@macintacos/caret 0.3.0 → 0.4.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/.claude-plugin/plugin.json +1 -1
- package/README.md +49 -14
- package/commands/discovery.md +1 -1
- package/dist/cli.js +1600 -200
- package/opencode/caret.plugin.ts +238 -14
- package/opencode/index.ts +8 -0
- package/package.json +10 -2
- package/ui/dist/assets/{angular-html-B6NJ8Crx.js → angular-html-kKPIob-B.js} +1 -1
- package/ui/dist/assets/{angular-ts-FdEJue4l.js → angular-ts-CKjP4O1R.js} +1 -1
- package/ui/dist/assets/{apl-8jCzQ5pt.js → apl-DCRQgCPD.js} +1 -1
- package/ui/dist/assets/{astro-D6Uv3Zd6.js → astro-BYbWYON5.js} +1 -1
- package/ui/dist/assets/{blade-DdLBtQgs.js → blade-CwhP_dxJ.js} +1 -1
- package/ui/dist/assets/{c-BtgVJzRT.js → c-CJEVusFw.js} +1 -1
- package/ui/dist/assets/{cobol-BOF3ihbS.js → cobol-DIBOqviT.js} +1 -1
- package/ui/dist/assets/{coffee-Br1deUOy.js → coffee-BS7TY60J.js} +1 -1
- package/ui/dist/assets/{cpp-BuRF7xA8.js → cpp-D1DVYlIO.js} +1 -1
- package/ui/dist/assets/{crystal-C2zE7OWx.js → crystal-1wNBwJ9X.js} +1 -1
- package/ui/dist/assets/{css-iBwOFG5O.js → css-DcRg7BqA.js} +1 -1
- package/ui/dist/assets/{dist-CtqCYfGw.js → dist-BPvuZVb2.js} +1 -1
- package/ui/dist/assets/{dist-C4FPvSXr.js → dist-BeSPrXBn.js} +1 -1
- package/ui/dist/assets/{dist-DIdA1vYB.js → dist-Bm-_E_MU.js} +1 -1
- package/ui/dist/assets/{dist-jmyqwp8P.js → dist-Buh6GXb2.js} +1 -1
- package/ui/dist/assets/{dist--moZHrIw.js → dist-C0x7GorT.js} +1 -1
- package/ui/dist/assets/{dist-Dm7ikdu5.js → dist-C2049AtS.js} +1 -1
- package/ui/dist/assets/{dist-zkfAcw6C.js → dist-C7ysmu-x.js} +1 -1
- package/ui/dist/assets/{dist-D2IYj7rL.js → dist-CA76eI1h.js} +1 -1
- package/ui/dist/assets/{dist-DhFSo_KF.js → dist-CZ-hU0oG.js} +1 -1
- package/ui/dist/assets/{dist-Diqv5yoL.js → dist-Cyz1Y8uV.js} +1 -1
- package/ui/dist/assets/{dist-DheG7L5T.js → dist-CzDZ2KMv.js} +1 -1
- package/ui/dist/assets/{dist-DXeIzOJW.js → dist-DBvtZoff.js} +1 -1
- package/ui/dist/assets/{dist-CDXacocg.js → dist-DNG5YE4w.js} +1 -1
- package/ui/dist/assets/{dist-DvWv2GjQ.js → dist-DPr7mnLy.js} +1 -1
- package/ui/dist/assets/{dist-DSFoRH4B.js → dist-Dhe__fm5.js} +1 -1
- package/ui/dist/assets/{dist-D0u8lgi2.js → dist-afCEYO1j.js} +1 -1
- package/ui/dist/assets/{dist-CsIQFmL2.js → dist-fAkxRpOI.js} +1 -1
- package/ui/dist/assets/{edge-C8C1WH_b.js → edge-DhG5RI3d.js} +1 -1
- package/ui/dist/assets/{elixir-ChioPNrw.js → elixir-k8JKnHNU.js} +1 -1
- package/ui/dist/assets/{elm-DrMVy3GL.js → elm-BCt58sPl.js} +1 -1
- package/ui/dist/assets/{erb-B3LvCl6V.js → erb-gEaFK19o.js} +1 -1
- package/ui/dist/assets/{git-rebase-Bv1Z90mV.js → git-rebase-PGNnuu_q.js} +1 -1
- package/ui/dist/assets/{glimmer-js-_Cj2ZxqT.js → glimmer-js-BShMa8kS.js} +1 -1
- package/ui/dist/assets/{glimmer-ts-eeir-ofz.js → glimmer-ts-BBjvNufU.js} +1 -1
- package/ui/dist/assets/{glsl-Zcj4mBmc.js → glsl-CVu5XUh6.js} +1 -1
- package/ui/dist/assets/{graphql-DcI0CImY.js → graphql-CpSUkXDO.js} +1 -1
- package/ui/dist/assets/{hack-CRMO6OEY.js → hack-vYYr_EuM.js} +1 -1
- package/ui/dist/assets/{haml-vpaJ2U9N.js → haml-aiyqEFS_.js} +1 -1
- package/ui/dist/assets/{handlebars-BmRnoKX5.js → handlebars-vKdd7ZE6.js} +1 -1
- package/ui/dist/assets/{html-CWopqLKh.js → html-BSDB9v3Y.js} +1 -1
- package/ui/dist/assets/{html-derivative-kjil5-1g.js → html-derivative-V8cBpxuT.js} +1 -1
- package/ui/dist/assets/{http-BsiD1_wo.js → http-DXSNVmLc.js} +1 -1
- package/ui/dist/assets/{hurl-BSOSzca8.js → hurl-eKV70JUb.js} +1 -1
- package/ui/dist/assets/{index-anQLM8ZA.js → index-C3YoPLgV.js} +4 -4
- package/ui/dist/assets/{java-B3dX7M_O.js → java-DGolWD2l.js} +1 -1
- package/ui/dist/assets/{javascript-FM1qUZzw.js → javascript-DcKrb1R6.js} +1 -1
- package/ui/dist/assets/{jinja-DVVPq-Qq.js → jinja-O0MduF1V.js} +1 -1
- package/ui/dist/assets/{jison-DZjXlKnT.js → jison-BGBc5HtG.js} +1 -1
- package/ui/dist/assets/{json-psWWRfU7.js → json-B-Q47BuG.js} +1 -1
- package/ui/dist/assets/{jsx-Bv0NBlC9.js → jsx-B__N5PZx.js} +1 -1
- package/ui/dist/assets/{julia-DRPZCNs5.js → julia-BfiIt3AD.js} +1 -1
- package/ui/dist/assets/{just-CznON7Md.js → just-CN940-eY.js} +1 -1
- package/ui/dist/assets/{latex-99tFYwaR.js → latex-wUKEeqEd.js} +1 -1
- package/ui/dist/assets/{liquid-8z3tzRYn.js → liquid-D2cnd1Ez.js} +1 -1
- package/ui/dist/assets/{lua-BZoKCS17.js → lua-BQiIdljT.js} +1 -1
- package/ui/dist/assets/{marko-BU9z-RZr.js → marko-BCqypbre.js} +1 -1
- package/ui/dist/assets/{mdc-C38yLzkY.js → mdc-105-eiCZ.js} +1 -1
- package/ui/dist/assets/{nginx-UMVInepI.js → nginx-C5dkaLo6.js} +1 -1
- package/ui/dist/assets/{nim-Du4jXclQ.js → nim-RJQN31Xa.js} +1 -1
- package/ui/dist/assets/{perl-CoEbwzPf.js → perl-DZkWjug_.js} +1 -1
- package/ui/dist/assets/{php-ubTDGUam.js → php-OoKYDxlw.js} +1 -1
- package/ui/dist/assets/{pug-Bmsmvvm7.js → pug-CDXuXfau.js} +1 -1
- package/ui/dist/assets/{qml-YXj-z032.js → qml-BSj8AX1e.js} +1 -1
- package/ui/dist/assets/{r-BNkIpWO8.js → r-DlO747T6.js} +1 -1
- package/ui/dist/assets/{razor-ZM--hAhl.js → razor-D1gVuaXL.js} +1 -1
- package/ui/dist/assets/{regexp-CHr2m78T.js → regexp-CGVqhulu.js} +1 -1
- package/ui/dist/assets/{rst-Xx0XAo8H.js → rst-DtURuW7a.js} +1 -1
- package/ui/dist/assets/{ruby-BWgyGqGH.js → ruby-Bc3kUlvr.js} +1 -1
- package/ui/dist/assets/{sas-CwTmTlh0.js → sas-CFQgZChj.js} +1 -1
- package/ui/dist/assets/{scss-DNgS20lR.js → scss-B8cq7hhb.js} +1 -1
- package/ui/dist/assets/{shellscript-Dkezxj03.js → shellscript-C_GHS-ym.js} +1 -1
- package/ui/dist/assets/{shellsession-D6yCCjOL.js → shellsession-CTplGpC8.js} +1 -1
- package/ui/dist/assets/{soy-lzhm7a9Y.js → soy-BgD_ErAN.js} +1 -1
- package/ui/dist/assets/{sql-Yo8AWGPM.js → sql-BnGnr4ii.js} +1 -1
- package/ui/dist/assets/{stata-D62k9gHq.js → stata-qCQsVpGc.js} +1 -1
- package/ui/dist/assets/{surrealql-qp-qEg-3.js → surrealql-BqH_LSaF.js} +1 -1
- package/ui/dist/assets/{svelte-DLztoC2n.js → svelte-Bu1vTtJQ.js} +1 -1
- package/ui/dist/assets/{templ-Cu6WsZcl.js → templ-B5jQzs9l.js} +1 -1
- package/ui/dist/assets/{tex-CqZU9zkk.js → tex-BJ-wZPSn.js} +1 -1
- package/ui/dist/assets/{ts-tags-ClqaCWh2.js → ts-tags-DuLm-TvJ.js} +1 -1
- package/ui/dist/assets/{tsx-Cj58ow-S.js → tsx-BPiBkGlY.js} +1 -1
- package/ui/dist/assets/{twig-CgaKnAdg.js → twig-CdQnHxAS.js} +1 -1
- package/ui/dist/assets/{typescript-CKElJ_dH.js → typescript-Dp_zdoqe.js} +1 -1
- package/ui/dist/assets/{vue-DtckUkhv.js → vue-BmKvlxSZ.js} +1 -1
- package/ui/dist/assets/{vue-html-Cqq7SmCi.js → vue-html-CizabNef.js} +1 -1
- package/ui/dist/assets/{vue-vine-Dp4BXiQa.js → vue-vine-JH1Msnx4.js} +1 -1
- package/ui/dist/assets/{xml-C3UNSSfc.js → xml-DW7DdZow.js} +1 -1
- package/ui/dist/assets/{xsl-BL_LCJsy.js → xsl-6zDkD8bR.js} +1 -1
- package/ui/dist/assets/{yaml-CD_CHV62.js → yaml-W1qZ5vOg.js} +1 -1
- package/ui/dist/index.html +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-kKPIob-B.js","assets/html-BSDB9v3Y.js","assets/css-DcRg7BqA.js","assets/javascript-DcKrb1R6.js","assets/angular-ts-CKjP4O1R.js","assets/scss-B8cq7hhb.js","assets/apl-DCRQgCPD.js","assets/json-B-Q47BuG.js","assets/xml-DW7DdZow.js","assets/java-DGolWD2l.js","assets/astro-BYbWYON5.js","assets/postcss-BXeXVLqQ.js","assets/tsx-BPiBkGlY.js","assets/typescript-Dp_zdoqe.js","assets/blade-CwhP_dxJ.js","assets/html-derivative-V8cBpxuT.js","assets/sql-BnGnr4ii.js","assets/bsl-BkkzgIyY.js","assets/sdbl-bTVj8UrX.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/cobol-DIBOqviT.js","assets/coffee-BS7TY60J.js","assets/cpp-D1DVYlIO.js","assets/glsl-CVu5XUh6.js","assets/c-CJEVusFw.js","assets/regexp-CGVqhulu.js","assets/crystal-1wNBwJ9X.js","assets/shellscript-C_GHS-ym.js","assets/edge-DhG5RI3d.js","assets/elixir-k8JKnHNU.js","assets/elm-BCt58sPl.js","assets/erb-gEaFK19o.js","assets/ruby-Bc3kUlvr.js","assets/graphql-CpSUkXDO.js","assets/jsx-B__N5PZx.js","assets/haml-aiyqEFS_.js","assets/lua-BQiIdljT.js","assets/yaml-W1qZ5vOg.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-C0sCabJj.js","assets/gdscript-Cp2uCuqX.js","assets/gdshader-CBce3t8t.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-PGNnuu_q.js","assets/glimmer-js-BShMa8kS.js","assets/glimmer-ts-BBjvNufU.js","assets/hack-vYYr_EuM.js","assets/handlebars-vKdd7ZE6.js","assets/http-DXSNVmLc.js","assets/hurl-eKV70JUb.js","assets/csv-Dx-8-gkx.js","assets/hxml-B0Qn7Nwc.js","assets/haxe-OTjmBuCE.js","assets/jinja-O0MduF1V.js","assets/jison-BGBc5HtG.js","assets/julia-BfiIt3AD.js","assets/r-DlO747T6.js","assets/just-CN940-eY.js","assets/perl-DZkWjug_.js","assets/latex-wUKEeqEd.js","assets/tex-BJ-wZPSn.js","assets/liquid-D2cnd1Ez.js","assets/marko-BCqypbre.js","assets/less-DVTAwKKz.js","assets/mdc-105-eiCZ.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-C5dkaLo6.js","assets/nim-RJQN31Xa.js","assets/php-OoKYDxlw.js","assets/pug-CDXuXfau.js","assets/qml-BSj8AX1e.js","assets/razor-D1gVuaXL.js","assets/csharp-oqKa8noW.js","assets/rst-DtURuW7a.js","assets/cmake-Bj61d0ZC.js","assets/sas-CFQgZChj.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-CTplGpC8.js","assets/soy-BgD_ErAN.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-qCQsVpGc.js","assets/surrealql-BqH_LSaF.js","assets/svelte-Bu1vTtJQ.js","assets/templ-B5jQzs9l.js","assets/go-rLFTqkRN.js","assets/ts-tags-DuLm-TvJ.js","assets/twig-CdQnHxAS.js","assets/vue-BmKvlxSZ.js","assets/vue-html-CizabNef.js","assets/vue-vine-JH1Msnx4.js","assets/stylus-B6D30XZt.js","assets/xsl-6zDkD8bR.js","assets/dockerfile-BLkNEvjs.js","assets/simple-mode-DRpGK0lJ.js","assets/factor-D7LVTn2l.js","assets/nsis-AQ_alPln.js","assets/pug-Bugr-47h.js","assets/javascript-9Tg8ixDm.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.defineProperty,t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=Array.isArray,i=Array.prototype.indexOf,a=Array.prototype.includes,o=Array.from,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,u=Object.prototype,d=Array.prototype,f=Object.getPrototypeOf,p=Object.isExtensible;function m(e){return typeof e==`function`}var h=()=>{};function g(e){for(var t=0;t<e.length;t++)e[t]()}function _(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var v=1<<24,y=1024,b=2048,x=4096,S=8192,ee=16384,C=32768,te=1<<25,ne=65536,re=1<<19,ie=1<<20,ae=1<<25,oe=65536,se=1<<21,ce=1<<22,le=1<<23,ue=Symbol(`$state`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),ge=Symbol(`text`),_e=Symbol(`form reset`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Se(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ce(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function we(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Te(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ee(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function De(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Oe(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},Pe=Symbol(`uninitialized`),Fe=`http://www.w3.org/1999/xhtml`,Ie=`http://www.w3.org/2000/svg`,Le=`http://www.w3.org/1998/Math/MathML`,Re=`@attach`;function ze(){console.warn(`https://svelte.dev/e/derived_inert`)}function Be(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ve(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function He(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Ue=!1;function We(e){Ue=e}var Ge;function Ke(e){if(e===null)throw Be(),Ne;return Ge=e}function qe(){return Ke(An(Ge))}function w(e){if(Ue){if(An(Ge)!==null)throw Be(),Ne;Ge=e}}function Je(e=1){if(Ue){for(var t=e,n=Ge;t--;)n=An(n);Ge=n}}function Ye(e=!0){for(var t=0,n=Ge;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=An(n);e&&n.remove(),n=i}}function Xe(e){if(!e||e.nodeType!==8)throw Be(),Ne;return e.data}function Ze(e){return e===this.v}function Qe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function $e(e){return!Qe(e,this.v)}var et=!1,tt=!1,nt=null;function rt(e){nt=e}function it(e){return lt(`getContext`).get(e)}function at(e,t){let n=lt(`setContext`);if(et){var r=xr.f;!vr&&r&32&&!nt.i||Oe()}return n.set(e,t),t}function ot(e){return lt(`hasContext`).has(e)}function st(){return lt(`getAllContexts`)}function T(e,t=!1,n){nt={p:nt,i:!1,c:null,e:null,s:e,x:null,r:xr,l:tt&&!t?{s:null,u:null,$:[]}:null}}function E(e){var t=nt,n=t.e;if(n!==null){t.e=null;for(var r of n)qn(r)}return e!==void 0&&(t.x=e),t.i=!0,nt=t.p,e??{}}function ct(){return!tt||nt!==null&&nt.l===null}function lt(e){return nt===null&&be(e),nt.c??=new Map(ut(nt)||void 0)}function ut(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var dt=[];function ft(){var e=dt;dt=[],g(e)}function pt(e){if(dt.length===0&&!jt){var t=dt;queueMicrotask(()=>{t===dt&&ft()})}dt.push(e)}function mt(){for(;dt.length>0;)ft()}function ht(e){var t=xr;if(t===null)return vr.f|=le,e;if(!(t.f&32768)&&!(t.f&4))throw e;gt(e,t)}function gt(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var _t=~(b|x|y);function vt(e,t){e.f=e.f&_t|t}function yt(e){e.f&512||e.deps===null?vt(e,y):vt(e,x)}function bt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=oe,bt(t.deps))}function xt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),bt(e.deps),vt(e,y)}var St=!1,Ct=!1;function wt(e){var t=Ct;try{return Ct=!1,[e(),Ct]}finally{Ct=t}}var Tt=null,Et=null,Dt=null,Ot=null,kt=null,At=null,jt=!1,Mt=!1,Nt=null,Pt=null,Ft=0,It=1,Lt=class e{id=It++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#r=new Set;#i=new Set;#a=new Set;#o=0;#s=new Map;#c=null;#l=[];#u=[];#d=new Set;#f=new Set;#p=new Map;#m=new Set;is_fork=!1;#h=!1;#g(){if(this.is_fork)return!0;for(let n of this.#s.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#p.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#p.has(e)||this.#p.set(e,{d:[],m:[]}),this.#m.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#p.get(e);if(n){this.#p.delete(e);for(var r of n.d)vt(r,b),t(r);for(r of n.m)vt(r,x),t(r)}this.#m.add(e)}#_(){if(this.#e=!0,Ft++>1e3&&(this.#w(),zt()),!this.#g()){for(let e of this.#d)this.#f.delete(e),vt(e,b),this.schedule(e);for(let e of this.#f)vt(e,x),this.schedule(e)}let t=this.#l;this.#l=[],this.apply();var n=Nt=[],r=[],i=Pt=[];for(let e of t)try{this.#v(e,n,r)}catch(t){throw Kt(e),t}if(Dt=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Nt=null,Pt=null,this.#g()){this.#x(r),this.#x(n);for(let[e,t]of this.#p)Gt(e,t);i.length>0&&Dt.#_();return}let o=this.#y();if(o){o.#b(this);return}this.#d.clear(),this.#f.clear();for(let e of this.#r)e(this);this.#r.clear(),Ot=this,Vt(r),Vt(n),Ot=null,this.#c?.resolve();var s=Dt;if(this.linked&&this.#o===0&&this.#w(),et&&!this.linked&&(this.#S(),Dt=s),this.#l.length>0){s===null&&(s=this,this.#C());let e=s;e.#l.push(...this.#l.filter(t=>!e.#l.includes(t)))}s!==null&&s.#_()}#v(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#p.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):et&&i&16777224?n.push(r):Pr(r)&&(i&16&&this.#f.add(r),zr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve)}let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#f.delete(i),vt(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#w(),Dt=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)xt(e[t],this.#d,this.#f)}capture(e,t,n=!1){e.v!==Pe&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),kt?.set(e,t)),this.is_fork||(e.v=t)}activate(){Dt=this}deactivate(){Dt=null,kt=null}flush(){try{Mt=!0,Dt=this,this.#_()}finally{Ft=0,At=null,Nt=null,Pt=null,Mt=!1,Dt=null,kt=null,fn.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear(),this.#a.clear(),this.#w()}register_created_effect(e){this.#u.push(e)}#S(){this.#w();for(let l=Tt;l!==null;l=l.#n){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=l.async_deriveds.get(e);n&&t.promise.then(n.resolve)}if(l.#e){var r=[...l.current.keys()].filter(e=>!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#m)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#x([e])});l.activate();var i=new Set,a=new Map;for(var o of t)Ht(o,r,i,a);a=new Map;var s=[...l.current.keys()].filter(e=>this.current.has(e)?this.current.get(e)[0]!==e.v:!0);if(s.length>0)for(let e of this.#u)!(e.f&155648)&&Ut(e,s,a)&&(e.f&4194320?(vt(e,b),l.schedule(e)):l.#d.add(e));if(l.#l.length>0&&!l.#h){l.apply();for(var c of l.#l)l.#v(c,[],[]);l.#l=[]}l.deactivate()}}}}increment(e,t){if(this.#o+=1,e){let e=this.#s.get(t)??0;this.#s.set(t,e+1)}}decrement(e,t){if(--this.#o,e){let e=this.#s.get(t)??0;e===1?this.#s.delete(t):this.#s.set(t,e-1)}this.#h||(this.#h=!0,pt(()=>{this.#h=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#d.add(t);for(let e of t)this.#f.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}on_fork_commit(e){this.#a.add(e)}run_fork_commit_callbacks(){for(let e of this.#a)e(this);this.#a.clear()}settled(){return(this.#c??=_()).promise}static ensure(){if(Dt===null){let t=Dt=new e;t.#C(),!Mt&&!jt&&pt(()=>{t.#e||t.flush()})}return Dt}apply(){if(!et||!this.is_fork&&this.#t===null&&this.#n===null){kt=null;return}kt=new Map;for(let[e,[t]]of this.current)kt.set(e,t);for(let t=Tt;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)kt.has(e)||kt.set(e,n)}}schedule(e){if(At=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Nt!==null&&t===xr&&(et||(vr===null||!(vr.f&2))&&!St))return;if(n&96){if(!(n&1024))return;t.f^=y}}this.#l.push(t)}#C(){Et===null?Tt=Et=this:(Et.#n=this,this.#t=Et),Et=this}#w(){var e=this.#t,t=this.#n;e===null?Tt=t:e.#n=t,t===null?Et=e:t.#t=e,this.linked=!1}};function Rt(e){var t=jt;jt=!0;try{var n;for(e&&(Dt!==null&&!Dt.is_fork&&Dt.flush(),n=e());;){if(mt(),Dt===null)return n;Dt.flush()}}finally{jt=t}}function zt(){try{Ee()}catch(e){gt(e,At)}}var Bt=null;function Vt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Pr(r)&&(Bt=new Set,zr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&cr(r),Bt?.size>0)){fn.clear();for(let e of Bt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Bt.has(n)&&(Bt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||zr(n)}}Bt.clear()}}Bt=null}}function Ht(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Ht(i,t,n,r):e&4194320&&!(e&2048)&&Ut(i,t,r)&&(vt(i,b),Wt(i))}}function Ut(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(a.call(t,r))return!0;if(r.f&2&&Ut(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Wt(e){Dt.schedule(e)}function Gt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),vt(e,y);for(var n=e.first;n!==null;)Gt(n,t),n=n.next}}function Kt(e){vt(e,y);for(var t=e.first;t!==null;)Kt(t),t=t.next}function qt(e){let t=0,n=mn(0),r;return()=>{Wn()&&(P(n),$n(()=>(t===0&&(r=Ur(()=>e(()=>vn(n)))),t+=1,()=>{pt(()=>{--t,t===0&&(r?.(),r=void 0,vn(n))})})))}}var Jt=ne|re;function Yt(e,t,n,r){new Xt(e,t,n,r)}var Xt=class{parent;is_pending=!1;transform_error;#e;#t=Ue?Ge:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=qt(()=>(this.#m=mn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=xr;t.b=this,t.f|=128,n(e)},this.parent=xr.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=er(()=>{if(Ue){let e=this.#t;qe();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Jt),Ue&&(this.#e=Ge)}#g(){try{this.#a=nr(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=nr(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=nr(()=>e(this.#e)),pt(()=>{var e=this.#c=document.createDocumentFragment(),t=On();e.append(t),this.#a=this.#x(()=>nr(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,lr(this.#o,()=>{this.#o=null}),this.#b(Dt))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=nr(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();pr(this.#a,e);let t=this.#n.pending;this.#o=nr(()=>t(this.#e))}else this.#b(Dt)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){xt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=xr,n=vr,r=nt;Sr(this.#i),br(this.#i),rt(this.#i.ctx);try{return Lt.ensure(),e()}catch(e){return ht(e),null}finally{Sr(t),br(n),rt(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&lr(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,pt(()=>{this.#d=!1,this.#m&&gn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),P(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;Dt?.is_fork?(this.#a&&Dt.skip_effect(this.#a),this.#o&&Dt.skip_effect(this.#o),this.#s&&Dt.skip_effect(this.#s),Dt.on_fork_commit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(or(this.#a),null),this.#o&&=(or(this.#o),null),this.#s&&=(or(this.#s),null),Ue&&(Ke(this.#t),Je(),Ke(Ye()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){He();return}r=!0,i&&Me(),this.#s!==null&&lr(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){gt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return nr(()=>{var t=xr;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return gt(e,this.#i.parent),null}}))};pt(()=>{var t;try{t=this.transform_error(e)}catch(e){gt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>gt(e,this.#i&&this.#i.parent)):o(t)})}};function Zt(e,t,n,r){let i=ct()?tn:an;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=xr,s=Qt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){if(!(o.f&16384)){s();try{r(e)}catch(e){gt(e,o)}$t()}}var u=en();if(n.length===0){c.then(()=>l(t.map(i))).finally(u);return}function d(){Promise.all(n.map(e=>rn(e))).then(e=>l([...t.map(i),...e])).catch(e=>gt(e,o)).finally(u)}c?c.then(()=>{s(),d(),$t()}):d()}function Qt(){var e=xr,t=vr,n=nt,r=Dt;return function(i=!0){Sr(e),br(t),rt(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function $t(e=!0){Sr(null),br(null),rt(null),e&&Dt?.deactivate()}function en(){var e=xr,t=e.b,n=Dt,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function tn(e){var t=2|b;return xr!==null&&(xr.f|=re),{ctx:nt,deps:null,effects:null,equals:Ze,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:xr,ac:null}}var nn=Symbol(`obsolete`);function rn(e,t,n){let r=xr;r===null&&xe();var i=void 0,a=mn(Pe),o=!vr,s=new Set;return Qn(()=>{var t=xr,n=_();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally($t)}catch(e){n.reject(e),$t()}var c=Dt;if(o){if(t.f&32768)var l=en();if(r.b.is_rendered())c.async_deriveds.get(t)?.reject(nn);else for(let e of s.values())e.reject(nn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==nn&&(c.activate(),t?(a.f|=le,gn(a,t)):(a.f&8388608&&(a.f^=le),gn(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Gn(()=>{for(let e of s)e.reject(nn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function D(e){let t=tn(e);return et||wr(t),t}function an(e){let t=tn(e);return t.equals=$e,t}function on(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)or(t[n])}}function sn(e){var t,n=xr,r=e.parent;if(!gr&&r!==null&&e.v!==Pe&&r.f&24576)return ze(),e.v;Sr(r);try{e.f&=~oe,on(e),t=Ir(e)}finally{Sr(n)}return t}function cn(e){var t=sn(e);if(!e.equals(t)&&(e.wv=Nr(),(!Dt?.is_fork||e.deps===null)&&(Dt===null?e.v=t:(Dt.capture(e,t,!0),Ot?.capture(e,t,!0)),e.deps===null))){vt(e,y);return}gr||(kt===null?yt(e):(Wn()||Dt?.is_fork)&&kt.set(e,t))}function ln(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ve),t.fn!==null&&(t.teardown=h),t.ac=null,Rr(t,0),ir(t))}function un(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&zr(t)}var dn=new Set,fn=new Map,pn=!1;function mn(e,t){return{f:0,v:e,reactions:null,equals:Ze,rv:0,wv:0}}function O(e,t){let n=mn(e,t);return wr(n),n}function hn(e,t=!1,n=!0){let r=mn(e);return t||(r.equals=$e),tt&&n&&nt!==null&&nt.l!==null&&(nt.l.s??=[]).push(r),r}function k(e,t,n=!1){return vr!==null&&(!yr||vr.f&131072)&&ct()&&vr.f&4325394&&(Cr===null||!a.call(Cr,e))&&je(),gn(e,n?bn(t):t,Pt)}function gn(e,t,n=null){if(!e.equals(t)){fn.set(e,gr?t:e.v);var r=Lt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&sn(t),kt===null&&yt(t)}e.wv=Nr(),yn(e,b,n),ct()&&xr!==null&&xr.f&1024&&!(xr.f&96)&&(Dr===null?Or([e]):Dr.push(e)),!r.is_fork&&dn.size>0&&!pn&&_n()}return t}function _n(){pn=!1;for(let e of dn){e.f&1024&&vt(e,x);let t;try{t=Pr(e)}catch{t=!0}t&&zr(e)}dn.clear()}function vn(e){k(e,e.v+1)}function yn(e,t,n){var r=e.reactions;if(r!==null)for(var i=ct(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===xr)){var l=(c&b)===0;if(l&&vt(s,t),c&131072)dn.add(s);else if(c&2){var u=s;kt?.delete(u),c&65536||(c&512&&(xr===null||!(xr.f&2097152))&&(s.f|=oe),yn(u,x,n))}else if(l){var d=s;c&16&&Bt!==null&&Bt.add(d),n===null?Wt(d):n.push(d)}}}}function bn(e){if(typeof e!=`object`||!e||ue in e)return e;let t=f(e);if(t!==u&&t!==d)return e;var n=new Map,i=r(e),a=O(0),o=null,s=jr,l=e=>{if(jr===s)return e();var t=vr,n=jr;br(null),Mr(s);var r=e();return br(t),Mr(n),r};return i&&n.set(`length`,O(e.length,o)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&ke();var i=n.get(t);return i===void 0?l(()=>{var e=O(r.value,o);return n.set(t,e),e}):k(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=l(()=>O(Pe,o));n.set(t,e),vn(a)}}else k(r,Pe),vn(a);return!0},get(t,r,i){if(r===ue)return e;var a=n.get(r),s=r in t;if(a===void 0&&(!s||c(t,r)?.writable)&&(a=l(()=>O(bn(s?t[r]:Pe),o)),n.set(r,a)),a!==void 0){var u=P(a);return u===Pe?void 0:u}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=P(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==Pe)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===ue)return!0;var r=n.get(t),i=r!==void 0&&r.v!==Pe||Reflect.has(e,t);return(r!==void 0||xr!==null&&(!i||c(e,t)?.writable))&&(r===void 0&&(r=l(()=>O(i?bn(e[t]):Pe,o)),n.set(t,r)),P(r)===Pe)?!1:i},set(e,t,r,s){var u=n.get(t),d=t in e;if(i&&t===`length`)for(var f=r;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=l(()=>O(Pe,o)),n.set(f+``,p)):k(p,Pe)}if(u===void 0)(!d||c(e,t)?.writable)&&(u=l(()=>O(void 0,o)),k(u,bn(r)),n.set(t,u));else{d=u.v!==Pe;var m=l(()=>bn(r));k(u,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,r),!d){if(i&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&k(g,_+1)}vn(a)}return!0},ownKeys(e){P(a);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==Pe});for(var[r,i]of n)i.v!==Pe&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ae()}})}function xn(e){try{if(typeof e==`object`&&e&&ue in e)return e[ue]}catch{}return e}function Sn(e,t){return Object.is(xn(e),xn(t))}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var Cn,wn,Tn,En;function Dn(){if(Cn===void 0){Cn=window,wn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Tn=c(t,`firstChild`).get,En=c(t,`nextSibling`).get,p(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),p(n)&&(n[ge]=void 0)}}function On(e=``){return document.createTextNode(e)}function kn(e){return Tn.call(e)}function An(e){return En.call(e)}function A(e,t){if(!Ue)return kn(e);var n=kn(Ge);if(n===null)n=Ge.appendChild(On());else if(t&&n.nodeType!==3){var r=On();return n?.before(r),Ke(r),r}return t&&Pn(n),Ke(n),n}function j(e,t=!1){if(!Ue){var n=kn(e);return n instanceof Comment&&n.data===``?An(n):n}if(t){if(Ge?.nodeType!==3){var r=On();return Ge?.before(r),Ke(r),r}Pn(Ge)}return Ge}function M(e,t=1,n=!1){let r=Ue?Ge:e;for(var i;t--;)i=r,r=An(r);if(!Ue)return r;if(n){if(r?.nodeType!==3){var a=On();return r===null?i?.after(a):r.before(a),Ke(a),a}Pn(r)}return Ke(r),r}function jn(e){e.textContent=``}function Mn(){return!et||Bt!==null?!1:(xr.f&C)!==0}function Nn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function Pn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Fn(e,t){if(t){let t=document.body;e.autofocus=!0,pt(()=>{document.activeElement===t&&e.focus()})}}function In(e){Ue&&kn(e)!==null&&jn(e)}var Ln=!1;function Rn(){Ln||(Ln=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[_e]?.()})},{capture:!0}))}function zn(e){var t=vr,n=xr;br(null),Sr(null);try{return e()}finally{br(t),Sr(n)}}function Bn(e,t,n,r=n){e.addEventListener(t,()=>zn(n));let i=e[_e];i?e[_e]=()=>{i(),r(!0)}:e[_e]=()=>r(!0),Rn()}function Vn(e){xr===null&&(vr===null&&Te(e),we()),gr&&Ce(e)}function Hn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Un(e,t){var n=xr;n!==null&&n.f&8192&&(e|=S);var r={ctx:nt,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Dt?.register_created_effect(r);var i=r;if(e&4)Nt===null?Lt.ensure().schedule(r):Nt.push(r);else if(t!==null){try{zr(r)}catch(e){throw or(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ne))}if(i!==null&&(i.parent=n,n!==null&&Hn(i,n),vr!==null&&vr.f&2&&!(e&64))){var a=vr;(a.effects??=[]).push(i)}return r}function Wn(){return vr!==null&&!yr}function Gn(e){let t=Un(8,null);return vt(t,y),t.teardown=e,t}function Kn(e){Vn(`$effect`);var t=xr.f;if(!vr&&t&32&&!(t&32768)){var n=nt;(n.e??=[]).push(e)}else return qn(e)}function qn(e){return Un(4|ie,e)}function Jn(e){return Vn(`$effect.pre`),Un(8|ie,e)}function Yn(e){Lt.ensure();let t=Un(64|re,e);return()=>{or(t)}}function Xn(e){Lt.ensure();let t=Un(64|re,e);return(e={})=>new Promise(n=>{e.outro?lr(t,()=>{or(t),n(void 0)}):(or(t),n(void 0))})}function Zn(e){return Un(4,e)}function Qn(e){return Un(ce|re,e)}function $n(e,t=0){return Un(8|t,e)}function N(e,t=[],n=[],r=[]){Zt(r,t,n,t=>{Un(8,()=>e(...t.map(P)))})}function er(e,t=0){return Un(16|t,e)}function tr(e,t=0){return Un(v|t,e)}function nr(e){return Un(32|re,e)}function rr(e){var t=e.teardown;if(t!==null){let e=gr,n=vr;_r(!0),br(null);try{t.call(null)}finally{_r(e),br(n)}}}function ir(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&zn(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:or(n,t),n=r}}function ar(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||or(t),t=n}}function or(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(sr(e.nodes.start,e.nodes.end),n=!0),vt(e,te),ir(e,t&&!n),Rr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();rr(e),e.f^=te,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&cr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function sr(e,t){for(;e!==null;){var n=e===t?null:An(e);e.remove(),e=n}}function cr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function lr(e,t,n=!0){var r=[];ur(e,r,!0);var i=()=>{n&&or(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function ur(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;ur(i,t,o?n:!1)}i=a}}}function dr(e){fr(e,!0)}function fr(e,t){if(e.f&8192){e.f^=S,e.f&1024||(vt(e,b),Lt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;fr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function pr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:An(n);t.append(n),n=i}}var mr=null,hr=!1,gr=!1;function _r(e){gr=e}var vr=null,yr=!1;function br(e){vr=e}var xr=null;function Sr(e){xr=e}var Cr=null;function wr(e){vr!==null&&(!et||vr.f&2)&&(Cr===null?Cr=[e]:Cr.push(e))}var Tr=null,Er=0,Dr=null;function Or(e){Dr=e}var kr=1,Ar=0,jr=Ar;function Mr(e){jr=e}function Nr(){return++kr}function Pr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~oe),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Pr(a)&&cn(a),a.wv>e.wv)return!0}t&512&&kt===null&&vt(e,y)}return!1}function Fr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!et&&Cr!==null&&a.call(Cr,e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&2?Fr(o,t,!1):t===o&&(n?vt(o,b):o.f&1024&&vt(o,x),Wt(o))}}function Ir(e){var t=Tr,n=Er,r=Dr,i=vr,a=Cr,o=nt,s=yr,c=jr,l=e.f;Tr=null,Er=0,Dr=null,vr=l&96?null:e,Cr=null,rt(e.ctx),yr=!1,jr=++Ar,e.ac!==null&&(zn(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=se;var u=e.fn,d=u();e.f|=C;var f=e.deps,p=Dt?.is_fork;if(Tr!==null){var m;if(p||Rr(e,Er),f!==null&&Er>0)for(f.length=Er+Tr.length,m=0;m<Tr.length;m++)f[Er+m]=Tr[m];else e.deps=f=Tr;if(Wn()&&e.f&512)for(m=Er;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Er<f.length&&(Rr(e,Er),f.length=Er);if(ct()&&Dr!==null&&!yr&&f!==null&&!(e.f&6146))for(m=0;m<Dr.length;m++)Fr(Dr[m],e);if(i!==null&&i!==e){if(Ar++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Ar;if(t!==null)for(let e of t)e.rv=Ar;Dr!==null&&(r===null?r=Dr:r.push(...Dr))}return e.f&8388608&&(e.f^=le),d}catch(e){return ht(e)}finally{e.f^=se,Tr=t,Er=n,Dr=r,vr=i,Cr=a,rt(o),yr=s,jr=c}}function Lr(e,t){let n=t.reactions;if(n!==null){var r=i.call(n,e);if(r!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[r]=n[o],n.pop())}}if(n===null&&t.f&2&&(Tr===null||!a.call(Tr,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~oe),s.v!==Pe&&yt(s),ln(s),Rr(s,0)}}function Rr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Lr(e,n[r])}function zr(e){var t=e.f;if(!(t&16384)){vt(e,y);var n=xr,r=hr;xr=e,hr=!0;try{t&16777232?ar(e):ir(e),rr(e);var i=Ir(e);e.teardown=typeof i==`function`?i:null,e.wv=kr}finally{hr=r,xr=n}}}async function Br(){if(et)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Rt()}function P(e){var t=(e.f&2)!=0;if(mr?.add(e),vr!==null&&!yr&&!(xr!==null&&xr.f&16384)&&(Cr===null||!a.call(Cr,e))){var n=vr.deps;if(vr.f&2097152)e.rv<Ar&&(e.rv=Ar,Tr===null&&n!==null&&n[Er]===e?Er++:Tr===null?Tr=[e]:Tr.push(e));else{vr.deps??=[],a.call(vr.deps,e)||vr.deps.push(e);var r=e.reactions;r===null?e.reactions=[vr]:a.call(r,vr)||r.push(vr)}}if(gr&&fn.has(e))return fn.get(e);if(t){var i=e;if(gr){var o=i.v;return(!(i.f&1024)&&i.reactions!==null||Hr(i))&&(o=sn(i)),fn.set(i,o),o}var s=(i.f&512)==0&&!yr&&vr!==null&&(hr||(vr.f&512)!=0),c=(i.f&C)===0;Pr(i)&&(s&&(i.f|=512),cn(i)),s&&!c&&(un(i),Vr(i))}if(kt?.has(e))return kt.get(e);if(e.f&8388608)throw e.v;return e.v}function Vr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(un(t),Vr(t))}function Hr(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(fn.has(t)||t.f&2&&Hr(t))return!0;return!1}function Ur(e){var t=yr;try{return yr=!0,e()}finally{yr=t}}function Wr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(ue in e)Gr(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&ue in n&&Gr(n)}}}function Gr(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Gr(e[n],t)}catch{}let n=f(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=l(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function Kr(){return Symbol(Re)}function qr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Jr=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Yr(e){return Jr.includes(e)}var Xr=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Zr={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Qr(e){return e=e.toLowerCase(),Zr[e]??e}[...Xr];var $r=[`touchstart`,`touchmove`];function ei(e){return $r.includes(e)}var ti=[`textarea`,`script`,`style`,`title`];function ni(e){return ti.includes(e)}var ri=Symbol(`events`),ii=new Set,ai=new Set;function oi(e,t,n,r={}){function i(e){if(r.capture||fi.call(t,e),!e.cancelBubble)return zn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?pt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function si(e,t,n,r={}){var i=oi(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function ci(e,t,n,r,i){var a={capture:r,passive:i},o=oi(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Gn(()=>{t.removeEventListener(e,o,a)})}function li(e,t,n){(t[ri]??={})[e]=n}function ui(e){for(var t=0;t<e.length;t++)ii.add(e[t]);for(var n of ai)n(e)}var di=null;function fi(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;di=e;var o=0,c=di===e&&e[ri];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[ri]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(o=l)}if(a=i[o]||e.target,a!==t){s(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=vr,f=xr;br(null),Sr(null);try{for(var p,m=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[ri]?.[r];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble||h===t||h===null)break;a=h}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[ri]=t,delete e.currentTarget,br(d),Sr(f)}}}var pi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function mi(e){return pi?.createHTML(e)??e}function hi(e){var t=Nn(`template`);return t.innerHTML=mi(e.replaceAll(`<!>`,`<!---->`)),t.content}function gi(e,t){var n=xr;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(Ue)return gi(Ge,null),Ge;i===void 0&&(i=hi(a?e:`<!>`+e),n||(i=kn(i)));var t=r||wn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=kn(t),s=t.lastChild;gi(o,s)}else gi(t,t);return t}}function _i(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(Ue)return gi(Ge,null),Ge;if(!o){var e=kn(hi(a));if(i)for(o=document.createDocumentFragment();kn(e);)o.appendChild(kn(e));else o=kn(e)}var t=o.cloneNode(!0);if(i){var n=kn(t),r=t.lastChild;gi(n,r)}else gi(t,t);return t}}function vi(e,t){return _i(e,t,`svg`)}function yi(e=``){if(!Ue){var t=On(e+``);return gi(t,t),t}var n=Ge;return n.nodeType===3?Pn(n):(n.before(n=On()),Ke(n)),gi(n,n),n}function I(){if(Ue)return gi(Ge,null),Ge;var e=document.createDocumentFragment(),t=document.createComment(``),n=On();return e.append(t,n),gi(t,n),e}function L(e,t){if(Ue){var n=xr;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ge),qe();return}e!==null&&e.before(t)}function bi(){if(Ue&&Ge&&Ge.nodeType===8&&Ge.textContent?.startsWith(`$`)){let e=Ge.textContent.substring(1);return qe(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function R(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function xi(e,t){return Ci(e,t)}var Si=new Map;function Ci(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:s=!0,transformError:c}){Dn();var l=void 0,u=Xn(()=>{var s=n??t.appendChild(On());Yt(s,{pending:()=>{}},t=>{T({});var n=nt;if(a&&(n.c=a),i&&(r.$$events=i),Ue&&gi(t,null),l=e(t,r)||{},Ue&&(xr.nodes.end=Ge,Ge===null||Ge.nodeType!==8||Ge.data!==`]`))throw Be(),Ne;E()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=ei(r);for(let e of[t,document]){var a=Si.get(e);a===void 0&&(a=new Map,Si.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,fi,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(o(ii)),ai.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=Si.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,fi),r.delete(e),r.size===0&&Si.delete(n)):r.set(e,i)}ai.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return wi.set(l,u),l}var wi=new WeakMap;function Ti(e,t){let n=wi.get(e);return n?(wi.delete(e),n(t)):Promise.resolve()}var Ei=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)dr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(or(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();pr(r,t),t.append(On()),this.#n.set(e,{effect:r,fragment:t})}else or(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),lr(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(or(n.effect),this.#n.delete(e))};ensure(e,t){var n=Dt,r=Mn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=On();i.append(a),this.#n.set(e,{effect:nr(()=>t(a)),fragment:i})}else this.#t.set(e,nr(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else Ue&&(this.anchor=Ge),this.#a(n)}};function z(e,t,n=!1){var r;Ue&&(r=Ge,qe());var i=new Ei(e),a=n?ne:0;function o(e,t){if(Ue){var n=Xe(r);if(e!==parseInt(n.substring(1))){var a=Ye();Ke(a),i.anchor=a,We(!1),i.ensure(e,t),We(!0);return}}i.ensure(e,t)}er(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Di=Symbol(`NaN`);function Oi(e,t,n){Ue&&qe();var r=new Ei(e),i=!ct();er(()=>{var e=t();e!==e&&(e=Di),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function ki(e,t){return t}function Ai(e,t,n){for(var r=[],i=t.length,a,s=t.length,c=0;c<i;c++){let n=t[c];lr(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;ji(e,o(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --s},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;jn(d),d.append(u),e.items.clear()}ji(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function ji(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ae,pr(a,document.createDocumentFragment())):or(t[i],n)}}var Mi;function Ni(e,t,n,i,a,s=null){var c=e,l=new Map;if(t&4){var u=e;c=Ue?Ke(kn(u)):u.appendChild(On())}Ue&&qe();var d=null,f=an(()=>{var e=n();return r(e)?e:e==null?[]:o(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Fi(v,p,c,t,i),d!==null&&(p.length===0?d.f&33554432?(d.f^=ae,Li(d,null,c)):dr(d):lr(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:er(()=>{p=P(f);var e=p.length;let r=!1;Ue&&Xe(c)===`[!`!=(e===0)&&(c=Ye(),Ke(c),We(!1),r=!0);for(var o=new Set,u=Dt,v=Mn(),y=0;y<e;y+=1){Ue&&Ge.nodeType===8&&Ge.data===`]`&&(c=Ge,r=!0,We(!1));var b=p[y],x=i(b,y),S=h?null:l.get(x);S?(S.v&&gn(S.v,b),S.i&&gn(S.i,y),v&&u.unskip_effect(S.e)):(S=Ii(l,h?c:Mi??=On(),b,x,y,a,t,n),h||(S.e.f|=ae),l.set(x,S)),o.add(x)}if(e===0&&s&&!d&&(h?d=nr(()=>s(c)):(d=nr(()=>s(Mi??=On())),d.f|=ae)),e>o.size&&Se(``,``,``),Ue&&e>0&&Ke(Ye()),!h)if(m.set(u,o),v){for(let[e,t]of l)o.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);r&&We(!0),P(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,Ue&&(c=Ge)}function Pi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Fi(e,t,n,r,i){var a=(r&8)!=0,s=t.length,c=e.items,l=Pi(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<s;v+=1)h=t[v],g=i(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=i(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(dr(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ae,_===l)Li(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ri(e,d,_),Ri(e,_,y),Li(_,y,n),d=_,p=[],m=[],l=Pi(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Li(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ri(e,S.prev,ee.next),Ri(e,d,S),Ri(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Li(_,l,n),Ri(e,_.prev,_.next),Ri(e,_,d===null?e.effect.first:d.next),Ri(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Pi(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Pi(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(ji(e,o(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var C=[];if(u!==void 0)for(_ of u)_.f&8192||C.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&C.push(l),l=Pi(l.next);var te=C.length;if(te>0){var ne=r&4&&s===0?n:null;if(a){for(v=0;v<te;v+=1)C[v].nodes?.a?.measure();for(v=0;v<te;v+=1)C[v].nodes?.a?.fix()}Ai(e,C,ne)}}a&&pt(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Ii(e,t,n,r,i,a,o,s){var c=o&1?o&16?mn(n):hn(n,!1,!1):null,l=o&2?mn(i):null;return{v:c,i:l,e:nr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Li(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=An(r);if(a.before(r),r===i)return;r=o}}function Ri(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function zi(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;Ue&&(o=Ke(kn(c)))}N(()=>{var e=xr;if(s===(s=t()??``)){Ue&&qe();return}if(n&&!Ue){e.nodes=null,c.innerHTML=s,s!==``&&gi(kn(c),c.lastChild);return}if(e.nodes!==null&&(sr(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(Ue){for(var a=Ge.data,l=qe(),u=l;l!==null&&(l.nodeType!==8||l.data!==``);)u=l,l=An(l);if(l===null)throw Be(),Ne;gi(Ge,u),o=Ke(l);return}var d=Nn(r?`svg`:i?`math`:`template`,r?Ie:i?Le:void 0);d.innerHTML=s;var f=r||i?d:d.content;if(gi(kn(f),f.lastChild),r||i)for(;kn(f);)o.before(kn(f));else o.before(f)}})}function B(e,t,...n){var r=new Ei(e);er(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ne)}function V(e,t,n){var r;Ue&&(r=Ge,qe());var i=new Ei(e);er(()=>{var e=t()??null;if(Ue&&Xe(r)===`[`!=(e!==null)){var a=Ye();Ke(a),i.anchor=a,We(!1),i.ensure(e,e&&(t=>n(t,e))),We(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ne)}function Bi(e,t,n,r,i,a){let o=Ue;Ue&&qe();var s=null;Ue&&Ge.nodeType===1&&(s=Ge,qe());var c=Ue?Ge:e,l=new Ei(c,!1);er(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Ie:void 0;if(e===null){l.ensure(null,null);return}return l.ensure(e,t=>{if(e){if(s=Ue?s:Nn(e,a),gi(s,s),r){Ue&&ni(e)&&s.append(document.createComment(``));var n=Ue?kn(s):s.appendChild(On());Ue&&(n===null?We(!1):Ke(n)),r(s,n)}xr.nodes.end=s,t.before(s)}Ue&&Ke(t)}),()=>{}},ne),Gn(()=>{}),o&&(We(!0),Ke(c))}function Vi(e,t,n){Zn(()=>{var r=Ur(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};$n(()=>{var e=n();Wr(e),i&&Qe(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Hi(e,t){var n=void 0,r;tr(()=>{n!==(n=t())&&(r&&=(or(r),null),n&&(r=nr(()=>{Zn(()=>n(e))})))})}function Ui(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ui(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Wi(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ui(e))&&(r&&(r+=` `),r+=t);return r}function Gi(e){return typeof e==`object`?Wi(e):e??``}var Ki=[...`
|
|
3
3
|
\r\f\xA0\v`];function qi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ki.includes(r[o-1]))&&(s===r.length||Ki.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Ji(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Yi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Xi(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Yi)),i&&c.push(...Object.keys(i).map(Yi));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Yi(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Ji(r)),i&&(n+=Ji(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Zi(e,t,n,r,i,a){var o=e[me];if(Ue||o!==n||o===void 0){var s=qi(n,r,a);(!Ue||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Qi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function $i(e,t,n,r){var i=e[he];if(Ue||i!==t){var a=Xi(t,r);(!Ue||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=t}else r&&(Array.isArray(r)?(Qi(e,n?.[0],r[0]),Qi(e,n?.[1],r[1],`important`)):Qi(e,n,r));return r}function ea(e,t,n=!1){if(e.multiple){if(t==null)return;if(!r(t))return Ve();for(var i of e.options)i.selected=t.includes(na(i));return}for(i of e.options)if(Sn(na(i),t)){i.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function ta(e){var t=new MutationObserver(()=>{ea(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Gn(()=>{t.disconnect()})}function na(e){return`__value`in e?e.__value:e.value}var ra=Symbol(`class`),ia=Symbol(`style`),aa=Symbol(`is custom element`),oa=Symbol(`is html`),sa=ye?`link`:`LINK`,ca=ye?`input`:`INPUT`,la=ye?`option`:`OPTION`,ua=ye?`select`:`SELECT`;function da(e){if(Ue){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;pa(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;pa(e,`checked`,null),e.checked=r}}};e[_e]=n,pt(n),Rn()}}function fa(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function pa(e,t,n,r){var i=ga(e);Ue&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===sa)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&va(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ma(e,t,n,r,i=!1,a=!1){if(Ue&&i&&e.nodeName===ca){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||da(o)}var s=ga(e),c=s[aa],l=!s[oa];let u=Ue&&c;u&&We(!1);var d=t||{},f=e.nodeName===la;for(var p in t)p in n||(n[p]=null);n.class?n.class=Gi(n.class):(r||n[ra])&&(n.class=null),n[ia]&&(n.style??=null);var m=va(e);for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){Zi(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[ra],n[ra]),d[i]=o,d[ra]=n[ra];continue}if(i===`style`){$i(e,o,t?.[ia],n[ia]),d[i]=o,d[ia]=n[ia];continue}var h=d[i];if(!(o===h&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var g=i[0]+i[1];if(g!==`$$`)if(g===`on`){let t={},n=`$$`+i,r=i.slice(2);var _=Yr(r);if(qr(r)&&(r=r.slice(0,-7),t.capture=!0),!_&&h){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(_)li(r,e,o),ui([r]);else if(o!=null){function a(e){d[i].call(this,e)}d[n]=oi(r,e,a,t)}}else if(i===`style`)pa(e,i,o);else if(i===`autofocus`)Fn(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)fa(e,o);else{var v=i;l||(v=Qr(v));var y=v===`defaultValue`||v===`defaultChecked`;if(o==null&&!c&&!y)if(s[i]=null,v===`value`||v===`checked`){let n=e,r=t===void 0;if(v===`value`){let e=n.defaultValue;n.removeAttribute(v),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(v),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else y||m.includes(v)&&(c||typeof o!=`string`)?(e[v]=o,v in s&&(s[v]=Pe)):typeof o!=`function`&&pa(e,v,o,a)}}}return u&&We(!0),d}function ha(e,t,n=[],r=[],i=[],a,o=!1,s=!1){Zt(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===ua,l=!1;if(tr(()=>{var u=t(...n.map(P)),d=ma(e,r,u,a,o,s);l&&c&&`value`in u&&ea(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||or(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&or(i[t]),i[t]=nr(()=>Hi(e,()=>f))),d[t]=f}r=d}),c){var u=e;Zn(()=>{ea(u,r.value,!0),ta(u)})}l=!0})}function ga(e){return e[pe]??={[aa]:e.nodeName.includes(`-`),[oa]:e.namespaceURI===Fe}}var _a=new Map;function va(e){var t=e.getAttribute(`is`)||e.nodeName,n=_a.get(t);if(n)return n;_a.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=l(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=f(i)}return n}function ya(e,t,n=t){var r=new WeakSet;Bn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=ba(e)?xa(a):a,n(a),Dt!==null&&r.add(Dt),await Br(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Ue&&e.defaultValue!==e.value||Ur(t)==null&&e.value)&&(n(ba(e)?xa(e.value):e.value),Dt!==null&&r.add(Dt)),$n(()=>{var n=t();if(e===document.activeElement){var i=et?Ot:Dt;if(r.has(i))return}ba(e)&&n===xa(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function ba(e){var t=e.type;return t===`number`||t===`range`}function xa(e){return e===``?null:+e}function Sa(e,t,n=t){Bn(e,`change`,()=>{n(e.files)}),Ue&&e.files&&n(e.files),$n(()=>{e.files=t()})}function Ca(e,t){return e===t||e?.[ue]===t}function wa(e={},t,n,r){var i=nt.r,a=xr;return Zn(()=>{var o,s;return $n(()=>{o=s,s=r?.()||[],Ur(()=>{Ca(n(...s),e)||(t(e,...s),o&&Ca(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Ca(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Ta={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function H(e,t,n){return new Proxy({props:e,exclude:t},Ta)}var Ea={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(m(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];m(i)&&(i=i());let a=c(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(m(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=c(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===ue||t===de)return!1;for(let n of e.props)if(m(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(m(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function U(...e){return new Proxy({props:e},Ea)}function W(e,t,n,r){var i=!tt||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,l=!0,u=void 0,d=()=>o&&i?(u??=tn(r),P(u)):(l&&(l=!1,s=o?Ur(r):r),s);let f;if(a){var p=ue in e||de in e;f=c(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=wt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&De(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?tn:an)(()=>(v=!1,g()));a&&P(y);var b=xr;return(function(e,t){if(arguments.length>0){let n=t?P(y):i&&a?bn(e):e;return k(y,n),v=!0,s!==void 0&&(s=n),e}return gr&&v||b.f&16384?y.v:P(y)})}function Da(e){nt===null&&be(`onMount`),tt&&nt.l!==null?ka(nt).m.push(e):Kn(()=>{let t=Ur(e);if(typeof t==`function`)return t})}function Oa(e){nt===null&&be(`onDestroy`),Da(()=>()=>Ur(e))}function ka(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var Aa=`<redacted>`,ja=new Set([`plan`,`prompt`,`feedback`]);function Ma(e,t){return Na(e,t,0,new WeakSet)}function Na(e,t,n,r){if(typeof e==`string`)return t?t(e):e;if(typeof e!=`object`||!e)return e;if(r.has(e))return`<cyclic>`;if(n>=6)return`<depth-capped>`;r.add(e);let i;if(Array.isArray(e))i=e.map(e=>Na(e,t,n+1,r));else{let a={};for(let[i,o]of Object.entries(e))a[i]=ja.has(i)?Aa:Na(o,t,n+1,r);i=a}return r.delete(e),i}function Pa(e){return e.slice(0,8)}var Fa=/^[a-z][a-z0-9-]{0,31}$/,Ia=100,La=20,Ra=5e3;function za(e){try{e()}catch{}}function Ba(e){return Ma(e)}var Va=[];function Ha(e){Va.push(e),Va.length>Ia&&Va.shift(),Va.length>=La&&Ua()}function Ua(e){za(()=>{if(Va.length===0)return;let t=Va;Va=[],fetch(`/api/logs`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({events:t}),keepalive:e?.keepalive??!1}).catch(()=>{})})}function Wa(e,t,n,r){za(()=>{let i=Fa.test(t)?t:`ui`,a=n.slice(0,256),o=Array.isArray(r)?{value:r}:r,s=o===void 0?void 0:Ba(o);Ha({level:e,step:i,msg:a,...s===void 0?{}:{extra:s}})})}var Ga={debug:(e,t,n)=>Wa(`debug`,e,t,n),info:(e,t,n)=>Wa(`info`,e,t,n),warn:(e,t,n)=>Wa(`warn`,e,t,n),error(e,t,n){Wa(`error`,e,t instanceof Error?t.message:String(t),n)}};function Ka(){let e=setInterval(()=>Ua(),Ra),t=()=>Ua({keepalive:!0});return window.addEventListener(`pagehide`,t),()=>{clearInterval(e),window.removeEventListener(`pagehide`,t)}}var qa=class extends Error{status;constructor(e){super(`HTTP ${e}`),this.status=e,this.name=`HttpError`}};async function Ja(e){if(!e.ok)throw new qa(e.status);return await e.json()}async function Ya(){try{return await Ja(await fetch(`/api/health`))}catch(e){throw Ga.warn(`request`,`health probe failed`,{reason:String(e)}),e}}async function Xa(){try{let{approveMode:e}=await Ja(await fetch(`/api/prefs`));return e}catch(e){throw Ga.warn(`prefs`,`approve mode read failed`,{reason:String(e)}),e}}async function Za(){return Ja(await fetch(`/api/reviews`))}async function Qa(e,t){if(t.length===0)return[];try{let{resolved:n}=await Ja(await fetch(`/api/reviews/${encodeURIComponent(e)}/file-refs`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({paths:t})}));return n}catch(n){return Ga.warn(`request`,`file refs resolve failed: ${Pa(e)}`,{reviewId:e,candidateCount:t.length,reason:String(n)}),[]}}async function $a(e,t,n){let r=new URLSearchParams({path:t});return n!==void 0&&r.set(`line`,String(n)),Ja(await fetch(`/api/reviews/${encodeURIComponent(e)}/file?${r}`))}async function eo(e,t){try{await Ja(await fetch(`/api/reviews/${encodeURIComponent(e)}/draft`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}))}catch(n){throw Ga.warn(`draft`,`draft save failed: ${Pa(e)}`,{reviewId:e,annotationCount:t.annotations.length,reason:String(n)}),n}}async function to(e,t){Ga.info(`resolve`,`resolve submitted: ${Pa(e)}: ${t.behavior}`,{reviewId:e,...t.acceptMode===void 0?{}:{acceptMode:t.acceptMode},...t.feedback===void 0?{}:{feedbackChars:t.feedback.length}});try{await Ja(await fetch(`/api/reviews/${encodeURIComponent(e)}/resolve`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}))}catch(t){throw t instanceof qa?Ga.warn(`resolve`,`resolve failed: ${Pa(e)}: http ${t.status}`,{reviewId:e,status:t.status}):Ga.error(`resolve`,t,{reviewId:e}),t}}var no=[{id:`default`,label:`Approve`,description:`Approve edits manually`},{id:`acceptEdits`,label:`Approve & accept edits`,description:`Auto-accept file edits this session`},{id:`auto`,label:`Approve & auto mode`,description:`Full auto mode this session`}];function ro(e){return e&&e.length>0?e:no}function io(e,t){return t.find(t=>t.id===e)?.label??t[0]?.label??`Approve`}var ao=`🥕 New Plan Ready`;function oo(e,t){if(typeof Notification>`u`)return null;try{return new Notification(e,{body:t})}catch(e){return Ga.warn(`ui`,`notification construct failed`,{reason:String(e)}),null}}function so(){return typeof Notification>`u`?`default`:Notification.permission}var co=5e3;function lo(e){let t=globalThis.navigator?.locks;return t?new Promise(n=>{t.request(`caret-notify-${e}`,{ifAvailable:!0},e=>{if(e===null){n(!1);return}return n(!0),new Promise(e=>setTimeout(e,co))}).catch(t=>{Ga.warn(`ui`,`plan notification claim failed: ${Pa(e)}`,{reviewId:e,reason:String(t)}),n(!0)})}):!0}function uo(e){let t=e.notify??oo,n=e.isAway??(()=>document.visibilityState!==`visible`||!document.hasFocus()),r=e.permission??so,i=e.focus??(()=>window.focus()),a=e.claim??lo,o=n=>{let r=t(ao,`${n.title} — ${n.cwd}`);if(!r){Ga.warn(`ui`,`plan notification unavailable: ${Pa(n.id)}`,{reviewId:n.id});return}Ga.info(`ui`,`plan notification fired: ${Pa(n.id)}`,{reviewId:n.id}),r.onshow=()=>Ga.debug(`ui`,`plan notification shown: ${Pa(n.id)}`,{reviewId:n.id}),r.onerror=()=>Ga.warn(`ui`,`plan notification failed: ${Pa(n.id)}`,{reviewId:n.id}),r.onclick=()=>{Ga.debug(`ui`,`plan notification clicked: ${Pa(n.id)}`,{reviewId:n.id}),i(),e.onSelect(n.id),r.close()}},s=e=>Ga.debug(`ui`,`plan notification skipped (duplicate): ${Pa(e.id)}`,{reviewId:e.id}),c=null;return{observe(e){let t=c;if(c=new Set(e.map(e=>e.id)),t===null)return;let i=e.filter(e=>!t.has(e.id));if(i.length===0)return;let l=n()?r()===`granted`?null:`permission`:`active`;if(l){let e=l===`permission`&&r()===`default`?`info`:`debug`;for(let t of i)Ga[e](`ui`,`plan notification skipped (${l}): ${Pa(t.id)}`,{reviewId:t.id});return}for(let e of i){let t=a(e.id);t===!0?o(e):t===!1?s(e):t.then(t=>t?o(e):s(e))}}}}function fo(){let e=oo(`🥕 Test notification`,`Notifications reach your desktop`);return e?(e.onshow=()=>Ga.debug(`ui`,`test notification shown`),e.onerror=()=>Ga.warn(`ui`,`test notification failed`),Ga.info(`ui`,`test notification fired`),!0):(Ga.warn(`ui`,`test notification unavailable`),!1)}function po(e){switch(e){case`granted`:return{icon:`bell`,tone:`ok`,title:`Desktop notifications on — click to send a test notification`,canRequest:!1,canTest:!0};case`denied`:return{icon:`bell-off`,tone:`danger`,title:`Notifications blocked — re-enable them in your browser's site settings`,canRequest:!1,canTest:!1};default:return{icon:`bell`,overlay:`circle-question-mark`,tone:`muted`,title:`Enable desktop notifications for new plans`,canRequest:!0,canTest:!1}}}var mo=`/api/ui/gone`;function ho(e){let t=e.sendBeacon??(e=>navigator.sendBeacon(e)),n=e=>{e.persisted||t(mo)};return e.target.addEventListener(`pagehide`,n),()=>e.target.removeEventListener(`pagehide`,n)}function go(e){let t=e.now??(()=>performance.now()),n=e.graceMs??300,r=e.durationMs??2e3,i=t(),a=!1,o,s=0;function c(e){e.preventDefault(),e.stopImmediatePropagation(),s++}function l(){o=void 0,a&&(a=!1,Ga.debug(`ui`,`safe mode released`,{swallowed:s}),e.onChange(!1))}function u(u){if(a){c(u);return}t()-i<=n&&(s=0,c(u),a=!0,Ga.info(`ui`,`safe mode triggered`),e.onChange(!0),o&&clearTimeout(o),o=setTimeout(l,r))}function d(e){a&&c(e)}return e.target.addEventListener(`keydown`,u,!0),e.target.addEventListener(`keyup`,d,!0),{arm(){i=t()},isActive(){return a},destroy(){o&&clearTimeout(o),o=void 0,e.target.removeEventListener(`keydown`,u,!0),e.target.removeEventListener(`keyup`,d,!0)}}}function _o(e){return`startLine`in e}function vo(e){return`blockId`in e}function yo(e,t){return`${e}:${t}`}function bo(e){return{startLine:Math.min(e.start,e.end),endLine:Math.max(e.start,e.end)}}function xo(e,t){return e===t?`Line ${e}`:`Lines ${e}–${t}`}function So(e){let t=null,n=``,r=new Map,i=[];function a(){i=[...r.values()].sort((e,t)=>e.startLine-t.startLine||e.endLine-t.endLine)}function o(){t=null,n=``,e.onChange?.()}function s(i){t=i;let o=yo(i.startLine,i.endLine),s=r.get(o);n=s?.text??``,s!==void 0&&(r.delete(o),a()),e.onChange?.()}return{open(e){s(bo(e))},submit(n){if(t==null)return;let i=n.trim();if(r.delete(yo(t.startLine,t.endLine))&&a(),i===``){o();return}e.onCreate({startLine:t.startLine,endLine:t.endLine,comment:i}),o()},cancel(e){if(t==null)return;let n=e?.trim()??``;if(n!==``){let{startLine:e,endLine:i}=t,o=yo(e,i);r.set(o,{key:o,startLine:e,endLine:i,text:n}),a()}o()},discardOpen(){t!=null&&o()},pending(){return t??void 0},pendingText(){return n},scratches(){return i},resume(e){let t=r.get(e);t!=null&&s({startLine:t.startLine,endLine:t.endLine})},save(t){let n=r.get(t);n!=null&&(r.delete(t),a(),e.onCreate({startLine:n.startLine,endLine:n.endLine,comment:n.text}),e.onChange?.())},discard(t){r.delete(t)&&(a(),e.onChange?.())},draft({startLine:t,endLine:n,text:i}){let o=i.trim();if(o===``)return;let s=yo(t,n),c=r.get(s),l=c?`${c.text}\n${o}`:o;r.set(s,{key:s,startLine:t,endLine:n,text:l}),a(),e.onChange?.()},seed(i){t=null,n=``,r.clear();for(let e of i){let t=yo(e.startLine,e.endLine);r.set(t,{key:t,startLine:e.startLine,endLine:e.endLine,text:e.text})}a(),e.onChange?.()}}}function Co(e){return e.replace(/\s+/g,` `).trim()}function wo(e,t){return e===t?`Line ${e}:`:`Lines ${e}-${t}:`}function To(e,t,n){return n.slice(e-1,t)}function Eo(e,t,n){return To(e,t,n.split(`
|
|
4
4
|
`))}var Do=3;function Oo(e){let t=Co(e),n=t.split(` `);return n.length<=6?t:`${n.slice(0,Do).join(` `)} … ${n.slice(-3).join(` `)}`}function ko(e,t,n){if(vo(e))return`${t}. On "${Oo(e.quote)}": ${e.comment.trim()}`;let r=[`${t}. ${wo(e.startLine,e.endLine)}`],i=Oo(To(e.startLine,e.endLine,n).join(` `));return i&&r.push(` > ${i}`),r.push(` ${e.comment.trim()}`),r.join(`
|
|
@@ -190,7 +190,7 @@ var e=Object.defineProperty,t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=nu
|
|
|
190
190
|
\f\r &>`.split(``),`\0
|
|
191
191
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
192
192
|
\f\r "&'<=>\``.split(``),`\0
|
|
193
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function mS(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=rx);let l=hS(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!sS(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||!Gx(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function hS(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=gS(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 gS(e,t,n){let r=$b(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=Dx(r.attribute,Object.assign({},e.settings.characterReferences,{subset:pS.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Px:Fx)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Dx(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:pS.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Nx(n,o)>Nx(n,e.alternative)&&(o=e.alternative),s=o+Dx(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?pS.single:pS.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var _S=[`<`,`&`];function vS(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Dx(e.value,Object.assign({},r.settings.characterReferences,{subset:_S}))}function yS(e,t,n,r){return r.settings.allowDangerousHtml?e.value:vS(e,t,n,r)}function bS(e,t,n,r){return r.all(e)}var xS=ax(`type`,{invalid:SS,unknown:CS,handlers:{comment:jx,doctype:Mx,element:mS,raw:yS,root:bS,text:vS}});function SS(e){throw Error("Expected node, not `"+e+"`")}function CS(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var wS={},TS={},ES=[];function DS(e,t){let n=t||wS,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:OS,all:kS,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||wb,characterReferences:n.characterReferences||TS,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?rx:nx,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function OS(e,t,n){return xS(e,t,n,this)}function kS(e){let t=[],n=e&&e.children||ES,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var AS=class{hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;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.gutterUtilityLine=void 0,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.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){let n=!(e===this.selectedRange||mb(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&qS(e.composedPath())||(JS(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(JS(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(JS(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){JS(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();JS(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);JS(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=FS(i)&&this.hoveredLine?.lineElement===i.lineElement;PS(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),PS(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),FS(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(LS(i)&&p!=null){p(i);break}if(IS(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!FS(i))break;PS(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,JS(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})()),JS(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),JS(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();qS(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;e.preventDefault();let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;let r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),a=r?.top??i;i==null||a==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:a,current:i},t&&(this.selectionAnchor={lineNumber:a.lineNumber,side:a.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),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;e.preventDefault();let n=this.resolveSelectionPoint(e,{source:`coordinates-first`});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;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Cb(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});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.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=DS(Sb());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);NS(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(!(r==null||i==null))return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(BS(t));if(NS(n)&&!(this.mode===`diff`&&e.side!=null&&n.side!==e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(NS(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(NS(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&qS(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=BS(e);if(t&&qS(n))return;let r=VS(e);return r==null?this.pathFromAnnotationSlot(e):BS(r)}pathFromAnnotationSlot(e){let t=US(HS(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:BS(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=WS(t)?t:WS(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}mb(r??void 0,i??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}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.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);RS(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=KS(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=KS(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:zS(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:zS(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:GS(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:GS(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 jS({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:MS({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function MS({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function NS(e){return e!=null&&`kind`in e&&e.kind===`line`}function PS(e){return e!=null&&`kind`in e&&e.kind===`token`}function FS(e){return NS(e)||PS(e)}function IS(e){return`type`in e&&e.type===`line-info`}function LS(e){return`kind`in e&&e.kind===`merge-conflict-action`}function RS(e){return e===`current`||e===`incoming`||e===`both`}function zS(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function BS(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function VS(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function HS(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function US(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(Number.isFinite(n))return{lineNumber:n,side:t[1]}}function WS(e){return e!=null&&typeof e.elementFromPoint==`function`}function GS(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function KS(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 qS(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}function JS(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 YS=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,t){let n=new Set,r=0,i=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(r===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;r++;let n=i.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let a=e.firstElementChild;a instanceof HTMLElement||(a=null),n==null?(n={type:`code`,codeElement:e,numberElement:a,codeWidth:`auto`,numberWidth:0},this.observedNodes.set(e,n),this.observe(e),a!=null&&(this.observedNodes.set(a,n),this.observe(a))):(this.observedNodes.set(e,n),i.delete(e),n.numberElement===a?n.numberElement==null?n.numberWidth=0:(i.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),i.delete(n.numberElement)),a!=null&&(this.observe(a),i.delete(a),this.observedNodes.set(a,n)),n.numberElement=a,n.numberWidth=0))}if(r>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),r=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^\d+,\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let n=r.get(t);n??(n=[],r.set(t,n)),n.push(e)}for(let[e,t]of r){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[r,a]=t,o=r.firstElementChild,s=a.firstElementChild;if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement)||!(o instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=i.get(o);if(c!=null){this.observedNodes.set(o,c),this.observedNodes.set(s,c),i.delete(o),i.delete(s);continue}let l=o.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:r,child:o,childHeight:l},column2:{container:a,child:s,childHeight:u},currentHeight:`auto`},n.add({child1:o,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of n)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);n.clear()}for(let[e,t]of i)this.unobserve(e),t.type===`code`?QS(t):$S(t);i.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:XS(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:ZS(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;if(!(!i&&!a)&&(t.codeWidth=e,t.numberWidth=r,i&&t.codeElement.style.setProperty(`--diffs-column-width`,`${typeof e==`number`?`${e}px`:`auto`}`),a&&t.codeElement.style.setProperty(`--diffs-column-number-width`,`${r===0?`auto`:`${r}px`}`),i||a&&e!==`auto`)){let n=typeof e==`number`?Math.max(e-r,0):0;t.codeElement.style.setProperty(`--diffs-column-content-width`,`${n>0?`${n}px`:`auto`}`)}}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function XS(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function ZS(e){return Math.max(Math.ceil(e),0)}function QS(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`))}function $S(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var eC=new Map,tC=new Map,nC=new Map,rC=new Set;function iC(e){for(let t of Array.isArray(e)?e:[e])if(!(t===`text`||t===`ansi`)&&!rC.has(t))return!1;return!0}function aC(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(rC.has(n.name))continue;let e=eC.get(n.name);e??(e=n,eC.set(n.name,e)),rC.add(e.name),t.loadLanguageSync(e.data)}}function oC(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var sC=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function cC(){return 2147483648}function lC(){return typeof performance<`u`?performance.now():Date.now()}var uC=(e,t)=>e+(t-e%t)%t;async function dC(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=cC();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,uC(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:lC,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 fC=Object.defineProperty,pC=(e,t,n)=>t in e?fC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mC=(e,t,n)=>pC(e,typeof t==`symbol`?t:t+``,n),hC=null;function gC(e){throw new sC(e.UTF8ToString(e.getLastOnigError()))}var _C=class e{constructor(t){mC(this,`utf16Length`),mC(this,`utf8Length`),mC(this,`utf16Value`),mC(this,`utf8Value`),mC(this,`utf16OffsetToUtf8`),mC(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}},vC=class e{constructor(t){if(mC(this,`id`,++e.LAST_ID),mC(this,`_onigBinding`),mC(this,`content`),mC(this,`utf16Length`),mC(this,`utf8Length`),mC(this,`utf16OffsetToUtf8`),mC(this,`utf8OffsetToUtf16`),mC(this,`ptr`),!hC)throw new sC(`Must invoke loadWasm first.`);this._onigBinding=hC,this.content=t;let n=new _C(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=hC.omalloc(1e4),e._sharedPtrInUse=!0,hC.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(hC)}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)}};mC(vC,`LAST_ID`,0),mC(vC,`_sharedPtr`,0),mC(vC,`_sharedPtrInUse`,!1);var yC=vC,bC=class{constructor(e){if(mC(this,`_onigBinding`),mC(this,`_ptr`),!hC)throw new sC(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new _C(e[r]);t[r]=i.createString(hC),n[r]=i.utf8Length}let r=hC.omalloc(4*e.length);hC.HEAPU32.set(t,r/4);let i=hC.omalloc(4*e.length);hC.HEAPU32.set(n,i/4);let a=hC.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)hC.ofree(t[n]);hC.ofree(i),hC.ofree(r),a===0&&gC(hC),this._onigBinding=hC,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 yC(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 xC(e){return typeof e.instantiator==`function`}function SC(e){return typeof e.default==`function`}function CC(e){return e.data!==void 0}function wC(e){return typeof Response<`u`&&e instanceof Response}function TC(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 EC;function DC(e){if(EC)return EC;async function t(){hC=await dC(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),xC(n)?n=await n.instantiator(t):SC(n)?n=await n.default(t):(CC(n)&&(n=n.data),wC(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await kC(n)(t):await AC(n)(t):TC(n)||n instanceof WebAssembly.Module?n=await OC(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await OC(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return EC=t(),EC}function OC(e){return t=>WebAssembly.instantiate(e,t)}function kC(e){return t=>WebAssembly.instantiateStreaming(e,t)}function AC(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function jC(e){return e&&await DC(e),{createScanner(e){return new bC(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new yC(e)}}}var MC=`modulepreload`,NC=function(e){return`/`+e},PC={},q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=NC(t,n),t in PC)return;PC[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:MC,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},FC=[{id:`abap`,name:`ABAP`,import:(()=>q(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>q(()=>import(`./actionscript-3--17pq3dv.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>q(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>q(()=>import(`./angular-html-B6NJ8Crx.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>q(()=>import(`./angular-ts-FdEJue4l.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>q(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>q(()=>import(`./apex-VAyPSnFM.js`),[]))},{id:`apl`,name:`APL`,import:(()=>q(()=>import(`./apl-8jCzQ5pt.js`),__vite__mapDeps([6,2,1,3,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>q(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>q(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>q(()=>import(`./asciidoc-DE70LPWp.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>q(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>q(()=>import(`./astro-D6Uv3Zd6.js`),__vite__mapDeps([10,2,3,7,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>q(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>q(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>q(()=>import(`./bat-Bo4NYOV-.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>q(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>q(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>q(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>q(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>q(()=>import(`./bird2-C6vDhewU.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>q(()=>import(`./blade-DdLBtQgs.js`),__vite__mapDeps([14,2,15,1,3,7,16,8,9])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>q(()=>import(`./bsl-BkkzgIyY.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>q(()=>import(`./c-BtgVJzRT.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>q(()=>import(`./c3-BFHwR3_K.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>q(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>q(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`clarity`,name:`Clarity`,import:(()=>q(()=>import(`./clarity-SemFz856.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>q(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>q(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>q(()=>import(`./cobol-BOF3ihbS.js`),__vite__mapDeps([21,1,2,3,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>q(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>q(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>q(()=>import(`./coffee-Br1deUOy.js`),__vite__mapDeps([22,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>q(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>q(()=>import(`./coq-BrsZFFmf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>q(()=>import(`./cpp-BuRF7xA8.js`).then(e=>e.n),__vite__mapDeps([23,24,25,26,16])))},{id:`crystal`,name:`Crystal`,import:(()=>q(()=>import(`./crystal-C2zE7OWx.js`),__vite__mapDeps([27,25,2,1,3,28,16])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>q(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>q(()=>import(`./css-iBwOFG5O.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>q(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>q(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>q(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>q(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>q(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>q(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>q(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>q(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>q(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>q(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>q(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>q(()=>import(`./edge-C8C1WH_b.js`),__vite__mapDeps([29,15,1,2,3,13])))},{id:`elixir`,name:`Elixir`,import:(()=>q(()=>import(`./elixir-ChioPNrw.js`),__vite__mapDeps([30,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>q(()=>import(`./elm-DrMVy3GL.js`),__vite__mapDeps([31,24,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>q(()=>import(`./emacs-lisp-B4R74twV.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>q(()=>import(`./erb-B3LvCl6V.js`),__vite__mapDeps([32,1,2,3,33,25,23,24,26,16,34,35,12,13,36,37,28,8,9,38])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>q(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([39,40])))},{id:`fennel`,name:`Fennel`,import:(()=>q(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>q(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>q(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>q(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([41,42])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>q(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>q(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([43,40])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>q(()=>import(`./gdresource-C0sCabJj.js`),__vite__mapDeps([44,45,46])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>q(()=>import(`./gdscript-Cp2uCuqX.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>q(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>q(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>q(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>q(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([47,48])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>q(()=>import(`./git-rebase-Bv1Z90mV.js`),__vite__mapDeps([49,28])))},{id:`gleam`,name:`Gleam`,import:(()=>q(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>q(()=>import(`./glimmer-js-_Cj2ZxqT.js`),__vite__mapDeps([50,2,1,3,13])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>q(()=>import(`./glimmer-ts-eeir-ofz.js`),__vite__mapDeps([51,2,1,3,13])))},{id:`glsl`,name:`GLSL`,import:(()=>q(()=>import(`./glsl-Zcj4mBmc.js`).then(e=>e.n),__vite__mapDeps([24,25])))},{id:`gn`,name:`GN`,import:(()=>q(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>q(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>q(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>q(()=>import(`./graphql-DcI0CImY.js`).then(e=>e.n),__vite__mapDeps([34,3,35,12,13])))},{id:`groovy`,name:`Groovy`,import:(()=>q(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>q(()=>import(`./hack-CRMO6OEY.js`),__vite__mapDeps([52,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>q(()=>import(`./haml-vpaJ2U9N.js`).then(e=>e.n),__vite__mapDeps([36,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>q(()=>import(`./handlebars-BmRnoKX5.js`),__vite__mapDeps([53,2,1,3,38])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>q(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>q(()=>import(`./haxe-OTjmBuCE.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>q(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>q(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>q(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>q(()=>import(`./html-CWopqLKh.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>q(()=>import(`./html-derivative-kjil5-1g.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>q(()=>import(`./http-BsiD1_wo.js`),__vite__mapDeps([54,34,3,35,12,13,7,28,8,9])))},{id:`hurl`,name:`Hurl`,import:(()=>q(()=>import(`./hurl-BSOSzca8.js`),__vite__mapDeps([55,56,34,3,35,12,13,8,9])))},{id:`hxml`,name:`HXML`,import:(()=>q(()=>import(`./hxml-B0Qn7Nwc.js`),__vite__mapDeps([57,58])))},{id:`hy`,name:`Hy`,import:(()=>q(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>q(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>q(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>q(()=>import(`./java-B3dX7M_O.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>q(()=>import(`./javascript-FM1qUZzw.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>q(()=>import(`./jinja-DVVPq-Qq.js`),__vite__mapDeps([59,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>q(()=>import(`./jison-DZjXlKnT.js`),__vite__mapDeps([60,3])))},{id:`json`,name:`JSON`,import:(()=>q(()=>import(`./json-psWWRfU7.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>q(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>q(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>q(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>q(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>q(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>q(()=>import(`./jsx-Bv0NBlC9.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>q(()=>import(`./julia-DRPZCNs5.js`),__vite__mapDeps([61,23,24,25,26,16,3,20,62])))},{id:`just`,name:`Just`,import:(()=>q(()=>import(`./just-CznON7Md.js`),__vite__mapDeps([63,3,64,2,1,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38])))},{id:`kdl`,name:`KDL`,import:(()=>q(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>q(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>q(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>q(()=>import(`./latex-99tFYwaR.js`),__vite__mapDeps([65,66,62])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>q(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>q(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>q(()=>import(`./liquid-8z3tzRYn.js`),__vite__mapDeps([67,2,1,3,7])))},{id:`llvm`,name:`LLVM IR`,import:(()=>q(()=>import(`./llvm-Cm23YOpf.js`),[]))},{id:`log`,name:`Log file`,import:(()=>q(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>q(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>q(()=>import(`./lua-BZoKCS17.js`).then(e=>e.n),__vite__mapDeps([37,25])))},{id:`luau`,name:`Luau`,import:(()=>q(()=>import(`./luau-FMPmPwt6.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>q(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>q(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>q(()=>import(`./marko-BU9z-RZr.js`),__vite__mapDeps([68,2,69,5,13])))},{id:`matlab`,name:`MATLAB`,import:(()=>q(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>q(()=>import(`./mdc-C38yLzkY.js`),__vite__mapDeps([70,15,1,2,3,40,38])))},{id:`mdx`,name:`MDX`,import:(()=>q(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>q(()=>import(`./mermaid-Bk4SNUv9.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>q(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>q(()=>import(`./mojo-BgCJLMeH.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>q(()=>import(`./moonbit-CaWjb8XO.js`),[]))},{id:`move`,name:`Move`,import:(()=>q(()=>import(`./move-B1IS1UjX.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>q(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>q(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([71,72])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>q(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>q(()=>import(`./nginx-UMVInepI.js`),__vite__mapDeps([73,37,25])))},{id:`nim`,name:`Nim`,import:(()=>q(()=>import(`./nim-Du4jXclQ.js`),__vite__mapDeps([74,25,2,24,1,3,40,8,9])))},{id:`nix`,name:`Nix`,import:(()=>q(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>q(()=>import(`./nushell-DcLAeLz5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>q(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>q(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>q(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>q(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>q(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>q(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>q(()=>import(`./perl-CoEbwzPf.js`),__vite__mapDeps([64,2,1,3,16,8,9])))},{id:`php`,name:`PHP`,import:(()=>q(()=>import(`./php-ubTDGUam.js`),__vite__mapDeps([75,2,1,3,7,16,8,9])))},{id:`pkl`,name:`Pkl`,import:(()=>q(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>q(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>q(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>q(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>q(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>q(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>q(()=>import(`./powershell-DshXNtvi.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>q(()=>import(`./prisma-BsRQq5mF.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>q(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>q(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>q(()=>import(`./pug-Bmsmvvm7.js`),__vite__mapDeps([76,2,1,3])))},{id:`puppet`,name:`Puppet`,import:(()=>q(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>q(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>q(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>q(()=>import(`./qml-YXj-z032.js`),__vite__mapDeps([77,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>q(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>q(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>q(()=>import(`./r-BNkIpWO8.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>q(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>q(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>q(()=>import(`./razor-ZM--hAhl.js`),__vite__mapDeps([78,79,1,2,3])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>q(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>q(()=>import(`./regexp-CHr2m78T.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>q(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>q(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>q(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>q(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>q(()=>import(`./rst-Xx0XAo8H.js`),__vite__mapDeps([80,81,23,24,25,26,16,15,1,2,3,20,33,34,35,12,13,36,37,28,8,9,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>q(()=>import(`./ruby-BWgyGqGH.js`),__vite__mapDeps([33,25,23,24,26,16,2,34,3,35,12,13,36,1,37,28,8,9,38])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>q(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>q(()=>import(`./sas-CwTmTlh0.js`),__vite__mapDeps([82,16])))},{id:`sass`,name:`Sass`,import:(()=>q(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>q(()=>import(`./scala-DKOlJaKm.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>q(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>q(()=>import(`./scss-DNgS20lR.js`).then(e=>e.n),__vite__mapDeps([5,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>q(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>q(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([83,84])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>q(()=>import(`./shellscript-Dkezxj03.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>q(()=>import(`./shellsession-D6yCCjOL.js`),__vite__mapDeps([85,28])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>q(()=>import(`./smalltalk-B16xEiuN.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>q(()=>import(`./solidity-CKzVLygQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>q(()=>import(`./soy-lzhm7a9Y.js`),__vite__mapDeps([86,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>q(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([87,88])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>q(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>q(()=>import(`./sql-Yo8AWGPM.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>q(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>q(()=>import(`./stata-D62k9gHq.js`),__vite__mapDeps([89,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>q(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>q(()=>import(`./surrealql-qp-qEg-3.js`),__vite__mapDeps([90,3])))},{id:`svelte`,name:`Svelte`,import:(()=>q(()=>import(`./svelte-DLztoC2n.js`),__vite__mapDeps([91,2,3,11,13])))},{id:`swift`,name:`Swift`,import:(()=>q(()=>import(`./swift-DonLKvLd.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>q(()=>import(`./system-verilog-DJ5XKQeo.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>q(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>q(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>q(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>q(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>q(()=>import(`./templ-Cu6WsZcl.js`),__vite__mapDeps([92,2,93,3])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>q(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>q(()=>import(`./tex-CqZU9zkk.js`),__vite__mapDeps([66,62])))},{id:`toml`,name:`TOML`,import:(()=>q(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>q(()=>import(`./ts-tags-ClqaCWh2.js`),__vite__mapDeps([94,2,24,25,1,3,16,13,8,9])))},{id:`tsv`,name:`TSV`,import:(()=>q(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>q(()=>import(`./tsx-Cj58ow-S.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>q(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>q(()=>import(`./twig-CgaKnAdg.js`),__vite__mapDeps([95,2,3,75,1,7,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38,5])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>q(()=>import(`./typescript-CKElJ_dH.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>q(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>q(()=>import(`./typst-DI99ib-x.js`),[]))},{id:`v`,name:`V`,import:(()=>q(()=>import(`./v-DETTlOr0.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>q(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>q(()=>import(`./vb-Djn5o6TS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>q(()=>import(`./verilog-CiiDBU1e.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>q(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>q(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>q(()=>import(`./vue-DtckUkhv.js`),__vite__mapDeps([96,2,15,1,3,7,13])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>q(()=>import(`./vue-html-Cqq7SmCi.js`),__vite__mapDeps([97,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>q(()=>import(`./vue-vine-Dp4BXiQa.js`),__vite__mapDeps([98,2,3,69,11,5,99])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>q(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>q(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>q(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>q(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>q(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>q(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>q(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>q(()=>import(`./xml-C3UNSSfc.js`).then(e=>e.n),__vite__mapDeps([8,9])))},{id:`xsl`,name:`XSL`,import:(()=>q(()=>import(`./xsl-BL_LCJsy.js`),__vite__mapDeps([100,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>q(()=>import(`./yaml-CD_CHV62.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>q(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>q(()=>import(`./zig-CMLA9XwU.js`),[]))}],IC=Object.fromEntries(FC.map(e=>[e.id,e.import])),LC=Object.fromEntries(FC.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),RC={...IC,...LC},zC=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function BC(e){return VC(e)}function VC(e){return Array.isArray(e)?HC(e):e instanceof RegExp?e:typeof e==`object`?UC(e):e}function HC(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=VC(e[n]);return t}function UC(e){let t={};for(let n in e)t[n]=VC(e[n]);return t}function WC(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function GC(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?GC(e.substring(0,e.length-1)):e.substr(~t+1)}var KC=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,qC=class{static hasCaptures(e){return e===null?!1:(KC.lastIndex=0,KC.test(e))}static replaceCaptures(e,t,n){return e.replace(KC,(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 JC(e,t){return e<t?-1:+(e>t)}function YC(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=JC(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function XC(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 ZC(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var QC=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}},$C=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(iw(e),t)}static createFromParsedTheme(e,t){return sw(e,t)}_cachedMatchRoot=new QC(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=>tw(e.parent,t.parentScopes));return n?new rw(n.fontStyle,n.foreground,n.background):null}},ew=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 tw(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&&!nw(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function nw(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var rw=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function iw(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`&&XC(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&XC(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 aw(l,u,e,o,s,c)}}return n}var aw=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}},ow=(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))(ow||{});function sw(e,t){e.sort((e,t)=>{let n=JC(e.scope,t.scope);return n!==0||(n=YC(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 cw(t),o=new rw(n,a.getId(r),a.getId(i)),s=new dw(new uw(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 $C(a,o,s)}var cw=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)}},lw=Object.freeze([]),uw=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||lw,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)}},dw=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(),uw.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(YC(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 uw(e,t,n,r,i))}},fw=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=mw(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 pw(e){return e}function mw(e){return e}function hw(e,t){let n=[],r=_w(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(gw(i)){let e=[];do e.push(i),i=r.next();while(gw(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 gw(e){return!!e&&!!e.match(/[\w\.:]+/)}function _w(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 vw(e){typeof e.dispose==`function`&&e.dispose()}var yw=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},bw=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},xw=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))}},Sw=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new yw(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new xw;for(let n of e)Cw(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof yw){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 Cw(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 yw?Tw({baseGrammar:a,selfGrammar:i},r):ww(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 yw(e))}function ww(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Ew([r],t,n)}}function Tw(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ew(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ew(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ew(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?WC({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ew(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Mw(i);switch(a.kind){case 0:Tw({...t,selfGrammar:t.baseGrammar},n);break;case 1:Tw(t,n);break;case 2:ww(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?ww(a.ruleName,i,n):Tw(i,n)}else a.kind===4?n.add(new bw(a.scopeName,a.ruleName)):n.add(new yw(a.scopeName));break}}}var Dw=class{kind=0},Ow=class{kind=1},kw=class{constructor(e){this.ruleName=e}kind=2},Aw=class{constructor(e){this.scopeName=e}kind=3},jw=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Mw(e){if(e===`$base`)return new Dw;if(e===`$self`)return new Ow;let t=e.indexOf(`#`);return t===-1?new Aw(e):t===0?new kw(e.substring(1)):new jw(e.substring(0,t),e.substring(t+1))}var Nw=/\\(\d+)/,Pw=/\\(\d+)/g,Fw=-1,Iw=-2;function Lw(e){return e}function Rw(e){return e}var zw=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=qC.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=qC.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${GC(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:qC.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:qC.replaceCaptures(this._contentName,e,t)}},Bw=class extends zw{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!`)}},Vw=class extends zw{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Kw(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 qw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Hw=class extends zw{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 qw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Uw=class extends zw{_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 Kw(i,this.id),this.beginCaptures=a,this._end=new Kw(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 qw;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}},Ww=class extends zw{_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 Kw(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Kw(o,Iw),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 qw;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 qw,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Gw=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Bw(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Vw(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=WC({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Hw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Ww(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 Uw(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=Mw(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 Hw||e instanceof Uw||e instanceof Ww)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Kw=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=Nw.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 Pw.lastIndex=0,this.source.replace(Pw,(e,t)=>ZC(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}},qw=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 Jw(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 Jw(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Jw=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(`
|
|
193
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function mS(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=rx);let l=hS(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!sS(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||!Gx(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function hS(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=gS(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 gS(e,t,n){let r=$b(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=Dx(r.attribute,Object.assign({},e.settings.characterReferences,{subset:pS.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Px:Fx)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Dx(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:pS.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Nx(n,o)>Nx(n,e.alternative)&&(o=e.alternative),s=o+Dx(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?pS.single:pS.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var _S=[`<`,`&`];function vS(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Dx(e.value,Object.assign({},r.settings.characterReferences,{subset:_S}))}function yS(e,t,n,r){return r.settings.allowDangerousHtml?e.value:vS(e,t,n,r)}function bS(e,t,n,r){return r.all(e)}var xS=ax(`type`,{invalid:SS,unknown:CS,handlers:{comment:jx,doctype:Mx,element:mS,raw:yS,root:bS,text:vS}});function SS(e){throw Error("Expected node, not `"+e+"`")}function CS(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var wS={},TS={},ES=[];function DS(e,t){let n=t||wS,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:OS,all:kS,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||wb,characterReferences:n.characterReferences||TS,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?rx:nx,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function OS(e,t,n){return xS(e,t,n,this)}function kS(e){let t=[],n=e&&e.children||ES,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var AS=class{hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;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.gutterUtilityLine=void 0,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.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){let n=!(e===this.selectedRange||mb(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&qS(e.composedPath())||(JS(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(JS(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(JS(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){JS(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();JS(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);JS(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=FS(i)&&this.hoveredLine?.lineElement===i.lineElement;PS(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),PS(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),FS(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(LS(i)&&p!=null){p(i);break}if(IS(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!FS(i))break;PS(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,JS(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})()),JS(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),JS(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();qS(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;e.preventDefault();let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;let r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),a=r?.top??i;i==null||a==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:a,current:i},t&&(this.selectionAnchor={lineNumber:a.lineNumber,side:a.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),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;e.preventDefault();let n=this.resolveSelectionPoint(e,{source:`coordinates-first`});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;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Cb(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});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.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=DS(Sb());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);NS(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(!(r==null||i==null))return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(BS(t));if(NS(n)&&!(this.mode===`diff`&&e.side!=null&&n.side!==e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(NS(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(NS(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&qS(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=BS(e);if(t&&qS(n))return;let r=VS(e);return r==null?this.pathFromAnnotationSlot(e):BS(r)}pathFromAnnotationSlot(e){let t=US(HS(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:BS(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=WS(t)?t:WS(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}mb(r??void 0,i??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}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.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);RS(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=KS(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=KS(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:zS(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:zS(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:GS(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:GS(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 jS({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:MS({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function MS({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function NS(e){return e!=null&&`kind`in e&&e.kind===`line`}function PS(e){return e!=null&&`kind`in e&&e.kind===`token`}function FS(e){return NS(e)||PS(e)}function IS(e){return`type`in e&&e.type===`line-info`}function LS(e){return`kind`in e&&e.kind===`merge-conflict-action`}function RS(e){return e===`current`||e===`incoming`||e===`both`}function zS(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function BS(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function VS(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function HS(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function US(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(Number.isFinite(n))return{lineNumber:n,side:t[1]}}function WS(e){return e!=null&&typeof e.elementFromPoint==`function`}function GS(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function KS(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 qS(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}function JS(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 YS=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,t){let n=new Set,r=0,i=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(r===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;r++;let n=i.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let a=e.firstElementChild;a instanceof HTMLElement||(a=null),n==null?(n={type:`code`,codeElement:e,numberElement:a,codeWidth:`auto`,numberWidth:0},this.observedNodes.set(e,n),this.observe(e),a!=null&&(this.observedNodes.set(a,n),this.observe(a))):(this.observedNodes.set(e,n),i.delete(e),n.numberElement===a?n.numberElement==null?n.numberWidth=0:(i.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),i.delete(n.numberElement)),a!=null&&(this.observe(a),i.delete(a),this.observedNodes.set(a,n)),n.numberElement=a,n.numberWidth=0))}if(r>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),r=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^\d+,\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let n=r.get(t);n??(n=[],r.set(t,n)),n.push(e)}for(let[e,t]of r){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[r,a]=t,o=r.firstElementChild,s=a.firstElementChild;if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement)||!(o instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=i.get(o);if(c!=null){this.observedNodes.set(o,c),this.observedNodes.set(s,c),i.delete(o),i.delete(s);continue}let l=o.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:r,child:o,childHeight:l},column2:{container:a,child:s,childHeight:u},currentHeight:`auto`},n.add({child1:o,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of n)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);n.clear()}for(let[e,t]of i)this.unobserve(e),t.type===`code`?QS(t):$S(t);i.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:XS(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:ZS(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;if(!(!i&&!a)&&(t.codeWidth=e,t.numberWidth=r,i&&t.codeElement.style.setProperty(`--diffs-column-width`,`${typeof e==`number`?`${e}px`:`auto`}`),a&&t.codeElement.style.setProperty(`--diffs-column-number-width`,`${r===0?`auto`:`${r}px`}`),i||a&&e!==`auto`)){let n=typeof e==`number`?Math.max(e-r,0):0;t.codeElement.style.setProperty(`--diffs-column-content-width`,`${n>0?`${n}px`:`auto`}`)}}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function XS(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function ZS(e){return Math.max(Math.ceil(e),0)}function QS(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`))}function $S(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var eC=new Map,tC=new Map,nC=new Map,rC=new Set;function iC(e){for(let t of Array.isArray(e)?e:[e])if(!(t===`text`||t===`ansi`)&&!rC.has(t))return!1;return!0}function aC(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(rC.has(n.name))continue;let e=eC.get(n.name);e??(e=n,eC.set(n.name,e)),rC.add(e.name),t.loadLanguageSync(e.data)}}function oC(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var sC=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function cC(){return 2147483648}function lC(){return typeof performance<`u`?performance.now():Date.now()}var uC=(e,t)=>e+(t-e%t)%t;async function dC(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=cC();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,uC(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:lC,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 fC=Object.defineProperty,pC=(e,t,n)=>t in e?fC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mC=(e,t,n)=>pC(e,typeof t==`symbol`?t:t+``,n),hC=null;function gC(e){throw new sC(e.UTF8ToString(e.getLastOnigError()))}var _C=class e{constructor(t){mC(this,`utf16Length`),mC(this,`utf8Length`),mC(this,`utf16Value`),mC(this,`utf8Value`),mC(this,`utf16OffsetToUtf8`),mC(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}},vC=class e{constructor(t){if(mC(this,`id`,++e.LAST_ID),mC(this,`_onigBinding`),mC(this,`content`),mC(this,`utf16Length`),mC(this,`utf8Length`),mC(this,`utf16OffsetToUtf8`),mC(this,`utf8OffsetToUtf16`),mC(this,`ptr`),!hC)throw new sC(`Must invoke loadWasm first.`);this._onigBinding=hC,this.content=t;let n=new _C(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=hC.omalloc(1e4),e._sharedPtrInUse=!0,hC.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(hC)}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)}};mC(vC,`LAST_ID`,0),mC(vC,`_sharedPtr`,0),mC(vC,`_sharedPtrInUse`,!1);var yC=vC,bC=class{constructor(e){if(mC(this,`_onigBinding`),mC(this,`_ptr`),!hC)throw new sC(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new _C(e[r]);t[r]=i.createString(hC),n[r]=i.utf8Length}let r=hC.omalloc(4*e.length);hC.HEAPU32.set(t,r/4);let i=hC.omalloc(4*e.length);hC.HEAPU32.set(n,i/4);let a=hC.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)hC.ofree(t[n]);hC.ofree(i),hC.ofree(r),a===0&&gC(hC),this._onigBinding=hC,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 yC(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 xC(e){return typeof e.instantiator==`function`}function SC(e){return typeof e.default==`function`}function CC(e){return e.data!==void 0}function wC(e){return typeof Response<`u`&&e instanceof Response}function TC(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 EC;function DC(e){if(EC)return EC;async function t(){hC=await dC(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),xC(n)?n=await n.instantiator(t):SC(n)?n=await n.default(t):(CC(n)&&(n=n.data),wC(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await kC(n)(t):await AC(n)(t):TC(n)||n instanceof WebAssembly.Module?n=await OC(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await OC(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return EC=t(),EC}function OC(e){return t=>WebAssembly.instantiate(e,t)}function kC(e){return t=>WebAssembly.instantiateStreaming(e,t)}function AC(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function jC(e){return e&&await DC(e),{createScanner(e){return new bC(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new yC(e)}}}var MC=`modulepreload`,NC=function(e){return`/`+e},PC={},q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=NC(t,n),t in PC)return;PC[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:MC,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},FC=[{id:`abap`,name:`ABAP`,import:(()=>q(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>q(()=>import(`./actionscript-3--17pq3dv.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>q(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>q(()=>import(`./angular-html-kKPIob-B.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>q(()=>import(`./angular-ts-CKjP4O1R.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>q(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>q(()=>import(`./apex-VAyPSnFM.js`),[]))},{id:`apl`,name:`APL`,import:(()=>q(()=>import(`./apl-DCRQgCPD.js`),__vite__mapDeps([6,2,1,3,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>q(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>q(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>q(()=>import(`./asciidoc-DE70LPWp.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>q(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>q(()=>import(`./astro-BYbWYON5.js`),__vite__mapDeps([10,2,3,7,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>q(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>q(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>q(()=>import(`./bat-Bo4NYOV-.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>q(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>q(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>q(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>q(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>q(()=>import(`./bird2-C6vDhewU.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>q(()=>import(`./blade-CwhP_dxJ.js`),__vite__mapDeps([14,2,15,1,3,7,16,8,9])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>q(()=>import(`./bsl-BkkzgIyY.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>q(()=>import(`./c-CJEVusFw.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>q(()=>import(`./c3-BFHwR3_K.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>q(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>q(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`clarity`,name:`Clarity`,import:(()=>q(()=>import(`./clarity-SemFz856.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>q(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>q(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>q(()=>import(`./cobol-DIBOqviT.js`),__vite__mapDeps([21,1,2,3,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>q(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>q(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>q(()=>import(`./coffee-BS7TY60J.js`),__vite__mapDeps([22,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>q(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>q(()=>import(`./coq-BrsZFFmf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>q(()=>import(`./cpp-D1DVYlIO.js`).then(e=>e.n),__vite__mapDeps([23,24,25,26,16])))},{id:`crystal`,name:`Crystal`,import:(()=>q(()=>import(`./crystal-1wNBwJ9X.js`),__vite__mapDeps([27,25,2,1,3,28,16])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>q(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>q(()=>import(`./css-DcRg7BqA.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>q(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>q(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>q(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>q(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>q(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>q(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>q(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>q(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>q(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>q(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>q(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>q(()=>import(`./edge-DhG5RI3d.js`),__vite__mapDeps([29,15,1,2,3,13])))},{id:`elixir`,name:`Elixir`,import:(()=>q(()=>import(`./elixir-k8JKnHNU.js`),__vite__mapDeps([30,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>q(()=>import(`./elm-BCt58sPl.js`),__vite__mapDeps([31,24,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>q(()=>import(`./emacs-lisp-B4R74twV.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>q(()=>import(`./erb-gEaFK19o.js`),__vite__mapDeps([32,1,2,3,33,25,23,24,26,16,34,35,12,13,36,37,28,8,9,38])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>q(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([39,40])))},{id:`fennel`,name:`Fennel`,import:(()=>q(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>q(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>q(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>q(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([41,42])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>q(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>q(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([43,40])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>q(()=>import(`./gdresource-C0sCabJj.js`),__vite__mapDeps([44,45,46])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>q(()=>import(`./gdscript-Cp2uCuqX.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>q(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>q(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>q(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>q(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([47,48])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>q(()=>import(`./git-rebase-PGNnuu_q.js`),__vite__mapDeps([49,28])))},{id:`gleam`,name:`Gleam`,import:(()=>q(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>q(()=>import(`./glimmer-js-BShMa8kS.js`),__vite__mapDeps([50,2,1,3,13])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>q(()=>import(`./glimmer-ts-BBjvNufU.js`),__vite__mapDeps([51,2,1,3,13])))},{id:`glsl`,name:`GLSL`,import:(()=>q(()=>import(`./glsl-CVu5XUh6.js`).then(e=>e.n),__vite__mapDeps([24,25])))},{id:`gn`,name:`GN`,import:(()=>q(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>q(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>q(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>q(()=>import(`./graphql-CpSUkXDO.js`).then(e=>e.n),__vite__mapDeps([34,3,35,12,13])))},{id:`groovy`,name:`Groovy`,import:(()=>q(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>q(()=>import(`./hack-vYYr_EuM.js`),__vite__mapDeps([52,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>q(()=>import(`./haml-aiyqEFS_.js`).then(e=>e.n),__vite__mapDeps([36,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>q(()=>import(`./handlebars-vKdd7ZE6.js`),__vite__mapDeps([53,2,1,3,38])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>q(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>q(()=>import(`./haxe-OTjmBuCE.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>q(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>q(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>q(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>q(()=>import(`./html-BSDB9v3Y.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>q(()=>import(`./html-derivative-V8cBpxuT.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>q(()=>import(`./http-DXSNVmLc.js`),__vite__mapDeps([54,34,3,35,12,13,7,28,8,9])))},{id:`hurl`,name:`Hurl`,import:(()=>q(()=>import(`./hurl-eKV70JUb.js`),__vite__mapDeps([55,56,34,3,35,12,13,8,9])))},{id:`hxml`,name:`HXML`,import:(()=>q(()=>import(`./hxml-B0Qn7Nwc.js`),__vite__mapDeps([57,58])))},{id:`hy`,name:`Hy`,import:(()=>q(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>q(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>q(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>q(()=>import(`./java-DGolWD2l.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>q(()=>import(`./javascript-DcKrb1R6.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>q(()=>import(`./jinja-O0MduF1V.js`),__vite__mapDeps([59,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>q(()=>import(`./jison-BGBc5HtG.js`),__vite__mapDeps([60,3])))},{id:`json`,name:`JSON`,import:(()=>q(()=>import(`./json-B-Q47BuG.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>q(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>q(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>q(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>q(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>q(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>q(()=>import(`./jsx-B__N5PZx.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>q(()=>import(`./julia-BfiIt3AD.js`),__vite__mapDeps([61,23,24,25,26,16,3,20,62])))},{id:`just`,name:`Just`,import:(()=>q(()=>import(`./just-CN940-eY.js`),__vite__mapDeps([63,3,64,2,1,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38])))},{id:`kdl`,name:`KDL`,import:(()=>q(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>q(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>q(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>q(()=>import(`./latex-wUKEeqEd.js`),__vite__mapDeps([65,66,62])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>q(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>q(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>q(()=>import(`./liquid-D2cnd1Ez.js`),__vite__mapDeps([67,2,1,3,7])))},{id:`llvm`,name:`LLVM IR`,import:(()=>q(()=>import(`./llvm-Cm23YOpf.js`),[]))},{id:`log`,name:`Log file`,import:(()=>q(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>q(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>q(()=>import(`./lua-BQiIdljT.js`).then(e=>e.n),__vite__mapDeps([37,25])))},{id:`luau`,name:`Luau`,import:(()=>q(()=>import(`./luau-FMPmPwt6.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>q(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>q(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>q(()=>import(`./marko-BCqypbre.js`),__vite__mapDeps([68,2,69,5,13])))},{id:`matlab`,name:`MATLAB`,import:(()=>q(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>q(()=>import(`./mdc-105-eiCZ.js`),__vite__mapDeps([70,15,1,2,3,40,38])))},{id:`mdx`,name:`MDX`,import:(()=>q(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>q(()=>import(`./mermaid-Bk4SNUv9.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>q(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>q(()=>import(`./mojo-BgCJLMeH.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>q(()=>import(`./moonbit-CaWjb8XO.js`),[]))},{id:`move`,name:`Move`,import:(()=>q(()=>import(`./move-B1IS1UjX.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>q(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>q(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([71,72])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>q(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>q(()=>import(`./nginx-C5dkaLo6.js`),__vite__mapDeps([73,37,25])))},{id:`nim`,name:`Nim`,import:(()=>q(()=>import(`./nim-RJQN31Xa.js`),__vite__mapDeps([74,25,2,24,1,3,40,8,9])))},{id:`nix`,name:`Nix`,import:(()=>q(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>q(()=>import(`./nushell-DcLAeLz5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>q(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>q(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>q(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>q(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>q(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>q(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>q(()=>import(`./perl-DZkWjug_.js`),__vite__mapDeps([64,2,1,3,16,8,9])))},{id:`php`,name:`PHP`,import:(()=>q(()=>import(`./php-OoKYDxlw.js`),__vite__mapDeps([75,2,1,3,7,16,8,9])))},{id:`pkl`,name:`Pkl`,import:(()=>q(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>q(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>q(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>q(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>q(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>q(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>q(()=>import(`./powershell-DshXNtvi.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>q(()=>import(`./prisma-BsRQq5mF.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>q(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>q(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>q(()=>import(`./pug-CDXuXfau.js`),__vite__mapDeps([76,2,1,3])))},{id:`puppet`,name:`Puppet`,import:(()=>q(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>q(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>q(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>q(()=>import(`./qml-BSj8AX1e.js`),__vite__mapDeps([77,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>q(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>q(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>q(()=>import(`./r-DlO747T6.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>q(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>q(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>q(()=>import(`./razor-D1gVuaXL.js`),__vite__mapDeps([78,79,1,2,3])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>q(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>q(()=>import(`./regexp-CGVqhulu.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>q(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>q(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>q(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>q(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>q(()=>import(`./rst-DtURuW7a.js`),__vite__mapDeps([80,81,23,24,25,26,16,15,1,2,3,20,33,34,35,12,13,36,37,28,8,9,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>q(()=>import(`./ruby-Bc3kUlvr.js`),__vite__mapDeps([33,25,23,24,26,16,2,34,3,35,12,13,36,1,37,28,8,9,38])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>q(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>q(()=>import(`./sas-CFQgZChj.js`),__vite__mapDeps([82,16])))},{id:`sass`,name:`Sass`,import:(()=>q(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>q(()=>import(`./scala-DKOlJaKm.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>q(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>q(()=>import(`./scss-B8cq7hhb.js`).then(e=>e.n),__vite__mapDeps([5,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>q(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>q(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([83,84])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>q(()=>import(`./shellscript-C_GHS-ym.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>q(()=>import(`./shellsession-CTplGpC8.js`),__vite__mapDeps([85,28])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>q(()=>import(`./smalltalk-B16xEiuN.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>q(()=>import(`./solidity-CKzVLygQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>q(()=>import(`./soy-BgD_ErAN.js`),__vite__mapDeps([86,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>q(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([87,88])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>q(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>q(()=>import(`./sql-BnGnr4ii.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>q(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>q(()=>import(`./stata-qCQsVpGc.js`),__vite__mapDeps([89,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>q(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>q(()=>import(`./surrealql-BqH_LSaF.js`),__vite__mapDeps([90,3])))},{id:`svelte`,name:`Svelte`,import:(()=>q(()=>import(`./svelte-Bu1vTtJQ.js`),__vite__mapDeps([91,2,3,11,13])))},{id:`swift`,name:`Swift`,import:(()=>q(()=>import(`./swift-DonLKvLd.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>q(()=>import(`./system-verilog-DJ5XKQeo.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>q(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>q(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>q(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>q(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>q(()=>import(`./templ-B5jQzs9l.js`),__vite__mapDeps([92,2,93,3])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>q(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>q(()=>import(`./tex-BJ-wZPSn.js`),__vite__mapDeps([66,62])))},{id:`toml`,name:`TOML`,import:(()=>q(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>q(()=>import(`./ts-tags-DuLm-TvJ.js`),__vite__mapDeps([94,2,24,25,1,3,16,13,8,9])))},{id:`tsv`,name:`TSV`,import:(()=>q(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>q(()=>import(`./tsx-BPiBkGlY.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>q(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>q(()=>import(`./twig-CdQnHxAS.js`),__vite__mapDeps([95,2,3,75,1,7,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38,5])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>q(()=>import(`./typescript-Dp_zdoqe.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>q(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>q(()=>import(`./typst-DI99ib-x.js`),[]))},{id:`v`,name:`V`,import:(()=>q(()=>import(`./v-DETTlOr0.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>q(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>q(()=>import(`./vb-Djn5o6TS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>q(()=>import(`./verilog-CiiDBU1e.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>q(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>q(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>q(()=>import(`./vue-BmKvlxSZ.js`),__vite__mapDeps([96,2,15,1,3,7,13])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>q(()=>import(`./vue-html-CizabNef.js`),__vite__mapDeps([97,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>q(()=>import(`./vue-vine-JH1Msnx4.js`),__vite__mapDeps([98,2,3,69,11,5,99])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>q(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>q(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>q(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>q(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>q(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>q(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>q(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>q(()=>import(`./xml-DW7DdZow.js`).then(e=>e.n),__vite__mapDeps([8,9])))},{id:`xsl`,name:`XSL`,import:(()=>q(()=>import(`./xsl-6zDkD8bR.js`),__vite__mapDeps([100,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>q(()=>import(`./yaml-W1qZ5vOg.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>q(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>q(()=>import(`./zig-CMLA9XwU.js`),[]))}],IC=Object.fromEntries(FC.map(e=>[e.id,e.import])),LC=Object.fromEntries(FC.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),RC={...IC,...LC},zC=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function BC(e){return VC(e)}function VC(e){return Array.isArray(e)?HC(e):e instanceof RegExp?e:typeof e==`object`?UC(e):e}function HC(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=VC(e[n]);return t}function UC(e){let t={};for(let n in e)t[n]=VC(e[n]);return t}function WC(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function GC(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?GC(e.substring(0,e.length-1)):e.substr(~t+1)}var KC=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,qC=class{static hasCaptures(e){return e===null?!1:(KC.lastIndex=0,KC.test(e))}static replaceCaptures(e,t,n){return e.replace(KC,(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 JC(e,t){return e<t?-1:+(e>t)}function YC(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=JC(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function XC(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 ZC(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var QC=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}},$C=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(iw(e),t)}static createFromParsedTheme(e,t){return sw(e,t)}_cachedMatchRoot=new QC(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=>tw(e.parent,t.parentScopes));return n?new rw(n.fontStyle,n.foreground,n.background):null}},ew=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 tw(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&&!nw(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function nw(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var rw=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function iw(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`&&XC(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&XC(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 aw(l,u,e,o,s,c)}}return n}var aw=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}},ow=(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))(ow||{});function sw(e,t){e.sort((e,t)=>{let n=JC(e.scope,t.scope);return n!==0||(n=YC(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 cw(t),o=new rw(n,a.getId(r),a.getId(i)),s=new dw(new uw(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 $C(a,o,s)}var cw=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)}},lw=Object.freeze([]),uw=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||lw,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)}},dw=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(),uw.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(YC(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 uw(e,t,n,r,i))}},fw=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=mw(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 pw(e){return e}function mw(e){return e}function hw(e,t){let n=[],r=_w(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(gw(i)){let e=[];do e.push(i),i=r.next();while(gw(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 gw(e){return!!e&&!!e.match(/[\w\.:]+/)}function _w(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 vw(e){typeof e.dispose==`function`&&e.dispose()}var yw=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},bw=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},xw=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))}},Sw=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new yw(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new xw;for(let n of e)Cw(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof yw){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 Cw(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 yw?Tw({baseGrammar:a,selfGrammar:i},r):ww(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 yw(e))}function ww(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Ew([r],t,n)}}function Tw(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ew(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ew(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ew(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?WC({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ew(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Mw(i);switch(a.kind){case 0:Tw({...t,selfGrammar:t.baseGrammar},n);break;case 1:Tw(t,n);break;case 2:ww(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?ww(a.ruleName,i,n):Tw(i,n)}else a.kind===4?n.add(new bw(a.scopeName,a.ruleName)):n.add(new yw(a.scopeName));break}}}var Dw=class{kind=0},Ow=class{kind=1},kw=class{constructor(e){this.ruleName=e}kind=2},Aw=class{constructor(e){this.scopeName=e}kind=3},jw=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Mw(e){if(e===`$base`)return new Dw;if(e===`$self`)return new Ow;let t=e.indexOf(`#`);return t===-1?new Aw(e):t===0?new kw(e.substring(1)):new jw(e.substring(0,t),e.substring(t+1))}var Nw=/\\(\d+)/,Pw=/\\(\d+)/g,Fw=-1,Iw=-2;function Lw(e){return e}function Rw(e){return e}var zw=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=qC.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=qC.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${GC(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:qC.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:qC.replaceCaptures(this._contentName,e,t)}},Bw=class extends zw{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!`)}},Vw=class extends zw{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Kw(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 qw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Hw=class extends zw{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 qw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Uw=class extends zw{_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 Kw(i,this.id),this.beginCaptures=a,this._end=new Kw(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 qw;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}},Ww=class extends zw{_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 Kw(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Kw(o,Iw),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 qw;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 qw,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Gw=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Bw(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Vw(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=WC({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Hw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Ww(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 Uw(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=Mw(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 Hw||e instanceof Uw||e instanceof Ww)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Kw=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=Nw.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 Pw.lastIndex=0,this.source.replace(Pw,(e,t)=>ZC(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}},qw=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 Jw(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 Jw(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Jw=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(`
|
|
194
194
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Yw=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Xw=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Yw(e,8),this._embeddedLanguagesMatcher=new Zw(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 Yw(0,0);_getBasicScopeAttributes=new QC(e=>new Yw(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/},Zw=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])=>ZC(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 Qw=!1,$w=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function eT(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=tT(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 $w(i,!0);f()}return new $w(i,!1);function f(){let o=nT(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===Fw){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),cT(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 Uw){let r=o;cT(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 Ww){let r=o;cT(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(cT(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 tT(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 Ww&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=oT(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Iw){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),cT(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 nT(e,t,n,r,i,a){let o=rT(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=iT(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 rT(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=aT(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 iT(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}=aT(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 aT(e,t,n,r,i){return Qw?{ruleScanner:e.compile(t,n),findOptions:sT(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function oT(e,t,n,r,i){return Qw?{ruleScanner:e.compileWhile(t,n),findOptions:sT(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function sT(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function cT(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));eT(e,p,n&&d.start===0,d.start,f,i,!1,0),vw(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 lT(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var lT=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function uT(e,t,n,r,i,a,o,s){return new mT(e,t,n,r,i,a,o,s)}function dT(e,t,n,r,i){let a=hw(t,fT),o=Gw.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 fT(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(pT(t[r],e))return n=r+1,!0;return!1})}function pT(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 mT=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Xw(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=hT(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=hw(e,fT);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)dT(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&&dT(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(Lw(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Rw(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]=hT(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=Gw.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===_T.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=fw.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?gT.createRootAndLookUpScopeName(a,r,this):gT.createRoot(`unknown`,r),t=new _T(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
195
195
|
`;let a=this.createOnigString(e),o=a.content.length,s=new yT(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=eT(this,a,i,0,t,s,!0,r);return vw(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function hT(e,t){return e=BC(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 gT=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=ew.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new ew(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new ew(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),fw.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}},_T=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)?gT.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:Rw(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=gT.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Lw(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,gT.fromExtension(r,n.contentNameScopesList))}},vT=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):hw(e,fT).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>hw(e,fT).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}},yT=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=fw.set(n,0,pw(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=fw.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}},bT=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,uT(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},xT=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new bT($C.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme($C.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 vT(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Sw(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)}},ST=_T.NULL;function CT(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 wT(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function TT(e){return Array.isArray(e)?e:[e]}async function ET(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function DT(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function OT(e){return e===`ansi`||DT(e)}function kT(e){return e===`none`}function AT(e){return kT(e)}var jT=/(\r?\n)/g;function MT(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(jT),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var NT={light:`#333333`,dark:`#bbbbbb`},PT={light:`#fffffe`,dark:`#1e1e1e`},FT=`__shiki_resolved`;function IT(e){if(e?.[FT])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`?NT.light:NT.dark,n||=t.type===`light`?PT.light:PT.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,FT,{enumerable:!1,writable:!1,value:!0}),t}async function LT(e){return[...new Set((await Promise.all(e.filter(e=>!OT(e)).map(async e=>await ET(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function RT(e){return(await Promise.all(e.map(async e=>AT(e)?null:IT(await ET(e))))).filter(e=>!!e)}function zT(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 zC(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var BT=class extends xT{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=IT(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=$C.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=zT(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new zC(`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))}},VT=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}},HT=0;function UT(e){HT+=1,e.warnings!==!1&&HT>=10&&HT%10==0&&console.warn(`[Shiki] ${HT} 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 zC("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(IT),i=new BT(new VT(e.engine,n),r,n,e.langAlias),a;function o(t){return zT(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new zC(`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 zC(`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 LT(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await RT(e))}function g(){if(t)throw new zC(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--HT)}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 WT(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([RT(e.themes||[]),LT(e.langs||[]),e.engine]);return UT({...e,themes:t,langs:n,engine:r})}var GT=new WeakMap;function KT(e,t){GT.set(e,t)}function qT(e){return GT.get(e)}var JT=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(TT(n).map(e=>[e,ST])),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 YT(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function YT(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 XT(e,t){if(!(e instanceof JT))throw new zC(`Invalid grammar state`);return e.getInternalStack(t)}var ZT=/,/,QT=/ /;function $T(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(DT(e.resolveLangAlias(n.lang||`text`))||kT(r))return MT(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new zC(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new zC(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return tE(t,o,i,a,n)}function eE(...e){if(e.length===2)return qT(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(DT(i)||kT(a))throw new zC(`Plain language does not have grammar state`);if(i===`ansi`)throw new zC(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new JT(nE(n,c,o,s,r).stateStack,c.name,o.name)}function tE(e,t,n,r,i){let a=nE(e,t,n,r,i),o=new JT(a.stateStack,t.name,n.name);return KT(a.tokens,o),a.tokens}function nE(e,t,n,r,i){let a=CT(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=MT(e),l=i.grammarState?XT(i.grammarState,n.name)??ST:i.grammarContextCode==null?ST:nE(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=wT(r[fw.getForeground(s)],a),l=fw.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(ZT).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(QT))})}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`?rE(t.scopes):iE(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function rE(e){return e.map(e=>({scopeName:e}))}function iE(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:sE(e,i,t.slice(0,r))}}return n}function aE(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function oE(e,t,n){if(!aE(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)aE(e[r],n[i])&&--r,--i;return r===-1}function sE(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(oE(e,t,n)){r.push(a);break}return r}function cE(e,t,n,r=$T){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:qT(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=lE(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new JT(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&KT(s,c),s}function lE(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var uE=/\s+/g;function dE(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(uE)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(uE);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function fE(e){let t=MT(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var pE=[`color`,`background-color`];function mE(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 hE(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=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?mE(e,t):e})):e}function gE(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>_E(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&&pE.includes(a))if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new zC('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 _E(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&ow.Italic&&(t[`font-style`]=`italic`),e.fontStyle&ow.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&ow.Underline&&n.push(`underline`),e.fontStyle&ow.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function vE(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function yE(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=fE(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new zC(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new zC(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new zC(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));bE(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return hE(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new zC(`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+=xE(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new zC(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new zC(`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&&dE(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 bE(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new zC(`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 zC(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function xE(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(xE).join(``):``}var SE=[yE()];function CE(e){let t=wE(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...SE]}function wE(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 TE=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],EE={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function DE(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 OE(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 kE(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)EE[r]&&t.push({type:`setDecoration`,value:EE[r]});else if(r<=29){let e=EE[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:TE[r-30]}});else if(r===38){let n=OE(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:TE[r-40]}});else if(r===48){let n=OE(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:TE[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:TE[r-100+8]}})}return t}function AE(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=DE(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=kE(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 jE={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 ME(e=jE){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<TE.length;e++)r.push(t(TE[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 NE=/#([0-9a-f]{3,8})/i,PE=/var\((--[\w-]+-ansi-[\w-]+)\)/,FE={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 IE(e,t,n){let r=CT(e,n),i=MT(t),a=ME(Object.fromEntries(TE.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||FE[t]]}))),o=AE();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=wT(i,r),o=wT(o,r),n.decorations.has(`dim`)&&(i=LE(i));let s=ow.None;return n.decorations.has(`bold`)&&(s|=ow.Bold),n.decorations.has(`italic`)&&(s|=ow.Italic),n.decorations.has(`underline`)&&(s|=ow.Underline),n.decorations.has(`strikethrough`)&&(s|=ow.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function LE(e){let t=e.match(NE);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(PE);return n?`var(${n[1]}-dim)`:e}function RE(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!DT(r)&&!kT(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return IE(r,t,n)}return $T(e,t,n)}function zE(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 zC("`themes` option must not be empty");let p=cE(e,t,n,RE);if(c=qT(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new zC(`\`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=>gE(e,h,u,l,d))),c&&KT(a,c);let g=f.map(e=>CT(e.theme,n));i=BE(f,m,g,u,l,`fg`,d),r=BE(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=CT(n.theme,n);a=RE(e,t,n);let l=e.getTheme(n.theme);r=wT(l.bg,s),i=wT(l.fg,s),o=l.name,c=qT(a)}else throw new zC("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function BE(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=wT(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new zC('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${wT(t[r][a],n[r])||`inherit`}, ${wT(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var VE=/^\s+$/,HE=/^(\s*)(.*?)(\s*)$/;function UE(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>UE(e,t,n),codeToTokens:(t,n)=>zE(e,t,n)}){let i=t;for(let e of CE(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=zE(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=GE(a):d===`never`&&(a=KE(a)),f&&(a=qE(a));let p={...r,get source(){return i}};for(let e of CE(n))a=e.tokens?.call(p,a)||a;return WE(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function WE(e,t,n,r=qT(e)){let i=CE(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:dE,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:`
|
|
196
196
|
`}));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=vE(a.htmlStyle||_E(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&&KT(m,r),m}function GE(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&ow.Underline||i.fontStyle&ow.Strikethrough));o&&VE.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function KE(e){return e.map(e=>e.flatMap(e=>{if(VE.test(e.content))return e;let t=e.content.match(HE);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 qE(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=vE(e.htmlStyle||_E(e)),i=vE(n.htmlStyle||_E(n)),a=e.fontStyle&&(e.fontStyle&ow.Underline||e.fontStyle&ow.Strikethrough),o=n.fontStyle&&(n.fontStyle&ow.Underline||n.fontStyle&ow.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var JE=DS;function YE(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>UE(e,t,n),codeToTokens:(t,n)=>zE(e,t,n)},i=JE(UE(e,t,n,r));for(let e of CE(n))i=e.postprocess?.call(r,i,n)||i;return i}async function XE(e){let t=await WT(e);return{getLastGrammarState:(...e)=>eE(t,...e),codeToTokensBase:(e,n)=>RE(t,e,n),codeToTokensWithThemes:(e,n)=>cE(t,e,n),codeToTokens:(e,n)=>zE(t,e,n),codeToHast:(e,n)=>UE(t,e,n),codeToHtml:(e,n)=>YE(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function ZE(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,OT(n))return[];let r=t[n];if(!r)throw new zC(`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(AT(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new zC(`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 XE({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}var QE=4294967295,$E=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:QE,end:QE,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 eD(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function tD(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var nD=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),rD=String.raw;function iD(e,t){if(e==null)throw Error(t??`Value expected`);return e}var aD=rD`\[\^?`,oD=`c.? | C(?:-.?)?|${rD`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${rD`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${rD`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${rD`o\{[^\}]*\}?`}|${rD`\d{1,3}`}`,sD=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,cD=new RegExp(rD`
|
|
@@ -787,7 +787,7 @@ XID_Start XIDS`.split(/\s/).map(e=>[OO(e),e])),Sk=new Map([[`s`,ok(383)],[ok(383
|
|
|
787
787
|
`),n=[],r=null;for(let e=0;e<t.length;e++){if(!QP.test(t[e]??``))continue;let i=e+1;r==null?r=i:(n.push({start:r,end:i}),r=null)}return r!=null&&n.push({start:r,end:t.length}),n}function eF(e,t){let n=e.split(`
|
|
788
788
|
`).slice(t.start-1,t.end);return n.length>0&&QP.test(n[0]??``)&&n.shift(),n.length>0&&QP.test(n[n.length-1]??``)&&n.pop(),n.join(`
|
|
789
789
|
`)}var tF=/^[`~\s]*$/;function nF(e){for(let t of e.children){let e=t.textContent??``;if(e.trim()!==``&&!tF.test(e)){t.setAttribute(`data-code-lang`,``);return}}}function rF(e){for(let t of e.children)if(/[`~]/.test(t.textContent??``)){t.setAttribute(`data-code-fence`,``);return}}function iF(e,t){let n=new Set(t.map(e=>e.start)),r=new Set(t.map(e=>e.end)),i=e=>t.some(t=>e>=t.start&&e<=t.end);for(let t of e.querySelectorAll(`[data-content] [data-code-lang], [data-content] [data-code-fence]`))t.removeAttribute(`data-code-lang`),t.removeAttribute(`data-code-fence`);for(let t of e.querySelectorAll(`[data-content] [data-line]`)){let e=Number(t.getAttribute(`data-line`)),a=Number.isFinite(e)&&i(e);t.toggleAttribute(`data-code-line`,a),t.toggleAttribute(`data-code-start`,a&&n.has(e)),t.toggleAttribute(`data-code-end`,a&&r.has(e)),a&&n.has(e)&&nF(t),a&&r.has(e)&&rF(t)}}var aF=`data-code-card`,oF=`data-code-card-gutter`,sF=e=>({scrollWidth:e.scrollWidth,clientWidth:e.clientWidth});function cF(e,t){let n=[];for(let r=t.start;r<=t.end;r++){let t=e.querySelector(`:scope > [data-line="${r}"]`);t!=null&&n.push(t)}return n}function lF(e,t,n){let r=document.createElement(`div`);r.setAttribute(aF,t),r.style.gridRow=`span ${n.length}`,e.insertBefore(r,n[0]??null);for(let e of n)r.appendChild(e)}function uF(e,t){for(;t.firstChild!=null;)e.insertBefore(t.firstChild,t);t.remove()}function dF(e,t){let n=[];for(let r=t.start;r<=t.end;r++){let t=e.querySelector(`:scope > [data-column-number="${r}"]`);t!=null&&n.push(t)}return n}function fF(e,t,n){let r=document.createElement(`div`);r.setAttribute(oF,t),r.style.display=`contents`,e.insertBefore(r,n[0]??null);for(let e of n)r.appendChild(e)}function pF(e,t,n=sF){let r=e.querySelector(`[data-content]`);if(r==null)return;let i=new Set;for(let e of t){let t=String(e.start),a=r.querySelector(`:scope > [${aF}="${t}"]`);if(a!=null){let e=n(a);e.scrollWidth>e.clientWidth&&i.add(t);continue}let o=cF(r,e);o.length!==0&&o.some(e=>{let t=n(e);return t.scrollWidth>t.clientWidth})&&(lF(r,t,o),i.add(t))}for(let e of r.querySelectorAll(`:scope > [${aF}]`))i.has(e.getAttribute(`data-code-card`)??``)||uF(r,e);let a=e.querySelector(`[data-gutter]`);if(a!=null){for(let e of t){let t=String(e.start);if(!i.has(t)||a.querySelector(`:scope > [data-code-card-gutter="${t}"]`)!=null)continue;let n=dF(a,e);n.length>0&&fF(a,t,n)}for(let e of a.querySelectorAll(`:scope > [${oF}]`))i.has(e.getAttribute(`data-code-card-gutter`)??``)||uF(a,e)}}var mF=new Set(Object.keys(TA)),hF={js:`javascript`,mjs:`javascript`,cjs:`javascript`,node:`javascript`,ts:`typescript`,py:`python`,python3:`python`,rb:`ruby`,rs:`rust`,golang:`go`,sh:`shellscript`,bash:`shellscript`,zsh:`shellscript`,shell:`shellscript`,console:`shellscript`,yml:`yaml`,"c++":`cpp`,cxx:`cpp`,cc:`cpp`,hpp:`cpp`,htm:`html`,docker:`dockerfile`,gql:`graphql`},gF=/^[ \t]{0,3}(?:`{3,}|~{3,})[ \t]*([A-Za-z0-9_+#.-]+)/gm;function _F(e){let t=new Set;for(let n of e.matchAll(gF)){let e=(n[1]??``).toLowerCase(),r=hF[e]??e;r!==`markdown`&&mF.has(r)&&t.add(r)}return[...t].sort()}var vF=new Set,yF=new Map;function bF(e){let t=UA({themes:[BP.theme.light,BP.theme.dark],langs:[e]}).then(()=>(vF.add(e),!0)).catch(()=>!1).finally(()=>{yF.delete(e)});return yF.set(e,t),t}async function xF(e){let t=e.filter(e=>!vF.has(e)).map(e=>yF.get(e)??bF(e));return t.length===0?!1:(await Promise.all(t)).some(Boolean)}var SF=F(`<div class="diffview"></div>`);function CF(e,t){T(t,!0),UP();let n=W(t,`options`,19,()=>({})),r=W(t,`openUrl`,3,PP),i=W(t,`selectedRange`,3,null),a=oP({create:e=>new lM(e,void 0,!0)}),o=O(void 0),s=!1;Kn(()=>{if(P(o)==null||s)return;s=!0;let e=P(o);t.onReady?.({scrollToLine:t=>XP(e,t),host:e})});let c=D(()=>SP(t.links,t.fileRefs,{openUrl:r(),onFileRefEnter:t.onFileRefEnter,onFileRefLeave:t.onFileRefLeave})),l=e=>{let n=(P(o)?.shadowRoot)?.getSelection?.()??(typeof getSelection==`function`?getSelection():null);dP({numberColumn:e.numberColumn,linkConsumed:P(c)?.wasLinkClick(e.event)??!1,selectionCollapsed:n==null||n.isCollapsed})&&t.onLineComment?.(e.lineNumber)},u=D(()=>t.onLineComment==null?void 0:l),d=D(()=>GP(n(),P(c),t.gutter,P(u)));Kn(()=>()=>a.destroy()),Kn(()=>{P(o)!=null&&a.sync({contentKey:t.contentKey,container:P(o),content:{file:{name:t.doc.name,contents:t.doc.text}},options:P(d),annotations:t.annotations})}),Kn(()=>{let e=_F(t.doc.text);if(e.length===0)return;let n=!1;return xF(e).then(e=>{e&&!n&&a.rehighlight()}),()=>{n=!0}});let f=D(()=>t.onLineRangeComment!=null);function p(e,t){let n=P(o)?.shadowRoot;if(n==null)return null;let r=n.elementFromPoint(e,t);if(!(r instanceof Element)||r.closest(`[data-column-number],[data-gutter-utility-slot]`))return null;let i=r.closest(`[data-line]`),a=i==null?NaN:Number.parseInt(i.getAttribute(`data-line`)??``,10);return Number.isFinite(a)?a:null}Kn(()=>{let e=P(o);if(e==null||!P(f))return;let n=sP({lineFromPoint:p,onPreview:e=>{a.select(e==null?null:{start:e.startLine,end:e.endLine}),t.onLineRangePreview?.(e)},onCommit:e=>{t.onLineRangeComment?.(e.startLine,e.endLine)}}),r=e=>n.pointermove(e);function i(t){for(let n of[`user-select`,`-webkit-user-select`])t?e.style.setProperty(n,`none`):e.style.removeProperty(n)}function s(){i(!1),document.removeEventListener(`pointermove`,r),document.removeEventListener(`pointerup`,c),document.removeEventListener(`pointercancel`,l),window.removeEventListener(`blur`,l)}function c(e){n.pointerup(e),s()}function l(){n.cancel(),s()}let u=e=>{n.pointerdown(e)&&(i(!0),document.addEventListener(`pointermove`,r),document.addEventListener(`pointerup`,c),document.addEventListener(`pointercancel`,l),window.addEventListener(`blur`,l))};return e.addEventListener(`pointerdown`,u),()=>{e.removeEventListener(`pointerdown`,u),n.cancel(),s()}}),Kn(()=>{a.select(i()==null?null:{start:i().startLine,end:i().endLine})});let m,h=D(()=>(m?.text!==t.doc.text&&(m={text:t.doc.text,ranges:$P(t.doc.text)}),m.ranges)),g=new Map;Kn(()=>{let e=P(o)?.shadowRoot;if(e==null)return;let n=P(h),r=t.fileRefs,i=0,a=()=>{iF(e,n),pF(e,n),mP(e,r??g)},s=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(a)};a();let c=new MutationObserver(s);c.observe(e,{childList:!0,subtree:!0});let l=new ResizeObserver(s);return P(o)!=null&&l.observe(P(o)),()=>{cancelAnimationFrame(i),c.disconnect(),l.disconnect()}});var _=SF();wa(_,e=>k(o,e),()=>P(o)),L(e,_),E()}var wF=F(`<div class="diffview"></div>`);function TF(e,t){T(t,!0),UP();let n=W(t,`options`,19,()=>({})),r=oP({create:e=>new JN(e,void 0,!0)}),i=O(void 0),a=D(()=>KP(n()));Kn(()=>()=>r.destroy()),Kn(()=>{P(i)!=null&&r.sync({contentKey:t.contentKey,container:P(i),content:{oldFile:{name:t.oldDoc.name,contents:t.oldDoc.text},newFile:{name:t.newDoc.name,contents:t.newDoc.text}},options:P(a),annotations:t.annotations})}),Kn(()=>{let e=_F(`${t.oldDoc.text}\n${t.newDoc.text}`);if(e.length===0)return;let n=!1;return xF(e).then(e=>{e&&!n&&r.rehighlight()}),()=>{n=!0}});var o=wF();wa(o,e=>k(i,e),()=>P(i)),N(()=>pa(o,`data-caret-indicators`,n().diffIndicators===`both`?`both`:void 0)),L(e,o),E()}var EF=`--diffs-decoration-bar-color`,DF=e=>{let t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom}};function OF(e,t,n,r=DF){let i=Math.min(n.startLine,n.endLine),a=Math.max(n.startLine,n.endLine),o=e.shadowRoot;if(o==null)return null;let s,c;for(let e=i;e<=a;e++){let t=o.querySelector(`[data-line="${e}"]`);if(t==null)continue;let n=r(t);(s===void 0||n.top<s)&&(s=n.top),(c===void 0||n.bottom>c)&&(c=n.bottom)}if(s===void 0||c===void 0)return null;let l=r(t).top-t.scrollTop;return{top:s-l,height:Math.max(0,c-s)}}function kF(e,t){e.dataset.commentBracketLayer=``;let n=t,r,i,a=e.parentElement,o=()=>{let t=n.host;if(t==null||a==null){e.replaceChildren();return}let r=getComputedStyle(t).getPropertyValue(EF).trim();r!==``&&e.style.setProperty(EF,r);let i=e.children;for(;i.length>n.spans.length;)e.lastElementChild?.remove();for(;i.length<n.spans.length;){let t=document.createElement(`div`);t.dataset.commentBracket=``,e.appendChild(t)}n.spans.forEach((e,n)=>{let r=i[n];if(r==null)return;let o=OF(t,a,e);if(o==null||o.height===0){r.style.display=`none`;return}r.style.display=``,r.style.top=`${o.top}px`,r.style.height=`${o.height}px`})},s=e=>{e!==r&&(i?.disconnect(),i=void 0,r=e,e!=null&&(i=new ResizeObserver(()=>o()),i.observe(e)))};return s(n.host),o(),{update(e){n=e,s(e.host),o()},destroy(){i?.disconnect()}}}var AF=e=>{let t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom,left:t.left,right:t.right}};function jF(e,t,n,r,i=AF){let a=e.shadowRoot;if(a==null)return null;for(let e of t){let t=a.querySelector(`[data-content] > [data-line="${e.start}"]`),o=a.querySelector(`[data-content] > [data-line="${e.end}"]`);if(t==null||o==null)continue;let s=i(t),c=i(o),l=Math.min(s.top,c.top),u=Math.max(s.bottom,c.bottom);if(r>=l&&r<=u&&n>=s.left&&n<=s.right)return e}return null}function MF(e,t,n,r=AF){let i=e.shadowRoot;if(i==null)return null;let a=i.querySelector(`[data-content] > [data-line="${n.start}"]`);if(a==null)return null;let o=r(a),s=r(t);return{top:o.top-(s.top-t.scrollTop),left:o.right-(s.left-t.scrollLeft)}}var NF=`caret:diffview:drag-hint-dismissed`;function PF(){try{return localStorage.getItem(NF)===`1`}catch{return!0}}function FF(){try{localStorage.setItem(NF,`1`)}catch{}}var IF=/^\s*(`{3,}|~{3,})/,LF=/(`+)(.*?)\1/g,RF=/\bhttps?:\/\/\S+/gi,zF=/[A-Za-z0-9._/~-]+(?::\d+(?::\d+)?)?/g,BF=/^(.+?):(\d+)(?::\d+)?$/,VF=/\.([A-Za-z0-9]+)$/,HF=new Set(`ts.tsx.mts.cts.js.jsx.mjs.cjs.svelte.vue.json.jsonc.css.scss.less.html.htm.xml.svg.md.mdx.py.rb.rs.go.java.kt.c.h.cc.cpp.hpp.sh.bash.zsh.toml.yaml.yml.ini.sql.graphql.gql.php.swift.dart.txt.lock.cfg.conf`.split(`.`));function UF(e){let t=e,n,r=BF.exec(e);r&&(t=r[1],n=Number(r[2]));let i=t.split(`/`).pop()??``,a=VF.exec(i)?.[1]?.toLowerCase();return a===void 0||!HF.has(a)||i.length<=a.length+1?null:{path:t,line:n}}function WF(e){let t=[];for(let n of e.matchAll(LF)){let e=n[2]??``,r=n.index+(n[1]?.length??0),i=[...e.matchAll(RF)].map(e=>({start:e.index,end:e.index+e[0].length}));for(let n of e.matchAll(zF)){let e=n[0],a=n.index,o=a+e.length;if(i.some(e=>a<e.end&&o>e.start))continue;let s=UF(e);s!==null&&t.push({startCol:r+a,endCol:r+o,path:s.path,line:s.line})}}return t}function GF(e){let t=e.split(`
|
|
790
|
-
`),n=new Map,r=!1;for(let e=0;e<t.length;e++){let i=t[e]??``,a=IF.test(i);if(r||a){a&&(r=!r);continue}let o=WF(i);o.length>0&&n.set(e+1,o)}return n}var KF=Xo(`caret.diffStyle`,[`split`,`unified`],`split`),qF=KF.read,JF=KF.write,YF=Xo(`caret.diffIndicators`,[`bars`,`classic`,`both`],`bars`),XF=YF.read,ZF=YF.write;function QF(e){let t=e[e.length-1]?.version??0;return{base:t,target:e[e.length-2]?.version??t}}function $F(e,t){function n(t){let{base:n,target:r}=QF(t);e.baseVersion=n,e.targetVersion=r}return{canCompare(e){return e.length>=2},planFor(e,t){return e.find(e=>e.version===t)?.plan??``},init(r){e.diffStyle=t.readPref(),e.diffIndicators=t.readIndicatorsPref(),n(r)},syncVersions(t){t.length<2&&(e.comparing=!1);let r=e=>t.some(t=>t.version===e);(!r(e.baseVersion)||!r(e.targetVersion))&&n(t)},setBase(t){e.baseVersion=t},setTarget(t){e.targetVersion=t},setComparing(t){e.comparing=t},setDiffStyle(n){e.diffStyle=n,t.writePref(n)},setDiffIndicators(n){e.diffIndicators=n,t.writeIndicatorsPref(n)}}}function eI(e){if(e==null)return null;let t=e.trim();return t===``?null:t}function tI(){return eI(new URLSearchParams(location.search).get(`heading`))}function nI(e){let t=new URL(location.href),n=e?.trim();n?t.searchParams.set(`heading`,n):t.searchParams.delete(`heading`),history.replaceState(null,``,t)}function rI(){let e=tI();return e!=null&&nI(null),e}function iI(e,t){T(t,!0);let n=W(t,`open`,15,!1),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`open`]);var i=I();V(j(i),()=>E_,(e,t)=>{t(e,U(()=>r,{get open(){return n()},set open(e){n(e)}}))}),L(e,i),E()}function aI(e,t){let n=H(t,[`$$slots`,`$$events`,`$$legacy`]);var r=I();V(j(r),()=>sf,(e,t)=>{t(e,U(()=>n))}),L(e,r)}function oI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`sideOffset`,3,4),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`sideOffset`,`portalProps`,`class`]);aI(e,U(()=>t.portalProps,{children:(e,a)=>{var o=I(),s=j(o);{let e=D(()=>rl(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border p-1 shadow-md outline-none`,t.class));V(s,()=>k_,(t,a)=>{a(t,U({"data-slot":`dropdown-menu-content`,get sideOffset(){return r()},get class(){return P(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,o)},$$slots:{default:!0}})),E()}function sI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`variant`,3,`default`),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`inset`,`variant`]);var a=I(),o=j(a);{let e=D(()=>rl(`data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t.class));V(o,()=>d_,(a,o)=>{o(a,U({"data-slot":`dropdown-menu-item`,get"data-inset"(){return t.inset},get"data-variant"(){return r()},get class(){return P(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,a),E()}function cI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`]);var i=I();V(j(i),()=>j_,(e,t)=>{t(e,U({"data-slot":`dropdown-menu-trigger`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),L(e,i),E()}var lI=nl({base:`hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,variants:{variant:{default:`bg-transparent`,outline:`border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs`},size:{default:`h-9 min-w-9 px-2`,sm:`h-8 min-w-8 px-1.5`,lg:`h-10 min-w-10 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}});function uI(e){at(`toggleGroup`,e)}function dI(){return it(`toggleGroup`)}function fI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`value`,15),i=W(t,`size`,3,`default`),a=W(t,`spacing`,3,0),o=W(t,`variant`,3,`default`),s=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`,`size`,`spacing`,`variant`]);uI({variant:o(),size:i(),spacing:a()});var c=I(),l=j(c);{let e=D(()=>`--gap: ${a()}`),c=D(()=>rl(`group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs`,t.class));V(l,()=>Lv,(t,l)=>{l(t,U({"data-slot":`toggle-group`,get"data-variant"(){return o()},get"data-size"(){return i()},get"data-spacing"(){return a()},get style(){return P(e)},get class(){return P(c)}},()=>s,{get value(){return r()},set value(e){r(e)},get ref(){return n()},set ref(e){n(e)}}))})}L(e,c),E()}function pI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`,`size`,`variant`]),i=dI();var a=I(),o=j(a);{let e=D(()=>i.variant||t.variant),a=D(()=>i.size||t.size),s=D(()=>rl(lI({variant:i.variant||t.variant,size:i.size||t.size}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10 data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,t.class));V(o,()=>zv,(o,c)=>{c(o,U({"data-slot":`toggle-group-item`,get"data-variant"(){return P(e)},get"data-size"(){return P(a)},get"data-spacing"(){return i.spacing},get class(){return P(s)},get value(){return t.value}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,a),E()}function mI(e,t){T(t,!0);let n=W(t,`open`,15,!1),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`open`]);var i=I();V(j(i),()=>Yv,(e,t)=>{t(e,U(()=>r,{get open(){return n()},set open(e){n(e)}}))}),L(e,i),E()}function hI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`]);var i=I();V(j(i),()=>ey,(e,t)=>{t(e,U({"data-slot":`tooltip-trigger`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),L(e,i),E()}function gI(e,t){let n=H(t,[`$$slots`,`$$events`,`$$legacy`]);var r=I();V(j(r),()=>sf,(e,t)=>{t(e,U(()=>n))}),L(e,r)}var _I=F(`<div></div>`),vI=F(`<!> <!>`,1);function yI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`sideOffset`,3,0),i=W(t,`side`,3,`top`),a=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`sideOffset`,`side`,`children`,`arrowClasses`,`portalProps`]);gI(e,U(()=>t.portalProps,{children:(e,o)=>{var s=I(),c=j(s);{let e=D(()=>rl(`bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--bits-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,t.class));V(c,()=>Qv,(o,s)=>{s(o,U({"data-slot":`tooltip-content`,get sideOffset(){return r()},get side(){return i()},get class(){return P(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=vI(),i=j(r);B(i,()=>t.children??h);var a=M(i,2);{let e=(e,n)=>{let r=()=>n?.().props;var i=_I();ha(i,e=>({class:e,...r()}),[()=>rl(`bg-foreground z-50 size-2.5 rotate-45 rounded-[2px]`,`data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]`,`data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]`,`data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2`,`data-[side=left]:-translate-y-[calc(50%_-_3px)]`,t.arrowClasses)]),L(e,i)};V(a,()=>ty,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}L(e,r)},$$slots:{default:!0}}))})}L(e,s)},$$slots:{default:!0}})),E()}function bI(e,t){let n=H(t,[`$$slots`,`$$events`,`$$legacy`]);var r=I();V(j(r),()=>ny,(e,t)=>{t(e,U(()=>n))}),L(e,r)}var xI=F(`<button><span class="vpick-label svelte-h91uf3"> </span> <svg class="chevron svelte-h91uf3" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button>`),SI=F(`<span class="check" aria-hidden="true"><!></span> <span> </span>`,1),CI=F(`<!> <!>`,1),wI=F(`<span><!></span>`),TI=F(`<!> <!>`,1),EI=F(`<!> <!>`,1),DI=F(`<!> <!> <!>`,1),OI=F(`<div class="pair svelte-h91uf3"><div class="field svelte-h91uf3"><span class="lbl svelte-h91uf3">Base</span> <!></div> <span class="arrow svelte-h91uf3" aria-hidden="true">→</span> <div class="field svelte-h91uf3"><span class="lbl svelte-h91uf3">Target</span> <!></div></div> <div class="controls svelte-h91uf3"><!> <!></div>`,1),kI=F(`<div class="compare-picker svelte-h91uf3"><!> <!></div>`);function AI(e,t){T(t,!0);let n=(e,t=h,n=h,i=h)=>{var a=I();V(j(a),()=>iI,(e,a)=>{a(e,{children:(e,a)=>{var o=CI(),s=j(o);{let e=(e,r)=>{let i=()=>r?.().props;var a=xI();ha(a,()=>({...i(),type:`button`,class:`vpick float-chip`,"aria-label":t()}),void 0,void 0,void 0,`svelte-h91uf3`);var o=A(a),s=A(o);w(o),Je(2),w(a),N(()=>R(s,`v${n()??``}`)),L(e,a)};V(s,()=>cI,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}V(M(s,2),()=>oI,(e,t)=>{t(e,{align:`start`,class:`vmenu`,style:`min-width: var(--bits-dropdown-menu-anchor-width)`,children:(e,t)=>{var a=I(),o=j(a);{let e=D(()=>String(n()));V(o,()=>h_,(t,n)=>{n(t,{get value(){return P(e)},onValueChange:e=>i()(Number(e)),children:(e,t)=>{var n=I();Ni(j(n),17,()=>P(r),e=>e.version,(e,t)=>{var n=I(),r=j(n);{let e=(e,n)=>{let r=()=>n?.().checked;var i=SI(),a=j(i),o=A(a),s=e=>{wl(e,{name:`check`,size:15})};z(o,e=>{r()&&e(s)}),w(a);var c=M(a,2),l=A(c);w(c),N(()=>R(l,`v${P(t).version??``}`)),L(e,i)},n=D(()=>String(P(t).version));V(r,()=>p_,(t,r)=>{r(t,{get value(){return P(n)},class:`vitem`,children:e,$$slots:{default:!0}})})}L(e,n)}),L(e,n)},$$slots:{default:!0}})})}L(e,a)},$$slots:{default:!0}})}),L(e,o)},$$slots:{default:!0}})}),L(e,a)},r=D(()=>[...t.versions].sort((e,t)=>t.version-e.version)),i=O(null),a=O(null);function o(e){let t=document.createElement(`span`);t.className=`seg-pill`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t);let n=()=>{let n=e.querySelector(`[data-state="on"]`);if(!n){t.style.opacity=`0`;return}let r=e.getBoundingClientRect(),i=n.getBoundingClientRect();t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,t.style.transform=`translate(${i.left-r.left}px, ${i.top-r.top}px)`,t.style.opacity=`1`};t.style.transition=`none`;let r=requestAnimationFrame(()=>{n(),r=requestAnimationFrame(()=>{t.style.transition=``})}),i=new MutationObserver(n);i.observe(e,{attributes:!0,attributeFilter:[`data-state`],subtree:!0});let a=typeof ResizeObserver<`u`?new ResizeObserver(n):null;return a?.observe(e),()=>{cancelAnimationFrame(r),i.disconnect(),a?.disconnect(),t.remove()}}Kn(()=>P(i)?o(P(i)):void 0),Kn(()=>P(a)?o(P(a)):void 0);var s=kI(),c=A(s),l=e=>{ul(e,{variant:`secondary`,size:`sm`,class:`compare-toggle float-chip`,get"aria-pressed"(){return t.comparing},onclick:()=>t.onSetComparing(!t.comparing),children:(e,t)=>{Je(),L(e,yi(`Compare versions`))},$$slots:{default:!0}})},u=e=>{var t=I();V(j(t),()=>bI,(e,t)=>{t(e,{delayDuration:0,children:(e,t)=>{var n=I();V(j(n),()=>mI,(e,t)=>{t(e,{children:(e,t)=>{var n=TI(),r=j(n);{let e=(e,t)=>{let n=()=>t?.().props;var r=wI();ha(r,()=>({...n(),class:`compare-toggle-wrap`}),void 0,void 0,void 0,`svelte-h91uf3`),ul(A(r),{variant:`secondary`,size:`sm`,class:`compare-toggle float-chip`,disabled:!0,"aria-pressed":!1,children:(e,t)=>{Je(),L(e,yi(`Compare versions`))},$$slots:{default:!0}}),w(r),L(e,r)};V(r,()=>hI,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}V(M(r,2),()=>yI,(e,t)=>{t(e,{children:(e,t)=>{Je(),L(e,yi(`No other versions to compare yet`))},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})}),L(e,t)};z(c,e=>{t.canCompare?e(l):e(u,-1)});var d=M(c,2),f=e=>{var r=OI(),o=j(r),s=A(o);n(M(A(s),2),()=>`Base version`,()=>t.baseVersion,()=>e=>t.onSelectBase(e)),w(s);var c=M(s,4);n(M(A(c),2),()=>`Target version`,()=>t.targetVersion,()=>e=>t.onSelectTarget(e)),w(c),w(o);var l=M(o,2),u=A(l),d=()=>t.diffStyle,f=e=>{e&&t.onSetDiffStyle(e)};V(u,()=>fI,(e,t)=>{t(e,{type:`single`,size:`sm`,"aria-label":`Diff layout`,get value(){return d()},set value(e){f(e)},get ref(){return P(i)},set ref(e){k(i,e,!0)},children:(e,t)=>{var n=EI(),r=j(n);V(r,()=>pI,(e,t)=>{t(e,{value:`split`,children:(e,t)=>{Je(),L(e,yi(`Split`))},$$slots:{default:!0}})}),V(M(r,2),()=>pI,(e,t)=>{t(e,{value:`unified`,children:(e,t)=>{Je(),L(e,yi(`Unified`))},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})});var p=M(u,2),m=()=>t.diffIndicators,h=e=>{e&&t.onSetDiffIndicators(e)};V(p,()=>fI,(e,t)=>{t(e,{type:`single`,size:`sm`,"aria-label":`Diff indicators`,get value(){return m()},set value(e){h(e)},get ref(){return P(a)},set ref(e){k(a,e,!0)},children:(e,t)=>{var n=DI(),r=j(n);V(r,()=>pI,(e,t)=>{t(e,{value:`bars`,children:(e,t)=>{Je(),L(e,yi(`Bars`))},$$slots:{default:!0}})});var i=M(r,2);V(i,()=>pI,(e,t)=>{t(e,{value:`classic`,children:(e,t)=>{Je(),L(e,yi(`+/−`))},$$slots:{default:!0}})}),V(M(i,2),()=>pI,(e,t)=>{t(e,{value:`both`,children:(e,t)=>{Je(),L(e,yi(`Both`))},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})}),w(l),L(e,r)};z(d,e=>{t.comparing&&e(f)}),w(s),L(e,s),E()}var jI=/^\s*(#{1,6})\s+(.*)$/,MI=/^\s*(`{3,}|~{3,})/;function NI(e){let t=[],n=!1,r=e.split(`
|
|
790
|
+
`),n=new Map,r=!1;for(let e=0;e<t.length;e++){let i=t[e]??``,a=IF.test(i);if(r||a){a&&(r=!r);continue}let o=WF(i);o.length>0&&n.set(e+1,o)}return n}var KF=Xo(`caret.diffStyle`,[`split`,`unified`],`split`),qF=KF.read,JF=KF.write,YF=Xo(`caret.diffIndicators`,[`bars`,`classic`,`both`],`bars`),XF=YF.read,ZF=YF.write;function QF(e){let t=e[e.length-1]?.version??0;return{base:t,target:e[e.length-2]?.version??t}}function $F(e,t){function n(t){let{base:n,target:r}=QF(t);e.baseVersion=n,e.targetVersion=r}return{canCompare(e){return e.length>=2},planFor(e,t){return e.find(e=>e.version===t)?.plan??``},init(r){e.diffStyle=t.readPref(),e.diffIndicators=t.readIndicatorsPref(),n(r)},syncVersions(t){t.length<2&&(e.comparing=!1);let r=e=>t.some(t=>t.version===e);(!r(e.baseVersion)||!r(e.targetVersion))&&n(t)},setBase(t){e.baseVersion=t},setTarget(t){e.targetVersion=t},setComparing(t){e.comparing=t},setDiffStyle(n){e.diffStyle=n,t.writePref(n)},setDiffIndicators(n){e.diffIndicators=n,t.writeIndicatorsPref(n)}}}function eI(e){if(e==null)return null;let t=e.trim();return t===``?null:t}function tI(){return eI(new URLSearchParams(location.search).get(`heading`))}function nI(e){let t=new URL(location.href),n=e?.trim();n?t.searchParams.set(`heading`,n):t.searchParams.delete(`heading`),history.replaceState(null,``,t)}function rI(){let e=tI();return e!=null&&nI(null),e}function iI(e,t){T(t,!0);let n=W(t,`open`,15,!1),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`open`]);var i=I();V(j(i),()=>E_,(e,t)=>{t(e,U(()=>r,{get open(){return n()},set open(e){n(e)}}))}),L(e,i),E()}function aI(e,t){let n=H(t,[`$$slots`,`$$events`,`$$legacy`]);var r=I();V(j(r),()=>sf,(e,t)=>{t(e,U(()=>n))}),L(e,r)}function oI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`sideOffset`,3,4),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`sideOffset`,`portalProps`,`class`]);aI(e,U(()=>t.portalProps,{children:(e,a)=>{var o=I(),s=j(o);{let e=D(()=>rl(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border p-1 shadow-md outline-none`,t.class));V(s,()=>k_,(t,a)=>{a(t,U({"data-slot":`dropdown-menu-content`,get sideOffset(){return r()},get class(){return P(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,o)},$$slots:{default:!0}})),E()}function sI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`variant`,3,`default`),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`inset`,`variant`]);var a=I(),o=j(a);{let e=D(()=>rl(`data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t.class));V(o,()=>d_,(a,o)=>{o(a,U({"data-slot":`dropdown-menu-item`,get"data-inset"(){return t.inset},get"data-variant"(){return r()},get class(){return P(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,a),E()}function cI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`]);var i=I();V(j(i),()=>j_,(e,t)=>{t(e,U({"data-slot":`dropdown-menu-trigger`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),L(e,i),E()}var lI=nl({base:`hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,variants:{variant:{default:`bg-transparent`,outline:`border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs`},size:{default:`h-9 min-w-9 px-2`,sm:`h-8 min-w-8 px-1.5`,lg:`h-10 min-w-10 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}});function uI(e){at(`toggleGroup`,e)}function dI(){return it(`toggleGroup`)}function fI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`value`,15),i=W(t,`size`,3,`default`),a=W(t,`spacing`,3,0),o=W(t,`variant`,3,`default`),s=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`,`size`,`spacing`,`variant`]);uI({get variant(){return o()},get size(){return i()},get spacing(){return a()}});var c=I(),l=j(c);{let e=D(()=>`--gap: ${a()}`),c=D(()=>rl(`group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs`,t.class));V(l,()=>Lv,(t,l)=>{l(t,U({"data-slot":`toggle-group`,get"data-variant"(){return o()},get"data-size"(){return i()},get"data-spacing"(){return a()},get style(){return P(e)},get class(){return P(c)}},()=>s,{get value(){return r()},set value(e){r(e)},get ref(){return n()},set ref(e){n(e)}}))})}L(e,c),E()}function pI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`,`size`,`variant`]),i=dI();var a=I(),o=j(a);{let e=D(()=>i.variant||t.variant),a=D(()=>i.size||t.size),s=D(()=>rl(lI({variant:i.variant||t.variant,size:i.size||t.size}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10 data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,t.class));V(o,()=>zv,(o,c)=>{c(o,U({"data-slot":`toggle-group-item`,get"data-variant"(){return P(e)},get"data-size"(){return P(a)},get"data-spacing"(){return i.spacing},get class(){return P(s)},get value(){return t.value}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,a),E()}function mI(e,t){T(t,!0);let n=W(t,`open`,15,!1),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`open`]);var i=I();V(j(i),()=>Yv,(e,t)=>{t(e,U(()=>r,{get open(){return n()},set open(e){n(e)}}))}),L(e,i),E()}function hI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`]);var i=I();V(j(i),()=>ey,(e,t)=>{t(e,U({"data-slot":`tooltip-trigger`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),L(e,i),E()}function gI(e,t){let n=H(t,[`$$slots`,`$$events`,`$$legacy`]);var r=I();V(j(r),()=>sf,(e,t)=>{t(e,U(()=>n))}),L(e,r)}var _I=F(`<div></div>`),vI=F(`<!> <!>`,1);function yI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`sideOffset`,3,0),i=W(t,`side`,3,`top`),a=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`sideOffset`,`side`,`children`,`arrowClasses`,`portalProps`]);gI(e,U(()=>t.portalProps,{children:(e,o)=>{var s=I(),c=j(s);{let e=D(()=>rl(`bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--bits-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,t.class));V(c,()=>Qv,(o,s)=>{s(o,U({"data-slot":`tooltip-content`,get sideOffset(){return r()},get side(){return i()},get class(){return P(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=vI(),i=j(r);B(i,()=>t.children??h);var a=M(i,2);{let e=(e,n)=>{let r=()=>n?.().props;var i=_I();ha(i,e=>({class:e,...r()}),[()=>rl(`bg-foreground z-50 size-2.5 rotate-45 rounded-[2px]`,`data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]`,`data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]`,`data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2`,`data-[side=left]:-translate-y-[calc(50%_-_3px)]`,t.arrowClasses)]),L(e,i)};V(a,()=>ty,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}L(e,r)},$$slots:{default:!0}}))})}L(e,s)},$$slots:{default:!0}})),E()}function bI(e,t){let n=H(t,[`$$slots`,`$$events`,`$$legacy`]);var r=I();V(j(r),()=>ny,(e,t)=>{t(e,U(()=>n))}),L(e,r)}var xI=F(`<button><span class="vpick-label svelte-h91uf3"> </span> <svg class="chevron svelte-h91uf3" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button>`),SI=F(`<span class="check" aria-hidden="true"><!></span> <span> </span>`,1),CI=F(`<!> <!>`,1),wI=F(`<span><!></span>`),TI=F(`<!> <!>`,1),EI=F(`<!> <!>`,1),DI=F(`<!> <!> <!>`,1),OI=F(`<div class="pair svelte-h91uf3"><div class="field svelte-h91uf3"><span class="lbl svelte-h91uf3">Base</span> <!></div> <span class="arrow svelte-h91uf3" aria-hidden="true">→</span> <div class="field svelte-h91uf3"><span class="lbl svelte-h91uf3">Target</span> <!></div></div> <div class="controls svelte-h91uf3"><!> <!></div>`,1),kI=F(`<div class="compare-picker svelte-h91uf3"><!> <!></div>`);function AI(e,t){T(t,!0);let n=(e,t=h,n=h,i=h)=>{var a=I();V(j(a),()=>iI,(e,a)=>{a(e,{children:(e,a)=>{var o=CI(),s=j(o);{let e=(e,r)=>{let i=()=>r?.().props;var a=xI();ha(a,()=>({...i(),type:`button`,class:`vpick float-chip`,"aria-label":t()}),void 0,void 0,void 0,`svelte-h91uf3`);var o=A(a),s=A(o);w(o),Je(2),w(a),N(()=>R(s,`v${n()??``}`)),L(e,a)};V(s,()=>cI,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}V(M(s,2),()=>oI,(e,t)=>{t(e,{align:`start`,class:`vmenu`,style:`min-width: var(--bits-dropdown-menu-anchor-width)`,children:(e,t)=>{var a=I(),o=j(a);{let e=D(()=>String(n()));V(o,()=>h_,(t,n)=>{n(t,{get value(){return P(e)},onValueChange:e=>i()(Number(e)),children:(e,t)=>{var n=I();Ni(j(n),17,()=>P(r),e=>e.version,(e,t)=>{var n=I(),r=j(n);{let e=(e,n)=>{let r=()=>n?.().checked;var i=SI(),a=j(i),o=A(a),s=e=>{wl(e,{name:`check`,size:15})};z(o,e=>{r()&&e(s)}),w(a);var c=M(a,2),l=A(c);w(c),N(()=>R(l,`v${P(t).version??``}`)),L(e,i)},n=D(()=>String(P(t).version));V(r,()=>p_,(t,r)=>{r(t,{get value(){return P(n)},class:`vitem`,children:e,$$slots:{default:!0}})})}L(e,n)}),L(e,n)},$$slots:{default:!0}})})}L(e,a)},$$slots:{default:!0}})}),L(e,o)},$$slots:{default:!0}})}),L(e,a)},r=D(()=>[...t.versions].sort((e,t)=>t.version-e.version)),i=O(null),a=O(null);function o(e){let t=document.createElement(`span`);t.className=`seg-pill`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t);let n=()=>{let n=e.querySelector(`[data-state="on"]`);if(!n){t.style.opacity=`0`;return}let r=e.getBoundingClientRect(),i=n.getBoundingClientRect();t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,t.style.transform=`translate(${i.left-r.left}px, ${i.top-r.top}px)`,t.style.opacity=`1`};t.style.transition=`none`;let r=requestAnimationFrame(()=>{n(),r=requestAnimationFrame(()=>{t.style.transition=``})}),i=new MutationObserver(n);i.observe(e,{attributes:!0,attributeFilter:[`data-state`],subtree:!0});let a=typeof ResizeObserver<`u`?new ResizeObserver(n):null;return a?.observe(e),()=>{cancelAnimationFrame(r),i.disconnect(),a?.disconnect(),t.remove()}}Kn(()=>P(i)?o(P(i)):void 0),Kn(()=>P(a)?o(P(a)):void 0);var s=kI(),c=A(s),l=e=>{ul(e,{variant:`secondary`,size:`sm`,class:`compare-toggle float-chip`,get"aria-pressed"(){return t.comparing},onclick:()=>t.onSetComparing(!t.comparing),children:(e,t)=>{Je(),L(e,yi(`Compare versions`))},$$slots:{default:!0}})},u=e=>{var t=I();V(j(t),()=>bI,(e,t)=>{t(e,{delayDuration:0,children:(e,t)=>{var n=I();V(j(n),()=>mI,(e,t)=>{t(e,{children:(e,t)=>{var n=TI(),r=j(n);{let e=(e,t)=>{let n=()=>t?.().props;var r=wI();ha(r,()=>({...n(),class:`compare-toggle-wrap`}),void 0,void 0,void 0,`svelte-h91uf3`),ul(A(r),{variant:`secondary`,size:`sm`,class:`compare-toggle float-chip`,disabled:!0,"aria-pressed":!1,children:(e,t)=>{Je(),L(e,yi(`Compare versions`))},$$slots:{default:!0}}),w(r),L(e,r)};V(r,()=>hI,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}V(M(r,2),()=>yI,(e,t)=>{t(e,{children:(e,t)=>{Je(),L(e,yi(`No other versions to compare yet`))},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})}),L(e,t)};z(c,e=>{t.canCompare?e(l):e(u,-1)});var d=M(c,2),f=e=>{var r=OI(),o=j(r),s=A(o);n(M(A(s),2),()=>`Base version`,()=>t.baseVersion,()=>e=>t.onSelectBase(e)),w(s);var c=M(s,4);n(M(A(c),2),()=>`Target version`,()=>t.targetVersion,()=>e=>t.onSelectTarget(e)),w(c),w(o);var l=M(o,2),u=A(l),d=()=>t.diffStyle,f=e=>{e&&t.onSetDiffStyle(e)};V(u,()=>fI,(e,t)=>{t(e,{type:`single`,size:`sm`,"aria-label":`Diff layout`,get value(){return d()},set value(e){f(e)},get ref(){return P(i)},set ref(e){k(i,e,!0)},children:(e,t)=>{var n=EI(),r=j(n);V(r,()=>pI,(e,t)=>{t(e,{value:`split`,children:(e,t)=>{Je(),L(e,yi(`Split`))},$$slots:{default:!0}})}),V(M(r,2),()=>pI,(e,t)=>{t(e,{value:`unified`,children:(e,t)=>{Je(),L(e,yi(`Unified`))},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})});var p=M(u,2),m=()=>t.diffIndicators,h=e=>{e&&t.onSetDiffIndicators(e)};V(p,()=>fI,(e,t)=>{t(e,{type:`single`,size:`sm`,"aria-label":`Diff indicators`,get value(){return m()},set value(e){h(e)},get ref(){return P(a)},set ref(e){k(a,e,!0)},children:(e,t)=>{var n=DI(),r=j(n);V(r,()=>pI,(e,t)=>{t(e,{value:`bars`,children:(e,t)=>{Je(),L(e,yi(`Bars`))},$$slots:{default:!0}})});var i=M(r,2);V(i,()=>pI,(e,t)=>{t(e,{value:`classic`,children:(e,t)=>{Je(),L(e,yi(`+/−`))},$$slots:{default:!0}})}),V(M(i,2),()=>pI,(e,t)=>{t(e,{value:`both`,children:(e,t)=>{Je(),L(e,yi(`Both`))},$$slots:{default:!0}})}),L(e,n)},$$slots:{default:!0}})}),w(l),L(e,r)};z(d,e=>{t.comparing&&e(f)}),w(s),L(e,s),E()}var jI=/^\s*(#{1,6})\s+(.*)$/,MI=/^\s*(`{3,}|~{3,})/;function NI(e){let t=[],n=!1,r=e.split(`
|
|
791
791
|
`);for(let e=0;e<r.length;e++){let i=r[e]??``;if(MI.test(i)){n=!n;continue}if(n)continue;let a=jI.exec(i);if(!a)continue;let o=a[1]?.length??0,s=(a[2]??``).replace(/\s+#+\s*$/,``).trim();t.push({level:o,text:s,line:e+1})}return t}function PI(e){return e.length>=2}function FI(e,t){if(e.length===0)return null;let n=e[0]?.line??null;for(let r of e)if(r.line<=t)n=r.line;else break;return n}function II(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>e.text.toLowerCase().includes(n))}function LI(e){let t=e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-+|-+$/g,``);return t===``?`section`:t}function RI(e){let t=new Map;return e.map(e=>{let n=LI(e.text),r=t.get(n)??0;return t.set(n,r+1),r===0?n:`${n}-${r}`})}function zI(e,t){let n=e.findIndex(e=>e.line===t);return n===-1?null:RI(e)[n]??null}function BI(e,t){let n=RI(e).indexOf(t);return n===-1?null:e[n]?.line??null}var VI=F(`<div><!></div>`);function HI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var i=VI();ha(i,e=>({"data-slot":`card`,class:e,...r}),[()=>rl(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,t.class)]),B(A(i),()=>t.children??h),w(i),wa(i,e=>n(e),()=>n()),L(e,i),E()}var UI=F(`<kbd><!></kbd>`);function WI(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var i=UI();ha(i,e=>({"data-slot":`kbd`,class:e,...r}),[()=>rl(`bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none`,`[&_svg:not([class*='size-'])]:size-3`,`[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10`,t.class)]),B(A(i),()=>t.children??h),w(i),wa(i,e=>n(e),()=>n()),L(e,i),E()}function GI(e){return e.key===`Enter`&&(e.metaKey||e.ctrlKey)}function KI(e){return e.key===`Escape`}var qI=F(`<div role="alertdialog" tabindex="-1"><p class="question svelte-1rjhbnn"> </p> <div class="actions svelte-1rjhbnn"><button class="cancel svelte-1rjhbnn" type="button"> </button> <button class="confirm svelte-1rjhbnn" type="button"> </button></div> <span class="tail svelte-1rjhbnn" aria-hidden="true"></span></div>`);function JI(e,t){T(t,!0);let n=W(t,`cancelLabel`,3,`Cancel`),r=W(t,`align`,3,`end`),i=O(void 0),a=O(void 0),o=O(void 0),s=O(void 0),c=O(void 0);function l(e){return t.anchor&&document.body.appendChild(e),{destroy(){e.remove()}}}Kn(()=>{if(!t.anchor||!P(i))return;let e=t.anchor.getBoundingClientRect(),n=P(i).getBoundingClientRect(),a=window.innerWidth,l=window.innerHeight,u=r()===`end`?e.right-n.width:e.left;u=Math.max(8,Math.min(u,a-n.width-8));let d=e.bottom+8;if(d+n.height>l-8){let t=e.top-8-n.height;d=t>=8?t:Math.max(8,l-n.height-8)}k(s,u,!0),k(o,d,!0),k(c,Math.max(12,Math.min(e.left+e.width/2-u,n.width-12)),!0)}),Kn(()=>{if(!t.anchor)return;let e=()=>t.onCancel();return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}}),Kn(()=>{P(a)?.focus({preventScroll:!0})});function u(e){KI(e)&&(e.stopPropagation(),t.onCancel())}function d(e){P(i)&&e.target instanceof Node&&!P(i).contains(e.target)&&t.onCancel()}var f=qI();ci(`pointerdown`,Cn,d);let p,m;var h=A(f),g=A(h,!0);w(h);var _=M(h,2),v=A(_),y=A(v,!0);w(v);var b=M(v,2),x=A(b,!0);w(b),wa(b,e=>k(a,e),()=>P(a)),w(_),Je(2),w(f),wa(f,e=>k(i,e),()=>P(i)),Vi(f,e=>l?.(e)),N(()=>{p=Zi(f,1,`confirm-popover align-${r()??``}`,`svelte-1rjhbnn`,p,{portaled:t.anchor}),pa(f,`aria-label`,t.question),m=$i(f,``,m,{position:t.anchor?`fixed`:null,top:t.anchor&&P(o)!==void 0?`${P(o)}px`:null,left:t.anchor&&P(s)!==void 0?`${P(s)}px`:null,"--tail-left":t.anchor&&P(c)!==void 0?`${P(c)}px`:null}),R(g,t.question),R(y,n()),R(x,t.confirmLabel)}),li(`keydown`,f,u),li(`click`,v,function(...e){t.onCancel?.apply(this,e)}),li(`click`,b,function(...e){t.onConfirm?.apply(this,e)}),L(e,f),E()}ui([`keydown`,`click`]);var YI=[],XI=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?XI:YI).push(n+=e[t])})();function ZI(e){if(e<768)return!1;for(let t=0,n=YI.length;;){let r=t+n>>1;if(e<YI[r])n=r;else if(e>=XI[r])t=r+1;else return!0;if(t==n)return!1}}function QI(e){return e>=127462&&e<=127487}var $I=8205;function eL(e,t,n=!0,r=!0){return(n?tL:nL)(e,t,r)}function tL(e,t,n){if(t==e.length)return t;t&&iL(e.charCodeAt(t))&&aL(e.charCodeAt(t-1))&&t--;let r=rL(e,t);for(t+=oL(r);t<e.length;){let i=rL(e,t);if(r==$I||i==$I||n&&ZI(i))t+=oL(i),r=i;else if(QI(i)){let n=0,r=t-2;for(;r>=0&&QI(rL(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function nL(e,t,n){for(;t>0;){let r=tL(e,t-2,n);if(r<t)return r;t--}return 0}function rL(e,t){let n=e.charCodeAt(t);if(!aL(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return iL(r)?(n-55296<<10)+(r-56320)+65536:n}function iL(e){return e>=56320&&e<57344}function aL(e){return e>=55296&&e<56320}function oL(e){return e<65536?1:2}var sL=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=_L(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),lL.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=_L(this,e,t);let n=[];return this.decompose(e,t,n,0),lL.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new pL(this),i=new pL(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new pL(this,e)}iterRange(e,t=this.length){return new mL(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new hL(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new cL(t):lL.from(cL.split(t,[]))}},cL=class e extends sL{constructor(e,t=uL(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new gL(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(fL(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=dL(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=_L(this,t,n);let i=dL(this.text,dL(r.text,fL(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):lL.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
792
792
|
`){[e,t]=_L(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},lL=class e extends sL{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=_L(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
793
793
|
`){[e,t]=_L(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new cL(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof cL&&c&&(n=u[u.length-1])instanceof cL&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new cL(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};sL.empty=new cL([``],0);function uL(e){let t=-1;for(let n of e)t+=n.length+1;return t}function dL(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function fL(e,t,n){return dL(e,[``],t,n)}var pL=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof cL?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof cL?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
@@ -826,7 +826,7 @@ XID_Start XIDS`.split(/\s/).map(e=>[OO(e),e])),Sk=new Map([[`s`,ok(383)],[ok(383
|
|
|
826
826
|
\${}
|
|
827
827
|
}`,{label:`interface`,detail:`definition`,type:`keyword`}),sX("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),sX(`enum \${name} {
|
|
828
828
|
\${}
|
|
829
|
-
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),u0=new eG,d0=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function f0(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var p0=[`FunctionDeclaration`],m0={FunctionDeclaration:f0(`function`),ClassDeclaration:f0(`class`),ClassExpression:()=>!0,EnumDeclaration:f0(`constant`),TypeAliasDeclaration:f0(`type`),NamespaceDeclaration:f0(`namespace`),VariableDefinition(e,t){e.matchContext(p0)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function h0(e,t){let n=u0.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(NW.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=m0[t.name];if(e&&e(t,a)||d0.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of h0(e,t.node))r.push(n);return!1}}),u0.set(t,r),r}var g0=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,_0=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function v0(e){let t=QG(e.state).resolveInner(e.pos,-1);if(_0.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&g0.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)d0.has(n.name)&&(r=r.concat(h0(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:g0}}var y0=ZG.define({name:`javascript`,parser:o0.configure({props:[hK.add({IfStatement:DK({except:/^\s*({|else\b)/}),TryStatement:DK({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:EK,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:wK({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":DK({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),kK.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":AK,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),b0={test:e=>/^JSX/.test(e.name),facet:qG({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},x0=y0.configure({dialect:`ts`},`typescript`),S0=y0.configure({dialect:`jsx`,props:[JG.add(e=>e.isTop?[b0]:void 0)]}),C0=y0.configure({dialect:`jsx ts`,props:[JG.add(e=>e.isTop?[b0]:void 0)]},`typescript`),w0=e=>({label:e,type:`keyword`}),T0=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(w0),E0=T0.concat([`declare`,`implements`,`private`,`protected`,`public`].map(w0));function D0(e={}){let t=e.jsx?e.typescript?C0:S0:e.typescript?x0:y0,n=e.typescript?l0.concat(E0):c0.concat(T0);return new cK(t,[y0.data.of({autocomplete:HY(_0,VY(n))}),y0.data.of({autocomplete:v0}),e.jsx?j0:[]])}function O0(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function k0(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var A0=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),j0=rW.inputHandler.of((e,t,n,r,i)=>{if((A0?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!y0.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=QG(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=k0(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:J.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=O0(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=k0(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),M0=n({autoCloseTags:()=>l2,html:()=>s2,htmlCompletionSource:()=>e2,htmlCompletionSourceWith:()=>t2,htmlLanguage:()=>o2}),N0=[`_blank`,`_self`,`_top`,`_parent`],P0=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],F0=[`get`,`post`,`put`,`delete`],I0=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],L0=[`true`,`false`],R0={},z0={a:{attrs:{href:null,ping:null,type:null,media:null,target:N0,hreflang:null}},abbr:R0,address:R0,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:R0,aside:R0,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:R0,base:{attrs:{href:null,target:N0}},bdi:R0,bdo:R0,blockquote:{attrs:{cite:null}},body:R0,br:R0,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:I0,formmethod:F0,formnovalidate:[`novalidate`],formtarget:N0,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:R0,center:R0,cite:R0,code:R0,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:R0,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:R0,div:R0,dl:R0,dt:R0,em:R0,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:R0,figure:R0,footer:R0,form:{attrs:{action:null,name:null,"accept-charset":P0,autocomplete:[`on`,`off`],enctype:I0,method:F0,novalidate:[`novalidate`],target:N0}},h1:R0,h2:R0,h3:R0,h4:R0,h5:R0,h6:R0,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:R0,hgroup:R0,hr:R0,html:{attrs:{manifest:null}},i:R0,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:I0,formmethod:F0,formnovalidate:[`novalidate`],formtarget:N0,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:R0,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:R0,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:R0,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:P0,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:R0,noscript:R0,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:R0,param:{attrs:{name:null,value:null}},pre:R0,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:R0,rt:R0,ruby:R0,samp:R0,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:P0}},section:R0,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:R0,source:{attrs:{src:null,type:null,media:null}},span:R0,strong:R0,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:R0,summary:R0,sup:R0,table:R0,tbody:R0,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:R0,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:R0,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:R0,time:{attrs:{datetime:null}},title:R0,tr:R0,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:R0,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:R0},B0={accesskey:null,class:null,contenteditable:L0,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:L0,autocorrect:L0,autocapitalize:L0,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":L0,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":L0,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":L0,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":L0,"aria-hidden":L0,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":L0,"aria-multiselectable":L0,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":L0,"aria-relevant":null,"aria-required":L0,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},V0=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of V0)B0[e]=null;var H0=class{constructor(e,t){this.tags={...z0,...e},this.globalAttrs={...B0,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};H0.default=new H0;function U0(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function W0(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function G0(e,t,n){return n.tags[U0(e,W0(t))]?.children||n.allTags}function K0(e,t){let n=[];for(let r=W0(t);r&&!r.type.isTop;r=W0(r.parent)){let i=U0(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var q0=/^[:\-\.\w\u00b7-\uffff]*$/;function J0(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=W0(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:G0(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(K0(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Y0(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:K0(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:q0}}function X0(e,t,n,r){let i=[],a=0;for(let r of G0(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of K0(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Z0(e,t,n,r,i){let a=W0(n),o=a?t.tags[U0(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:q0}}function Q0(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=W0(n),i=r?t.tags[U0(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function $0(e,t){let{state:n,pos:r}=t,i=QG(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?Y0(n,i,i.from,r):J0(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?J0(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?Y0(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?Z0(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?Q0(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?X0(n,e,i,r):null}function e2(e){return $0(H0.default,e)}function t2(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new H0(t,n):H0.default;return e=>$0(r,e)}var n2=y0.parser.configure({top:`SingleExpression`}),r2=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:x0.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:S0.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:C0.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:n2},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:y0.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:C1.parser}],i2=[{name:`style`,parser:C1.parser.configure({top:`Styles`})}].concat(V0.map(e=>({name:e,parser:y0.parser}))),a2=ZG.define({name:`html`,parser:b$.configure({props:[hK.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),kK.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),BK.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),o2=a2.configure({wrap:w$(r2,i2)});function s2(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=w$((e.nestedLanguages||[]).concat(r2),(e.nestedAttributes||[]).concat(i2))),new cK(n?a2.configure({wrap:n,dialect:t}):t?o2.configure({dialect:t}):o2,[o2.data.of({autocomplete:t2(e)}),e.autoCloseTags===!1?[]:l2,D0().support,w1().support])}var c2=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),l2=rW.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!o2.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=QG(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=U0(o.doc,t.parent,n))&&!c2.has(a))return{range:e,changes:{from:n,to:n+ +(o.doc.sliceString(n,n+1)===`>`),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=U0(o.doc,e,n))&&!c2.has(a)){let e=n+ +(o.doc.sliceString(n,n+1)===`>`),t=`${a}>`;return{range:J.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),u2=n({commonmarkLanguage:()=>y2,deleteMarkupBackward:()=>N2,insertNewlineContinueMarkup:()=>O2,insertNewlineContinueMarkupCommand:()=>D2,markdown:()=>I2,markdownKeymap:()=>P2,markdownLanguage:()=>b2,pasteURLAsLink:()=>V2}),d2=qG({commentTokens:{block:{open:`<!--`,close:`-->`}}}),f2=new EW,p2=gZ.configure({props:[kK.add(e=>!e.is(`Block`)||e.is(`Document`)||m2(e)!=null||h2(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),f2.add(m2),hK.add({Document:()=>null}),KG.add({Document:d2})]});function m2(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function h2(e){return e.name==`OrderedList`||e.name==`BulletList`}function g2(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=m2(e.type))!=null&&r<=t)break;n=e}return n.to}var _2=OK.of((e,t,n)=>{for(let r=QG(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(f2);if(e==null)continue;let t=g2(r,e);if(t>n)return{from:n,to:t}}return null});function v2(e){return new YG(d2,e,[],`markdown`)}var y2=v2(p2),b2=v2(p2.configure([IZ,zZ,RZ,BZ,{props:[kK.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function x2(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):Z.matchLanguageName(e,n,!0),t instanceof Z)return t.support?t.support.language.parser:tK.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var S2=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+w2(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function C2(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new S2(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new S2(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new S2(i.parent,s,s+t,a[1],e,n,i))}}return r}function w2(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function T2(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=w2(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function E2(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(uK)!=` `)return e;let r=GR(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var D2=(e={})=>({state:t,dispatch:n})=>{let r=QG(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!b2.isActiveAt(t,n.from,-1)&&!b2.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=C2(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&T2(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&T2(e.item,i,r),{range:J.cursor(t+n.length),changes:r}}else{let e=j2(c,t,s);return{range:J.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&T2(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?GR(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=E2(p,t),A2(l.node,t.doc)&&(p=j2(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:J.cursor(m+p.length+1),changes:d}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},O2=D2();function k2(e){return e.name==`QuoteMark`||e.name==`ListMark`}function A2(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function j2(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?GR(n.text,4,e[t+1].from)-r.length:null,t<i);return E2(r,t)}function M2(e,t){let n=e.resolveInner(t,-1),r=t;k2(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(k2(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var N2=({state:e,dispatch:t})=>{let n=QG(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&b2.isActiveAt(e,t.from)){let t=a.lineAt(i),r=C2(M2(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:J.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(GR(t.text,4,n.to)-GR(t.text,4,n.from));return r==t.from&&(i=E2(i,e)),{range:J.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:J.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},P2=[{key:`Enter`,run:O2},{key:`Backspace`,run:N2}],F2=s2({matchClosingTags:!1});function I2(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=y2,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=F2}=e;if(!(i instanceof HX))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,_2],u;o&&l.push(V2),n instanceof cK?(l.push(n.support),u=n.language):n&&(u=n);let d=t||u?x2(t,u):void 0;c.push(vZ({codeParser:d,htmlParser:s.language.parser})),r&&l.push(KL.high(fW.of(P2)));let f=v2(i.configure(c));return a&&l.push(f.data.of({autocomplete:L2})),new cK(f,l)}function L2(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=QG(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:z2(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var R2=null;function z2(){if(R2)return R2;let e=e2(new RY(TR.create({extensions:F2}),0,!0));return R2=e?e.options:[]}var B2=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,V2=rW.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!b2.isActiveAt(t.state,n.from,1)))return!1;let i=QG(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||B2.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function $(e){return new cK(ZK.define(e))}function H2(e){return q(()=>import(`./dist-D0u8lgi2.js`).then(t=>t.sql({dialect:t[e]})),[])}var U2=[Z.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return q(()=>import(`./dist-CDXacocg.js`).then(e=>e.cpp()),[])}}),Z.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return q(()=>import(`./dist-CDXacocg.js`).then(e=>e.cpp()),[])}}),Z.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return H2(`Cassandra`)}}),Z.of({name:`CSS`,extensions:[`css`],load(){return q(()=>Promise.resolve().then(()=>s1).then(e=>e.css()),void 0)}}),Z.of({name:`Go`,extensions:[`go`],load(){return q(()=>import(`./dist-Diqv5yoL.js`).then(e=>e.go()),[])}}),Z.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return q(()=>Promise.resolve().then(()=>M0).then(e=>e.html()),void 0)}}),Z.of({name:`Java`,extensions:[`java`],load(){return q(()=>import(`./dist-DvWv2GjQ.js`).then(e=>e.java()),[])}}),Z.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript()),void 0)}}),Z.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return q(()=>import(`./dist-DhFSo_KF.js`).then(e=>e.jinja()),[])}}),Z.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return q(()=>import(`./dist-C4FPvSXr.js`).then(e=>e.json()),[])}}),Z.of({name:`JSX`,extensions:[`jsx`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript({jsx:!0})),void 0)}}),Z.of({name:`LESS`,extensions:[`less`],load(){return q(()=>import(`./dist-Dm7ikdu5.js`).then(e=>e.less()),[])}}),Z.of({name:`Liquid`,extensions:[`liquid`],load(){return q(()=>import(`./dist--moZHrIw.js`).then(e=>e.liquid()),[])}}),Z.of({name:`MariaDB SQL`,load(){return H2(`MariaSQL`)}}),Z.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return q(()=>Promise.resolve().then(()=>u2).then(e=>e.markdown()),void 0)}}),Z.of({name:`MS SQL`,load(){return H2(`MSSQL`)}}),Z.of({name:`MySQL`,load(){return H2(`MySQL`)}}),Z.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return q(()=>import(`./dist-DIdA1vYB.js`).then(e=>e.php()),[])}}),Z.of({name:`PLSQL`,extensions:[`pls`],load(){return H2(`PLSQL`)}}),Z.of({name:`PostgreSQL`,load(){return H2(`PostgreSQL`)}}),Z.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return q(()=>import(`./dist-jmyqwp8P.js`).then(e=>e.python()),[])}}),Z.of({name:`Rust`,extensions:[`rs`],load(){return q(()=>import(`./dist-DSFoRH4B.js`).then(e=>e.rust()),[])}}),Z.of({name:`Sass`,extensions:[`sass`],load(){return q(()=>import(`./dist-CsIQFmL2.js`).then(e=>e.sass({indented:!0})),[])}}),Z.of({name:`SCSS`,extensions:[`scss`],load(){return q(()=>import(`./dist-CsIQFmL2.js`).then(e=>e.sass()),[])}}),Z.of({name:`SQL`,extensions:[`sql`],load(){return H2(`StandardSQL`)}}),Z.of({name:`SQLite`,load(){return H2(`SQLite`)}}),Z.of({name:`TSX`,extensions:[`tsx`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript({jsx:!0,typescript:!0})),void 0)}}),Z.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript({typescript:!0})),void 0)}}),Z.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return q(()=>import(`./dist-DheG7L5T.js`).then(e=>e.wast()),[])}}),Z.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return q(()=>import(`./dist-CtqCYfGw.js`).then(e=>e.xml()),[])}}),Z.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return q(()=>import(`./dist-zkfAcw6C.js`).then(e=>e.yaml()),[])}}),Z.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return q(()=>import(`./apl-CnwPGSsG.js`).then(e=>$(e.apl)),[])}}),Z.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return q(()=>import(`./asciiarmor-qTkVPQu6.js`).then(e=>$(e.asciiArmor)),[])}}),Z.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return q(()=>import(`./asn1-Dr8qZg38.js`).then(e=>$(e.asn1({}))),[])}}),Z.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return q(()=>import(`./asterisk-Bja0s6e1.js`).then(e=>$(e.asterisk)),[])}}),Z.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return q(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>$(e.brainfuck)),[])}}),Z.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return q(()=>import(`./cobol-B_OZ4V-R.js`).then(e=>$(e.cobol)),[])}}),Z.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.csharp)),[])}}),Z.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),Z.of({name:`ClojureScript`,extensions:[`cljs`],load(){return q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),Z.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return q(()=>import(`./css-CYpP4FRV.js`).then(e=>$(e.gss)),[])}}),Z.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return q(()=>import(`./cmake-CyVbuzPu.js`).then(e=>$(e.cmake)),[])}}),Z.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return q(()=>import(`./coffeescript-B2pKbFk8.js`).then(e=>$(e.coffeeScript)),[])}}),Z.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return q(()=>import(`./commonlisp-CcllspGY.js`).then(e=>$(e.commonLisp)),[])}}),Z.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return q(()=>import(`./cypher-p9eYesGn.js`).then(e=>$(e.cypher)),[])}}),Z.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return q(()=>import(`./python-BqYw9LYJ.js`).then(e=>$(e.cython)),[])}}),Z.of({name:`Crystal`,extensions:[`cr`],load(){return q(()=>import(`./crystal-M5-qzICs.js`).then(e=>$(e.crystal)),[])}}),Z.of({name:`D`,extensions:[`d`],load(){return q(()=>import(`./d-BhMjBjQP.js`).then(e=>$(e.d)),[])}}),Z.of({name:`Dart`,extensions:[`dart`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.dart)),[])}}),Z.of({name:`diff`,extensions:[`diff`,`patch`],load(){return q(()=>import(`./diff-ChtP43wD.js`).then(e=>$(e.diff)),[])}}),Z.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return q(()=>import(`./dockerfile-BLkNEvjs.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([101,102]))}}),Z.of({name:`DTD`,extensions:[`dtd`],load(){return q(()=>import(`./dtd-DTF72YNO.js`).then(e=>$(e.dtd)),[])}}),Z.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return q(()=>import(`./dylan-C6jEEEk-.js`).then(e=>$(e.dylan)),[])}}),Z.of({name:`EBNF`,load(){return q(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>$(e.ebnf)),[])}}),Z.of({name:`ECL`,extensions:[`ecl`],load(){return q(()=>import(`./ecl-BSZaIHnp.js`).then(e=>$(e.ecl)),[])}}),Z.of({name:`edn`,extensions:[`edn`],load(){return q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),Z.of({name:`Eiffel`,extensions:[`e`],load(){return q(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>$(e.eiffel)),[])}}),Z.of({name:`Elm`,extensions:[`elm`],load(){return q(()=>import(`./elm-Cshzl8qu.js`).then(e=>$(e.elm)),[])}}),Z.of({name:`Erlang`,extensions:[`erl`],load(){return q(()=>import(`./erlang-DaB2Rkuy.js`).then(e=>$(e.erlang)),[])}}),Z.of({name:`Esper`,load(){return q(()=>import(`./sql-DcCJ9jop.js`).then(e=>$(e.esper)),[])}}),Z.of({name:`Factor`,extensions:[`factor`],load(){return q(()=>import(`./factor-D7LVTn2l.js`).then(e=>$(e.factor)),__vite__mapDeps([103,102]))}}),Z.of({name:`FCL`,load(){return q(()=>import(`./fcl-ClOhbFR7.js`).then(e=>$(e.fcl)),[])}}),Z.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return q(()=>import(`./forth-Cezjo90N.js`).then(e=>$(e.forth)),[])}}),Z.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return q(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>$(e.fortran)),[])}}),Z.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.fSharp)),[])}}),Z.of({name:`Gas`,extensions:[`s`],load(){return q(()=>import(`./gas-BHEdbvp9.js`).then(e=>$(e.gas)),[])}}),Z.of({name:`Gherkin`,extensions:[`feature`],load(){return q(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>$(e.gherkin)),[])}}),Z.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return q(()=>import(`./groovy-BC3IOsC8.js`).then(e=>$(e.groovy)),[])}}),Z.of({name:`Haskell`,extensions:[`hs`],load(){return q(()=>import(`./haskell-BRsoo5mP.js`).then(e=>$(e.haskell)),[])}}),Z.of({name:`Haxe`,extensions:[`hx`],load(){return q(()=>import(`./haxe-DIz0ZZqd.js`).then(e=>$(e.haxe)),[])}}),Z.of({name:`HXML`,extensions:[`hxml`],load(){return q(()=>import(`./haxe-DIz0ZZqd.js`).then(e=>$(e.hxml)),[])}}),Z.of({name:`HTTP`,load(){return q(()=>import(`./http-CLVgA2GD.js`).then(e=>$(e.http)),[])}}),Z.of({name:`IDL`,extensions:[`pro`],load(){return q(()=>import(`./idl-BUZw3wgd.js`).then(e=>$(e.idl)),[])}}),Z.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return q(()=>import(`./javascript-9Tg8ixDm.js`).then(e=>$(e.jsonld)),[])}}),Z.of({name:`Julia`,extensions:[`jl`],load(){return q(()=>import(`./julia-CQfgDRfP.js`).then(e=>$(e.julia)),[])}}),Z.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.kotlin)),[])}}),Z.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return q(()=>import(`./livescript-BXxG0Yva.js`).then(e=>$(e.liveScript)),[])}}),Z.of({name:`Lua`,extensions:[`lua`],load(){return q(()=>import(`./lua-CiA1ziua.js`).then(e=>$(e.lua)),[])}}),Z.of({name:`mIRC`,extensions:[`mrc`],load(){return q(()=>import(`./mirc-C9zpzAZU.js`).then(e=>$(e.mirc)),[])}}),Z.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return q(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>$(e.mathematica)),[])}}),Z.of({name:`Modelica`,extensions:[`mo`],load(){return q(()=>import(`./modelica-CqHI_q-D.js`).then(e=>$(e.modelica)),[])}}),Z.of({name:`MUMPS`,extensions:[`mps`],load(){return q(()=>import(`./mumps-CW_TBmxz.js`).then(e=>$(e.mumps)),[])}}),Z.of({name:`Mbox`,extensions:[`mbox`],load(){return q(()=>import(`./mbox-BEMVcqjs.js`).then(e=>$(e.mbox)),[])}}),Z.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return q(()=>import(`./nginx-BMaDbqW3.js`).then(e=>$(e.nginx)),[])}}),Z.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return q(()=>import(`./nsis-AQ_alPln.js`).then(e=>$(e.nsis)),__vite__mapDeps([104,102]))}}),Z.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return q(()=>import(`./ntriples-d28e9m0E.js`).then(e=>$(e.ntriples)),[])}}),Z.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.objectiveC)),[])}}),Z.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.objectiveCpp)),[])}}),Z.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.oCaml)),[])}}),Z.of({name:`Octave`,extensions:[`m`],load(){return q(()=>import(`./octave-D2Q8cUp1.js`).then(e=>$(e.octave)),[])}}),Z.of({name:`Oz`,extensions:[`oz`],load(){return q(()=>import(`./oz-BwTct_5T.js`).then(e=>$(e.oz)),[])}}),Z.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return q(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>$(e.pascal)),[])}}),Z.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return q(()=>import(`./perl-CdEHsPfU.js`).then(e=>$(e.perl)),[])}}),Z.of({name:`Pig`,extensions:[`pig`],load(){return q(()=>import(`./pig-AF4Hwhju.js`).then(e=>$(e.pig)),[])}}),Z.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return q(()=>import(`./powershell-CzG71I4L.js`).then(e=>$(e.powerShell)),[])}}),Z.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return q(()=>import(`./properties-C357ku5U.js`).then(e=>$(e.properties)),[])}}),Z.of({name:`ProtoBuf`,extensions:[`proto`],load(){return q(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>$(e.protobuf)),[])}}),Z.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return q(()=>import(`./pug-Bugr-47h.js`).then(e=>$(e.pug)),__vite__mapDeps([105,106]))}}),Z.of({name:`Puppet`,extensions:[`pp`],load(){return q(()=>import(`./puppet-B4hC2X4m.js`).then(e=>$(e.puppet)),[])}}),Z.of({name:`Q`,extensions:[`q`],load(){return q(()=>import(`./q-B9NhS7L_.js`).then(e=>$(e.q)),[])}}),Z.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return q(()=>import(`./r-DADKenSm.js`).then(e=>$(e.r)),[])}}),Z.of({name:`RPM Changes`,load(){return q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[])}}),Z.of({name:`RPM Spec`,extensions:[`spec`],load(){return q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[])}}),Z.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return q(()=>import(`./ruby-DsYpTuWg.js`).then(e=>$(e.ruby)),[])}}),Z.of({name:`SAS`,extensions:[`sas`],load(){return q(()=>import(`./sas-C2OyD2Y6.js`).then(e=>$(e.sas)),[])}}),Z.of({name:`Scala`,extensions:[`scala`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.scala)),[])}}),Z.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return q(()=>import(`./scheme-CyDdOh7e.js`).then(e=>$(e.scheme)),[])}}),Z.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return q(()=>import(`./shell-Du5Qg9im.js`).then(e=>$(e.shell)),[])}}),Z.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return q(()=>import(`./sieve-BAxa3IjF.js`).then(e=>$(e.sieve)),[])}}),Z.of({name:`Smalltalk`,extensions:[`st`],load(){return q(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>$(e.smalltalk)),[])}}),Z.of({name:`Solr`,load(){return q(()=>import(`./solr-BBopId9w.js`).then(e=>$(e.solr)),[])}}),Z.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.sml)),[])}}),Z.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return q(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>$(e.sparql)),[])}}),Z.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return q(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>$(e.spreadsheet)),[])}}),Z.of({name:`Squirrel`,extensions:[`nut`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.squirrel)),[])}}),Z.of({name:`Stylus`,extensions:[`styl`],load(){return q(()=>import(`./stylus-DLLZ8dgm.js`).then(e=>$(e.stylus)),[])}}),Z.of({name:`Swift`,extensions:[`swift`],load(){return q(()=>import(`./swift-DKB6_1j6.js`).then(e=>$(e.swift)),[])}}),Z.of({name:`sTeX`,load(){return q(()=>import(`./stex-sDrdk2BW.js`).then(e=>$(e.stex)),[])}}),Z.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return q(()=>import(`./stex-sDrdk2BW.js`).then(e=>$(e.stex)),[])}}),Z.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return q(()=>import(`./verilog-D-x6ne0Z.js`).then(e=>$(e.verilog)),[])}}),Z.of({name:`Tcl`,extensions:[`tcl`],load(){return q(()=>import(`./tcl-BGfruO1u.js`).then(e=>$(e.tcl)),[])}}),Z.of({name:`Textile`,extensions:[`textile`],load(){return q(()=>import(`./textile-DWBqthVk.js`).then(e=>$(e.textile)),[])}}),Z.of({name:`TiddlyWiki`,load(){return q(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[])}}),Z.of({name:`Tiki wiki`,load(){return q(()=>import(`./tiki-CxVlf5KZ.js`).then(e=>$(e.tiki)),[])}}),Z.of({name:`TOML`,extensions:[`toml`],load(){return q(()=>import(`./toml-LvoKBwCs.js`).then(e=>$(e.toml)),[])}}),Z.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return q(()=>import(`./troff-C2dAgh7P.js`).then(e=>$(e.troff)),[])}}),Z.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return q(()=>import(`./ttcn-BePYh-hG.js`).then(e=>$(e.ttcn)),[])}}),Z.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return q(()=>import(`./ttcn-cfg-CY0aot7Q.js`).then(e=>$(e.ttcnCfg)),[])}}),Z.of({name:`Turtle`,extensions:[`ttl`],load(){return q(()=>import(`./turtle-BDLWE2cD.js`).then(e=>$(e.turtle)),[])}}),Z.of({name:`Web IDL`,extensions:[`webidl`],load(){return q(()=>import(`./webidl-D5jiJvOU.js`).then(e=>$(e.webIDL)),[])}}),Z.of({name:`VB.NET`,extensions:[`vb`],load(){return q(()=>import(`./vb-BthdM_4N.js`).then(e=>$(e.vb)),[])}}),Z.of({name:`VBScript`,extensions:[`vbs`],load(){return q(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>$(e.vbScript)),[])}}),Z.of({name:`Velocity`,extensions:[`vtl`],load(){return q(()=>import(`./velocity-CqftRsjg.js`).then(e=>$(e.velocity)),[])}}),Z.of({name:`Verilog`,extensions:[`v`],load(){return q(()=>import(`./verilog-D-x6ne0Z.js`).then(e=>$(e.verilog)),[])}}),Z.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return q(()=>import(`./vhdl-CMrOq2q1.js`).then(e=>$(e.vhdl)),[])}}),Z.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return q(()=>import(`./xquery-fj_R-kMw.js`).then(e=>$(e.xQuery)),[])}}),Z.of({name:`Yacas`,extensions:[`ys`],load(){return q(()=>import(`./yacas-CXXgtw0p.js`).then(e=>$(e.yacas)),[])}}),Z.of({name:`Z80`,extensions:[`z80`],load(){return q(()=>import(`./z80-CL1naaMV.js`).then(e=>$(e.z80)),[])}}),Z.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.mscgen)),[])}}),Z.of({name:`Xù`,extensions:[`xu`],load(){return q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.xu)),[])}}),Z.of({name:`MsGenny`,extensions:[`msgenny`],load(){return q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.msgenny)),[])}}),Z.of({name:`Vue`,extensions:[`vue`],load(){return q(()=>import(`./dist-DXeIzOJW.js`).then(e=>e.vue()),[])}}),Z.of({name:`Angular Template`,load(){return q(()=>import(`./dist-D2IYj7rL.js`).then(e=>e.angular()),[])}})],W2=jK.define([{tag:X.strong,fontWeight:`700`},{tag:X.emphasis,fontStyle:`italic`},{tag:X.strikethrough,textDecoration:`line-through`},{tag:X.heading,fontWeight:`700`,color:`var(--ink)`},{tag:[X.link,X.url],color:`var(--accent)`,textDecoration:`underline`},{tag:X.quote,color:`var(--ink-soft)`},{tag:X.meta,color:`var(--ink-faint)`},{tag:[X.keyword,X.modifier,X.controlKeyword,X.operatorKeyword,X.definitionKeyword,X.moduleKeyword],color:`var(--accent)`},{tag:[X.string,X.special(X.string),X.regexp],color:`var(--ok)`},{tag:[X.comment,X.lineComment,X.blockComment,X.docComment],color:`var(--ink-faint)`,fontStyle:`italic`},{tag:[X.function(X.variableName),X.function(X.propertyName),X.labelName],color:`var(--accent-bright)`},{tag:[X.typeName,X.className,X.namespace,X.tagName],color:`var(--accent-bright)`},{tag:[X.number,X.bool,X.atom],color:`var(--accent-bright)`},{tag:[X.operator,X.punctuation,X.separator,X.bracket,X.angleBracket,X.squareBracket,X.paren,X.brace],color:`var(--ink-soft)`},{tag:[X.propertyName,X.attributeName],color:`var(--ink)`},{tag:[X.variableName,X.attributeValue],color:`var(--ink)`},{tag:X.escape,color:`var(--accent-bright)`}]),G2=Dz.mark({class:`cm-md-code`}),K2=Dz.line({class:`cm-md-codeblock`}),q2=Dz.line({class:`cm-md-codeblock cm-md-codeblock-open`}),J2=Dz.line({class:`cm-md-codeblock cm-md-codeblock-close`});function Y2(e){let t=[];for(let{from:n,to:r}of e.visibleRanges)QG(e.state).iterate({from:n,to:r,enter:n=>{if(n.name===`InlineCode`)return t.push(G2.range(n.from,n.to)),!1;if(n.name===`FencedCode`){let r=e.state.doc.lineAt(n.from).number,i=e.state.doc.lineAt(n.to).number;for(let n=r;n<=i;n++){let a=n===r?q2:n===i?J2:K2;t.push(a.range(e.state.doc.line(n).from))}return!1}}});return Dz.set(t,!0)}var X2=YB.fromClass(class{decorations=Dz.none;constructor(e){this.decorations=Y2(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=Y2(e.view))}},{decorations:e=>e.decorations}),Z2=rW.theme({"&":{backgroundColor:`transparent`,color:`var(--ink)`},".cm-scroller":{fontFamily:`var(--font-sans)`,fontSize:`var(--text-md)`,lineHeight:`var(--leading-snug)`,maxHeight:`22rem`,overflowY:`auto`},".cm-content":{padding:`0.45rem 0.55rem`,minHeight:`calc(var(--text-md) * var(--leading-snug) * 3)`,caretColor:`var(--accent)`},"&.cm-focused":{outline:`none`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--ink)`},".cm-selectionBackground, &.cm-focused .cm-selectionBackground, .cm-content ::selection":{backgroundColor:`color-mix(in lab, var(--accent) 22%, transparent)`},".cm-placeholder":{color:`var(--ink-faint)`},".cm-md-code":{fontFamily:`var(--font-mono)`,fontSize:`0.92em`,backgroundColor:`var(--paper-sunk)`,borderRadius:`3px`,padding:`0.05em 0.15em`},".cm-md-codeblock":{fontFamily:`var(--font-mono)`,backgroundColor:`var(--paper-sunk)`},".cm-md-codeblock-open":{borderTopLeftRadius:`var(--radius)`,borderTopRightRadius:`var(--radius)`,paddingTop:`0.2em`},".cm-md-codeblock-close":{borderBottomLeftRadius:`var(--radius)`,borderBottomRightRadius:`var(--radius)`,paddingBottom:`0.2em`}});function Q2(e){return[Aq(),I2({codeLanguages:U2}),FK(W2),X2,rW.lineWrapping,xW(e.placeholder),e.ariaLabel?rW.contentAttributes.of({"aria-label":e.ariaLabel}):[],KL.highest(rW.domEventHandlers({keydown:t=>GI(t)?(t.preventDefault(),e.onSubmitChord?.(),!0):KI(t)?(t.preventDefault(),e.onCancelChord?.(),!0):!1})),fW.of([...LY,...Yq]),Z2,rW.updateListener.of(t=>{t.docChanged&&e.onInput?.(t.state.doc.toString())})]}var $2=F(`<div class="md-editor svelte-1qjb7tg"></div>`);function e4(e,t){T(t,!0);let n=W(t,`value`,3,``),r=W(t,`placeholder`,3,``),i=W(t,`autofocus`,3,!1),a=W(t,`ariaLabel`,3,``),o=O(void 0);Kn(()=>{if(!P(o))return;let e=Ur(()=>n()),s=new rW({parent:P(o),state:TR.create({doc:e,extensions:Q2({placeholder:Ur(()=>r()),ariaLabel:Ur(()=>a()),onInput:e=>t.onInput?.(e),onSubmitChord:()=>t.onSubmitChord?.(),onCancelChord:()=>t.onCancelChord?.()})})});return t.onInput?.(e),Ur(()=>i())&&s.contentDOM.focus({preventScroll:!0}),()=>s.destroy()});var s=$2();wa(s,e=>k(o,e),()=>P(o)),L(e,s),E()}var t4=F(`<!><!>`,1),n4=F(`Save <!>`,1),r4=F(`<!> <!>`,1),i4=F(`<!><!>`,1),a4=F(`Comment <!>`,1),o4=F(`<!> <span class="discard-wrap svelte-1inwjxt"><!> <!></span> <!>`,1),s4=F(`<p class="label metric svelte-1inwjxt"> </p> <!> <div class="row svelte-1inwjxt"><!></div>`,1);function c4(e,t){T(t,!0);let n=W(t,`initial`,3,``),r=W(t,`mode`,3,`create`),i=D(()=>r()===`edit`),a=O(bn(Ur(()=>n())));Kn(()=>{t.onInput?.(P(a))});let o=D(()=>xo(t.startLine,t.endLine)),s=D(()=>P(a).trim()!==``),c=O(!1);function l(){t.onSubmit(P(a))}function u(){P(s)?k(c,!0):t.onDiscard()}function d(){k(c,!1),t.onDiscard()}function f(){P(i)?t.onDiscard():u()}function p(){t.onKeep?.(P(a))}{let r=D(()=>P(i)?`Edit comment`:`Add a comment`);HI(e,{class:`composer`,role:`dialog`,get"aria-label"(){return P(r)},tabindex:-1,children:(e,r)=>{var m=s4(),h=j(m),g=A(h,!0);w(h);var _=M(h,2);{let e=D(()=>P(i)?``:`What should change here?`),t=D(()=>P(i)?`Edit comment`:`Comment`);e4(_,{get value(){return n()},get placeholder(){return P(e)},get ariaLabel(){return P(t)},autofocus:!0,onInput:e=>k(a,e,!0),onSubmitChord:l,onCancelChord:f})}var v=M(_,2),y=A(v),b=e=>{var n=r4(),r=j(n);ul(r,{variant:`ghost`,class:`cancel`,get onclick(){return t.onDiscard},children:(e,t)=>{Je(),L(e,yi(`Cancel`))},$$slots:{default:!0}}),ul(M(r,2),{class:`save`,onclick:l,"aria-keyshortcuts":`Meta+Enter Control+Enter`,children:(e,t)=>{Je();var n=n4();WI(M(j(n)),{class:`kbd`,"aria-hidden":`true`,children:(e,t)=>{var n=t4(),r=j(n);wl(r,{name:`command`,size:12}),wl(M(r),{name:`corner-down-left`,size:12}),L(e,n)},$$slots:{default:!0}}),L(e,n)},$$slots:{default:!0}}),L(e,n)},x=e=>{var t=o4(),n=j(t);{let e=D(()=>!P(s));ul(n,{variant:`ghost`,class:`keep`,onclick:p,get disabled(){return P(e)},children:(e,t)=>{Je(),L(e,yi(`Keep for later`))},$$slots:{default:!0}})}var r=M(n,2),i=A(r);ul(i,{variant:`secondary`,class:`float-chip ghost`,onclick:u,"aria-keyshortcuts":`Escape`,children:(e,t)=>{Je(),L(e,yi(`Discard`))},$$slots:{default:!0}});var a=M(i,2),o=e=>{JI(e,{question:`Discard this comment?`,confirmLabel:`Discard`,cancelLabel:`Keep editing`,align:`start`,onConfirm:d,onCancel:()=>k(c,!1)})};z(a,e=>{P(c)&&e(o)}),w(r),ul(M(r,2),{onclick:l,"aria-keyshortcuts":`Meta+Enter Control+Enter`,children:(e,t)=>{Je();var n=a4();WI(M(j(n)),{class:`kbd`,"aria-hidden":`true`,children:(e,t)=>{var n=i4(),r=j(n);wl(r,{name:`command`,size:12}),wl(M(r),{name:`corner-down-left`,size:12}),L(e,n)},$$slots:{default:!0}}),L(e,n)},$$slots:{default:!0}}),L(e,t)};z(y,e=>{P(i)?e(b):e(x,-1)}),w(v),N(()=>R(g,P(o))),L(e,m)},$$slots:{default:!0}})}E()}var l4=nl({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3`,variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent`,destructive:`bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function u4(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`variant`,3,`default`),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`href`,`class`,`variant`,`children`]);var a=I();Bi(j(a),()=>t.href?`a`:`span`,!1,(e,a)=>{wa(e,e=>n(e),()=>n()),ha(e,e=>({"data-slot":`badge`,href:t.href,class:e,...i}),[()=>rl(l4({variant:r()}),t.class)]);var o=I();B(j(o),()=>t.children??h),L(a,o)}),L(e,a),E()}var d4=F(`<!> <span class="preview svelte-1r21hh7"> </span>`,1);function f4(e,t){ul(e,{variant:`ghost`,class:`scratch`,get onclick(){return t.onResume},"aria-label":`Resume unsent comment`,children:(e,n)=>{var r=d4(),i=j(r);u4(i,{variant:`outline`,class:`badge`,children:(e,t)=>{Je(),L(e,yi(`Resume`))},$$slots:{default:!0}});var a=M(i,2),o=A(a,!0);w(a),N(()=>R(o,t.text)),L(e,r)},$$slots:{default:!0}})}function p4(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`data-slot`,3,`separator`),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`data-slot`]);var a=I(),o=j(a);{let e=D(()=>rl(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:min-h-full data-[orientation=vertical]:w-px`,t.class));V(o,()=>i_,(t,a)=>{a(t,U({get"data-slot"(){return r()},get class(){return P(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,a),E()}function m4(e){let t=e??`pending`;switch(t){case`rejected`:return{status:t,label:`Requested`,tone:`draft`,unresolved:!0};case`approved`:return{status:t,label:`Accepted`,tone:`accepted`,unresolved:!1};case`expired`:return{status:t,label:`Expired`,tone:`expired`,unresolved:!1};default:return{status:`pending`,label:`Draft`,tone:`draft`,unresolved:!0}}}function h4(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var g4=h4();function _4(e){g4=e}var v4={exec:()=>null};function y4(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function b4(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(S4.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var x4=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),S4={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:y4(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:y4(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:y4(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:y4(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:y4(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:y4(e=>RegExp(`^ {0,${e}}>`))},C4=/^(?:[ \t]*(?:\n|$))+/,w4=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,T4=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E4=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,D4=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,O4=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,k4=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,A4=b4(k4).replace(/bull/g,O4).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),j4=b4(k4).replace(/bull/g,O4).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),M4=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,N4=/^[^\n]+/,P4=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,F4=b4(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,P4).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),I4=b4(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,O4).getRegex(),L4=`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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,R4=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,z4=b4(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,R4).replace(`tag`,L4).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B4=b4(M4).replace(`hr`,E4).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,L4).getRegex(),V4={blockquote:b4(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,B4).getRegex(),code:w4,def:F4,fences:T4,heading:D4,hr:E4,html:z4,lheading:A4,list:I4,newline:C4,paragraph:B4,table:v4,text:N4},H4=b4(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,E4).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,L4).getRegex(),U4={...V4,lheading:j4,table:H4,paragraph:b4(M4).replace(`hr`,E4).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,H4).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,L4).getRegex()},W4={...V4,html:b4(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,R4).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v4,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b4(M4).replace(`hr`,E4).replace(`heading`,` *#{1,6} *[^
|
|
829
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),u0=new eG,d0=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function f0(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var p0=[`FunctionDeclaration`],m0={FunctionDeclaration:f0(`function`),ClassDeclaration:f0(`class`),ClassExpression:()=>!0,EnumDeclaration:f0(`constant`),TypeAliasDeclaration:f0(`type`),NamespaceDeclaration:f0(`namespace`),VariableDefinition(e,t){e.matchContext(p0)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function h0(e,t){let n=u0.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(NW.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=m0[t.name];if(e&&e(t,a)||d0.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of h0(e,t.node))r.push(n);return!1}}),u0.set(t,r),r}var g0=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,_0=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function v0(e){let t=QG(e.state).resolveInner(e.pos,-1);if(_0.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&g0.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)d0.has(n.name)&&(r=r.concat(h0(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:g0}}var y0=ZG.define({name:`javascript`,parser:o0.configure({props:[hK.add({IfStatement:DK({except:/^\s*({|else\b)/}),TryStatement:DK({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:EK,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:wK({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":DK({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),kK.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":AK,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),b0={test:e=>/^JSX/.test(e.name),facet:qG({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},x0=y0.configure({dialect:`ts`},`typescript`),S0=y0.configure({dialect:`jsx`,props:[JG.add(e=>e.isTop?[b0]:void 0)]}),C0=y0.configure({dialect:`jsx ts`,props:[JG.add(e=>e.isTop?[b0]:void 0)]},`typescript`),w0=e=>({label:e,type:`keyword`}),T0=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(w0),E0=T0.concat([`declare`,`implements`,`private`,`protected`,`public`].map(w0));function D0(e={}){let t=e.jsx?e.typescript?C0:S0:e.typescript?x0:y0,n=e.typescript?l0.concat(E0):c0.concat(T0);return new cK(t,[y0.data.of({autocomplete:HY(_0,VY(n))}),y0.data.of({autocomplete:v0}),e.jsx?j0:[]])}function O0(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function k0(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var A0=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),j0=rW.inputHandler.of((e,t,n,r,i)=>{if((A0?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!y0.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=QG(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=k0(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:J.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=O0(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=k0(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),M0=n({autoCloseTags:()=>l2,html:()=>s2,htmlCompletionSource:()=>e2,htmlCompletionSourceWith:()=>t2,htmlLanguage:()=>o2}),N0=[`_blank`,`_self`,`_top`,`_parent`],P0=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],F0=[`get`,`post`,`put`,`delete`],I0=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],L0=[`true`,`false`],R0={},z0={a:{attrs:{href:null,ping:null,type:null,media:null,target:N0,hreflang:null}},abbr:R0,address:R0,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:R0,aside:R0,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:R0,base:{attrs:{href:null,target:N0}},bdi:R0,bdo:R0,blockquote:{attrs:{cite:null}},body:R0,br:R0,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:I0,formmethod:F0,formnovalidate:[`novalidate`],formtarget:N0,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:R0,center:R0,cite:R0,code:R0,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:R0,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:R0,div:R0,dl:R0,dt:R0,em:R0,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:R0,figure:R0,footer:R0,form:{attrs:{action:null,name:null,"accept-charset":P0,autocomplete:[`on`,`off`],enctype:I0,method:F0,novalidate:[`novalidate`],target:N0}},h1:R0,h2:R0,h3:R0,h4:R0,h5:R0,h6:R0,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:R0,hgroup:R0,hr:R0,html:{attrs:{manifest:null}},i:R0,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:I0,formmethod:F0,formnovalidate:[`novalidate`],formtarget:N0,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:R0,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:R0,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:R0,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:P0,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:R0,noscript:R0,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:R0,param:{attrs:{name:null,value:null}},pre:R0,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:R0,rt:R0,ruby:R0,samp:R0,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:P0}},section:R0,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:R0,source:{attrs:{src:null,type:null,media:null}},span:R0,strong:R0,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:R0,summary:R0,sup:R0,table:R0,tbody:R0,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:R0,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:R0,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:R0,time:{attrs:{datetime:null}},title:R0,tr:R0,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:R0,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:R0},B0={accesskey:null,class:null,contenteditable:L0,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:L0,autocorrect:L0,autocapitalize:L0,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":L0,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":L0,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":L0,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":L0,"aria-hidden":L0,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":L0,"aria-multiselectable":L0,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":L0,"aria-relevant":null,"aria-required":L0,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},V0=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of V0)B0[e]=null;var H0=class{constructor(e,t){this.tags={...z0,...e},this.globalAttrs={...B0,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};H0.default=new H0;function U0(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function W0(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function G0(e,t,n){return n.tags[U0(e,W0(t))]?.children||n.allTags}function K0(e,t){let n=[];for(let r=W0(t);r&&!r.type.isTop;r=W0(r.parent)){let i=U0(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var q0=/^[:\-\.\w\u00b7-\uffff]*$/;function J0(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=W0(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:G0(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(K0(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Y0(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:K0(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:q0}}function X0(e,t,n,r){let i=[],a=0;for(let r of G0(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of K0(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Z0(e,t,n,r,i){let a=W0(n),o=a?t.tags[U0(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:q0}}function Q0(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=W0(n),i=r?t.tags[U0(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function $0(e,t){let{state:n,pos:r}=t,i=QG(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?Y0(n,i,i.from,r):J0(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?J0(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?Y0(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?Z0(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?Q0(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?X0(n,e,i,r):null}function e2(e){return $0(H0.default,e)}function t2(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new H0(t,n):H0.default;return e=>$0(r,e)}var n2=y0.parser.configure({top:`SingleExpression`}),r2=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:x0.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:S0.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:C0.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:n2},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:y0.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:C1.parser}],i2=[{name:`style`,parser:C1.parser.configure({top:`Styles`})}].concat(V0.map(e=>({name:e,parser:y0.parser}))),a2=ZG.define({name:`html`,parser:b$.configure({props:[hK.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),kK.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),BK.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),o2=a2.configure({wrap:w$(r2,i2)});function s2(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=w$((e.nestedLanguages||[]).concat(r2),(e.nestedAttributes||[]).concat(i2))),new cK(n?a2.configure({wrap:n,dialect:t}):t?o2.configure({dialect:t}):o2,[o2.data.of({autocomplete:t2(e)}),e.autoCloseTags===!1?[]:l2,D0().support,w1().support])}var c2=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),l2=rW.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!o2.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=QG(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=U0(o.doc,t.parent,n))&&!c2.has(a))return{range:e,changes:{from:n,to:n+ +(o.doc.sliceString(n,n+1)===`>`),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=U0(o.doc,e,n))&&!c2.has(a)){let e=n+ +(o.doc.sliceString(n,n+1)===`>`),t=`${a}>`;return{range:J.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),u2=n({commonmarkLanguage:()=>y2,deleteMarkupBackward:()=>N2,insertNewlineContinueMarkup:()=>O2,insertNewlineContinueMarkupCommand:()=>D2,markdown:()=>I2,markdownKeymap:()=>P2,markdownLanguage:()=>b2,pasteURLAsLink:()=>V2}),d2=qG({commentTokens:{block:{open:`<!--`,close:`-->`}}}),f2=new EW,p2=gZ.configure({props:[kK.add(e=>!e.is(`Block`)||e.is(`Document`)||m2(e)!=null||h2(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),f2.add(m2),hK.add({Document:()=>null}),KG.add({Document:d2})]});function m2(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function h2(e){return e.name==`OrderedList`||e.name==`BulletList`}function g2(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=m2(e.type))!=null&&r<=t)break;n=e}return n.to}var _2=OK.of((e,t,n)=>{for(let r=QG(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(f2);if(e==null)continue;let t=g2(r,e);if(t>n)return{from:n,to:t}}return null});function v2(e){return new YG(d2,e,[],`markdown`)}var y2=v2(p2),b2=v2(p2.configure([IZ,zZ,RZ,BZ,{props:[kK.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function x2(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):Z.matchLanguageName(e,n,!0),t instanceof Z)return t.support?t.support.language.parser:tK.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var S2=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+w2(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function C2(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new S2(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new S2(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new S2(i.parent,s,s+t,a[1],e,n,i))}}return r}function w2(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function T2(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=w2(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function E2(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(uK)!=` `)return e;let r=GR(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var D2=(e={})=>({state:t,dispatch:n})=>{let r=QG(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!b2.isActiveAt(t,n.from,-1)&&!b2.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=C2(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&T2(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&T2(e.item,i,r),{range:J.cursor(t+n.length),changes:r}}else{let e=j2(c,t,s);return{range:J.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&T2(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?GR(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=E2(p,t),A2(l.node,t.doc)&&(p=j2(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:J.cursor(m+p.length+1),changes:d}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},O2=D2();function k2(e){return e.name==`QuoteMark`||e.name==`ListMark`}function A2(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function j2(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?GR(n.text,4,e[t+1].from)-r.length:null,t<i);return E2(r,t)}function M2(e,t){let n=e.resolveInner(t,-1),r=t;k2(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(k2(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var N2=({state:e,dispatch:t})=>{let n=QG(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&b2.isActiveAt(e,t.from)){let t=a.lineAt(i),r=C2(M2(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:J.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(GR(t.text,4,n.to)-GR(t.text,4,n.from));return r==t.from&&(i=E2(i,e)),{range:J.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:J.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},P2=[{key:`Enter`,run:O2},{key:`Backspace`,run:N2}],F2=s2({matchClosingTags:!1});function I2(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=y2,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=F2}=e;if(!(i instanceof HX))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,_2],u;o&&l.push(V2),n instanceof cK?(l.push(n.support),u=n.language):n&&(u=n);let d=t||u?x2(t,u):void 0;c.push(vZ({codeParser:d,htmlParser:s.language.parser})),r&&l.push(KL.high(fW.of(P2)));let f=v2(i.configure(c));return a&&l.push(f.data.of({autocomplete:L2})),new cK(f,l)}function L2(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=QG(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:z2(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var R2=null;function z2(){if(R2)return R2;let e=e2(new RY(TR.create({extensions:F2}),0,!0));return R2=e?e.options:[]}var B2=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,V2=rW.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!b2.isActiveAt(t.state,n.from,1)))return!1;let i=QG(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||B2.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function $(e){return new cK(ZK.define(e))}function H2(e){return q(()=>import(`./dist-afCEYO1j.js`).then(t=>t.sql({dialect:t[e]})),[])}var U2=[Z.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return q(()=>import(`./dist-DNG5YE4w.js`).then(e=>e.cpp()),[])}}),Z.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return q(()=>import(`./dist-DNG5YE4w.js`).then(e=>e.cpp()),[])}}),Z.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return H2(`Cassandra`)}}),Z.of({name:`CSS`,extensions:[`css`],load(){return q(()=>Promise.resolve().then(()=>s1).then(e=>e.css()),void 0)}}),Z.of({name:`Go`,extensions:[`go`],load(){return q(()=>import(`./dist-Cyz1Y8uV.js`).then(e=>e.go()),[])}}),Z.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return q(()=>Promise.resolve().then(()=>M0).then(e=>e.html()),void 0)}}),Z.of({name:`Java`,extensions:[`java`],load(){return q(()=>import(`./dist-DPr7mnLy.js`).then(e=>e.java()),[])}}),Z.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript()),void 0)}}),Z.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return q(()=>import(`./dist-CZ-hU0oG.js`).then(e=>e.jinja()),[])}}),Z.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return q(()=>import(`./dist-BeSPrXBn.js`).then(e=>e.json()),[])}}),Z.of({name:`JSX`,extensions:[`jsx`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript({jsx:!0})),void 0)}}),Z.of({name:`LESS`,extensions:[`less`],load(){return q(()=>import(`./dist-C2049AtS.js`).then(e=>e.less()),[])}}),Z.of({name:`Liquid`,extensions:[`liquid`],load(){return q(()=>import(`./dist-C0x7GorT.js`).then(e=>e.liquid()),[])}}),Z.of({name:`MariaDB SQL`,load(){return H2(`MariaSQL`)}}),Z.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return q(()=>Promise.resolve().then(()=>u2).then(e=>e.markdown()),void 0)}}),Z.of({name:`MS SQL`,load(){return H2(`MSSQL`)}}),Z.of({name:`MySQL`,load(){return H2(`MySQL`)}}),Z.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return q(()=>import(`./dist-Bm-_E_MU.js`).then(e=>e.php()),[])}}),Z.of({name:`PLSQL`,extensions:[`pls`],load(){return H2(`PLSQL`)}}),Z.of({name:`PostgreSQL`,load(){return H2(`PostgreSQL`)}}),Z.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return q(()=>import(`./dist-Buh6GXb2.js`).then(e=>e.python()),[])}}),Z.of({name:`Rust`,extensions:[`rs`],load(){return q(()=>import(`./dist-Dhe__fm5.js`).then(e=>e.rust()),[])}}),Z.of({name:`Sass`,extensions:[`sass`],load(){return q(()=>import(`./dist-fAkxRpOI.js`).then(e=>e.sass({indented:!0})),[])}}),Z.of({name:`SCSS`,extensions:[`scss`],load(){return q(()=>import(`./dist-fAkxRpOI.js`).then(e=>e.sass()),[])}}),Z.of({name:`SQL`,extensions:[`sql`],load(){return H2(`StandardSQL`)}}),Z.of({name:`SQLite`,load(){return H2(`SQLite`)}}),Z.of({name:`TSX`,extensions:[`tsx`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript({jsx:!0,typescript:!0})),void 0)}}),Z.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return q(()=>Promise.resolve().then(()=>s0).then(e=>e.javascript({typescript:!0})),void 0)}}),Z.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return q(()=>import(`./dist-CzDZ2KMv.js`).then(e=>e.wast()),[])}}),Z.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return q(()=>import(`./dist-BPvuZVb2.js`).then(e=>e.xml()),[])}}),Z.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return q(()=>import(`./dist-C7ysmu-x.js`).then(e=>e.yaml()),[])}}),Z.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return q(()=>import(`./apl-CnwPGSsG.js`).then(e=>$(e.apl)),[])}}),Z.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return q(()=>import(`./asciiarmor-qTkVPQu6.js`).then(e=>$(e.asciiArmor)),[])}}),Z.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return q(()=>import(`./asn1-Dr8qZg38.js`).then(e=>$(e.asn1({}))),[])}}),Z.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return q(()=>import(`./asterisk-Bja0s6e1.js`).then(e=>$(e.asterisk)),[])}}),Z.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return q(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>$(e.brainfuck)),[])}}),Z.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return q(()=>import(`./cobol-B_OZ4V-R.js`).then(e=>$(e.cobol)),[])}}),Z.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.csharp)),[])}}),Z.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),Z.of({name:`ClojureScript`,extensions:[`cljs`],load(){return q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),Z.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return q(()=>import(`./css-CYpP4FRV.js`).then(e=>$(e.gss)),[])}}),Z.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return q(()=>import(`./cmake-CyVbuzPu.js`).then(e=>$(e.cmake)),[])}}),Z.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return q(()=>import(`./coffeescript-B2pKbFk8.js`).then(e=>$(e.coffeeScript)),[])}}),Z.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return q(()=>import(`./commonlisp-CcllspGY.js`).then(e=>$(e.commonLisp)),[])}}),Z.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return q(()=>import(`./cypher-p9eYesGn.js`).then(e=>$(e.cypher)),[])}}),Z.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return q(()=>import(`./python-BqYw9LYJ.js`).then(e=>$(e.cython)),[])}}),Z.of({name:`Crystal`,extensions:[`cr`],load(){return q(()=>import(`./crystal-M5-qzICs.js`).then(e=>$(e.crystal)),[])}}),Z.of({name:`D`,extensions:[`d`],load(){return q(()=>import(`./d-BhMjBjQP.js`).then(e=>$(e.d)),[])}}),Z.of({name:`Dart`,extensions:[`dart`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.dart)),[])}}),Z.of({name:`diff`,extensions:[`diff`,`patch`],load(){return q(()=>import(`./diff-ChtP43wD.js`).then(e=>$(e.diff)),[])}}),Z.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return q(()=>import(`./dockerfile-BLkNEvjs.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([101,102]))}}),Z.of({name:`DTD`,extensions:[`dtd`],load(){return q(()=>import(`./dtd-DTF72YNO.js`).then(e=>$(e.dtd)),[])}}),Z.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return q(()=>import(`./dylan-C6jEEEk-.js`).then(e=>$(e.dylan)),[])}}),Z.of({name:`EBNF`,load(){return q(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>$(e.ebnf)),[])}}),Z.of({name:`ECL`,extensions:[`ecl`],load(){return q(()=>import(`./ecl-BSZaIHnp.js`).then(e=>$(e.ecl)),[])}}),Z.of({name:`edn`,extensions:[`edn`],load(){return q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),Z.of({name:`Eiffel`,extensions:[`e`],load(){return q(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>$(e.eiffel)),[])}}),Z.of({name:`Elm`,extensions:[`elm`],load(){return q(()=>import(`./elm-Cshzl8qu.js`).then(e=>$(e.elm)),[])}}),Z.of({name:`Erlang`,extensions:[`erl`],load(){return q(()=>import(`./erlang-DaB2Rkuy.js`).then(e=>$(e.erlang)),[])}}),Z.of({name:`Esper`,load(){return q(()=>import(`./sql-DcCJ9jop.js`).then(e=>$(e.esper)),[])}}),Z.of({name:`Factor`,extensions:[`factor`],load(){return q(()=>import(`./factor-D7LVTn2l.js`).then(e=>$(e.factor)),__vite__mapDeps([103,102]))}}),Z.of({name:`FCL`,load(){return q(()=>import(`./fcl-ClOhbFR7.js`).then(e=>$(e.fcl)),[])}}),Z.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return q(()=>import(`./forth-Cezjo90N.js`).then(e=>$(e.forth)),[])}}),Z.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return q(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>$(e.fortran)),[])}}),Z.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.fSharp)),[])}}),Z.of({name:`Gas`,extensions:[`s`],load(){return q(()=>import(`./gas-BHEdbvp9.js`).then(e=>$(e.gas)),[])}}),Z.of({name:`Gherkin`,extensions:[`feature`],load(){return q(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>$(e.gherkin)),[])}}),Z.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return q(()=>import(`./groovy-BC3IOsC8.js`).then(e=>$(e.groovy)),[])}}),Z.of({name:`Haskell`,extensions:[`hs`],load(){return q(()=>import(`./haskell-BRsoo5mP.js`).then(e=>$(e.haskell)),[])}}),Z.of({name:`Haxe`,extensions:[`hx`],load(){return q(()=>import(`./haxe-DIz0ZZqd.js`).then(e=>$(e.haxe)),[])}}),Z.of({name:`HXML`,extensions:[`hxml`],load(){return q(()=>import(`./haxe-DIz0ZZqd.js`).then(e=>$(e.hxml)),[])}}),Z.of({name:`HTTP`,load(){return q(()=>import(`./http-CLVgA2GD.js`).then(e=>$(e.http)),[])}}),Z.of({name:`IDL`,extensions:[`pro`],load(){return q(()=>import(`./idl-BUZw3wgd.js`).then(e=>$(e.idl)),[])}}),Z.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return q(()=>import(`./javascript-9Tg8ixDm.js`).then(e=>$(e.jsonld)),[])}}),Z.of({name:`Julia`,extensions:[`jl`],load(){return q(()=>import(`./julia-CQfgDRfP.js`).then(e=>$(e.julia)),[])}}),Z.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.kotlin)),[])}}),Z.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return q(()=>import(`./livescript-BXxG0Yva.js`).then(e=>$(e.liveScript)),[])}}),Z.of({name:`Lua`,extensions:[`lua`],load(){return q(()=>import(`./lua-CiA1ziua.js`).then(e=>$(e.lua)),[])}}),Z.of({name:`mIRC`,extensions:[`mrc`],load(){return q(()=>import(`./mirc-C9zpzAZU.js`).then(e=>$(e.mirc)),[])}}),Z.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return q(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>$(e.mathematica)),[])}}),Z.of({name:`Modelica`,extensions:[`mo`],load(){return q(()=>import(`./modelica-CqHI_q-D.js`).then(e=>$(e.modelica)),[])}}),Z.of({name:`MUMPS`,extensions:[`mps`],load(){return q(()=>import(`./mumps-CW_TBmxz.js`).then(e=>$(e.mumps)),[])}}),Z.of({name:`Mbox`,extensions:[`mbox`],load(){return q(()=>import(`./mbox-BEMVcqjs.js`).then(e=>$(e.mbox)),[])}}),Z.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return q(()=>import(`./nginx-BMaDbqW3.js`).then(e=>$(e.nginx)),[])}}),Z.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return q(()=>import(`./nsis-AQ_alPln.js`).then(e=>$(e.nsis)),__vite__mapDeps([104,102]))}}),Z.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return q(()=>import(`./ntriples-d28e9m0E.js`).then(e=>$(e.ntriples)),[])}}),Z.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.objectiveC)),[])}}),Z.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.objectiveCpp)),[])}}),Z.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.oCaml)),[])}}),Z.of({name:`Octave`,extensions:[`m`],load(){return q(()=>import(`./octave-D2Q8cUp1.js`).then(e=>$(e.octave)),[])}}),Z.of({name:`Oz`,extensions:[`oz`],load(){return q(()=>import(`./oz-BwTct_5T.js`).then(e=>$(e.oz)),[])}}),Z.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return q(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>$(e.pascal)),[])}}),Z.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return q(()=>import(`./perl-CdEHsPfU.js`).then(e=>$(e.perl)),[])}}),Z.of({name:`Pig`,extensions:[`pig`],load(){return q(()=>import(`./pig-AF4Hwhju.js`).then(e=>$(e.pig)),[])}}),Z.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return q(()=>import(`./powershell-CzG71I4L.js`).then(e=>$(e.powerShell)),[])}}),Z.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return q(()=>import(`./properties-C357ku5U.js`).then(e=>$(e.properties)),[])}}),Z.of({name:`ProtoBuf`,extensions:[`proto`],load(){return q(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>$(e.protobuf)),[])}}),Z.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return q(()=>import(`./pug-Bugr-47h.js`).then(e=>$(e.pug)),__vite__mapDeps([105,106]))}}),Z.of({name:`Puppet`,extensions:[`pp`],load(){return q(()=>import(`./puppet-B4hC2X4m.js`).then(e=>$(e.puppet)),[])}}),Z.of({name:`Q`,extensions:[`q`],load(){return q(()=>import(`./q-B9NhS7L_.js`).then(e=>$(e.q)),[])}}),Z.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return q(()=>import(`./r-DADKenSm.js`).then(e=>$(e.r)),[])}}),Z.of({name:`RPM Changes`,load(){return q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[])}}),Z.of({name:`RPM Spec`,extensions:[`spec`],load(){return q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[])}}),Z.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return q(()=>import(`./ruby-DsYpTuWg.js`).then(e=>$(e.ruby)),[])}}),Z.of({name:`SAS`,extensions:[`sas`],load(){return q(()=>import(`./sas-C2OyD2Y6.js`).then(e=>$(e.sas)),[])}}),Z.of({name:`Scala`,extensions:[`scala`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.scala)),[])}}),Z.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return q(()=>import(`./scheme-CyDdOh7e.js`).then(e=>$(e.scheme)),[])}}),Z.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return q(()=>import(`./shell-Du5Qg9im.js`).then(e=>$(e.shell)),[])}}),Z.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return q(()=>import(`./sieve-BAxa3IjF.js`).then(e=>$(e.sieve)),[])}}),Z.of({name:`Smalltalk`,extensions:[`st`],load(){return q(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>$(e.smalltalk)),[])}}),Z.of({name:`Solr`,load(){return q(()=>import(`./solr-BBopId9w.js`).then(e=>$(e.solr)),[])}}),Z.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.sml)),[])}}),Z.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return q(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>$(e.sparql)),[])}}),Z.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return q(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>$(e.spreadsheet)),[])}}),Z.of({name:`Squirrel`,extensions:[`nut`],load(){return q(()=>import(`./clike-DHH8Ad3s.js`).then(e=>$(e.squirrel)),[])}}),Z.of({name:`Stylus`,extensions:[`styl`],load(){return q(()=>import(`./stylus-DLLZ8dgm.js`).then(e=>$(e.stylus)),[])}}),Z.of({name:`Swift`,extensions:[`swift`],load(){return q(()=>import(`./swift-DKB6_1j6.js`).then(e=>$(e.swift)),[])}}),Z.of({name:`sTeX`,load(){return q(()=>import(`./stex-sDrdk2BW.js`).then(e=>$(e.stex)),[])}}),Z.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return q(()=>import(`./stex-sDrdk2BW.js`).then(e=>$(e.stex)),[])}}),Z.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return q(()=>import(`./verilog-D-x6ne0Z.js`).then(e=>$(e.verilog)),[])}}),Z.of({name:`Tcl`,extensions:[`tcl`],load(){return q(()=>import(`./tcl-BGfruO1u.js`).then(e=>$(e.tcl)),[])}}),Z.of({name:`Textile`,extensions:[`textile`],load(){return q(()=>import(`./textile-DWBqthVk.js`).then(e=>$(e.textile)),[])}}),Z.of({name:`TiddlyWiki`,load(){return q(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[])}}),Z.of({name:`Tiki wiki`,load(){return q(()=>import(`./tiki-CxVlf5KZ.js`).then(e=>$(e.tiki)),[])}}),Z.of({name:`TOML`,extensions:[`toml`],load(){return q(()=>import(`./toml-LvoKBwCs.js`).then(e=>$(e.toml)),[])}}),Z.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return q(()=>import(`./troff-C2dAgh7P.js`).then(e=>$(e.troff)),[])}}),Z.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return q(()=>import(`./ttcn-BePYh-hG.js`).then(e=>$(e.ttcn)),[])}}),Z.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return q(()=>import(`./ttcn-cfg-CY0aot7Q.js`).then(e=>$(e.ttcnCfg)),[])}}),Z.of({name:`Turtle`,extensions:[`ttl`],load(){return q(()=>import(`./turtle-BDLWE2cD.js`).then(e=>$(e.turtle)),[])}}),Z.of({name:`Web IDL`,extensions:[`webidl`],load(){return q(()=>import(`./webidl-D5jiJvOU.js`).then(e=>$(e.webIDL)),[])}}),Z.of({name:`VB.NET`,extensions:[`vb`],load(){return q(()=>import(`./vb-BthdM_4N.js`).then(e=>$(e.vb)),[])}}),Z.of({name:`VBScript`,extensions:[`vbs`],load(){return q(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>$(e.vbScript)),[])}}),Z.of({name:`Velocity`,extensions:[`vtl`],load(){return q(()=>import(`./velocity-CqftRsjg.js`).then(e=>$(e.velocity)),[])}}),Z.of({name:`Verilog`,extensions:[`v`],load(){return q(()=>import(`./verilog-D-x6ne0Z.js`).then(e=>$(e.verilog)),[])}}),Z.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return q(()=>import(`./vhdl-CMrOq2q1.js`).then(e=>$(e.vhdl)),[])}}),Z.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return q(()=>import(`./xquery-fj_R-kMw.js`).then(e=>$(e.xQuery)),[])}}),Z.of({name:`Yacas`,extensions:[`ys`],load(){return q(()=>import(`./yacas-CXXgtw0p.js`).then(e=>$(e.yacas)),[])}}),Z.of({name:`Z80`,extensions:[`z80`],load(){return q(()=>import(`./z80-CL1naaMV.js`).then(e=>$(e.z80)),[])}}),Z.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.mscgen)),[])}}),Z.of({name:`Xù`,extensions:[`xu`],load(){return q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.xu)),[])}}),Z.of({name:`MsGenny`,extensions:[`msgenny`],load(){return q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.msgenny)),[])}}),Z.of({name:`Vue`,extensions:[`vue`],load(){return q(()=>import(`./dist-DBvtZoff.js`).then(e=>e.vue()),[])}}),Z.of({name:`Angular Template`,load(){return q(()=>import(`./dist-CA76eI1h.js`).then(e=>e.angular()),[])}})],W2=jK.define([{tag:X.strong,fontWeight:`700`},{tag:X.emphasis,fontStyle:`italic`},{tag:X.strikethrough,textDecoration:`line-through`},{tag:X.heading,fontWeight:`700`,color:`var(--ink)`},{tag:[X.link,X.url],color:`var(--accent)`,textDecoration:`underline`},{tag:X.quote,color:`var(--ink-soft)`},{tag:X.meta,color:`var(--ink-faint)`},{tag:[X.keyword,X.modifier,X.controlKeyword,X.operatorKeyword,X.definitionKeyword,X.moduleKeyword],color:`var(--accent)`},{tag:[X.string,X.special(X.string),X.regexp],color:`var(--ok)`},{tag:[X.comment,X.lineComment,X.blockComment,X.docComment],color:`var(--ink-faint)`,fontStyle:`italic`},{tag:[X.function(X.variableName),X.function(X.propertyName),X.labelName],color:`var(--accent-bright)`},{tag:[X.typeName,X.className,X.namespace,X.tagName],color:`var(--accent-bright)`},{tag:[X.number,X.bool,X.atom],color:`var(--accent-bright)`},{tag:[X.operator,X.punctuation,X.separator,X.bracket,X.angleBracket,X.squareBracket,X.paren,X.brace],color:`var(--ink-soft)`},{tag:[X.propertyName,X.attributeName],color:`var(--ink)`},{tag:[X.variableName,X.attributeValue],color:`var(--ink)`},{tag:X.escape,color:`var(--accent-bright)`}]),G2=Dz.mark({class:`cm-md-code`}),K2=Dz.line({class:`cm-md-codeblock`}),q2=Dz.line({class:`cm-md-codeblock cm-md-codeblock-open`}),J2=Dz.line({class:`cm-md-codeblock cm-md-codeblock-close`});function Y2(e){let t=[];for(let{from:n,to:r}of e.visibleRanges)QG(e.state).iterate({from:n,to:r,enter:n=>{if(n.name===`InlineCode`)return t.push(G2.range(n.from,n.to)),!1;if(n.name===`FencedCode`){let r=e.state.doc.lineAt(n.from).number,i=e.state.doc.lineAt(n.to).number;for(let n=r;n<=i;n++){let a=n===r?q2:n===i?J2:K2;t.push(a.range(e.state.doc.line(n).from))}return!1}}});return Dz.set(t,!0)}var X2=YB.fromClass(class{decorations=Dz.none;constructor(e){this.decorations=Y2(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=Y2(e.view))}},{decorations:e=>e.decorations}),Z2=rW.theme({"&":{backgroundColor:`transparent`,color:`var(--ink)`},".cm-scroller":{fontFamily:`var(--font-sans)`,fontSize:`var(--text-md)`,lineHeight:`var(--leading-snug)`,maxHeight:`22rem`,overflowY:`auto`},".cm-content":{padding:`0.45rem 0.55rem`,minHeight:`calc(var(--text-md) * var(--leading-snug) * 3)`,caretColor:`var(--accent)`},"&.cm-focused":{outline:`none`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--ink)`},".cm-selectionBackground, &.cm-focused .cm-selectionBackground, .cm-content ::selection":{backgroundColor:`color-mix(in lab, var(--accent) 22%, transparent)`},".cm-placeholder":{color:`var(--ink-faint)`},".cm-md-code":{fontFamily:`var(--font-mono)`,fontSize:`0.92em`,backgroundColor:`var(--paper-sunk)`,borderRadius:`3px`,padding:`0.05em 0.15em`},".cm-md-codeblock":{fontFamily:`var(--font-mono)`,backgroundColor:`var(--paper-sunk)`},".cm-md-codeblock-open":{borderTopLeftRadius:`var(--radius)`,borderTopRightRadius:`var(--radius)`,paddingTop:`0.2em`},".cm-md-codeblock-close":{borderBottomLeftRadius:`var(--radius)`,borderBottomRightRadius:`var(--radius)`,paddingBottom:`0.2em`}});function Q2(e){return[Aq(),I2({codeLanguages:U2}),FK(W2),X2,rW.lineWrapping,xW(e.placeholder),e.ariaLabel?rW.contentAttributes.of({"aria-label":e.ariaLabel}):[],KL.highest(rW.domEventHandlers({keydown:t=>GI(t)?(t.preventDefault(),e.onSubmitChord?.(),!0):KI(t)?(t.preventDefault(),e.onCancelChord?.(),!0):!1})),fW.of([...LY,...Yq]),Z2,rW.updateListener.of(t=>{t.docChanged&&e.onInput?.(t.state.doc.toString())})]}var $2=F(`<div class="md-editor svelte-1qjb7tg"></div>`);function e4(e,t){T(t,!0);let n=W(t,`value`,3,``),r=W(t,`placeholder`,3,``),i=W(t,`autofocus`,3,!1),a=W(t,`ariaLabel`,3,``),o=O(void 0);Kn(()=>{if(!P(o))return;let e=Ur(()=>n()),s=new rW({parent:P(o),state:TR.create({doc:e,extensions:Q2({placeholder:Ur(()=>r()),ariaLabel:Ur(()=>a()),onInput:e=>t.onInput?.(e),onSubmitChord:()=>t.onSubmitChord?.(),onCancelChord:()=>t.onCancelChord?.()})})});return t.onInput?.(e),Ur(()=>i())&&s.contentDOM.focus({preventScroll:!0}),()=>s.destroy()});var s=$2();wa(s,e=>k(o,e),()=>P(o)),L(e,s),E()}var t4=F(`<!><!>`,1),n4=F(`Save <!>`,1),r4=F(`<!> <!>`,1),i4=F(`<!><!>`,1),a4=F(`Comment <!>`,1),o4=F(`<!> <span class="discard-wrap svelte-1inwjxt"><!> <!></span> <!>`,1),s4=F(`<p class="label metric svelte-1inwjxt"> </p> <!> <div class="row svelte-1inwjxt"><!></div>`,1);function c4(e,t){T(t,!0);let n=W(t,`initial`,3,``),r=W(t,`mode`,3,`create`),i=D(()=>r()===`edit`),a=O(bn(Ur(()=>n())));Kn(()=>{t.onInput?.(P(a))});let o=D(()=>xo(t.startLine,t.endLine)),s=D(()=>P(a).trim()!==``),c=O(!1);function l(){t.onSubmit(P(a))}function u(){P(s)?k(c,!0):t.onDiscard()}function d(){k(c,!1),t.onDiscard()}function f(){P(i)?t.onDiscard():u()}function p(){t.onKeep?.(P(a))}{let r=D(()=>P(i)?`Edit comment`:`Add a comment`);HI(e,{class:`composer`,role:`dialog`,get"aria-label"(){return P(r)},tabindex:-1,children:(e,r)=>{var m=s4(),h=j(m),g=A(h,!0);w(h);var _=M(h,2);{let e=D(()=>P(i)?``:`What should change here?`),t=D(()=>P(i)?`Edit comment`:`Comment`);e4(_,{get value(){return n()},get placeholder(){return P(e)},get ariaLabel(){return P(t)},autofocus:!0,onInput:e=>k(a,e,!0),onSubmitChord:l,onCancelChord:f})}var v=M(_,2),y=A(v),b=e=>{var n=r4(),r=j(n);ul(r,{variant:`ghost`,class:`cancel`,get onclick(){return t.onDiscard},children:(e,t)=>{Je(),L(e,yi(`Cancel`))},$$slots:{default:!0}}),ul(M(r,2),{class:`save`,onclick:l,"aria-keyshortcuts":`Meta+Enter Control+Enter`,children:(e,t)=>{Je();var n=n4();WI(M(j(n)),{class:`kbd`,"aria-hidden":`true`,children:(e,t)=>{var n=t4(),r=j(n);wl(r,{name:`command`,size:12}),wl(M(r),{name:`corner-down-left`,size:12}),L(e,n)},$$slots:{default:!0}}),L(e,n)},$$slots:{default:!0}}),L(e,n)},x=e=>{var t=o4(),n=j(t);{let e=D(()=>!P(s));ul(n,{variant:`ghost`,class:`keep`,onclick:p,get disabled(){return P(e)},children:(e,t)=>{Je(),L(e,yi(`Keep for later`))},$$slots:{default:!0}})}var r=M(n,2),i=A(r);ul(i,{variant:`secondary`,class:`float-chip ghost`,onclick:u,"aria-keyshortcuts":`Escape`,children:(e,t)=>{Je(),L(e,yi(`Discard`))},$$slots:{default:!0}});var a=M(i,2),o=e=>{JI(e,{question:`Discard this comment?`,confirmLabel:`Discard`,cancelLabel:`Keep editing`,align:`start`,onConfirm:d,onCancel:()=>k(c,!1)})};z(a,e=>{P(c)&&e(o)}),w(r),ul(M(r,2),{onclick:l,"aria-keyshortcuts":`Meta+Enter Control+Enter`,children:(e,t)=>{Je();var n=a4();WI(M(j(n)),{class:`kbd`,"aria-hidden":`true`,children:(e,t)=>{var n=i4(),r=j(n);wl(r,{name:`command`,size:12}),wl(M(r),{name:`corner-down-left`,size:12}),L(e,n)},$$slots:{default:!0}}),L(e,n)},$$slots:{default:!0}}),L(e,t)};z(y,e=>{P(i)?e(b):e(x,-1)}),w(v),N(()=>R(g,P(o))),L(e,m)},$$slots:{default:!0}})}E()}var l4=nl({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3`,variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent`,destructive:`bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function u4(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`variant`,3,`default`),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`href`,`class`,`variant`,`children`]);var a=I();Bi(j(a),()=>t.href?`a`:`span`,!1,(e,a)=>{wa(e,e=>n(e),()=>n()),ha(e,e=>({"data-slot":`badge`,href:t.href,class:e,...i}),[()=>rl(l4({variant:r()}),t.class)]);var o=I();B(j(o),()=>t.children??h),L(a,o)}),L(e,a),E()}var d4=F(`<!> <span class="preview svelte-1r21hh7"> </span>`,1);function f4(e,t){ul(e,{variant:`ghost`,class:`scratch`,get onclick(){return t.onResume},"aria-label":`Resume unsent comment`,children:(e,n)=>{var r=d4(),i=j(r);u4(i,{variant:`outline`,class:`badge`,children:(e,t)=>{Je(),L(e,yi(`Resume`))},$$slots:{default:!0}});var a=M(i,2),o=A(a,!0);w(a),N(()=>R(o,t.text)),L(e,r)},$$slots:{default:!0}})}function p4(e,t){T(t,!0);let n=W(t,`ref`,15,null),r=W(t,`data-slot`,3,`separator`),i=H(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`data-slot`]);var a=I(),o=j(a);{let e=D(()=>rl(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:min-h-full data-[orientation=vertical]:w-px`,t.class));V(o,()=>i_,(t,a)=>{a(t,U({get"data-slot"(){return r()},get class(){return P(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}L(e,a),E()}function m4(e){let t=e??`pending`;switch(t){case`rejected`:return{status:t,label:`Requested`,tone:`draft`,unresolved:!0};case`approved`:return{status:t,label:`Accepted`,tone:`accepted`,unresolved:!1};case`expired`:return{status:t,label:`Expired`,tone:`expired`,unresolved:!1};default:return{status:`pending`,label:`Draft`,tone:`draft`,unresolved:!0}}}function h4(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var g4=h4();function _4(e){g4=e}var v4={exec:()=>null};function y4(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function b4(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(S4.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var x4=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),S4={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:y4(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:y4(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:y4(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:y4(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:y4(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:y4(e=>RegExp(`^ {0,${e}}>`))},C4=/^(?:[ \t]*(?:\n|$))+/,w4=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,T4=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E4=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,D4=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,O4=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,k4=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,A4=b4(k4).replace(/bull/g,O4).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),j4=b4(k4).replace(/bull/g,O4).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),M4=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,N4=/^[^\n]+/,P4=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,F4=b4(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,P4).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),I4=b4(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,O4).getRegex(),L4=`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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,R4=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,z4=b4(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,R4).replace(`tag`,L4).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B4=b4(M4).replace(`hr`,E4).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,L4).getRegex(),V4={blockquote:b4(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,B4).getRegex(),code:w4,def:F4,fences:T4,heading:D4,hr:E4,html:z4,lheading:A4,list:I4,newline:C4,paragraph:B4,table:v4,text:N4},H4=b4(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,E4).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,L4).getRegex(),U4={...V4,lheading:j4,table:H4,paragraph:b4(M4).replace(`hr`,E4).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,H4).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,L4).getRegex()},W4={...V4,html:b4(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,R4).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v4,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b4(M4).replace(`hr`,E4).replace(`heading`,` *#{1,6} *[^
|
|
830
830
|
]`).replace(`lheading`,A4).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},G4=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,K4=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,q4=/^( {2,}|\\)\n(?!\s*$)/,J4=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Y4=/[\p{P}\p{S}]/u,X4=/[\s\p{P}\p{S}]/u,Z4=/[^\s\p{P}\p{S}]/u,Q4=b4(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,X4).getRegex(),$4=/(?!~)[\p{P}\p{S}]/u,e3=/(?!~)[\s\p{P}\p{S}]/u,t3=/(?:[^\s\p{P}\p{S}]|~)/u,n3=b4(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,x4?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),r3=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,i3=b4(r3,`u`).replace(/punct/g,Y4).getRegex(),a3=b4(r3,`u`).replace(/punct/g,$4).getRegex(),o3=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,s3=b4(o3,`gu`).replace(/notPunctSpace/g,Z4).replace(/punctSpace/g,X4).replace(/punct/g,Y4).getRegex(),c3=b4(o3,`gu`).replace(/notPunctSpace/g,t3).replace(/punctSpace/g,e3).replace(/punct/g,$4).getRegex(),l3=b4(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Z4).replace(/punctSpace/g,X4).replace(/punct/g,Y4).getRegex(),u3=b4(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Y4).getRegex(),d3=b4(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Z4).replace(/punctSpace/g,X4).replace(/punct/g,Y4).getRegex(),f3=b4(/\\(punct)/,`gu`).replace(/punct/g,Y4).getRegex(),p3=b4(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),m3=b4(R4).replace(`(?:-->|$)`,`-->`).getRegex(),h3=b4(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,m3).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),g3=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,_3=b4(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,g3).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),v3=b4(/^!?\[(label)\]\[(ref)\]/).replace(`label`,g3).replace(`ref`,P4).getRegex(),y3=b4(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,P4).getRegex(),b3=b4(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,v3).replace(`nolink`,y3).getRegex(),x3=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,S3={_backpedal:v4,anyPunctuation:f3,autolink:p3,blockSkip:n3,br:q4,code:K4,del:v4,delLDelim:v4,delRDelim:v4,emStrongLDelim:i3,emStrongRDelimAst:s3,emStrongRDelimUnd:l3,escape:G4,link:_3,nolink:y3,punctuation:Q4,reflink:v3,reflinkSearch:b3,tag:h3,text:J4,url:v4},C3={...S3,link:b4(/^!?\[(label)\]\((.*?)\)/).replace(`label`,g3).getRegex(),reflink:b4(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,g3).getRegex()},w3={...S3,emStrongRDelimAst:c3,emStrongLDelim:a3,delLDelim:u3,delRDelim:d3,url:b4(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,x3).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:b4(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,x3).getRegex()},T3={...w3,br:b4(q4).replace(`{2,}`,`*`).getRegex(),text:b4(w3.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},E3={normal:V4,gfm:U4,pedantic:W4},D3={normal:S3,gfm:w3,breaks:T3,pedantic:C3},O3={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},k3=e=>O3[e];function A3(e,t){if(t){if(S4.escapeTest.test(e))return e.replace(S4.escapeReplace,k3)}else if(S4.escapeTestNoEncode.test(e))return e.replace(S4.escapeReplaceNoEncode,k3);return e}function j3(e){try{e=encodeURI(e).replace(S4.percentDecode,`%`)}catch{return null}return e}function M3(e,t){let n=e.replace(S4.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(S4.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(S4.slashPipe,`|`);return n}function N3(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function P3(e){let t=e.split(`
|
|
831
831
|
`),n=t.length-1;for(;n>=0&&S4.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
832
832
|
`)}function F3(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function I3(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function L3(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function R3(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|