const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DgL0RwuR.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-DtEQuh-b.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/dialog-select-directory-v2-5ukPk_ml.js","assets/dialog-v2-B8u7MssM.js","assets/dialog-v2-DE668_FY.css","assets/text-input-v2-BPpLJrvf.js","assets/text-input-v2-BX0oR3oF.css","assets/dialog-select-directory-v2-BLfZvzPV.css","assets/dialog-select-provider-Dbmd9jzs.js","assets/provider-icon-D6bZ2bty.js","assets/dialog-connect-provider-CqktASfe.js","assets/dialog-select-server-qeylUsR-.js","assets/server-row-BZ9nzgjA.js","assets/index-BNAROTu2.js","assets/JL7SEB2K-Dm8IeC9I.js","assets/LROKH5N7-dy2SHuzc.js","assets/settings-keybinds-Crigj-k6.js","assets/list-4OWRztNh.js","assets/settings-v2-DK5WzX-j.css","assets/dialog-server-v2-DCiTvTUY.js","assets/dialog-server-v2-CpG1cVtB.css","assets/index-D-8adDfn.css","assets/dialog-settings-NXqE2byn.js","assets/select-C1D8Rvy2.js","assets/switch-BVX9vJHv.js","assets/home-DP_j2kXj.js","assets/scroll-view-BEnZlh-i.js","assets/session-C3Y9_lot.js","assets/session-composer-state-B3laKCpu.js","assets/new-session-BuLfX1JQ.js"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const We={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t6(this.context.count)},getNextContextId(){return t6(this.context.count++)}};function t6(e){const t=String(e),n=t.length-1;return We.context.id+(n?String.fromCharCode(96+n):"")+t}function Us(e){We.context=e}const G8=!1,JR=(e,t)=>e===t,Gi=Symbol("solid-proxy"),K8=typeof Proxy=="function",k0=Symbol("solid-track"),x0={equals:JR};let Hu=null,Z8=J8;const Si=1,Xu=2,Y8={owned:null,cleanups:null,context:null,owner:null},mg={};var ft=null;let Me=null,eO=null,Pt=null,mr=null,er=null,Rp=0;function Wn(e,t){const n=Pt,r=ft,i=e.length===0,s=t===void 0?r:t,o=i?Y8:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>ut(()=>Ko(o)));ft=o,Pt=null;try{return Qr(a,!0)}finally{Pt=n,ft=r}}function xe(e,t){t=t?Object.assign({},x0,t):x0;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(Me&&Me.running&&Me.sources.has(n)?i=i(n.tValue):i=i(n.value)),X8(n,i));return[Q8.bind(n),r]}function vs(e,t,n){const r=Wd(e,t,!0,Si);Mc(r)}function Fe(e,t,n){const r=Wd(e,t,!1,Si);Mc(r)}function de(e,t,n){Z8=oO;const r=Wd(e,t,!1,Si),i=Ua&&Ct(Ua);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),er?er.push(r):Mc(r)}function U(e,t,n){n=n?Object.assign({},x0,n):x0;const r=Wd(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Mc(r),Q8.bind(r)}function tO(e){return e&&typeof e=="object"&&"then"in e}function Li(e,t,n){let r,i,s;typeof t=="function"?(r=e,i=t,s=n||{}):(r=!0,i=e,s=t||{});let o=null,a=mg,l=null,c=!1,u=!1,d="initialValue"in s,f=typeof r=="function"&&U(r);const h=new Set,[p,m]=(s.storage||xe)(s.initialValue),[g,y]=xe(void 0),[v,b]=xe(void 0,{equals:!1}),[_,x]=xe(d?"ready":"unresolved");We.context&&(l=We.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:We.load&&We.has(l)&&(a=We.load(l)));function E(j,P,D,C){return o===j&&(o=null,C!==void 0&&(d=!0),(j===a||P===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(C,{value:P})),a=mg,Me&&j&&c?(Me.promises.delete(j),c=!1,Qr(()=>{Me.running=!0,M(P,D)},!1)):M(P,D)),P}function M(j,P){Qr(()=>{P===void 0&&m(()=>j),x(P!==void 0?"errored":d?"ready":"unresolved"),y(P);for(const D of h.keys())D.decrement();h.clear()},!1)}function S(){const j=Ua&&Ct(Ua),P=p(),D=g();if(D!==void 0&&!o)throw D;return Pt&&!Pt.user&&j&&vs(()=>{v(),o&&(j.resolved&&Me&&c?Me.promises.add(o):h.has(j)||(j.increment(),h.add(j)))}),P}function I(j=!0){if(j!==!1&&u)return;u=!1;const P=f?f():r;if(c=Me&&Me.running,P==null||P===!1){E(o,ut(p));return}Me&&o&&Me.promises.delete(o);let D;const C=a!==mg?a:ut(()=>{try{return i(P,{value:p(),refetching:j})}catch(L){D=L}});if(D!==void 0){E(o,void 0,Zh(D),P);return}else if(!tO(C))return E(o,C,void 0,P),C;return o=C,"v"in C?(C.s===1?E(o,C.v,void 0,P):E(o,void 0,Zh(C.v),P),C):(u=!0,queueMicrotask(()=>u=!1),Qr(()=>{x(d?"refreshing":"pending"),b()},!1),C.then(L=>E(C,L,void 0,P),L=>E(C,void 0,Zh(L),P)))}Object.defineProperties(S,{state:{get:()=>_()},error:{get:()=>g()},loading:{get(){const j=_();return j==="pending"||j==="refreshing"}},latest:{get(){if(!d)return S();const j=g();if(j&&!o)throw j;return p()}}});let F=ft;return f?vs(()=>(F=ft,I(!1))):I(!1),[S,{refetch:j=>Ws(F,()=>I(j)),mutate:m}]}function dt(e){return Qr(e,!1)}function ut(e){if(Pt===null)return e();const t=Pt;Pt=null;try{return e()}finally{Pt=t}}function Ut(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let c=0;ct(a,i,o));return i=a,l}}function Ht(e){de(()=>ut(e))}function pe(e){return ft===null||(ft.cleanups===null?ft.cleanups=[e]:ft.cleanups.push(e)),e}function nO(e,t){Hu||(Hu=Symbol("error")),ft=Wd(void 0,void 0,!0),ft.context={...ft.context,[Hu]:[t]},Me&&Me.running&&Me.sources.add(ft);try{return e()}catch(n){Gd(n)}finally{ft=ft.owner}}function yv(){return Pt}function _i(){return ft}function Ws(e,t){const n=ft,r=Pt;ft=e,Pt=null;try{return Qr(t,!0)}catch(i){Gd(i)}finally{ft=n,Pt=r}}function $a(e){if(Me&&Me.running)return e(),Me.done;const t=Pt,n=ft;return Promise.resolve().then(()=>{Pt=t,ft=n;let r;return Ua&&(r=Me||(Me={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(i=>r.resolve=i)),r.running=!0),Qr(e,!1),Pt=ft=null,r?r.done:void 0})}const[Mbe,n6]=xe(!1);function rO(e){er.push.apply(er,e),e.length=0}function It(e,t){const n=Symbol("context");return{id:n,Provider:aO(n),defaultValue:e}}function Ct(e){let t;return ft&&ft.context&&(t=ft.context[e.id])!==void 0?t:e.defaultValue}function Ud(e){const t=U(e),n=U(()=>bv(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Ua;function iO(){return Ua||(Ua=It())}function Q8(){const e=Me&&Me.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Si)Mc(this);else{const t=mr;mr=null,Qr(()=>_0(this),!1),mr=t}if(Pt){const t=this.observers?this.observers.length:0;Pt.sources?(Pt.sources.push(this),Pt.sourceSlots.push(t)):(Pt.sources=[this],Pt.sourceSlots=[t]),this.observers?(this.observers.push(Pt),this.observerSlots.push(Pt.sources.length-1)):(this.observers=[Pt],this.observerSlots=[Pt.sources.length-1])}return e&&Me.sources.has(this)?this.tValue:this.value}function X8(e,t,n){let r=Me&&Me.running&&Me.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(Me){const i=Me.running;(i||!n&&Me.sources.has(e))&&(Me.sources.add(e),e.tValue=t),i||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Qr(()=>{for(let i=0;i1e6)throw mr=[],new Error},!1)}return t}function Mc(e){if(!e.fn)return;Ko(e);const t=Rp;r6(e,Me&&Me.running&&Me.sources.has(e)?e.tValue:e.value,t),Me&&!Me.running&&Me.sources.has(e)&&queueMicrotask(()=>{Qr(()=>{Me&&(Me.running=!0),Pt=ft=e,r6(e,e.tValue,t),Pt=ft=null},!1)})}function r6(e,t,n){let r;const i=ft,s=Pt;Pt=ft=e;try{r=e.fn(t)}catch(o){return e.pure&&(Me&&Me.running?(e.tState=Si,e.tOwned&&e.tOwned.forEach(Ko),e.tOwned=void 0):(e.state=Si,e.owned&&e.owned.forEach(Ko),e.owned=null)),e.updatedAt=n+1,Gd(o)}finally{Pt=s,ft=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?X8(e,r,!0):Me&&Me.running&&e.pure?(Me.sources.has(e)||(e.value=r),Me.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Wd(e,t,n,r=Si,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ft,context:ft?ft.context:null,pure:n};return Me&&Me.running&&(s.state=0,s.tState=r),ft===null||ft!==Y8&&(Me&&Me.running&&ft.pure?ft.tOwned?ft.tOwned.push(s):ft.tOwned=[s]:ft.owned?ft.owned.push(s):ft.owned=[s]),s}function S0(e){const t=Me&&Me.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Xu)return _0(e);if(e.suspense&&ut(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;r--){if(e=n[r],t){let i=e,s=n[r+1];for(;(i=i.owner)&&i!==s;)if(Me.disposed.has(i))return}if((t?e.tState:e.state)===Si)Mc(e);else if((t?e.tState:e.state)===Xu){const i=mr;mr=null,Qr(()=>_0(e,n[0]),!1),mr=i}}}function Qr(e,t){if(mr)return e();let n=!1;t||(mr=[]),er?n=!0:er=[],Rp++;try{const r=e();return sO(n),r}catch(r){n||(er=null),mr=null,Gd(r)}}function sO(e){if(mr&&(J8(mr),mr=null),e)return;let t;if(Me){if(!Me.promises.size&&!Me.queue.size){const r=Me.sources,i=Me.disposed;er.push.apply(er,Me.effects),t=Me.resolve;for(const s of er)"tState"in s&&(s.state=s.tState),delete s.tState;Me=null,Qr(()=>{for(const s of i)Ko(s);for(const s of r){if(s.value=s.tValue,s.owned)for(let o=0,a=s.owned.length;oZ8(n),!1),t&&t()}function J8(e){for(let t=0;t=0;t--)Ko(e.tOwned[t]);delete e.tOwned}if(Me&&Me.running&&e.pure)tS(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ko(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}Me&&Me.running?e.tState=0:e.state=0}function tS(e,t){if(t||(e.tState=0,Me.disposed.add(e)),e.owned)for(let n=0;ni=ut(()=>(ft.context={...ft.context,[e]:r.value},Ud(()=>r.children))),void 0),i}}const wv=Symbol("fallback");function C0(e){for(let t=0;t1?[]:null;return pe(()=>C0(s)),()=>{let l=e()||[],c=l.length,u,d;return l[k0],ut(()=>{let h,p,m,g,y,v,b,_,x;if(c===0)o!==0&&(C0(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[wv],i[0]=Wn(E=>(s[0]=E,n.fallback())),o=1);else if(o===0){for(i=new Array(c),d=0;d=v&&_>=v&&r[b]===l[_];b--,_--)m[_]=i[b],g[_]=s[b],a&&(y[_]=a[b]);for(h=new Map,p=new Array(_+1),d=_;d>=v;d--)x=l[d],u=h.get(x),p[d]=u===void 0?-1:u,h.set(x,d);for(u=v;u<=b;u++)x=r[u],d=h.get(x),d!==void 0&&d!==-1?(m[d]=i[u],g[d]=s[u],a&&(y[d]=a[u]),d=p[d],h.set(x,d)):s[u]();for(d=v;dC0(s)),()=>{const c=e()||[],u=c.length;return c[k0],ut(()=>{if(u===0)return a!==0&&(C0(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[wv],i[0]=Wn(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===wv&&(s[0](),s=[],r=[],i=[],a=0),l=0;lc[l]):l>=r.length&&(i[l]=Wn(d));for(;le(t||{}))}function Ff(){return!0}const kv={get(e,t,n){return t===Gi?n:e.get(t)},has(e,t){return t===Gi?!0:e.has(t)},set:Ff,deleteProperty:Ff,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ff,deleteProperty:Ff}},ownKeys(e){return e.keys()}};function gg(e){return(e=typeof e=="function"?e():e)?e:{}}function uO(){for(let e=0,t=this.length;e=0;a--){const l=gg(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in gg(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a=0;o--){const a=e[o];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:uO.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const i={},s=Object.keys(r);for(let o=s.length-1;o>=0;o--){const a=s[o],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function ve(e,...t){const n=t.length;if(K8&&Gi in e){const i=n>1?t.flat():t[0],s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},kv));return s.push(new Proxy({get(o){return i.includes(o)?void 0:e[o]},has(o){return i.includes(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.includes(o))}},kv)),s}const r=[];for(let i=0;i<=n;i++)r[i]={};for(const i of Object.getOwnPropertyNames(e)){let s=n;for(let l=0;l{const s=We.context;if(s){const[a,l]=xe();We.count||(We.count=0),We.count++,(n||(n=e())).then(c=>{!We.done&&Us(s),We.count--,l(()=>c.default),Us()}),t=a}else if(!t){const[a]=Li(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return U(()=>(o=t())?ut(()=>{if(!s||We.done)return o(i);const a=We.context;Us(s);const l=o(i);return Us(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}let dO=0;function Rn(){return We.context?We.getNextContextId():`cl-${dO++}`}const nS=e=>`Stale read from <${e}>.`;function Sr(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(lO(()=>e.each,e.children,t||void 0))}function Dbe(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(cO(()=>e.each,e.children,t||void 0))}function me(e){const t=e.keyed,n=U(()=>e.when,void 0,void 0),r=t?n:U(n,void 0,{equals:(i,s)=>!i==!s});return U(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?ut(()=>s(t?i:()=>{if(!ut(r))throw nS("Show");return n()})):s}return e.fallback},void 0,void 0)}function Dc(e){const t=Ud(()=>e.children),n=U(()=>{const r=t(),i=Array.isArray(r)?r:[r];let s=()=>{};for(let o=0;oc()?void 0:l.when,void 0,void 0),d=l.keyed?u:U(u,void 0,{equals:(f,h)=>!f==!h});s=()=>c()||(d()?[a,u,l]:void 0)}return s});return U(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?ut(()=>a(o.keyed?s():()=>{if(ut(n)()?.[0]!==i)throw nS("Match");return s()})):a},void 0,void 0)}function pr(e){return e}let Kl;function fO(){Kl&&[...Kl].forEach(e=>e())}function hO(e){let t;We.context&&We.load&&(t=We.load(We.getContextId()));const[n,r]=xe(t,void 0);return Kl||(Kl=new Set),Kl.add(r),pe(()=>Kl.delete(r)),U(()=>{let i;if(i=n()){const s=e.fallback;return typeof s=="function"&&s.length?ut(()=>s(i,()=>r())):s}return nO(()=>e.children,r)},void 0,void 0)}const pO=It();function Rbe(e){let t=0,n,r,i,s,o;const[a,l]=xe(!1),c=iO(),u={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:a,effects:[],resolved:!1},d=_i();if(We.context&&We.load){const p=We.getContextId();let m=We.load(p);if(m&&(typeof m!="object"||m.s!==1?i=m:We.gather(p)),i&&i!=="$$f"){const[g,y]=xe(void 0,{equals:!1});s=g,i.then(()=>{if(We.done)return y();We.gather(p),Us(r),y(),Us()},v=>{o=v,y()})}}const f=Ct(pO);f&&(n=f.register(u.inFallback));let h;return pe(()=>h&&h()),w(c.Provider,{value:u,get children(){return U(()=>{if(o)throw o;if(r=We.context,s)return s(),s=void 0;r&&i==="$$f"&&Us();const p=U(()=>e.children);return U(m=>{const g=u.inFallback(),{showContent:y=!0,showFallback:v=!0}=n?n():{};if((!g||i&&i!=="$$f")&&y)return u.resolved=!0,h&&h(),h=r=i=void 0,rO(u.effects),p();if(v)return h?m:Wn(b=>(h=b,r&&(Us({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const mO=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],gO=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...mO]),vO=new Set(["innerHTML","textContent","innerText","children"]),yO=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),bO=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function wO(e,t){const n=bO[e];return typeof n=="object"?n[t]?n.$:void 0:n}const kO=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),xO=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),SO={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Ue=e=>U(()=>e());function _O(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,c=null;for(;ou-a){const p=t[o];for(;a{i=s,t===document?e():G(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function le(e,t,n,r){let i;const s=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},o=t?()=>ut(()=>document.importNode(i||(i=s()),!0)):()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function $r(e,t=window.document){const n=t[s6]||(t[s6]=new Set);for(let r=0,i=e.length;ri.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Jt(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;si.children=Ju(e,t.children,i.children)),Fe(()=>typeof t.ref=="function"&&Mn(t.ref,e)),Fe(()=>LO(e,t,n,!0,i,!0)),i}function Mn(e,t,n){return ut(()=>e(t,n))}function G(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ju(e,t,r,n);Fe(i=>Ju(e,t(),i,n),r)}function LO(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=a6(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=a6(e,o,a,i[o],n,s,t)}}function IO(e){let t,n;return!al()||!(t=We.registry.get(n=DO()))?e():(We.completed&&We.completed.add(t),We.registry.delete(n),t)}function al(e){return!!We.context&&!We.done&&(!e||e.isConnected)}function AO(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function o6(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i-1&&SO[t.split(":")[0]];f?EO(e,f,t,n):Qe(e,yO[t]||t,n)}return n}function MO(e){if(We.registry&&We.events&&We.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),o=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),We.registry&&!We.done&&(We.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let c=0;c{let l=t();for(;typeof l=="function";)l=l();n=Ju(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(xv(l,t,n,i))return Fe(()=>n=Ju(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=Sl(e,n,r),a)return n}else c?n.length===0?l6(e,l,r):_O(e,n,l):(n&&Sl(e),l6(e,l));n=l}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Sl(e,n,r,t);Sl(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function xv(e,t,n,r){let i=!1;for(let s=0,o=t.length;s=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function DO(){return We.getNextContextId()}const Sv=!1,RO="http://www.w3.org/2000/svg";function rS(e,t=!1,n=void 0){return t?document.createElementNS(RO,e):document.createElement(e,{is:n})}function co(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=_i();let s,o=!!We.context;return de(()=>{o&&(_i().user=o=!1),s||(s=Ws(i,()=>U(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=xe(!1),u=()=>c(!0);Wn(d=>G(a,()=>l()?d():s(),null)),pe(u)}else{const l=rS(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),G(c,s),a.appendChild(l),e.ref&&e.ref(l),pe(()=>a.removeChild(l))}},void 0,{render:!o}),n}function OO(e,t){const n=U(e);return U(()=>{const r=n();switch(typeof r){case"function":return ut(()=>r(t));case"string":const i=xO.has(r),s=We.context?IO():rS(r,i,ut(()=>t.is));return Gn(s,t,i),s}})}function iS(e){const[,t]=ve(e,["component"]);return OO(()=>e.component,t)}const mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Wt=globalThis,ja="10.36.0";function Pp(){return $p(Wt),Wt}function $p(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ja,t[ja]=t[ja]||{}}function Rc(e,t,n=Wt){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[ja]=r[ja]||{};return i[e]||(i[e]=t())}const PO=["debug","info","warn","error","log","assert","trace"],$O="Sentry Logger ",E0={};function Oc(e){if(!("console"in Wt))return e();const t=Wt.console,n={},r=Object.keys(E0);r.forEach(i=>{const s=E0[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function NO(){Wb().enabled=!0}function FO(){Wb().enabled=!1}function sS(){return Wb().enabled}function HO(...e){Ub("log",...e)}function VO(...e){Ub("warn",...e)}function zO(...e){Ub("error",...e)}function Ub(e,...t){mt&&sS()&&Oc(()=>{Wt.console[e](`${$O}[${e}]:`,...t)})}function Wb(){return mt?Rc("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const at={enable:NO,disable:FO,isEnabled:sS,log:HO,warn:VO,error:zO},oS=50,Wa="?",c6=/\(error: (.*)\)/,u6=/captureMessage|captureException/;function aS(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const s=[],o=n.split(` `);for(let a=r;a1024&&(l=l.slice(0,1024));const c=c6.test(l)?l.replace(c6,"$1"):l;if(!c.match(/\S*Error: /)){for(const u of t){const d=u(c);if(d){s.push(d);break}}if(s.length>=oS+i)break}}return BO(s.slice(i))}}function jO(e){return Array.isArray(e)?aS(...e):e}function BO(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Hf(t).function||"")&&t.pop(),t.reverse(),u6.test(Hf(t).function||"")&&(t.pop(),u6.test(Hf(t).function||"")&&t.pop()),t.slice(0,oS).map(n=>({...n,filename:n.filename||Hf(t).filename,function:n.function||Wa}))}function Hf(e){return e[e.length-1]||{}}const vg="";function Zo(e){try{return!e||typeof e!="function"?vg:e.name||vg}catch{return vg}}function d6(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function lS(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Yh={},f6={};function ll(e,t){Yh[e]=Yh[e]||[],Yh[e].push(t)}function cl(e,t){if(!f6[e]){f6[e]=!0;try{t()}catch(n){mt&&at.error(`Error while instrumenting ${e}`,n)}}}function qi(e,t){const n=e&&Yh[e];if(n)for(const r of n)try{r(t)}catch(i){mt&&at.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${Zo(r)} Error:`,i)}}let yg=null;function qO(e){const t="error";ll(t,e),cl(t,UO)}function UO(){yg=Wt.onerror,Wt.onerror=function(e,t,n,r,i){return qi("error",{column:r,error:i,line:n,msg:e,url:t}),yg?yg.apply(this,arguments):!1},Wt.onerror.__SENTRY_INSTRUMENTED__=!0}let bg=null;function WO(e){const t="unhandledrejection";ll(t,e),cl(t,GO)}function GO(){bg=Wt.onunhandledrejection,Wt.onunhandledrejection=function(e){return qi("unhandledrejection",e),bg?bg.apply(this,arguments):!0},Wt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const cS=Object.prototype.toString;function Np(e){switch(cS.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Yo(e,Error)}}function Pc(e,t){return cS.call(e)===`[object ${t}]`}function uS(e){return Pc(e,"ErrorEvent")}function h6(e){return Pc(e,"DOMError")}function KO(e){return Pc(e,"DOMException")}function Qs(e){return Pc(e,"String")}function Gb(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Fp(e){return e===null||Gb(e)||typeof e!="object"&&typeof e!="function"}function ed(e){return Pc(e,"Object")}function Hp(e){return typeof Event<"u"&&Yo(e,Event)}function ZO(e){return typeof Element<"u"&&Yo(e,Element)}function YO(e){return Pc(e,"RegExp")}function Zd(e){return!!(e?.then&&typeof e.then=="function")}function QO(e){return ed(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Yo(e,t){try{return e instanceof t}catch{return!1}}function dS(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function fS(e){return typeof Request<"u"&&Yo(e,Request)}const Kb=Wt,XO=80;function hS(e,t={}){if(!e)return"";try{let n=e;const r=5,i=[];let s=0,o=0;const a=" > ",l=a.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||XO;for(;n&&s++1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return""}}function JO(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Kb.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i?.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Qs(o)){const a=o.split(/\s+/);for(const l of a)r.push(`.${l}`)}}const s=["aria-label","type","name","title","alt"];for(const o of s){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function Zb(){try{return Kb.document.location.href}catch{return""}}function eP(e){if(!Kb.HTMLElement)return null;let t=e;const n=5;for(let r=0;r"}}function m6(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function tP(e){const t=Object.keys(mS(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let _l;function Vp(e){if(_l!==void 0)return _l?_l(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Wt;return t in n&&typeof n[t]=="function"?(_l=n[t],_l(e)):(_l=null,e())}function T0(){return Vp(()=>Math.random())}function zp(){return Vp(()=>Date.now())}function _v(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function g6(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rQh(e,r,n))}function nP(){const e=Wt;return e.crypto||e.msCrypto}let wg;function rP(){return T0()*16}function wi(e=nP()){try{if(e?.randomUUID)return Vp(()=>e.randomUUID()).replace(/-/g,"")}catch{}return wg||(wg="10000000100040008000"+1e11),wg.replace(/[018]/g,t=>(t^(rP()&15)>>t/4).toString(16))}function gS(e){return e.exception?.values?.[0]}function Da(e){const{message:t,event_id:n}=e;if(t)return t;const r=gS(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Cv(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function pc(e,t){const n=gS(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const s={...i?.data,...t.data};n.mechanism.data=s}}function v6(e){if(iP(e))return!0;try{Qo(e,"__sentry_captured__",!0)}catch{}return!1}function iP(e){try{return e.__sentry_captured__}catch{}}const vS=1e3;function Yd(){return zp()/vS}function sP(){const{performance:e}=Wt;if(!e?.now||!e.timeOrigin)return Yd;const t=e.timeOrigin;return()=>(t+Vp(()=>e.now()))/vS}let y6;function Xs(){return(y6??(y6=sP()))()}function oP(e){const t=Xs(),n={sid:wi(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>lP(n)};return e&&mc(n,e),n}function mc(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Xs(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:wi()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function aP(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),mc(e,n)}function lP(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Qd(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Qd(r[i],t[i],n-1));return r}function b6(){return wi()}function yS(){return wi().substring(16)}const Ev="_sentrySpan";function w6(e,t){t?Qo(e,Ev,t):delete e[Ev]}function k6(e){return e[Ev]}const cP=100;class to{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:b6(),sampleRand:T0()}}clone(){const t=new to;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,w6(t,k6(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&mc(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof to?n.getScopeData():ed(n)?t:void 0,{tags:i,attributes:s,extra:o,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,w6(this,void 0),this._attachments=[],this.setPropagationContext({traceId:b6(),sampleRand:T0()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:cP;if(r<=0)return this;const i={timestamp:Yd(),...t,message:t.message?_v(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:k6(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Qd(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||wi();if(!this._client)return mt&&at.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||wi();if(!this._client)return mt&&at.warn("No client configured on scope - will not capture message!"),i;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:i},this),i}captureEvent(t,n){const r=n?.event_id||wi();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(mt&&at.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function uP(){return Rc("defaultCurrentScope",()=>new to)}function dP(){return Rc("defaultIsolationScope",()=>new to)}class fP{constructor(t,n){let r;t?r=t:r=new to;let i;n?i=n:i=new to,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return Zd(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function gc(){const e=Pp(),t=$p(e);return t.stack=t.stack||new fP(uP(),dP())}function hP(e){return gc().withScope(e)}function pP(e,t){const n=gc();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function x6(e){return gc().withScope(()=>e(gc().getIsolationScope()))}function mP(){return{withIsolationScope:x6,withScope:hP,withSetScope:pP,withSetIsolationScope:(e,t)=>x6(t),getCurrentScope:()=>gc().getScope(),getIsolationScope:()=>gc().getIsolationScope()}}function Qb(e){const t=$p(e);return t.acs?t.acs:mP()}function oa(){const e=Pp();return Qb(e).getCurrentScope()}function Xd(){const e=Pp();return Qb(e).getIsolationScope()}function gP(){return Rc("globalScope",()=>new to)}function vP(...e){const t=Pp(),n=Qb(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function ar(){return oa().getClient()}function yP(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,s={trace_id:n,span_id:i||yS()};return r&&(s.parent_span_id=r),s}const bP="sentry.source",wP="sentry.sample_rate",kP="sentry.previous_trace_sample_rate",xP="sentry.op",SP="sentry.origin",bS="sentry.profile_id",wS="sentry.exclusive_time",_P=0,CP=1,EP="_sentryScope",TP="_sentryIsolationScope";function LP(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function kS(e){const t=e;return{scope:t[EP],isolationScope:LP(t[TP])}}const IP="sentry-",AP=/^sentry-/;function MP(e){const t=DP(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(AP)){const o=i.slice(IP.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function DP(e){if(!(!e||!Qs(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=S6(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):S6(e)}function S6(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),i=t.slice(n+1);return[r,i].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}const RP=/^o(\d+)\./,OP=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function PP(e){return e==="http"||e==="https"}function Jd(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function $P(e){const t=OP.exec(e);if(!t){Oc(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",s="",o="",a=""]=t.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return xS({host:s,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function xS(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function NP(e){if(!mt)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(at.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?PP(r)?t&&isNaN(parseInt(t,10))?(at.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(at.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(at.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function FP(e){return e.match(RP)?.[1]}function HP(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=FP(n)),r}function VP(e){const t=typeof e=="string"?$P(e):xS(e);if(!(!t||!NP(t)))return t}function zP(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const SS=1;let _6=!1;function jP(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Xb(e).parent_span_id,s=kS(e).scope,o=r?s?.getPropagationContext().propagationSpanId||yS():t;return{parent_span_id:i,span_id:o,trace_id:n}}function BP(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:s})=>({span_id:t,trace_id:n,sampled:r===SS,attributes:s,...i}))}function C6(e){return typeof e=="number"?E6(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?E6(e.getTime()):Xs()}function E6(e){return e>9999999999?e/1e3:e}function Xb(e){if(UP(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(qP(e)){const{attributes:r,startTime:i,name:s,endTime:o,status:a,links:l}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:C6(i),timestamp:C6(o)||void 0,status:GP(a),op:r[xP],origin:r[SP],links:BP(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function qP(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function UP(e){return typeof e.getSpanJSON=="function"}function WP(e){const{traceFlags:t}=e.spanContext();return t===SS}function GP(e){if(!(!e||e.code===_P))return e.code===CP?"ok":e.message||"internal_error"}const KP="_sentryRootSpan";function _S(e){return e[KP]||e}function T6(){_6||(Oc(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),_6=!0)}function ZP(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=ar()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function L6(e){at.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function I6(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(QP(n)){if(Qh(e.description,n))return mt&&L6(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?Qh(e.description,n.name):!0,i=n.op?e.op&&Qh(e.op,n.op):!0;if(r&&i)return mt&&L6(e),!0}return!1}function YP(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function QP(e){return typeof e=="string"||e instanceof RegExp}const Jb="production",XP="_frozenDsc";function CS(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Jb,release:n.release,public_key:r,trace_id:e,org_id:HP(t)};return t.emit("createDsc",i),i}function JP(e,t){const n=t.getPropagationContext();return n.dsc||CS(n.traceId,e)}function e$(e){const t=ar();if(!t)return{};const n=_S(e),r=Xb(n),i=r.data,s=n.spanContext().traceState,o=s?.get("sentry.sample_rate")??i[wP]??i[kP];function a(p){return(typeof o=="number"||typeof o=="string")&&(p.sample_rate=`${o}`),p}const l=n[XP];if(l)return a(l);const c=s?.get("sentry.dsc"),u=c&&MP(c);if(u)return a(u);const d=CS(e.spanContext().traceId,t),f=i[bP],h=r.description;return f!=="url"&&h&&(d.transaction=h),ZP()&&(d.sampled=String(WP(n)),d.sample_rand=s?.get("sentry.sample_rand")??kS(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function Vs(e,t=100,n=1/0){try{return Tv("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ES(e,t=3,n=100*1024){const r=Vs(e,t);return i$(r)>n?ES(e,t-1,n):r}function Tv(e,t,n=1/0,r=1/0,i=s$()){const[s,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=t$(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const h=c.toJSON();return Tv("",h,l-1,r,i)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const f=mS(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(d>=r){u[h]="[MaxProperties ~]";break}const p=f[h];u[h]=Tv(h,p,l-1,r,i),d++}return o(t),u}function t$(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(dS(t))return lS(t);if(QO(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Zo(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=n$(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function n$(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function r$(e){return~-encodeURI(e).split(/%..|./).length}function i$(e){return r$(JSON.stringify(e))}function s$(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function $c(e,t=[]){return[e,t]}function o$(e,t){const[n,r]=e;return[n,[...r,t]]}function Lv(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function a$(e,t){return Lv(e,(n,r)=>t.includes(r))}function Iv(e){const t=$p(Wt);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function l$(e){const[t,n]=e;let r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[Iv(r),s]:r.push(typeof s=="string"?Iv(s):s)}for(const s of n){const[o,a]=s;if(i(` ${JSON.stringify(o)} `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Vs(a))}i(l)}}return typeof r=="string"?r:c$(r)}function c$(e){const t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function u$(e){const t=typeof e.data=="string"?Iv(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const d$={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function A6(e){return d$[e]}function TS(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function f$(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Jd(r)},...i&&{trace:i}}}function h$(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function p$(e,t,n,r){const i=TS(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Jd(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return $c(s,[o])}function m$(e,t,n,r){const i=TS(n),s=e.type&&e.type!=="replay_event"?e.type:"event";h$(e,n?.sdk);const o=f$(e,i,r,t);return delete e.sdkProcessingMetadata,$c(o,[[{type:s},e]])}const kg=0,M6=1,D6=2;function Bp(e){return new td(t=>{t(e)})}function e2(e){return new td((t,n)=>{n(e)})}class td{constructor(t){this._state=kg,this._handlers=[],this._runExecutor(t)}then(t,n){return new td((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new td((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}_executeHandlers(){if(this._state===kg)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===M6&&n[1](this._value),this._state===D6&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,o)=>{if(this._state===kg){if(Zd(o)){o.then(r,i);return}this._state=s,this._value=o,this._executeHandlers()}},r=s=>{n(M6,s)},i=s=>{n(D6,s)};try{t(r,i)}catch(s){i(s)}}}function g$(e,t,n,r=0){try{const i=Av(t,n,e,r);return Zd(i)?i:Bp(i)}catch(i){return e2(i)}}function Av(e,t,n,r){const i=n[r];if(!e||!i)return e;const s=i({...e},t);return mt&&s===null&&at.log(`Event processor "${i.id||"?"}" dropped event`),Zd(s)?s.then(o=>Av(o,t,n,r+1)):Av(s,t,n,r+1)}let ga,R6,O6,xo;function v$(e){const t=Wt._sentryDebugIds,n=Wt._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(xo&&r.length===R6&&i.length===O6)return xo;R6=r.length,O6=i.length,xo={},ga||(ga={});const s=(o,a)=>{for(const l of o){const c=a[l],u=ga?.[l];if(u&&xo&&c)xo[u[0]]=c,ga&&(ga[l]=[u[0],c]);else if(c){const d=e(l);for(let f=d.length-1;f>=0;f--){const p=d[f]?.filename;if(p&&xo&&ga){xo[p]=c,ga[l]=[p,c];break}}}}};return t&&s(r,t),n&&s(i,n),xo}function y$(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;w$(e,t),r&&S$(e,r),_$(e,n),k$(e,i),x$(e,s)}function P6(e,t){const{extra:n,tags:r,attributes:i,user:s,contexts:o,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:h,transactionName:p,span:m}=t;ou(e,"extra",n),ou(e,"tags",r),ou(e,"attributes",i),ou(e,"user",s),ou(e,"contexts",o),e.sdkProcessingMetadata=Qd(e.sdkProcessingMetadata,l,2),a&&(e.level=a),p&&(e.transactionName=p),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}}function ou(e,t,n){e[t]=Qd(e[t],n,1)}function b$(e,t){const n=gP().getScopeData();return e&&P6(n,e.getScopeData()),t&&P6(n,t.getScopeData()),n}function w$(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function k$(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function x$(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function S$(e,t){e.contexts={trace:jP(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:e$(t),...e.sdkProcessingMetadata};const n=_S(t),r=Xb(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function _$(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function C$(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||wi(),timestamp:t.timestamp||Yd()},c=n.integrations||e.integrations.map(g=>g.name);E$(l,e),I$(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&T$(l,e.stackParser);const u=M$(r,n.captureContext);n.mechanism&&pc(l,n.mechanism);const d=i?i.getEventProcessors():[],f=b$(s,u),h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),y$(l,f);const p=[...d,...f.eventProcessors];return g$(p,l,n).then(g=>(g&&L$(g),typeof o=="number"&&o>0?A$(g,o,a):g))}function E$(e,t){const{environment:n,release:r,dist:i,maxValueLength:s}=t;e.environment=e.environment||n||Jb,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const o=e.request;o?.url&&s&&(o.url=_v(o.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=_v(a.value,s))})}function T$(e,t){const n=v$(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function L$(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function I$(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function A$(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Vs(i.data,t,n)}}))},...e.user&&{user:Vs(e.user,t,n)},...e.contexts&&{contexts:Vs(e.contexts,t,n)},...e.extra&&{extra:Vs(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Vs(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Vs(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Vs(e.contexts.flags,3,n)),r}function M$(e,t){if(!t)return e;const n=e?e.clone():new to;return n.update(t),n}function t2(e,t){return oa().captureException(e,void 0)}function LS(e,t){return oa().captureEvent(e,t)}function D$(){const e=ar();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function $6(e){const t=Xd(),n=oa(),{userAgent:r}=Wt.navigator||{},i=oP({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&mc(s,{status:"exited"}),IS(),t.setSession(i),i}function IS(){const e=Xd(),n=oa().getSession()||e.getSession();n&&aP(n),AS(),e.setSession()}function AS(){const e=Xd(),t=ar(),n=e.getSession();n&&t&&t.captureSession(n)}function N6(e=!1){if(e){IS();return}AS()}const R$="7";function O$(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function P$(e){return`${O$(e)}${e.projectId}/envelope/`}function $$(e,t){const n={sentry_version:R$};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function N$(e,t,n){return t||`${P$(e)}?${$$(e,n)}`}const F6=[];function F$(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function H$(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return F$(r)}function V$(e,t){const n={};return t.forEach(r=>{r&&MS(e,r,n)}),n}function H6(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function MS(e,t,n){if(n[t.name]){mt&&at.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!F6.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),F6.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}mt&&at.log(`Integration installed: ${t.name}`)}function z$(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function j$(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Jd(r)),$c(i,[z$(e)])}function DS(e,t){const n=t??B$(e)??[];if(n.length===0)return;const r=e.getOptions(),i=j$(n,r._metadata,r.tunnel,e.getDsn());RS().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function B$(e){return RS().get(e)}function RS(){return Rc("clientToLogBufferMap",()=>new WeakMap)}function q$(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function U$(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Jd(r)),$c(i,[q$(e)])}function OS(e,t){const n=t??W$(e)??[];if(n.length===0)return;const r=e.getOptions(),i=U$(n,r._metadata,r.tunnel,e.getDsn());PS().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function W$(e){return PS().get(e)}function PS(){return Rc("clientToMetricBufferMap",()=>new WeakMap)}const n2=Symbol.for("SentryBufferFullError");function r2(e=100){const t=new Set;function n(){return t.sizer(a),()=>r(a)),a}function s(o){if(!t.size)return Bp(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!o)return a;const l=[a,new Promise(c=>setTimeout(()=>c(!1),o))];return Promise.race(l)}return{get $(){return Array.from(t)},add:i,drain:s}}const G$=60*1e3;function K$(e,t=zp()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?G$:r-t}function Z$(e,t){return e[t]||e.all||0}function Y$(e,t,n=zp()){return Z$(e,t)>n}function Q$(e,{statusCode:t,headers:n},r=zp()){const i={...e},s=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[l,c,,,u]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(const h of c.split(";"))h==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(i[h]=r+f):i[h]=r+f}else o?i.all=r+K$(o,r):t===429&&(i.all=r+60*1e3);return i}const $S=64;function X$(e,t,n=r2(e.bufferSize||$S)){let r={};const i=o=>n.drain(o);function s(o){const a=[];if(Lv(o,(d,f)=>{const h=A6(f);Y$(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):a.push(d)}),a.length===0)return Promise.resolve({});const l=$c(o[0],a),c=d=>{if(a$(l,["client_report"])){mt&&at.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}Lv(l,(f,h)=>{e.recordDroppedEvent(d,A6(h))})},u=()=>t({body:l$(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&mt&&at.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Q$(r,d),d),d=>{throw c("network_error"),mt&&at.error("Encountered error running transport request:",d),d});return n.add(u).then(d=>d,d=>{if(d===n2)return mt&&at.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:s,flush:i}}function J$(e,t,n){const r=[{type:"client_report"},{timestamp:Yd(),discarded_events:e}];return $c(t?{dsn:t}:{},[r])}function NS(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function eN(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:s,data:o,op:a}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:o?.[bS],exclusive_time:o?.[wS],measurements:e.measurements,is_segment:!0}}function tN(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[bS]:e.profile_id},...e.exclusive_time&&{[wS]:e.exclusive_time}}}},measurements:e.measurements}}const V6="Not capturing exception because it's already been captured.",z6="Discarded session because of missing or non-string release",FS=Symbol.for("SentryInternalError"),HS=Symbol.for("SentryDoNotSendEventError"),nN=5e3;function Xh(e){return{message:e,[FS]:!0}}function xg(e){return{message:e,[HS]:!0}}function j6(e){return!!e&&typeof e=="object"&&FS in e}function B6(e){return!!e&&typeof e=="object"&&HS in e}function q6(e,t,n,r,i){let s=0,o,a=!1;e.on(n,()=>{s=0,clearTimeout(o),a=!1}),e.on(t,l=>{s+=r(l),s>=8e5?i(e):a||(a=!0,o=setTimeout(()=>{i(e)},nN))}),e.on("flush",()=>{i(e)})}class rN{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=r2(t.transportOptions?.bufferSize??$S),t.dsn?this._dsn=VP(t.dsn):mt&&at.warn("No DSN provided, client will not send events."),this._dsn){const r=N$(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&q6(this,"afterCaptureLog","flushLogs",aN,DS),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&q6(this,"afterCaptureMetric","flushMetrics",oN,OS)}captureException(t,n,r){const i=wi();if(v6(t))return mt&&at.log(V6),i;const s={event_id:i,...n};return this._process(()=>this.eventFromException(t,s).then(o=>this._captureEvent(o,s,r)).then(o=>o),"error"),s.event_id}captureMessage(t,n,r,i){const s={event_id:wi(),...r},o=Gb(t)?t:String(t),a=Fp(t),l=a?this.eventFromMessage(o,n,s):this.eventFromException(t,s);return this._process(()=>l.then(c=>this._captureEvent(c,s,i)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const i=wi();if(n?.originalException&&v6(n.originalException))return mt&&at.log(V6),i;const s={event_id:i,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope,c=U6(t.type);return this._process(()=>this._captureEvent(t,s,a||r,l),c),s.event_id}captureSession(t){this.sendSession(t),mc(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),i=await n.flush(t);return r&&i}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];MS(this,t,this._integrations),n||H6(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=m$(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=o$(r,u$(i));this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){const{release:n,environment:r=Jb}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){mt&&at.warn(z6);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){mt&&at.warn(z6);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=p$(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;mt&&at.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,i=(...s)=>n(...s);return r.add(i),()=>{r.delete(i)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return mt&&at.error("Error while sending envelope:",n),{}}return mt&&at.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=V$(this,t),H6(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const s=n.exception?.values;if(s){i=!0,r=!1;for(const l of s)if(l.mechanism?.handled===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(mc(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||nsetTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),C$(s,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:yP(r),...a.contexts};const l=JP(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=oa(),i=Xd()){return mt&&Mv(t)&&at.log(`Captured error event \`${NS(t)[0]||""}\``),this._processEvent(t,n,r,i).then(s=>s.event_id,s=>{mt&&(B6(s)?at.log(s.message):j6(s)?at.warn(s.message):at.warn(s))})}_processEvent(t,n,r,i){const s=this.getOptions(),{sampleRate:o}=s,a=VS(t),l=Mv(t),u=`before send for type \`${t.type||"error"}\``,d=typeof o>"u"?void 0:zP(o);if(l&&typeof d=="number"&&T0()>d)return this.recordDroppedEvent("sample_rate","error"),e2(xg(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=U6(t.type);return this._prepareEvent(t,n,r,i).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f),xg("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return h;const m=sN(this,s,h,n);return iN(m,u)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",f),a){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw xg(`${u} returned \`null\`, will not send event.`)}const p=r.getSession()||i.getSession();if(l&&p&&this._updateSessionFromEvent(p,h),a){const g=h.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=h.spans?h.spans.length:0,v=g-y;v>0&&this.recordDroppedEvent("before_send","span",v)}const m=h.transaction_info;if(a&&m&&h.transaction!==t.transaction){const g="custom";h.transaction_info={...m,source:g}}return this.sendEvent(h,n),h}).then(null,h=>{throw B6(h)||j6(h)?h:(this.captureException(h,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:h}),Xh(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${h}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===n2&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,s]=n.split(":");return{reason:i,category:s,quantity:r}})}_flushOutcomes(){mt&&at.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){mt&&at.log("No outcomes to send");return}if(!this._dsn){mt&&at.log("No dsn provided, will not send outcomes");return}mt&&at.log("Sending outcomes:",t);const n=J$(t,this._options.tunnel&&Jd(this._dsn));this.sendEnvelope(n)}}function U6(e){return e==="replay_event"?"replay":e||"error"}function iN(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Zd(e))return e.then(r=>{if(!ed(r)&&r!==null)throw Xh(n);return r},r=>{throw Xh(`${t} rejected with ${r}`)});if(!ed(e)&&e!==null)throw Xh(n);return e}function sN(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o,ignoreSpans:a}=t;let l=n;if(Mv(l)&&i)return i(l,r);if(VS(l)){if(o||a){const c=eN(l);if(a?.length&&I6(c,a))return null;if(o){const u=o(c);u?l=Qd(n,tN(u)):T6()}if(l.spans){const u=[],d=l.spans;for(const h of d){if(a?.length&&I6(h,a)){YP(d,h);continue}if(o){const p=o(h);p?u.push(p):(T6(),u.push(h))}else u.push(h)}const f=l.spans.length-u.length;f&&e.recordDroppedEvent("before_send","span",f),l.spans=u}}if(s){if(l.spans){const c=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return s(l,r)}}return l}function Mv(e){return e.type===void 0}function VS(e){return e.type==="transaction"}function oN(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+zS(e.attributes)}function aN(e){let t=0;return e.message&&(t+=e.message.length*2),t+zS(e.attributes)}function zS(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*W6(n[0]):Fp(n)?t+=W6(n):t+=100}),t}function W6(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function lN(e){return Np(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function G6(e){return lN(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function cN(e,t){t.debug===!0&&(mt?at.enable():Oc(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),oa().update(t.initialScope);const r=new e(t);return uN(r),r.init(),r}function uN(e){oa().setClient(e)}function Sg(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function dN(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),s=e.indexOf(",");let o="";if(t&&s!==-1){const a=e.slice(s+1);o=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${i?",base64":""}${o?`,${o}`:""}`}return e}function fN(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function jS(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:ja})),version:ja}),e._metadata=i}const hN=100;function Ga(e,t){const n=ar(),r=Xd();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=hN}=n.getOptions();if(s<=0)return;const a={timestamp:Yd(),...e},l=i?Oc(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,s))}let K6;const pN="FunctionToString",Z6=new WeakMap,mN=(()=>({name:pN,setupOnce(){K6=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Yb(this),n=Z6.has(ar())&&t!==void 0?t:this;return K6.apply(n,e)}}catch{}},setup(e){Z6.set(e,!0)}})),gN=mN,vN=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],yN="EventFilters",bN=(e={})=>{let t;return{name:yN,setup(n){const r=n.getOptions();t=Y6(e,r)},processEvent(n,r,i){if(!t){const s=i.getOptions();t=Y6(e,s)}return kN(n,t)?null:n}}},wN=((e={})=>({...bN(e),name:"InboundFilters"}));function Y6(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:vN],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function kN(e,t){if(e.type){if(e.type==="transaction"&&SN(e,t.ignoreTransactions))return mt&&at.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${Da(e)}`),!0}else{if(xN(e,t.ignoreErrors))return mt&&at.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${Da(e)}`),!0;if(TN(e))return mt&&at.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${Da(e)}`),!0;if(_N(e,t.denyUrls))return mt&&at.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Da(e)}. Url: ${L0(e)}`),!0;if(!CN(e,t.allowUrls))return mt&&at.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Da(e)}. Url: ${L0(e)}`),!0}return!1}function xN(e,t){return t?.length?NS(e).some(n=>jp(n,t)):!1}function SN(e,t){if(!t?.length)return!1;const n=e.transaction;return n?jp(n,t):!1}function _N(e,t){if(!t?.length)return!1;const n=L0(e);return n?jp(n,t):!1}function CN(e,t){if(!t?.length)return!0;const n=L0(e);return n?jp(n,t):!0}function EN(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function L0(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?EN(n):null}catch{return mt&&at.error(`Cannot extract url for event ${Da(e)}`),null}}function TN(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function LN(e,t,n,r,i,s){if(!i.exception?.values||!s||!Yo(s.originalException,Error))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=Dv(e,t,r,s.originalException,n,i.exception.values,o,0))}function Dv(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(Yo(r[i],Error)){Q6(o,a);const c=e(t,r[i]),u=l.length;X6(c,i,u,a),l=Dv(e,t,n,r[i],i,[c,...l],c,u)}return Array.isArray(r.errors)&&r.errors.forEach((c,u)=>{if(Yo(c,Error)){Q6(o,a);const d=e(t,c),f=l.length;X6(d,`errors[${u}]`,f,a),l=Dv(e,t,n,c,i,[d,...l],d,f)}}),l}function Q6(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function X6(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function IN(e){const t="console";ll(t,e),cl(t,AN)}function AN(){"console"in Wt&&PO.forEach(function(e){e in Wt.console&&Zr(Wt.console,e,function(t){return E0[e]=t,function(...n){qi("console",{args:n,level:e}),E0[e]?.apply(Wt.console,n)}})})}function MN(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const DN="Dedupe",RN=(()=>{let e;return{name:DN,processEvent(t){if(t.type)return t;try{if(PN(t,e))return mt&&at.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),ON=RN;function PN(e,t){return t?!!($N(e,t)||NN(e,t)):!1}function $N(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!qS(e,t)||!BS(e,t))}function NN(e,t){const n=J6(t),r=J6(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!qS(e,t)||!BS(e,t))}function BS(e,t){let n=d6(e),r=d6(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i=400&&e<500?"warning":e>=500?"error":void 0}const nd=Wt;function FN(){return"history"in nd&&!!nd.history}function HN(){if(!("fetch"in nd))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Rv(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function VN(){if(typeof EdgeRuntime=="string")return!0;if(!HN())return!1;if(Rv(nd.fetch))return!0;let e=!1;const t=nd.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Rv(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){mt&&at.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function zN(e,t){const n="fetch";ll(n,e),cl(n,()=>jN(void 0,t))}function jN(e,t=!1){t&&!VN()||Zr(Wt,"fetch",function(n){return function(...r){const i=new Error,{method:s,url:o}=BN(r),a={args:r,fetchData:{method:s,url:o},startTimestamp:Xs()*1e3,virtualError:i,headers:qN(r)};return qi("fetch",{...a}),n.apply(Wt,r).then(async l=>(qi("fetch",{...a,endTimestamp:Xs()*1e3,response:l}),l),l=>{qi("fetch",{...a,endTimestamp:Xs()*1e3,error:l}),Np(l)&&l.stack===void 0&&(l.stack=i.stack,Qo(l,"framesToPop",1));const u=ar()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const h=new URL(a.fetchData.url).host;u==="always"?l.message=`${l.message} (${h})`:Qo(l,"__sentry_fetch_url_host__",h)}catch{}throw l})}})}function Jh(e,t){return!!e&&typeof e=="object"&&!!e[t]}function e3(e){return typeof e=="string"?e:e?Jh(e,"url")?e.url:e.toString?e.toString():"":""}function BN(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:e3(n),method:Jh(r,"method")?String(r.method).toUpperCase():fS(n)&&Jh(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:e3(t),method:Jh(t,"method")?String(t.method).toUpperCase():"GET"}}function qN(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(fS(t))return new Headers(t.headers)}catch{}}function UN(){return"npm"}const kn=Wt;let Ov=0;function WS(){return Ov>0}function WN(){Ov++,setTimeout(()=>{Ov--})}function vc(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(Yb(e))return e}catch{return e}const r=function(...i){try{const s=i.map(o=>vc(o,t));return e.apply(this,s)}catch(s){throw WN(),vP(o=>{o.addEventProcessor(a=>(t.mechanism&&(Cv(a,void 0),pc(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),t2(s)}),s}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}pS(r,e),Qo(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function GN(){const e=Zb(),{referrer:t}=kn.document||{},{userAgent:n}=kn.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function i2(e,t){const n=s2(e,t),r={type:XN(t),value:JN(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function KN(e,t,n,r){const s=ar()?.getOptions().normalizeDepth,o=iF(t),a={__serialized__:ES(t,s)};if(o)return{exception:{values:[i2(e,o)]},extra:a};const l={exception:{values:[{type:Hp(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:nF(t,{isUnhandledRejection:r})}]},extra:a};if(n){const c=s2(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function _g(e,t){return{exception:{values:[i2(e,t)]}}}function s2(e,t){const n=t.stacktrace||t.stack||"",r=YN(t),i=QN(t);try{return e(n,r,i)}catch{}return[]}const ZN=/Minified React error #\d+;/i;function YN(e){return e&&ZN.test(e.message)?1:0}function QN(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function GS(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function XN(e){const t=e?.name;return!t&&GS(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function JN(e){const t=e?.message;return GS(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?G6(t.error):G6(e):"No error message"}function eF(e,t,n,r){const i=n?.syntheticException||void 0,s=o2(e,t,i,r);return pc(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),Bp(s)}function tF(e,t,n="info",r,i){const s=r?.syntheticException||void 0,o=Pv(e,t,s,i);return o.level=n,r?.event_id&&(o.event_id=r.event_id),Bp(o)}function o2(e,t,n,r,i){let s;if(uS(t)&&t.error)return _g(e,t.error);if(h6(t)||KO(t)){const o=t;if("stack"in t)s=_g(e,t);else{const a=o.name||(h6(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Pv(e,l,n,r),Cv(s,l)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Np(t)?_g(e,t):ed(t)||Hp(t)?(s=KN(e,t,n,i),pc(s,{synthetic:!0}),s):(s=Pv(e,t,n,r),Cv(s,`${t}`),pc(s,{synthetic:!0}),s)}function Pv(e,t,n,r){const i={};if(r&&n){const s=s2(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]}),pc(i,{synthetic:!0})}if(Gb(t)){const{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function nF(e,{isUnhandledRejection:t}){const n=tP(e),r=t?"promise rejection":"exception";return uS(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Hp(e)?`Event \`${rF(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function rF(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function iF(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class sF extends rN{constructor(t){const n=oF(t),r=kn.SENTRY_SDK_SOURCE||UN();jS(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:i,sendClientReports:s,enableLogs:o,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;kn.document&&(s||o||c)&&kn.document.addEventListener("visibilitychange",()=>{kn.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),o&&DS(this),c&&OS(this))}),i&&this.on("beforeSendSession",fN)}eventFromException(t,n){return eF(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return tF(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function oF(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:kn.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const aF=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,br=Wt,lF=1e3;let t3,$v,Nv;function cF(e){ll("dom",e),cl("dom",uF)}function uF(){if(!br.document)return;const e=qi.bind(null,"dom"),t=n3(e,!0);br.document.addEventListener("click",t,!1),br.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=br[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(Zr(i,"addEventListener",function(s){return function(o,a,l){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[o]=c[o]||{refCount:0};if(!u.handler){const d=n3(e);u.handler=d,s.call(this,o,d,l)}u.refCount++}catch{}return s.call(this,o,a,l)}}),Zr(i,"removeEventListener",function(s){return function(o,a,l){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},u=c[o];u&&(u.refCount--,u.refCount<=0&&(s.call(this,o,u.handler,l),u.handler=void 0,delete c[o]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,a,l)}}))})}function dF(e){if(e.type!==$v)return!1;try{if(!e.target||e.target._sentryId!==Nv)return!1}catch{}return!0}function fF(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function n3(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=hF(n);if(fF(n.type,r))return;Qo(n,"_sentryCaptured",!0),r&&!r._sentryId&&Qo(r,"_sentryId",wi());const i=n.type==="keypress"?"input":n.type;dF(n)||(e({event:n,name:i,global:t}),$v=n.type,Nv=r?r._sentryId:void 0),clearTimeout(t3),t3=br.setTimeout(()=>{Nv=void 0,$v=void 0},lF)}}function hF(e){try{return e.target}catch{return null}}let Vf;function KS(e){const t="history";ll(t,e),cl(t,pF)}function pF(){if(br.addEventListener("popstate",()=>{const t=br.location.href,n=Vf;if(Vf=t,n===t)return;qi("history",{from:n,to:t})}),!FN())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Vf,s=mF(String(r));if(Vf=s,i===s)return t.apply(this,n);qi("history",{from:i,to:s})}return t.apply(this,n)}}Zr(br.history,"pushState",e),Zr(br.history,"replaceState",e)}function mF(e){try{return new URL(e,br.location.origin).toString()}catch{return e}}const e0={};function gF(e){const t=e0[e];if(t)return t;let n=br[e];if(Rv(n))return e0[e]=n.bind(br);const r=br.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const s=i.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){aF&&at.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(e0[e]=n.bind(br))}function vF(e){e0[e]=void 0}const Su="__sentry_xhr_v3__";function yF(e){ll("xhr",e),cl("xhr",bF)}function bF(){if(!br.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,s=Xs()*1e3,o=Qs(r[0])?r[0].toUpperCase():void 0,a=wF(r[1]);if(!o||!a)return t.apply(n,r);n[Su]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const c=n[Su];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:Xs()*1e3,startTimestamp:s,xhr:n,virtualError:i};qi("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,d){const[f,h]=d,p=u[Su];return p&&Qs(f)&&Qs(h)&&(p.request_headers[f.toLowerCase()]=h),c.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Su];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const s={startTimestamp:Xs()*1e3,xhr:n};return qi("xhr",s),t.apply(n,r)}})}function wF(e){if(Qs(e))return e;try{return e.toString()}catch{}}const kF=40;function xF(e,t=gF("fetch")){let n=0,r=0;async function i(s){const o=s.body.length;n+=o,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw vF("fetch"),l}finally{n-=o,r--}}return X$(e,i,r2(e.bufferSize||kF))}const qp=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,SF=30,_F=50;function Fv(e,t,n,r){const i={filename:e,function:t===""?Wa:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const CF=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,EF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,TF=/\((\S*)(?::(\d+))(?::(\d+))\)/,LF=/at (.+?) ?\(data:(.+?),/,IF=e=>{const t=e.match(LF);if(t)return{filename:``,function:t[1]};const n=CF.exec(e);if(n){const[,i,s,o]=n;return Fv(i,Wa,+s,+o)}const r=EF.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=TF.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,o]=ZS(r[1]||Wa,r[2]);return Fv(o,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},AF=[SF,IF],MF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,DF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,RF=e=>{const t=MF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=DF.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],i=t[1]||Wa;return[i,r]=ZS(i,r),Fv(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},OF=[_F,RF],PF=[AF,OF],$F=aS(...PF),ZS=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Wa,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},zf=1024,NF="Breadcrumbs",FF=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:NF,setup(n){t.console&&IN(jF(n)),t.dom&&cF(zF(n,t.dom)),t.xhr&&yF(BF(n)),t.fetch&&zN(qF(n)),t.history&&KS(UF(n)),t.sentry&&n.on("beforeSendEvent",VF(n))}}}),HF=FF;function VF(e){return function(n){ar()===e&&Ga({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Da(n)},{event:n})}}function zF(e,t){return function(r){if(ar()!==e)return;let i,s,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>zf&&(qp&&at.warn(`\`dom.maxStringLength\` cannot exceed ${zf}, but a value of ${a} was configured. Sentry will use ${zf} instead.`),a=zf),typeof o=="string"&&(o=[o]);try{const c=r.event,u=WF(c)?c.target:c;i=hS(u,{keyAttrs:o,maxStringLength:a}),s=eP(u)}catch{i=""}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};s&&(l.data={"ui.component_name":s}),Ga(l,{event:r.event,name:r.name,global:r.global})}}function jF(e){return function(n){if(ar()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:MN(n.level),message:g6(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${g6(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ga(r,{input:n.args,level:n.level})}}function BF(e){return function(n){if(ar()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[Su];if(!r||!i||!s)return;const{method:o,url:a,status_code:l,body:c}=s,u={method:o,url:a,status_code:l},d={xhr:n.xhr,input:c,startTimestamp:r,endTimestamp:i},f={category:"xhr",data:u,type:"http",level:US(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Ga(f,d)}}function qF(e){return function(n){if(ar()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:s,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),Ga(a,o)}else{const s=n.response,o={...n.fetchData,status_code:s?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,s?.status;const a={input:n.args,response:s,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:o,type:"http",level:US(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Ga(l,a)}}}function UF(e){return function(n){if(ar()!==e)return;let r=n.from,i=n.to;const s=Sg(kn.location.href);let o=r?Sg(r):void 0;const a=Sg(i);o?.path||(o=s),s.protocol===a.protocol&&s.host===a.host&&(i=a.relative),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),Ga({category:"navigation",data:{from:r,to:i}})}}function WF(e){return!!e&&!!e.target}const GF=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],KF="BrowserApiErrors",ZF=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:KF,setupOnce(){t.setTimeout&&Zr(kn,"setTimeout",r3),t.setInterval&&Zr(kn,"setInterval",r3),t.requestAnimationFrame&&Zr(kn,"requestAnimationFrame",QF),t.XMLHttpRequest&&"XMLHttpRequest"in kn&&Zr(XMLHttpRequest.prototype,"send",XF);const n=t.eventTarget;n&&(Array.isArray(n)?n:GF).forEach(i=>JF(i,t))}}}),YF=ZF;function r3(e){return function(...t){const n=t[0];return t[0]=vc(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Zo(e)}`}}),e.apply(this,t)}}function QF(e){return function(t){return e.apply(this,[vc(t,{mechanism:{data:{handler:Zo(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function XF(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Zr(n,i,function(s){const o={mechanism:{data:{handler:Zo(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=Yb(s);return a&&(o.mechanism.data.handler=Zo(a)),vc(s,o)})}),e.apply(this,t)}}function JF(e,t){const r=kn[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Zr(r,"addEventListener",function(i){return function(s,o,a){try{eH(o)&&(o.handleEvent=vc(o.handleEvent,{mechanism:{data:{handler:Zo(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&tH(this,s,o),i.apply(this,[s,vc(o,{mechanism:{data:{handler:Zo(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Zr(r,"removeEventListener",function(i){return function(s,o,a){try{const l=o.__sentry_wrapped__;l&&i.call(this,s,l,a)}catch{}return i.call(this,s,o,a)}}))}function eH(e){return typeof e.handleEvent=="function"}function tH(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const nH=()=>({name:"BrowserSession",setupOnce(){if(typeof kn.document>"u"){qp&&at.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}$6({ignoreDuration:!0}),N6(),KS(({from:e,to:t})=>{e!==void 0&&e!==t&&($6({ignoreDuration:!0}),N6())})}}),rH="GlobalHandlers",iH=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:rH,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(oH(n),i3("onerror")),t.onunhandledrejection&&(aH(n),i3("onunhandledrejection"))}}}),sH=iH;function oH(e){qO(t=>{const{stackParser:n,attachStacktrace:r}=YS();if(ar()!==e||WS())return;const{msg:i,url:s,line:o,column:a,error:l}=t,c=uH(o2(n,l||i,void 0,r,!1),s,o,a);c.level="error",LS(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function aH(e){WO(t=>{const{stackParser:n,attachStacktrace:r}=YS();if(ar()!==e||WS())return;const i=lH(t),s=Fp(i)?cH(i):o2(n,i,void 0,r,!0);s.level="error",LS(s,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function lH(e){if(Fp(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function cH(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function uH(e,t,n,r){const i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=r,u=n,d=dH(t)??Zb();return l.length===0&&l.push({colno:c,filename:d,function:Wa,in_app:!0,lineno:u}),e}function i3(e){qp&&at.log(`Global Handler attached: ${e}`)}function YS(){return ar()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function dH(e){if(!(!Qs(e)||e.length===0))return e.startsWith("data:")?`<${dN(e,!1)}>`:e}const fH=()=>({name:"HttpContext",preprocessEvent(e){if(!kn.navigator&&!kn.location&&!kn.document)return;const t=GN(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),hH="cause",pH=5,mH="LinkedErrors",gH=((e={})=>{const t=e.limit||pH,n=e.key||hH;return{name:mH,preprocessEvent(r,i,s){const o=s.getOptions();LN(i2,o.stackParser,n,t,r,i)}}}),vH=gH;function yH(){return bH()?(qp&&Oc(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function bH(){if(typeof kn.window>"u")return!1;const e=kn;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Zb(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(kn===kn.top&&r.some(s=>n.startsWith(`${s}://`)))}function wH(e){return[wN(),gN(),YF(),HF(),sH(),vH(),ON(),fH(),nH()]}function kH(e={}){const t=!e.skipBrowserExtensionCheck&&yH();let n=e.defaultIntegrations==null?wH():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:jO(e.stackParser||$F),integrations:H$({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||xF};return cN(sF,r)}function xH(e){const t={...e};return jS(t,"solid"),kH(t)}const SH="modulepreload",_H=function(e){return"/"+e},s3={},A=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");i=l(n.map(c=>{if(c=_H(c),c in s3)return;s3[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":SH,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};function an(e){const t=It();return{provider:n=>{const r=e.init(n);if(!(e.gate??!0))return w(t.Provider,{value:r,get children(){return n.children}});const s=U(()=>{const o=r.ready;return o===void 0||(typeof o=="function"?o():o)});return w(me,{get when(){return s()},get children(){return w(t.Provider,{value:r,get children(){return n.children}})}})},use(){const n=Ct(t);if(!n)throw new Error(`${e.name} context must be used within a context provider`);return n}}}const{use:Obe,provider:CH}=an({name:"Data",init:e=>({get store(){return e.data},get directory(){return e.directory},navigateToSession:e.onNavigateToSession,sessionHref:e.onSessionHref})}),QS=an({name:"FileComponent",init:e=>e.component}),EH=QS.provider,Pbe=QS.use,TH=e=>e!=null,XS=e=>e.filter(TH);function LH(e){return(...t)=>{for(const n of e)n&&n(...t)}}const be=e=>typeof e=="function"&&!e.length?e():e,I0=e=>Array.isArray(e)?e:e?[e]:[];function IH(e,...t){return typeof e=="function"?e(...t):e}const a2=pe;function AH(e,t,n){if(We.context){const[r,i]=xe(e,n);return Ht(()=>i(()=>t())),[r,i]}return xe(t(),n)}function JS(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o{I0(be(e)).forEach(s=>{s&&I0(be(t)).forEach(o=>Bt(s,o,n,r))})};typeof e=="function"?de(i):Fe(i)}function DH(e,t=_i()){let n=0,r,i;return()=>(n++,pe(()=>{n--,queueMicrotask(()=>{!n&&i&&(i(),i=r=void 0)})}),i||Wn(s=>r=e(i=s),t),r)}function RH(e){const t=_i(),n=DH(e,t);return()=>We.context?Wn(e,t):n()}function l2(e,t=!1){const n=window.matchMedia(e),[r,i]=AH(t,()=>n.matches);return Bt(n,"change",()=>i(n.matches)),r}function OH(e){return l2("(prefers-color-scheme: dark)",e)}OH.bind(void 0,!1);const PH=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function o3(e){const t={};let n;for(;n=PH.exec(e);)t[n[1]]=n[2];return t}function Ii(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=o3(e)}else typeof t=="string"&&(t=o3(t));return{...e,...t}}function Gt(...e){return LH(e)}function $H(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Hv(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function NH(e){return typeof e=="number"}function Vl(e){return Object.prototype.toString.call(e)==="[object String]"}function e9(e){return typeof e=="function"}function Ji(e){return t=>`${e()}-${t}`}function FH(){const e=new Map,t=(i,s,o,a)=>{const l=a?.once?(...c)=>{e.delete(o),o(...c)}:o;e.set(o,{type:s,eventTarget:i,fn:l,options:a}),i.addEventListener(s,o,a)},n=(i,s,o,a)=>{const l=e.get(o)?.fn||o;i.removeEventListener(s,l,a),e.delete(o)},r=()=>{e.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})};return pe(()=>{r()}),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function xn(e,t){return e?e===t||e.contains(t):!1}function _u(e,t=!1){const{activeElement:n}=Er(e);if(!n?.nodeName)return null;if(t9(n)&&n.contentDocument)return _u(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Er(n).getElementById(r);if(i)return i}}return n}function c2(e){return Er(e).defaultView||window}function Er(e){return e?e.ownerDocument||e:document}function t9(e){return e.tagName==="IFRAME"}var n9=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(n9||{});function r9(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function u2(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Up(){return u2(/^Mac/i)}function HH(){return u2(/^iPhone/i)}function VH(){return u2(/^iPad/i)||Up()&&navigator.maxTouchPoints>1}function zH(){return HH()||VH()}function jH(){return Up()||zH()}function $be(){return r9(/AppleWebKit/i)&&!BH()}function BH(){return r9(/Chrome/i)}function it(e,t){return t&&(e9(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function An(e){return t=>{for(const n of e)it(t,n)}}function qH(e){return Up()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function wn(e){if(e)if(UH())e.focus({preventScroll:!0});else{const t=WH(e);e.focus(),GH(t)}}var jf=null;function UH(){if(jf==null){jf=!1;try{document.createElement("div").focus({get preventScroll(){return jf=!0,!0}})}catch{}}return jf}function WH(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight{if(t9(i)&&i.contentDocument){const o=i.contentDocument.body,a=s9(o,!1);r.splice(s,1,...a)}}),r}function a3(e){return o9(e)&&!YH(e)}function o9(e){return e.matches(d2)&&f2(e)}function YH(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function f2(e,t){return e.nodeName!=="#comment"&&QH(e)&&XH(e,t)&&(!e.parentElement||f2(e.parentElement,e))}function QH(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:s,visibility:o}=i(e);r=s!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function XH(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function JH(e,t,n){const r=t?.tabbable?ZH:d2,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return t?.from?.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&f2(s)&&(!t?.accept||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function l3(e){let t=e;for(;t&&!eV(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function eV(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function tV(){}function a9(e){return[e.clientX,e.clientY]}function h2(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=s,a=0,l=o-1;a=f&&r0&&(r===f?r>h&&(i=!i):i=!i)}}else if(uu&&r<=f){if(p===0)return!0;p<0&&(r===f?r=d&&n<=c||n>=c&&n<=d))return!0}return i}function st(e,t){return ce(e,t)}var au=new Map,c3=new Set;function u3(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=au.get(n.target);r||(r=new Set,au.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=au.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),au.delete(n.target)),au.size===0)){for(const i of c3)i();c3.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?u3():document.addEventListener("DOMContentLoaded",u3));function Vv(e,t){const n=d3(e,t,"left"),r=d3(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,c=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>c&&(a+=r+s-c),e.scrollLeft=o,e.scrollTop=a}function d3(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function nV(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let i=l3(e);for(;e&&i&&e!==n&&i!==n;)Vv(i,e),e=i,i=l3(e)}else{const{left:i,top:s}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:o,top:a}=e.getBoundingClientRect();(Math.abs(i-o)>1||Math.abs(s-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var rV={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},rd="data-kb-top-layer",l9,zv=!1,no=[];function id(e){return no.findIndex(t=>t.node===e)}function iV(e){return no[id(e)]}function sV(e){return no[no.length-1].node===e}function c9(){return no.filter(e=>e.isPointerBlocking)}function oV(){return[...c9()].slice(-1)[0]}function p2(){return c9().length>0}function u9(e){const t=id(oV()?.node);return id(e)e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),l=()=>Er(t()),c=()=>{const p=l().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,rV),p},u=()=>{const p=t();return p?s9(p,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const p=u();return p.length>0?p[0]:null},f=()=>{const p=u();return p.length>0?p[p.length-1]:null},h=()=>{const p=t();if(!p)return!1;const m=_u(p);return!m||xn(p,m)?!1:o9(m)};de(()=>{const p=t();if(!p)return;h3.add(i);const m=_u(p);if(!xn(p,m)){const y=new CustomEvent(Cg,f3);p.addEventListener(Cg,o),p.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{wn(d()),_u(p)===m&&wn(p)},0)}pe(()=>{p.removeEventListener(Cg,o),setTimeout(()=>{const y=new CustomEvent(Eg,f3);h()&&y.preventDefault(),p.addEventListener(Eg,a),p.dispatchEvent(y),y.defaultPrevented||wn(m??l().body),p.removeEventListener(Eg,a),h3.remove(i)},0)})}),de(()=>{const p=t();if(!p||!be(e.trapFocus)||n())return;const m=y=>{const v=y.target;v?.closest(`[${rd}]`)||(xn(p,v)?s=v:wn(s))},g=y=>{const b=y.relatedTarget??_u(p);b?.closest(`[${rd}]`)||xn(p,b)||wn(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",g),pe(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",g)})}),de(()=>{const p=t();if(!p||!be(e.trapFocus)||n())return;const m=c();p.insertAdjacentElement("afterbegin",m);const g=c();p.insertAdjacentElement("beforeend",g);function y(b){const _=d(),x=f();b.relatedTarget===_?wn(x):wn(_)}m.addEventListener("focusin",y),g.addEventListener("focusin",y);const v=new MutationObserver(b=>{for(const _ of b)_.previousSibling===g&&(g.remove(),p.insertAdjacentElement("beforeend",g)),_.nextSibling===m&&(m.remove(),p.insertAdjacentElement("afterbegin",m))});v.observe(p,{childList:!0,subtree:!1}),pe(()=>{m.removeEventListener("focusin",y),g.removeEventListener("focusin",y),m.remove(),g.remove(),v.disconnect()})})}var fV="data-live-announcer";function g2(e){de(()=>{be(e.isDisabled)||pe(hV(be(e.targets),be(e.root)))})}var lu=new WeakMap,ci=[];function hV(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${fV}], [${rd}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)s(f),f=u.nextNode()}},s=l=>{const c=lu.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),lu.set(l,c+1))};ci.length&&ci[ci.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&i(u)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return ci.push(a),()=>{o.disconnect();for(const l of r){const c=lu.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),lu.delete(l)):lu.set(l,c-1)}a===ci[ci.length-1]?(ci.pop(),ci.length&&ci[ci.length-1].observe()):ci.splice(ci.indexOf(a),1)}}var p3="interactOutside.pointerDownOutside",m3="interactOutside.focusOutside";function pV(e,t){let n,r=tV;const i=()=>Er(t()),s=d=>e.onPointerDownOutside?.(d),o=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),l=d=>{const f=d.target;return!(f instanceof Element)||f.closest(`[${rd}]`)||!xn(i(),f)||xn(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const h=t(),p=d.target;if(!h||!p||!l(d))return;const m=An([s,a]);p.addEventListener(p3,m,{once:!0});const g=new CustomEvent(p3,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||qH(d)&&d.button===0}});p.dispatchEvent(g)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const p=An([o,a]);h.addEventListener(m3,p,{once:!0});const m=new CustomEvent(m3,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};de(()=>{be(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),pe(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}function mV(e){const t=n=>{n.key===n9.Escape&&e.onEscapeKeyDown?.(n)};de(()=>{if(be(e.isDisabled))return;const n=e.ownerDocument?.()??Er();n.addEventListener("keydown",t),pe(()=>{n.removeEventListener("keydown",t)})})}function wt(e){const[t,n]=ve(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return w(iS,ce(n,{get component(){return t.as}}))}var d9=It();function gV(){return Ct(d9)}function ef(e){let t;const n=gV(),[r,i]=ve(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),o=d=>{s.add(d);const f=n?.registerNestedLayer(d);return()=>{s.delete(d),f?.()}};pV({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>xn(f(),d))||[...s].some(f=>xn(f,d)):!1,onPointerDownOutside:d=>{!t||Vr.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Vr.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),mV({ownerDocument:()=>Er(t),onEscapeKeyDown:d=>{!t||!Vr.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Ht(()=>{if(!t)return;Vr.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);Vr.assignPointerEventToLayers(),Vr.disableBodyPointerEvents(t),pe(()=>{t&&(Vr.removeLayer(t),d?.(),Vr.assignPointerEventToLayers(),Vr.restoreBodyPointerEvents(t))})}),de(Ut([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=Vr.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,Vr.assignPointerEventToLayers()),f&&Vr.disableBodyPointerEvents(d),pe(()=>{Vr.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:o};return w(d9.Provider,{value:u,get children(){return w(wt,ce({as:"div",ref(d){var f=Gt(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function tf(e){const[t,n]=xe(e.defaultValue?.()),r=U(()=>e.value?.()!==void 0),i=U(()=>r()?e.value?.():t());return[i,o=>{ut(()=>{const a=IH(o,i());return Object.is(a,i())||(r()||n(a),e.onChange?.(a)),a})}]}function f9(e){const[t,n]=tf(e);return[()=>t()??!1,n]}function vV(e){const[t,n]=tf(e);return[()=>t()??[],n]}function aa(e={}){const[t,n]=f9({value:()=>be(e.open),defaultValue:()=>!!be(e.defaultOpen),onChange:o=>e.onOpenChange?.(o)}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}function nf(e,t){const[n,r]=xe(g3(t?.()));return de(()=>{r(e()?.tagName.toLowerCase()||g3(t?.()))}),n}function g3(e){return Vl(e)?e:void 0}var yV=Object.defineProperty,Ai=(e,t)=>{for(var n in t)yV(e,n,{get:t[n],enumerable:!0})},bV={};Ai(bV,{Button:()=>rf,Root:()=>uo});var wV=["button","color","file","image","reset","submit"];function kV(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?wV.indexOf(e.type)!==-1:!1}function uo(e){let t;const n=st({type:"button"},e),[r,i]=ve(n,["ref","type","disabled"]),s=nf(()=>t,()=>"button"),o=U(()=>{const c=s();return c==null?!1:kV({tagName:c,type:r.type})}),a=U(()=>s()==="input"),l=U(()=>s()==="a"&&t?.getAttribute("href")!=null);return w(wt,ce({as:"button",ref(c){var u=Gt(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return Ue(()=>!!(o()||a()))()?r.type:void 0},get role(){return!o()&&!l()?"button":void 0},get tabIndex(){return!o()&&!l()&&!r.disabled?0:void 0},get disabled(){return Ue(()=>!!(o()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var rf=uo;function qn(e){return t=>(e(t),()=>e(void 0))}var Xt=e=>typeof e=="function"?e():e,jv=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Bf=new Map,xV=e=>{de(()=>{const t=Xt(e.style)??{},n=Xt(e.properties)??[],r={};for(const s in t)r[s]=e.element.style[s];const i=Bf.get(e.key);i?i.activeCount++:Bf.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(s=>s.key)}),Object.assign(e.element.style,e.style);for(const s of n)e.element.style.setProperty(s.key,s.value);pe(()=>{const s=Bf.get(e.key);if(s){if(s.activeCount!==1){s.activeCount--;return}Bf.delete(e.key);for(const[o,a]of Object.entries(s.originalStyles))e.element.style[o]=a;for(const o of s.properties)e.element.style.removeProperty(o);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},v3=xV,SV=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},_V=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},CV=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,s=0,o=0,a=!1;do{const[l,c,u]=SV(i,t),d=u-l-r*c;(c!==0||d!==0)&&_V(i,t)&&(s+=d,o+=c),i===(n??document.documentElement)?a=!0:i=i._$host??i.parentElement}while(i&&!a);return[s,o]},[y3,b3]=xe([]),EV=e=>y3().indexOf(e)===y3().length-1,TV=e=>{const t=ce({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Rn();let r=[0,0],i=null,s=null;de(()=>{Xt(t.enabled)&&(b3(c=>[...c,n]),pe(()=>{b3(c=>c.filter(u=>u!==n))}))}),de(()=>{if(!Xt(t.enabled)||!Xt(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(Xt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(Xt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const h=window.scrollY,p=window.scrollX;v3({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Xt(t.restoreScrollPosition)&&u>0&&window.scrollTo(p,h)}})}else v3({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),de(()=>{!EV(n)||!Xt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),pe(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=c=>{r=w3(c),i=null,s=null},a=c=>{const u=c.target,d=Xt(t.element),f=LV(c),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",p=h==="x"?f[0]:f[1],m=k3(u,h,p,d);let g;d&&jv(d,u)?g=!m:g=!0,g&&c.cancelable&&c.preventDefault()},l=c=>{const u=Xt(t.element),d=c.target;let f;if(c.touches.length===2)f=!Xt(t.allowPinchZoom);else{if(i==null||s===null){const h=w3(c).map((m,g)=>r[g]-m),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=p,s=p==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=k3(d,i,s,u);u&&jv(u,d)?f=!h:f=!0}}f&&c.cancelable&&c.preventDefault()}},LV=e=>[e.deltaX,e.deltaY],w3=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],k3=(e,t,n,r)=>{const i=r!==null&&jv(r,e),[s,o]=CV(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},IV=TV,v2=IV,AV=e=>{const t=U(()=>{const o=Xt(e.element);if(o)return getComputedStyle(o)}),n=()=>t()?.animationName??"none",[r,i]=xe(Xt(e.show)?"present":"hidden");let s="none";return de(o=>{const a=Xt(e.show);return ut(()=>{if(o===a)return a;const l=s,c=n();a?i("present"):c==="none"||t()?.display==="none"?i("hidden"):i(o===!0&&l!==c?"hiding":"hidden")}),a}),de(()=>{const o=Xt(e.element);if(!o)return;const a=c=>{c.target===o&&(s=n())},l=c=>{const d=n().includes(c.animationName);c.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),pe(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:i}},MV=AV,Xo=MV,DV={};Ai(DV,{CloseButton:()=>p9,Content:()=>m9,Description:()=>g9,Dialog:()=>Fo,Overlay:()=>v9,Portal:()=>y9,Root:()=>b9,Title:()=>w9,Trigger:()=>k9,useDialogContext:()=>la});var h9=It();function la(){const e=Ct(h9);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function p9(e){const t=la(),[n,r]=ve(e,["aria-label","onClick"]);return w(uo,ce({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:s=>{it(s,n.onClick),t.close()}},r))}function m9(e){let t;const n=la(),r=st({id:n.generateId("content")},e),[i,s]=ve(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let o=!1,a=!1;const l=f=>{i.onPointerDownOutside?.(f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{i.onFocusOutside?.(f),n.modal()&&f.preventDefault()},u=f=>{i.onInteractOutside?.(f),!n.modal()&&(f.defaultPrevented||(o=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),xn(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{i.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),wn(n.triggerRef())):(f.defaultPrevented||(o||wn(n.triggerRef()),f.preventDefault()),o=!1,a=!1)};return g2({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),v2({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),m2({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),de(()=>pe(n.registerContentId(s.id))),w(me,{get when(){return n.contentPresent()},get children(){return w(ef,ce({ref(f){var h=Gt(p=>{n.setContentRef(p),t=p},i.ref);typeof h=="function"&&h(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Ue(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,get onDismiss(){return n.close}},s))}})}function g9(e){const t=la(),n=st({id:t.generateId("description")},e),[r,i]=ve(n,["id"]);return de(()=>pe(t.registerDescriptionId(r.id))),w(wt,ce({as:"p",get id(){return r.id}},i))}function v9(e){const t=la(),[n,r]=ve(e,["ref","style","onPointerDown"]),i=s=>{it(s,n.onPointerDown),s.target===s.currentTarget&&s.preventDefault()};return w(me,{get when(){return t.overlayPresent()},get children(){return w(wt,ce({as:"div",ref(s){var o=Gt(t.setOverlayRef,n.ref);typeof o=="function"&&o(s)},get style(){return Ii({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:i},r))}})}function y9(e){const t=la();return w(me,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return w(co,e)}})}var x3={dismiss:"Dismiss"};function b9(e){const t=`dialog-${Rn()}`,n=st({id:t,modal:!0,translations:x3},e),[r,i]=xe(),[s,o]=xe(),[a,l]=xe(),[c,u]=xe(),[d,f]=xe(),[h,p]=xe(),m=aa({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:_=>n.onOpenChange?.(_)}),g=()=>n.forceMount||m.isOpen(),{present:y}=Xo({show:g,element:()=>c()??null}),{present:v}=Xo({show:g,element:()=>d()??null}),b={translations:()=>n.translations??x3,isOpen:m.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??b.modal(),contentId:r,titleId:s,descriptionId:a,triggerRef:h,overlayRef:c,setOverlayRef:u,contentRef:d,setContentRef:f,overlayPresent:y,contentPresent:v,close:m.close,toggle:m.toggle,setTriggerRef:p,generateId:Ji(()=>n.id),registerContentId:qn(i),registerTitleId:qn(o),registerDescriptionId:qn(l)};return w(h9.Provider,{value:b,get children(){return n.children}})}function w9(e){const t=la(),n=st({id:t.generateId("title")},e),[r,i]=ve(n,["id"]);return de(()=>pe(t.registerTitleId(r.id))),w(wt,ce({as:"h2",get id(){return r.id}},i))}function k9(e){const t=la(),[n,r]=ve(e,["ref","onClick"]);return w(uo,ce({ref(s){var o=Gt(t.setTriggerRef,n.ref);typeof o=="function"&&o(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Ue(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:s=>{it(s,n.onClick),t.toggle()}},r))}var Fo=Object.assign(b9,{CloseButton:p9,Content:m9,Description:g9,Overlay:v9,Portal:y9,Title:w9,Trigger:k9}),RV=le("
"),OV=le("
");const x9=It();function PV(){const[e,t]=xe([]),n={current:void 0},r={value:!1};pe(()=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0)});const i=l=>{const c=e(),u=l?c.find(f=>f.id===l):c.at(-1);if(!u||r.value)return;r.value=!0,u.onClose?.(),u.setClosing(!0);const d=u.id;n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),n.current=setTimeout(()=>{n.current=void 0,u.dispose(),t(f=>f.filter(h=>h.id!==d)),r.value=!1},100)};de(()=>{if(e().length===0)return;Bt(window,"keydown",c=>{c.key==="Escape"&&(i(),c.preventDefault(),c.stopPropagation())},{capture:!0})});const s=(l,c,u,d)=>{const f=Math.random().toString(36).slice(2),h=50+d*10;let p,m;const g=Ws(c,()=>Wn(v=>{p=v;const[b,_]=xe(!1);return m=_,w(Fo,{modal:!0,get open(){return!b()},onOpenChange:x=>{x||i(f)},get children(){return w(Fo.Portal,{get children(){return[w(Fo.Overlay,{"data-component":"dialog-overlay",get style(){return{"z-index":String(h)}},onClick:()=>i(f)}),(()=>{var x=RV();return Qe(x,"data-dialog-layer",d),G(x,l),Fe(E=>bn(x,"z-index",String(h))),x})()]}})}})}));if(!p||!m)return;const y={id:f,node:g,dispose:p,owner:c,onClose:u,setClosing:m};t(v=>[...v,y])};return{stack:e,close:i,show:(l,c,u)=>{for(const d of e())d.dispose();t([]),n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1,s(l,c,u,0)},push:(l,c,u)=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1,s(l,c,u,e().length)}}}function $V(e){const t=PV();return w(x9.Provider,{value:t,get children(){return[Ue(()=>e.children),(()=>{var n=OV();return G(n,w(Sr,{get each(){return t.stack()},children:r=>r.node})),n})()]}})}function Nc(){const e=Ct(x9),t=_i();if(!t)throw new Error("useDialog must be used within a DialogProvider");if(!e)throw new Error("useDialog must be used within a DialogProvider");return{get active(){return e.stack().at(-1)},show(n,r){const i=e.stack().at(-1)?.owner??t;return $a(()=>e.show(n,i,r))},push(n,r){const i=e.stack().at(-1)?.owner??t;return $a(()=>e.push(n,i,r))},close(){e.close()}}}const S9={"ui.sessionReview.title":"Session changes","ui.sessionReview.title.git":"Git changes","ui.sessionReview.title.branch":"Branch changes","ui.sessionReview.title.lastTurn":"Last turn changes","ui.sessionReview.diffStyle.unified":"Unified","ui.sessionReview.diffStyle.split":"Split","ui.sessionReview.expandAll":"Expand all","ui.sessionReview.collapseAll":"Collapse all","ui.sessionReview.change.added":"Added","ui.sessionReview.change.removed":"Removed","ui.sessionReview.change.modified":"Modified","ui.sessionReview.image.loading":"Loading...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff too large to render","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} changed lines. Current: {{current}} changed lines.","ui.sessionReview.largeDiff.renderAnyway":"Render anyway","ui.sessionReview.openFile":"Open file","ui.sessionReview.selection.line":"line {{line}}","ui.sessionReview.selection.lines":"lines {{start}}-{{end}}","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Removed {{kind}} file.","ui.fileMedia.state.loading":"Loading {{kind}}...","ui.fileMedia.state.error":"Unable to load {{kind}}.","ui.fileMedia.state.unavailable":"{{kind}} preview unavailable.","ui.fileMedia.binary.title":"Binary file","ui.fileMedia.binary.description.path":"{{path}} is binary.","ui.fileMedia.binary.description.default":"Binary content","ui.lineComment.label.prefix":"Comment on ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commenting on ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Add comment","ui.lineComment.submit":"Comment","ui.sessionTurn.steps.show":"Show steps","ui.sessionTurn.steps.hide":"Hide steps","ui.sessionTurn.summary.response":"Response","ui.sessionTurn.diff.showMore":"Show more changes ({{count}})","ui.sessionTurn.diffs.changed":"Changed","ui.sessionTurn.diffs.showAll":"Show all","ui.sessionTurn.diffs.showLess":"Show less","ui.sessionTurn.diffs.more":"+{{count}} more files","ui.sessionTurn.retry.retrying":"retrying","ui.sessionTurn.retry.inSeconds":"in {{seconds}}s","ui.sessionTurn.retry.attempt":"attempt #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - attempt #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini is way too hot right now","ui.sessionTurn.error.freeUsageExceeded":"Free usage exceeded","ui.sessionTurn.error.addCredits":"Add credits","dialog.usageExceeded.freeTier.title":"Free limit reached","dialog.usageExceeded.freeTier.description":"Subscribe to OpenCode Go for reliable access to the best open-source models, starting at $5/month.","dialog.usageExceeded.freeTier.actionLabel":"Subscribe","dialog.usageExceeded.accountRateLimit.title":"Go limit reached","dialog.usageExceeded.accountRateLimit.description":"Usage limit reached. To continue using this model now, enable usage from your available balance","dialog.usageExceeded.accountRateLimit.actionLabel":"Open settings","ui.sessionTurn.status.delegating":"Delegating work","ui.sessionTurn.status.planning":"Planning next steps","ui.sessionTurn.status.gatheringContext":"Exploring","ui.sessionTurn.status.gatheredContext":"Explored","ui.sessionTurn.status.searchingCodebase":"Searching the codebase","ui.sessionTurn.status.searchingWeb":"Searching the web","ui.sessionTurn.status.makingEdits":"Making edits","ui.sessionTurn.status.runningCommands":"Running commands","ui.sessionTurn.status.thinking":"Thinking","ui.sessionTurn.status.thinkingWithTopic":"Thinking - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Gathering thoughts","ui.sessionTurn.status.consideringNextSteps":"Considering next steps","ui.messagePart.diagnostic.error":"Error","ui.messagePart.title.edit":"Edit","ui.messagePart.title.write":"Write","ui.messagePart.option.typeOwnAnswer":"Type your own answer","ui.messagePart.review.title":"Review your answers","ui.messagePart.questions.dismissed":"Questions dismissed","ui.messagePart.compaction":"Session compacted","ui.messagePart.context.read.one":"{{count}} read","ui.messagePart.context.read.other":"{{count}} reads","ui.messagePart.context.search.one":"{{count}} search","ui.messagePart.context.search.other":"{{count}} searches","ui.messagePart.context.list.one":"{{count}} list","ui.messagePart.context.list.other":"{{count}} lists","ui.list.loading":"Loading","ui.list.empty":"No results","ui.list.clearFilter":"Clear filter","ui.list.emptyWithFilter.prefix":"No results for","ui.list.emptyWithFilter.suffix":"","ui.fileSearch.placeholder":"Find","ui.fileSearch.previousMatch":"Previous match","ui.fileSearch.nextMatch":"Next match","ui.fileSearch.close":"Close search","ui.messageNav.newMessage":"New message","ui.textField.copyToClipboard":"Copy to clipboard","ui.textField.copyLink":"Copy link","ui.textField.copied":"Copied","ui.imagePreview.alt":"Image preview","ui.scrollView.ariaLabel":"scrollable content","ui.tool.read":"Read","ui.tool.loaded":"Loaded","ui.tool.list":"List","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.task":"Task","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Web Search","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"To-dos","ui.tool.todos.read":"Read to-dos","ui.tool.questions":"Questions","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.tool.skill":"Skill","ui.basicTool.called":"Called `{{tool}}`","ui.toolErrorCard.failed":"Failed","ui.toolErrorCard.copyError":"Copy error","ui.common.file.one":"file","ui.common.file.other":"files","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.add":"Add","ui.common.back":"Back","ui.common.cancel":"Cancel","ui.common.confirm":"Confirm","ui.common.dismiss":"Dismiss","ui.common.close":"Close","ui.common.next":"Next","ui.common.submit":"Submit","ui.permission.deny":"Deny","ui.permission.allowAlways":"Allow always","ui.permission.allowOnce":"Allow once","ui.message.expand":"Expand message","ui.message.collapse":"Collapse message","ui.message.copy":"Copy","ui.message.copyMessage":"Copy message","ui.message.forkMessage":"Fork to new session","ui.message.revertMessage":"Revert message","ui.message.copyResponse":"Copy response","ui.message.copied":"Copied","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s","ui.message.interrupted":"Interrupted","ui.message.queued":"Queued","ui.message.attachment.alt":"attachment","ui.patch.action.deleted":"Deleted","ui.patch.action.created":"Created","ui.patch.action.moved":"Moved","ui.patch.action.patched":"Patched","ui.question.subtitle.answered":"{{count}} answered","ui.question.answer.none":"(no answer)","ui.question.review.notAnswered":"(not answered)","ui.question.multiHint":"Select all answers that apply","ui.question.singleHint":"Select one answer","ui.question.custom.placeholder":"Type your answer..."};function NV(e,t){return t?e.replace(/{{\s*([^}]+?)\s*}}/g,(n,r)=>{const i=String(r),s=t[i];return s===void 0?"":String(s)}):e}const FV={locale:()=>"en",t:(e,t)=>{const n=S9[e]??String(e);return NV(n,t)}},_9=It(FV);function HV(e){return w(_9.Provider,{get value(){return e.value},get children(){return e.children}})}function ul(){return Ct(_9)}function y2(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var dl=y2();function C9(e){dl=e}var Vu={exec:()=>null};function Mt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(wr.caret,"$1"),n=n.replace(i,o),r},getRegex:()=>new RegExp(n,t)};return r}var VV=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,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:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},zV=/^(?:[ \t]*(?:\n|$))+/,jV=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,BV=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,sf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qV=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,b2=/(?:[*+-]|\d{1,9}[.)])/,E9=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,T9=Mt(E9).replace(/bull/g,b2).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(),UV=Mt(E9).replace(/bull/g,b2).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(),w2=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,WV=/^[^\n]+/,k2=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,GV=Mt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",k2).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),KV=Mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,b2).getRegex(),Wp="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",x2=/|$))/,ZV=Mt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",x2).replace("tag",Wp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),L9=Mt(w2).replace("hr",sf).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[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Wp).getRegex(),YV=Mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",L9).getRegex(),S2={blockquote:YV,code:jV,def:GV,fences:BV,heading:qV,hr:sf,html:ZV,lheading:T9,list:KV,newline:zV,paragraph:L9,table:Vu,text:WV},S3=Mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",sf).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[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Wp).getRegex(),QV={...S2,lheading:UV,table:S3,paragraph:Mt(w2).replace("hr",sf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",S3).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Wp).getRegex()},XV={...S2,html:Mt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",x2).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Vu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Mt(w2).replace("hr",sf).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",T9).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},JV=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ez=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,I9=/^( {2,}|\\)\n(?!\s*$)/,tz=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",VV?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),D9=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,oz=Mt(D9,"u").replace(/punct/g,Gp).getRegex(),az=Mt(D9,"u").replace(/punct/g,M9).getRegex(),R9="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lz=Mt(R9,"gu").replace(/notPunctSpace/g,A9).replace(/punctSpace/g,_2).replace(/punct/g,Gp).getRegex(),cz=Mt(R9,"gu").replace(/notPunctSpace/g,iz).replace(/punctSpace/g,rz).replace(/punct/g,M9).getRegex(),uz=Mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,A9).replace(/punctSpace/g,_2).replace(/punct/g,Gp).getRegex(),dz=Mt(/\\(punct)/,"gu").replace(/punct/g,Gp).getRegex(),fz=Mt(/^<(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(),hz=Mt(x2).replace("(?:-->|$)","-->").getRegex(),pz=Mt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",hz).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),A0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mz=Mt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",A0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O9=Mt(/^!?\[(label)\]\[(ref)\]/).replace("label",A0).replace("ref",k2).getRegex(),P9=Mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",k2).getRegex(),gz=Mt("reflink|nolink(?!\\()","g").replace("reflink",O9).replace("nolink",P9).getRegex(),_3=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,C2={_backpedal:Vu,anyPunctuation:dz,autolink:fz,blockSkip:sz,br:I9,code:ez,del:Vu,emStrongLDelim:oz,emStrongRDelimAst:lz,emStrongRDelimUnd:uz,escape:JV,link:mz,nolink:P9,punctuation:nz,reflink:O9,reflinkSearch:gz,tag:pz,text:tz,url:Vu},vz={...C2,link:Mt(/^!?\[(label)\]\((.*?)\)/).replace("label",A0).getRegex(),reflink:Mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",A0).getRegex()},Bv={...C2,emStrongRDelimAst:cz,emStrongLDelim:az,url:Mt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_3).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:Mt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},C3=e=>bz[e];function Fs(e,t){if(t){if(wr.escapeTest.test(e))return e.replace(wr.escapeReplace,C3)}else if(wr.escapeTestNoEncode.test(e))return e.replace(wr.escapeReplaceNoEncode,C3);return e}function E3(e){try{e=encodeURI(e).replace(wr.percentDecode,"%")}catch{return null}return e}function T3(e,t){let n=e.replace(wr.findPipe,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(wr.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length0?-2:-1}function L3(e,t,n,r,i){let s=t.href,o=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function kz(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` `).map(s=>{let o=s.match(n.other.beginningSpace);if(o===null)return s;let[a]=o;return a.length>=i.length?s.slice(i.length):s}).join(` `)}var M0=class{options;rules;lexer;constructor(t){this.options=t||dl}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:uu(r,` `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=kz(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let i=uu(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:uu(n[0],` `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=uu(n[0],` `).split(` `),i="",s="",o=[];for(;r.length>0;){let a=!1,l=[],c;for(c=0;c1,s={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let o=this.rules.other.listItemRegex(r),a=!1;for(;t;){let c=!1,u="",d="";if(!(n=o.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let f=n[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,g=>" ".repeat(3*g.length)),h=t.split(` `,1)[0],p=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):p?m=n[1].length+1:(m=n[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=n[1].length),p&&this.rules.other.blankLine.test(h)&&(u+=h+` `,t=t.substring(h.length+1),c=!0),!c){let g=this.rules.other.nextBulletRegex(m),y=this.rules.other.hrRegex(m),v=this.rules.other.fencesBeginRegex(m),b=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let x=t.split(` `,1)[0],E;if(h=x,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),E=h):E=h.replace(this.rules.other.tabCharGlobal," "),v.test(h)||b.test(h)||_.test(h)||g.test(h)||y.test(h))break;if(E.search(this.rules.other.nonSpaceChar)>=m||!h.trim())d+=` `+E.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||b.test(f)||y.test(f))break;d+=` `+h}!p&&!h.trim()&&(p=!0),u+=x+` `,t=t.substring(x.length+1),f=E.slice(m)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),s.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),s.raw+=u}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c of s.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let d={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=d.checked,s.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=d.raw+c.tokens[0].raw,c.tokens[0].text=d.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(d)):c.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):c.tokens.unshift(d)}}if(!s.loose){let u=c.tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}}if(s.loose)for(let c of s.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return s}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=T3(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(` `):[],o={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===` `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let o=uu(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{let o=wz(n[2],"()");if(o===-2)return;if(o>-1){let a=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),L3(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=n[i.toLowerCase()];if(!s){let o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return L3(r,s,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!r||this.rules.inline.punctuation.exec(r))){let s=[...i[0]].length-1,o,a,l=s,c=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,n=n.slice(-1*t.length+s);(i=u.exec(n))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(a=[...o].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let d=[...i[0]][0].length,f=t.slice(0,s+i.index+d+a);if(Math.min(s,a)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(s!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},Hi=class qv{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||dl,this.options.tokenizer=this.options.tokenizer||new M0,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:wr,block:qf.normal,inline:cu.normal};this.options.pedantic?(n.block=qf.pedantic,n.inline=cu.pedantic):this.options.gfm&&(n.block=qf.gfm,this.options.breaks?n.inline=cu.breaks:n.inline=cu.gfm),this.tokenizer.rules=n}static get rules(){return{block:qf,inline:cu}}static lex(t,n){return new qv(n).lex(t)}static lexInline(t,n){return new qv(n).inlineTokens(t)}lex(t){t=t.replace(wr.carriageReturn,` `),this.blockTokens(t,this.tokens);for(let n=0;n(i=o.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=n.at(-1);i.raw.length===1&&o!==void 0?o.raw+=` `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.text,this.inlineQueue.at(-1).src=o.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,a=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let o=n.at(-1);r&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(i),r=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(i);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let o=!1,a="";for(;t;){o||(a=""),o=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let u=n.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(t,r,a)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),n.push(l);continue}let c=t;if(this.options.extensions?.startInline){let u=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),o=!0;let u=n.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}},D0=class{options;parser;constructor(t){this.options=t||dl}space(t){return""}code({text:t,lang:n,escaped:r}){let i=(n||"").match(wr.notSpaceStart)?.[0],s=t.replace(wr.endingNewline,"")+` `;return i?'
'+(r?s:Fs(s,!0))+`
`:"
"+(r?s:Fs(s,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`${this.parser.parseInline(t)} `}hr(t){return`
`}list(t){let n=t.ordered,r=t.start,i="";for(let a=0;a `+i+" `}listitem(t){return`
  • ${this.parser.parse(t.tokens)}
  • `}checkbox({checked:t}){return" '}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let n="",r="";for(let s=0;s${i}`),` `+n+` `+i+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+` `}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Fs(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),s=E3(t);if(s===null)return i;t=s;let o='
    ",o}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let s=E3(t);if(s===null)return Fs(r);t=s;let o=`${r}{let a=s[o].flat(1/0);r=r.concat(this.walkTokens(a,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=n.renderers[s.name];o?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[s.level];o?o.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){let s=this.defaults.renderer||new D0(this.defaults);for(let o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,l=r.renderer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}i.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new M0(this.defaults);for(let o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,l=r.tokenizer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}i.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Cu;for(let o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,l=r.hooks[a],c=s[a];Cu.passThroughHooks.has(o)?s[a]=u=>{if(this.defaults.async&&Cu.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(s,u);return c.call(s,f)})();let d=l.call(s,u);return c.call(s,d)}:s[a]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,u);return f===!1&&(f=await c.apply(s,u)),f})();let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}i.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Hi.lex(t,n??this.defaults)}parser(t,n){return Vi.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},s={...this.defaults,...i},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let a=s.hooks?await s.hooks.preprocess(n):n,l=await(s.hooks?await s.hooks.provideLexer():t?Hi.lex:Hi.lexInline)(a,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let u=await(s.hooks?await s.hooks.provideParser():t?Vi.parse:Vi.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(u):u})().catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let a=(s.hooks?s.hooks.provideLexer():t?Hi.lex:Hi.lexInline)(n,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?Vi.parse:Vi.parseInline)(a,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(a){return o(a)}}}onError(t,n){return r=>{if(r.message+=` Please report this to https://github.com/markedjs/marked.`,t){let i="

    An error occurred:

    "+Fs(r.message+"",!0)+"
    ";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Ka=new xz;function qt(e,t){return Ka.parse(e,t)}qt.options=qt.setOptions=function(e){return Ka.setOptions(e),qt.defaults=Ka.defaults,C9(qt.defaults),qt};qt.getDefaults=y2;qt.defaults=dl;qt.use=function(...e){return Ka.use(...e),qt.defaults=Ka.defaults,C9(qt.defaults),qt};qt.walkTokens=function(e,t){return Ka.walkTokens(e,t)};qt.parseInline=Ka.parseInline;qt.Parser=Vi;qt.parser=Vi.parse;qt.Renderer=D0;qt.TextRenderer=E2;qt.Lexer=Hi;qt.lexer=Hi.lex;qt.Tokenizer=M0;qt.Hooks=Cu;qt.parse=qt;qt.options;qt.setOptions;qt.use;qt.walkTokens;qt.parseInline;Vi.parse;Hi.lex;class Pr{constructor(t,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new Pr(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class Xr{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new Xr(n,Pr.range(this,t))}}class Ce{constructor(t,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+t,i,s,o=n&&n.loc;if(o&&o.start<=o.end){var a=o.lexer.input;i=o.start,s=o.end,i===a.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ";var l=a.slice(i,s).replace(/[^]/g,"$&̲"),c;i>15?c="…"+a.slice(i-15,i):c=a.slice(0,i);var u;s+15":">","<":"<",'"':""","'":"'"},Tz=/[&><"']/g;function Lz(e){return String(e).replace(Tz,t=>Ez[t])}var $9=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},Iz=function(t){var n=$9(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},Az=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Mz=function(t){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},At={deflt:Sz,escape:Lz,hyphenate:Cz,getBaseElem:$9,isCharacterBox:Iz,protocolFromUrl:Mz},t0={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Dz(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}let T2=class{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n in t0)if(t0.hasOwnProperty(n)){var r=t0[n];this[n]=t[n]!==void 0?r.processor?r.processor(t[n]):t[n]:Dz(r)}}reportNonstrict(t,n,r){var i=this.strict;if(typeof i=="function"&&(i=i(t,n,r)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Ce("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var i=this.strict;if(typeof i=="function")try{i=i(t,n,r)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var n=At.protocolFromUrl(t.url);if(n==null)return!1;t.protocol=n}var r=typeof this.trust=="function"?this.trust(t):this.trust;return!!r}};class So{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return cs[Rz[this.id]]}sub(){return cs[Oz[this.id]]}fracNum(){return cs[Pz[this.id]]}fracDen(){return cs[$z[this.id]]}cramp(){return cs[Nz[this.id]]}text(){return cs[Fz[this.id]]}isTight(){return this.size>=2}}var L2=0,R0=1,tc=2,Js=3,sd=4,gi=5,yc=6,kr=7,cs=[new So(L2,0,!1),new So(R0,0,!0),new So(tc,1,!1),new So(Js,1,!0),new So(sd,2,!1),new So(gi,2,!0),new So(yc,3,!1),new So(kr,3,!0)],Rz=[sd,gi,sd,gi,yc,kr,yc,kr],Oz=[gi,gi,gi,gi,kr,kr,kr,kr],Pz=[tc,Js,sd,gi,yc,kr,yc,kr],$z=[Js,Js,gi,gi,kr,kr,kr,kr],Nz=[R0,R0,Js,Js,gi,gi,kr,kr],Fz=[L2,R0,tc,Js,tc,Js,tc,Js],nt={DISPLAY:cs[L2],TEXT:cs[tc],SCRIPT:cs[sd],SCRIPTSCRIPT:cs[yc]},Wv=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Hz(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var n0=[];Wv.forEach(e=>e.blocks.forEach(t=>n0.push(...t)));function N9(e){for(var t=0;t=n0[t]&&e<=n0[t+1])return!0;return!1}var Cl=80,Vz=function(t,n){return"M95,"+(622+t+n)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+t/2.075+" -"+t+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+t)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},zz=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+t/2.084+" -"+t+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+t)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},jz=function(t,n){return"M983 "+(10+t+n)+` l`+t/3.13+" -"+t+` c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Bz=function(t,n){return"M424,"+(2398+t+n)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+t)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` h400000v`+(40+t)+"h-400000z"},qz=function(t,n){return"M473,"+(2713+t+n)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},Uz=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},Wz=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},Gz=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=Vz(n,Cl);break;case"sqrtSize1":i=zz(n,Cl);break;case"sqrtSize2":i=jz(n,Cl);break;case"sqrtSize3":i=Bz(n,Cl);break;case"sqrtSize4":i=qz(n,Cl);break;case"sqrtTall":i=Wz(n,Cl,r)}return i},Kz=function(t,n){switch(t){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},I3={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Zz=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class of{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;nn.toText();return this.children.map(t).join("")}}var fs={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Uf={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},A3={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Yz(e,t){fs[e]=t}function I2(e,t,n){if(!fs[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=fs[t][r];if(!i&&e[0]in A3&&(r=A3[e[0]].charCodeAt(0),i=fs[t][r]),!i&&n==="text"&&N9(r)&&(i=fs[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Tg={};function Qz(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Tg[t]){var n=Tg[t]={cssEmPerMu:Uf.quad[t]/18};for(var r in Uf)Uf.hasOwnProperty(r)&&(n[r]=Uf[r][t])}return Tg[t]}var Xz=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],M3=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],D3=function(t,n){return n.size<2?t:Xz[t-1][n.size-1]};class zs{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||zs.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=M3[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new zs(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:D3(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:M3[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=D3(zs.BASESIZE,t);return this.size===n&&this.textSize===zs.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==zs.BASESIZE?["sizing","reset-size"+this.size,"size"+zs.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Qz(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}zs.BASESIZE=6;var Gv={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Jz={ex:!0,em:!0,mu:!0},F9=function(t){return typeof t!="string"&&(t=t.unit),t in Gv||t in Jz||t==="ex"},hn=function(t,n){var r;if(t.unit in Gv)r=Gv[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new Ce("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},Ie=function(t){return+t.toFixed(4)+"em"},Jo=function(t){return t.filter(n=>n).join(" ")},H9=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},V9=function(t){var n=document.createElement(t);n.className=Jo(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&n.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,z9=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+At.escape(Jo(this.classes))+'"');var r="";for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=At.hyphenate(i)+":"+this.style[i]+";");r&&(n+=' style="'+At.escape(r)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(ej.test(s))throw new Ce("Invalid attribute name '"+s+"'");n+=" "+s+'="'+At.escape(this.attributes[s])+'"'}n+=">";for(var o=0;o",n};class af{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,H9.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return V9.call(this,"span")}toMarkup(){return z9.call(this,"span")}}class A2{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,H9.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return V9.call(this,"a")}toMarkup(){return z9.call(this,"a")}}class tj{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);return t}toMarkup(){var t=''+At.escape(this.alt)+'0&&(n=document.createElement("span"),n.style.marginRight=Ie(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Jo(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="0&&(r+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=At.hyphenate(i)+":"+this.style[i]+";");r&&(t=!0,n+=' style="'+At.escape(r)+'"');var s=At.escape(this.text);return t?(n+=">",n+=s,n+="",n):s}}class ro{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i':''}}class Kv{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t=" but got "+String(e)+".")}var ij={bin:1,close:1,inner:1,open:1,punct:1,rel:1},sj={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},on={math:{},text:{}};function k(e,t,n,r,i,s){on[e][i]={font:t,group:n,replace:r},s&&r&&(on[e][r]=on[e][i])}var T="math",ke="text",$="main",K="ams",cn="accent-token",Ne="bin",Ir="close",Fc="inner",tt="mathord",On="op-token",ii="open",Kp="punct",Y="rel",fo="spacing",X="textord";k(T,$,Y,"≡","\\equiv",!0);k(T,$,Y,"≺","\\prec",!0);k(T,$,Y,"≻","\\succ",!0);k(T,$,Y,"∼","\\sim",!0);k(T,$,Y,"⊥","\\perp");k(T,$,Y,"⪯","\\preceq",!0);k(T,$,Y,"⪰","\\succeq",!0);k(T,$,Y,"≃","\\simeq",!0);k(T,$,Y,"∣","\\mid",!0);k(T,$,Y,"≪","\\ll",!0);k(T,$,Y,"≫","\\gg",!0);k(T,$,Y,"≍","\\asymp",!0);k(T,$,Y,"∥","\\parallel");k(T,$,Y,"⋈","\\bowtie",!0);k(T,$,Y,"⌣","\\smile",!0);k(T,$,Y,"⊑","\\sqsubseteq",!0);k(T,$,Y,"⊒","\\sqsupseteq",!0);k(T,$,Y,"≐","\\doteq",!0);k(T,$,Y,"⌢","\\frown",!0);k(T,$,Y,"∋","\\ni",!0);k(T,$,Y,"∝","\\propto",!0);k(T,$,Y,"⊢","\\vdash",!0);k(T,$,Y,"⊣","\\dashv",!0);k(T,$,Y,"∋","\\owns");k(T,$,Kp,".","\\ldotp");k(T,$,Kp,"⋅","\\cdotp");k(T,$,X,"#","\\#");k(ke,$,X,"#","\\#");k(T,$,X,"&","\\&");k(ke,$,X,"&","\\&");k(T,$,X,"ℵ","\\aleph",!0);k(T,$,X,"∀","\\forall",!0);k(T,$,X,"ℏ","\\hbar",!0);k(T,$,X,"∃","\\exists",!0);k(T,$,X,"∇","\\nabla",!0);k(T,$,X,"♭","\\flat",!0);k(T,$,X,"ℓ","\\ell",!0);k(T,$,X,"♮","\\natural",!0);k(T,$,X,"♣","\\clubsuit",!0);k(T,$,X,"℘","\\wp",!0);k(T,$,X,"♯","\\sharp",!0);k(T,$,X,"♢","\\diamondsuit",!0);k(T,$,X,"ℜ","\\Re",!0);k(T,$,X,"♡","\\heartsuit",!0);k(T,$,X,"ℑ","\\Im",!0);k(T,$,X,"♠","\\spadesuit",!0);k(T,$,X,"§","\\S",!0);k(ke,$,X,"§","\\S");k(T,$,X,"¶","\\P",!0);k(ke,$,X,"¶","\\P");k(T,$,X,"†","\\dag");k(ke,$,X,"†","\\dag");k(ke,$,X,"†","\\textdagger");k(T,$,X,"‡","\\ddag");k(ke,$,X,"‡","\\ddag");k(ke,$,X,"‡","\\textdaggerdbl");k(T,$,Ir,"⎱","\\rmoustache",!0);k(T,$,ii,"⎰","\\lmoustache",!0);k(T,$,Ir,"⟯","\\rgroup",!0);k(T,$,ii,"⟮","\\lgroup",!0);k(T,$,Ne,"∓","\\mp",!0);k(T,$,Ne,"⊖","\\ominus",!0);k(T,$,Ne,"⊎","\\uplus",!0);k(T,$,Ne,"⊓","\\sqcap",!0);k(T,$,Ne,"∗","\\ast");k(T,$,Ne,"⊔","\\sqcup",!0);k(T,$,Ne,"◯","\\bigcirc",!0);k(T,$,Ne,"∙","\\bullet",!0);k(T,$,Ne,"‡","\\ddagger");k(T,$,Ne,"≀","\\wr",!0);k(T,$,Ne,"⨿","\\amalg");k(T,$,Ne,"&","\\And");k(T,$,Y,"⟵","\\longleftarrow",!0);k(T,$,Y,"⇐","\\Leftarrow",!0);k(T,$,Y,"⟸","\\Longleftarrow",!0);k(T,$,Y,"⟶","\\longrightarrow",!0);k(T,$,Y,"⇒","\\Rightarrow",!0);k(T,$,Y,"⟹","\\Longrightarrow",!0);k(T,$,Y,"↔","\\leftrightarrow",!0);k(T,$,Y,"⟷","\\longleftrightarrow",!0);k(T,$,Y,"⇔","\\Leftrightarrow",!0);k(T,$,Y,"⟺","\\Longleftrightarrow",!0);k(T,$,Y,"↦","\\mapsto",!0);k(T,$,Y,"⟼","\\longmapsto",!0);k(T,$,Y,"↗","\\nearrow",!0);k(T,$,Y,"↩","\\hookleftarrow",!0);k(T,$,Y,"↪","\\hookrightarrow",!0);k(T,$,Y,"↘","\\searrow",!0);k(T,$,Y,"↼","\\leftharpoonup",!0);k(T,$,Y,"⇀","\\rightharpoonup",!0);k(T,$,Y,"↙","\\swarrow",!0);k(T,$,Y,"↽","\\leftharpoondown",!0);k(T,$,Y,"⇁","\\rightharpoondown",!0);k(T,$,Y,"↖","\\nwarrow",!0);k(T,$,Y,"⇌","\\rightleftharpoons",!0);k(T,K,Y,"≮","\\nless",!0);k(T,K,Y,"","\\@nleqslant");k(T,K,Y,"","\\@nleqq");k(T,K,Y,"⪇","\\lneq",!0);k(T,K,Y,"≨","\\lneqq",!0);k(T,K,Y,"","\\@lvertneqq");k(T,K,Y,"⋦","\\lnsim",!0);k(T,K,Y,"⪉","\\lnapprox",!0);k(T,K,Y,"⊀","\\nprec",!0);k(T,K,Y,"⋠","\\npreceq",!0);k(T,K,Y,"⋨","\\precnsim",!0);k(T,K,Y,"⪹","\\precnapprox",!0);k(T,K,Y,"≁","\\nsim",!0);k(T,K,Y,"","\\@nshortmid");k(T,K,Y,"∤","\\nmid",!0);k(T,K,Y,"⊬","\\nvdash",!0);k(T,K,Y,"⊭","\\nvDash",!0);k(T,K,Y,"⋪","\\ntriangleleft");k(T,K,Y,"⋬","\\ntrianglelefteq",!0);k(T,K,Y,"⊊","\\subsetneq",!0);k(T,K,Y,"","\\@varsubsetneq");k(T,K,Y,"⫋","\\subsetneqq",!0);k(T,K,Y,"","\\@varsubsetneqq");k(T,K,Y,"≯","\\ngtr",!0);k(T,K,Y,"","\\@ngeqslant");k(T,K,Y,"","\\@ngeqq");k(T,K,Y,"⪈","\\gneq",!0);k(T,K,Y,"≩","\\gneqq",!0);k(T,K,Y,"","\\@gvertneqq");k(T,K,Y,"⋧","\\gnsim",!0);k(T,K,Y,"⪊","\\gnapprox",!0);k(T,K,Y,"⊁","\\nsucc",!0);k(T,K,Y,"⋡","\\nsucceq",!0);k(T,K,Y,"⋩","\\succnsim",!0);k(T,K,Y,"⪺","\\succnapprox",!0);k(T,K,Y,"≆","\\ncong",!0);k(T,K,Y,"","\\@nshortparallel");k(T,K,Y,"∦","\\nparallel",!0);k(T,K,Y,"⊯","\\nVDash",!0);k(T,K,Y,"⋫","\\ntriangleright");k(T,K,Y,"⋭","\\ntrianglerighteq",!0);k(T,K,Y,"","\\@nsupseteqq");k(T,K,Y,"⊋","\\supsetneq",!0);k(T,K,Y,"","\\@varsupsetneq");k(T,K,Y,"⫌","\\supsetneqq",!0);k(T,K,Y,"","\\@varsupsetneqq");k(T,K,Y,"⊮","\\nVdash",!0);k(T,K,Y,"⪵","\\precneqq",!0);k(T,K,Y,"⪶","\\succneqq",!0);k(T,K,Y,"","\\@nsubseteqq");k(T,K,Ne,"⊴","\\unlhd");k(T,K,Ne,"⊵","\\unrhd");k(T,K,Y,"↚","\\nleftarrow",!0);k(T,K,Y,"↛","\\nrightarrow",!0);k(T,K,Y,"⇍","\\nLeftarrow",!0);k(T,K,Y,"⇏","\\nRightarrow",!0);k(T,K,Y,"↮","\\nleftrightarrow",!0);k(T,K,Y,"⇎","\\nLeftrightarrow",!0);k(T,K,Y,"△","\\vartriangle");k(T,K,X,"ℏ","\\hslash");k(T,K,X,"▽","\\triangledown");k(T,K,X,"◊","\\lozenge");k(T,K,X,"Ⓢ","\\circledS");k(T,K,X,"®","\\circledR");k(ke,K,X,"®","\\circledR");k(T,K,X,"∡","\\measuredangle",!0);k(T,K,X,"∄","\\nexists");k(T,K,X,"℧","\\mho");k(T,K,X,"Ⅎ","\\Finv",!0);k(T,K,X,"⅁","\\Game",!0);k(T,K,X,"‵","\\backprime");k(T,K,X,"▲","\\blacktriangle");k(T,K,X,"▼","\\blacktriangledown");k(T,K,X,"■","\\blacksquare");k(T,K,X,"⧫","\\blacklozenge");k(T,K,X,"★","\\bigstar");k(T,K,X,"∢","\\sphericalangle",!0);k(T,K,X,"∁","\\complement",!0);k(T,K,X,"ð","\\eth",!0);k(ke,$,X,"ð","ð");k(T,K,X,"╱","\\diagup");k(T,K,X,"╲","\\diagdown");k(T,K,X,"□","\\square");k(T,K,X,"□","\\Box");k(T,K,X,"◊","\\Diamond");k(T,K,X,"¥","\\yen",!0);k(ke,K,X,"¥","\\yen",!0);k(T,K,X,"✓","\\checkmark",!0);k(ke,K,X,"✓","\\checkmark");k(T,K,X,"ℶ","\\beth",!0);k(T,K,X,"ℸ","\\daleth",!0);k(T,K,X,"ℷ","\\gimel",!0);k(T,K,X,"ϝ","\\digamma",!0);k(T,K,X,"ϰ","\\varkappa");k(T,K,ii,"┌","\\@ulcorner",!0);k(T,K,Ir,"┐","\\@urcorner",!0);k(T,K,ii,"└","\\@llcorner",!0);k(T,K,Ir,"┘","\\@lrcorner",!0);k(T,K,Y,"≦","\\leqq",!0);k(T,K,Y,"⩽","\\leqslant",!0);k(T,K,Y,"⪕","\\eqslantless",!0);k(T,K,Y,"≲","\\lesssim",!0);k(T,K,Y,"⪅","\\lessapprox",!0);k(T,K,Y,"≊","\\approxeq",!0);k(T,K,Ne,"⋖","\\lessdot");k(T,K,Y,"⋘","\\lll",!0);k(T,K,Y,"≶","\\lessgtr",!0);k(T,K,Y,"⋚","\\lesseqgtr",!0);k(T,K,Y,"⪋","\\lesseqqgtr",!0);k(T,K,Y,"≑","\\doteqdot");k(T,K,Y,"≓","\\risingdotseq",!0);k(T,K,Y,"≒","\\fallingdotseq",!0);k(T,K,Y,"∽","\\backsim",!0);k(T,K,Y,"⋍","\\backsimeq",!0);k(T,K,Y,"⫅","\\subseteqq",!0);k(T,K,Y,"⋐","\\Subset",!0);k(T,K,Y,"⊏","\\sqsubset",!0);k(T,K,Y,"≼","\\preccurlyeq",!0);k(T,K,Y,"⋞","\\curlyeqprec",!0);k(T,K,Y,"≾","\\precsim",!0);k(T,K,Y,"⪷","\\precapprox",!0);k(T,K,Y,"⊲","\\vartriangleleft");k(T,K,Y,"⊴","\\trianglelefteq");k(T,K,Y,"⊨","\\vDash",!0);k(T,K,Y,"⊪","\\Vvdash",!0);k(T,K,Y,"⌣","\\smallsmile");k(T,K,Y,"⌢","\\smallfrown");k(T,K,Y,"≏","\\bumpeq",!0);k(T,K,Y,"≎","\\Bumpeq",!0);k(T,K,Y,"≧","\\geqq",!0);k(T,K,Y,"⩾","\\geqslant",!0);k(T,K,Y,"⪖","\\eqslantgtr",!0);k(T,K,Y,"≳","\\gtrsim",!0);k(T,K,Y,"⪆","\\gtrapprox",!0);k(T,K,Ne,"⋗","\\gtrdot");k(T,K,Y,"⋙","\\ggg",!0);k(T,K,Y,"≷","\\gtrless",!0);k(T,K,Y,"⋛","\\gtreqless",!0);k(T,K,Y,"⪌","\\gtreqqless",!0);k(T,K,Y,"≖","\\eqcirc",!0);k(T,K,Y,"≗","\\circeq",!0);k(T,K,Y,"≜","\\triangleq",!0);k(T,K,Y,"∼","\\thicksim");k(T,K,Y,"≈","\\thickapprox");k(T,K,Y,"⫆","\\supseteqq",!0);k(T,K,Y,"⋑","\\Supset",!0);k(T,K,Y,"⊐","\\sqsupset",!0);k(T,K,Y,"≽","\\succcurlyeq",!0);k(T,K,Y,"⋟","\\curlyeqsucc",!0);k(T,K,Y,"≿","\\succsim",!0);k(T,K,Y,"⪸","\\succapprox",!0);k(T,K,Y,"⊳","\\vartriangleright");k(T,K,Y,"⊵","\\trianglerighteq");k(T,K,Y,"⊩","\\Vdash",!0);k(T,K,Y,"∣","\\shortmid");k(T,K,Y,"∥","\\shortparallel");k(T,K,Y,"≬","\\between",!0);k(T,K,Y,"⋔","\\pitchfork",!0);k(T,K,Y,"∝","\\varpropto");k(T,K,Y,"◀","\\blacktriangleleft");k(T,K,Y,"∴","\\therefore",!0);k(T,K,Y,"∍","\\backepsilon");k(T,K,Y,"▶","\\blacktriangleright");k(T,K,Y,"∵","\\because",!0);k(T,K,Y,"⋘","\\llless");k(T,K,Y,"⋙","\\gggtr");k(T,K,Ne,"⊲","\\lhd");k(T,K,Ne,"⊳","\\rhd");k(T,K,Y,"≂","\\eqsim",!0);k(T,$,Y,"⋈","\\Join");k(T,K,Y,"≑","\\Doteq",!0);k(T,K,Ne,"∔","\\dotplus",!0);k(T,K,Ne,"∖","\\smallsetminus");k(T,K,Ne,"⋒","\\Cap",!0);k(T,K,Ne,"⋓","\\Cup",!0);k(T,K,Ne,"⩞","\\doublebarwedge",!0);k(T,K,Ne,"⊟","\\boxminus",!0);k(T,K,Ne,"⊞","\\boxplus",!0);k(T,K,Ne,"⋇","\\divideontimes",!0);k(T,K,Ne,"⋉","\\ltimes",!0);k(T,K,Ne,"⋊","\\rtimes",!0);k(T,K,Ne,"⋋","\\leftthreetimes",!0);k(T,K,Ne,"⋌","\\rightthreetimes",!0);k(T,K,Ne,"⋏","\\curlywedge",!0);k(T,K,Ne,"⋎","\\curlyvee",!0);k(T,K,Ne,"⊝","\\circleddash",!0);k(T,K,Ne,"⊛","\\circledast",!0);k(T,K,Ne,"⋅","\\centerdot");k(T,K,Ne,"⊺","\\intercal",!0);k(T,K,Ne,"⋒","\\doublecap");k(T,K,Ne,"⋓","\\doublecup");k(T,K,Ne,"⊠","\\boxtimes",!0);k(T,K,Y,"⇢","\\dashrightarrow",!0);k(T,K,Y,"⇠","\\dashleftarrow",!0);k(T,K,Y,"⇇","\\leftleftarrows",!0);k(T,K,Y,"⇆","\\leftrightarrows",!0);k(T,K,Y,"⇚","\\Lleftarrow",!0);k(T,K,Y,"↞","\\twoheadleftarrow",!0);k(T,K,Y,"↢","\\leftarrowtail",!0);k(T,K,Y,"↫","\\looparrowleft",!0);k(T,K,Y,"⇋","\\leftrightharpoons",!0);k(T,K,Y,"↶","\\curvearrowleft",!0);k(T,K,Y,"↺","\\circlearrowleft",!0);k(T,K,Y,"↰","\\Lsh",!0);k(T,K,Y,"⇈","\\upuparrows",!0);k(T,K,Y,"↿","\\upharpoonleft",!0);k(T,K,Y,"⇃","\\downharpoonleft",!0);k(T,$,Y,"⊶","\\origof",!0);k(T,$,Y,"⊷","\\imageof",!0);k(T,K,Y,"⊸","\\multimap",!0);k(T,K,Y,"↭","\\leftrightsquigarrow",!0);k(T,K,Y,"⇉","\\rightrightarrows",!0);k(T,K,Y,"⇄","\\rightleftarrows",!0);k(T,K,Y,"↠","\\twoheadrightarrow",!0);k(T,K,Y,"↣","\\rightarrowtail",!0);k(T,K,Y,"↬","\\looparrowright",!0);k(T,K,Y,"↷","\\curvearrowright",!0);k(T,K,Y,"↻","\\circlearrowright",!0);k(T,K,Y,"↱","\\Rsh",!0);k(T,K,Y,"⇊","\\downdownarrows",!0);k(T,K,Y,"↾","\\upharpoonright",!0);k(T,K,Y,"⇂","\\downharpoonright",!0);k(T,K,Y,"⇝","\\rightsquigarrow",!0);k(T,K,Y,"⇝","\\leadsto");k(T,K,Y,"⇛","\\Rrightarrow",!0);k(T,K,Y,"↾","\\restriction");k(T,$,X,"‘","`");k(T,$,X,"$","\\$");k(ke,$,X,"$","\\$");k(ke,$,X,"$","\\textdollar");k(T,$,X,"%","\\%");k(ke,$,X,"%","\\%");k(T,$,X,"_","\\_");k(ke,$,X,"_","\\_");k(ke,$,X,"_","\\textunderscore");k(T,$,X,"∠","\\angle",!0);k(T,$,X,"∞","\\infty",!0);k(T,$,X,"′","\\prime");k(T,$,X,"△","\\triangle");k(T,$,X,"Γ","\\Gamma",!0);k(T,$,X,"Δ","\\Delta",!0);k(T,$,X,"Θ","\\Theta",!0);k(T,$,X,"Λ","\\Lambda",!0);k(T,$,X,"Ξ","\\Xi",!0);k(T,$,X,"Π","\\Pi",!0);k(T,$,X,"Σ","\\Sigma",!0);k(T,$,X,"Υ","\\Upsilon",!0);k(T,$,X,"Φ","\\Phi",!0);k(T,$,X,"Ψ","\\Psi",!0);k(T,$,X,"Ω","\\Omega",!0);k(T,$,X,"A","Α");k(T,$,X,"B","Β");k(T,$,X,"E","Ε");k(T,$,X,"Z","Ζ");k(T,$,X,"H","Η");k(T,$,X,"I","Ι");k(T,$,X,"K","Κ");k(T,$,X,"M","Μ");k(T,$,X,"N","Ν");k(T,$,X,"O","Ο");k(T,$,X,"P","Ρ");k(T,$,X,"T","Τ");k(T,$,X,"X","Χ");k(T,$,X,"¬","\\neg",!0);k(T,$,X,"¬","\\lnot");k(T,$,X,"⊤","\\top");k(T,$,X,"⊥","\\bot");k(T,$,X,"∅","\\emptyset");k(T,K,X,"∅","\\varnothing");k(T,$,tt,"α","\\alpha",!0);k(T,$,tt,"β","\\beta",!0);k(T,$,tt,"γ","\\gamma",!0);k(T,$,tt,"δ","\\delta",!0);k(T,$,tt,"ϵ","\\epsilon",!0);k(T,$,tt,"ζ","\\zeta",!0);k(T,$,tt,"η","\\eta",!0);k(T,$,tt,"θ","\\theta",!0);k(T,$,tt,"ι","\\iota",!0);k(T,$,tt,"κ","\\kappa",!0);k(T,$,tt,"λ","\\lambda",!0);k(T,$,tt,"μ","\\mu",!0);k(T,$,tt,"ν","\\nu",!0);k(T,$,tt,"ξ","\\xi",!0);k(T,$,tt,"ο","\\omicron",!0);k(T,$,tt,"π","\\pi",!0);k(T,$,tt,"ρ","\\rho",!0);k(T,$,tt,"σ","\\sigma",!0);k(T,$,tt,"τ","\\tau",!0);k(T,$,tt,"υ","\\upsilon",!0);k(T,$,tt,"ϕ","\\phi",!0);k(T,$,tt,"χ","\\chi",!0);k(T,$,tt,"ψ","\\psi",!0);k(T,$,tt,"ω","\\omega",!0);k(T,$,tt,"ε","\\varepsilon",!0);k(T,$,tt,"ϑ","\\vartheta",!0);k(T,$,tt,"ϖ","\\varpi",!0);k(T,$,tt,"ϱ","\\varrho",!0);k(T,$,tt,"ς","\\varsigma",!0);k(T,$,tt,"φ","\\varphi",!0);k(T,$,Ne,"∗","*",!0);k(T,$,Ne,"+","+");k(T,$,Ne,"−","-",!0);k(T,$,Ne,"⋅","\\cdot",!0);k(T,$,Ne,"∘","\\circ",!0);k(T,$,Ne,"÷","\\div",!0);k(T,$,Ne,"±","\\pm",!0);k(T,$,Ne,"×","\\times",!0);k(T,$,Ne,"∩","\\cap",!0);k(T,$,Ne,"∪","\\cup",!0);k(T,$,Ne,"∖","\\setminus",!0);k(T,$,Ne,"∧","\\land");k(T,$,Ne,"∨","\\lor");k(T,$,Ne,"∧","\\wedge",!0);k(T,$,Ne,"∨","\\vee",!0);k(T,$,X,"√","\\surd");k(T,$,ii,"⟨","\\langle",!0);k(T,$,ii,"∣","\\lvert");k(T,$,ii,"∥","\\lVert");k(T,$,Ir,"?","?");k(T,$,Ir,"!","!");k(T,$,Ir,"⟩","\\rangle",!0);k(T,$,Ir,"∣","\\rvert");k(T,$,Ir,"∥","\\rVert");k(T,$,Y,"=","=");k(T,$,Y,":",":");k(T,$,Y,"≈","\\approx",!0);k(T,$,Y,"≅","\\cong",!0);k(T,$,Y,"≥","\\ge");k(T,$,Y,"≥","\\geq",!0);k(T,$,Y,"←","\\gets");k(T,$,Y,">","\\gt",!0);k(T,$,Y,"∈","\\in",!0);k(T,$,Y,"","\\@not");k(T,$,Y,"⊂","\\subset",!0);k(T,$,Y,"⊃","\\supset",!0);k(T,$,Y,"⊆","\\subseteq",!0);k(T,$,Y,"⊇","\\supseteq",!0);k(T,K,Y,"⊈","\\nsubseteq",!0);k(T,K,Y,"⊉","\\nsupseteq",!0);k(T,$,Y,"⊨","\\models");k(T,$,Y,"←","\\leftarrow",!0);k(T,$,Y,"≤","\\le");k(T,$,Y,"≤","\\leq",!0);k(T,$,Y,"<","\\lt",!0);k(T,$,Y,"→","\\rightarrow",!0);k(T,$,Y,"→","\\to");k(T,K,Y,"≱","\\ngeq",!0);k(T,K,Y,"≰","\\nleq",!0);k(T,$,fo," ","\\ ");k(T,$,fo," ","\\space");k(T,$,fo," ","\\nobreakspace");k(ke,$,fo," ","\\ ");k(ke,$,fo," "," ");k(ke,$,fo," ","\\space");k(ke,$,fo," ","\\nobreakspace");k(T,$,fo,null,"\\nobreak");k(T,$,fo,null,"\\allowbreak");k(T,$,Kp,",",",");k(T,$,Kp,";",";");k(T,K,Ne,"⊼","\\barwedge",!0);k(T,K,Ne,"⊻","\\veebar",!0);k(T,$,Ne,"⊙","\\odot",!0);k(T,$,Ne,"⊕","\\oplus",!0);k(T,$,Ne,"⊗","\\otimes",!0);k(T,$,X,"∂","\\partial",!0);k(T,$,Ne,"⊘","\\oslash",!0);k(T,K,Ne,"⊚","\\circledcirc",!0);k(T,K,Ne,"⊡","\\boxdot",!0);k(T,$,Ne,"△","\\bigtriangleup");k(T,$,Ne,"▽","\\bigtriangledown");k(T,$,Ne,"†","\\dagger");k(T,$,Ne,"⋄","\\diamond");k(T,$,Ne,"⋆","\\star");k(T,$,Ne,"◃","\\triangleleft");k(T,$,Ne,"▹","\\triangleright");k(T,$,ii,"{","\\{");k(ke,$,X,"{","\\{");k(ke,$,X,"{","\\textbraceleft");k(T,$,Ir,"}","\\}");k(ke,$,X,"}","\\}");k(ke,$,X,"}","\\textbraceright");k(T,$,ii,"{","\\lbrace");k(T,$,Ir,"}","\\rbrace");k(T,$,ii,"[","\\lbrack",!0);k(ke,$,X,"[","\\lbrack",!0);k(T,$,Ir,"]","\\rbrack",!0);k(ke,$,X,"]","\\rbrack",!0);k(T,$,ii,"(","\\lparen",!0);k(T,$,Ir,")","\\rparen",!0);k(ke,$,X,"<","\\textless",!0);k(ke,$,X,">","\\textgreater",!0);k(T,$,ii,"⌊","\\lfloor",!0);k(T,$,Ir,"⌋","\\rfloor",!0);k(T,$,ii,"⌈","\\lceil",!0);k(T,$,Ir,"⌉","\\rceil",!0);k(T,$,X,"\\","\\backslash");k(T,$,X,"∣","|");k(T,$,X,"∣","\\vert");k(ke,$,X,"|","\\textbar",!0);k(T,$,X,"∥","\\|");k(T,$,X,"∥","\\Vert");k(ke,$,X,"∥","\\textbardbl");k(ke,$,X,"~","\\textasciitilde");k(ke,$,X,"\\","\\textbackslash");k(ke,$,X,"^","\\textasciicircum");k(T,$,Y,"↑","\\uparrow",!0);k(T,$,Y,"⇑","\\Uparrow",!0);k(T,$,Y,"↓","\\downarrow",!0);k(T,$,Y,"⇓","\\Downarrow",!0);k(T,$,Y,"↕","\\updownarrow",!0);k(T,$,Y,"⇕","\\Updownarrow",!0);k(T,$,On,"∐","\\coprod");k(T,$,On,"⋁","\\bigvee");k(T,$,On,"⋀","\\bigwedge");k(T,$,On,"⨄","\\biguplus");k(T,$,On,"⋂","\\bigcap");k(T,$,On,"⋃","\\bigcup");k(T,$,On,"∫","\\int");k(T,$,On,"∫","\\intop");k(T,$,On,"∬","\\iint");k(T,$,On,"∭","\\iiint");k(T,$,On,"∏","\\prod");k(T,$,On,"∑","\\sum");k(T,$,On,"⨂","\\bigotimes");k(T,$,On,"⨁","\\bigoplus");k(T,$,On,"⨀","\\bigodot");k(T,$,On,"∮","\\oint");k(T,$,On,"∯","\\oiint");k(T,$,On,"∰","\\oiiint");k(T,$,On,"⨆","\\bigsqcup");k(T,$,On,"∫","\\smallint");k(ke,$,Fc,"…","\\textellipsis");k(T,$,Fc,"…","\\mathellipsis");k(ke,$,Fc,"…","\\ldots",!0);k(T,$,Fc,"…","\\ldots",!0);k(T,$,Fc,"⋯","\\@cdots",!0);k(T,$,Fc,"⋱","\\ddots",!0);k(T,$,X,"⋮","\\varvdots");k(ke,$,X,"⋮","\\varvdots");k(T,$,cn,"ˊ","\\acute");k(T,$,cn,"ˋ","\\grave");k(T,$,cn,"¨","\\ddot");k(T,$,cn,"~","\\tilde");k(T,$,cn,"ˉ","\\bar");k(T,$,cn,"˘","\\breve");k(T,$,cn,"ˇ","\\check");k(T,$,cn,"^","\\hat");k(T,$,cn,"⃗","\\vec");k(T,$,cn,"˙","\\dot");k(T,$,cn,"˚","\\mathring");k(T,$,tt,"","\\@imath");k(T,$,tt,"","\\@jmath");k(T,$,X,"ı","ı");k(T,$,X,"ȷ","ȷ");k(ke,$,X,"ı","\\i",!0);k(ke,$,X,"ȷ","\\j",!0);k(ke,$,X,"ß","\\ss",!0);k(ke,$,X,"æ","\\ae",!0);k(ke,$,X,"œ","\\oe",!0);k(ke,$,X,"ø","\\o",!0);k(ke,$,X,"Æ","\\AE",!0);k(ke,$,X,"Œ","\\OE",!0);k(ke,$,X,"Ø","\\O",!0);k(ke,$,cn,"ˊ","\\'");k(ke,$,cn,"ˋ","\\`");k(ke,$,cn,"ˆ","\\^");k(ke,$,cn,"˜","\\~");k(ke,$,cn,"ˉ","\\=");k(ke,$,cn,"˘","\\u");k(ke,$,cn,"˙","\\.");k(ke,$,cn,"¸","\\c");k(ke,$,cn,"˚","\\r");k(ke,$,cn,"ˇ","\\v");k(ke,$,cn,"¨",'\\"');k(ke,$,cn,"˝","\\H");k(ke,$,cn,"◯","\\textcircled");var j9={"--":!0,"---":!0,"``":!0,"''":!0};k(ke,$,X,"–","--",!0);k(ke,$,X,"–","\\textendash");k(ke,$,X,"—","---",!0);k(ke,$,X,"—","\\textemdash");k(ke,$,X,"‘","`",!0);k(ke,$,X,"‘","\\textquoteleft");k(ke,$,X,"’","'",!0);k(ke,$,X,"’","\\textquoteright");k(ke,$,X,"“","``",!0);k(ke,$,X,"“","\\textquotedblleft");k(ke,$,X,"”","''",!0);k(ke,$,X,"”","\\textquotedblright");k(T,$,X,"°","\\degree",!0);k(ke,$,X,"°","\\degree");k(ke,$,X,"°","\\textdegree",!0);k(T,$,X,"£","\\pounds");k(T,$,X,"£","\\mathsterling",!0);k(ke,$,X,"£","\\pounds");k(ke,$,X,"£","\\textsterling",!0);k(T,K,X,"✠","\\maltese");k(ke,K,X,"✠","\\maltese");var O3='0123456789/@."';for(var Lg=0;Lg0)return Fi(s,c,i,n,o.concat(u));if(l){var d,f;if(l==="boldsymbol"){var h=lj(s,i,n,o,r);d=h.fontName,f=[h.fontClass]}else a?(d=U9[l].fontName,f=[l]):(d=Zf(l,n.fontWeight,n.fontShape),f=[l,n.fontWeight,n.fontShape]);if(Zp(s,d,i).metrics)return Fi(s,d,i,n,o.concat(f));if(j9.hasOwnProperty(s)&&d.slice(0,10)==="Typewriter"){for(var p=[],m=0;m{if(Jo(e.classes)!==Jo(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},dj=e=>{for(var t=0;tn&&(n=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},Rr=function(t,n,r,i){var s=new af(t,n,r,i);return M2(s),s},B9=(e,t,n,r)=>new af(e,t,n,r),fj=function(t,n,r){var i=Rr([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=Ie(i.height),i.maxFontSize=1,i},hj=function(t,n,r,i){var s=new A2(t,n,r,i);return M2(s),s},q9=function(t){var n=new of(t);return M2(n),n},pj=function(t,n){return t instanceof of?Rr([],[t],n):t},mj=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,s=i,o=1;o{var n=Rr(["mspace"],[],t),r=hn(e,t);return n.style.marginRight=Ie(r),n},Zf=function(t,n,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var s;return n==="textbf"&&r==="textit"?s="BoldItalic":n==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",i+"-"+s},U9={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},W9={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},yj=function(t,n){var[r,i,s]=W9[t],o=new ea(r),a=new ro([o],{width:Ie(i),height:Ie(s),style:"width:"+Ie(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=B9(["overlay"],[a],n);return l.height=s,l.style.height=Ie(s),l.style.width=Ie(i),l},ie={fontMap:U9,makeSymbol:Fi,mathsym:aj,makeSpan:Rr,makeSvgSpan:B9,makeLineSpan:fj,makeAnchor:hj,makeFragment:q9,wrapFragment:pj,makeVList:gj,makeOrd:cj,makeGlue:vj,staticSvg:yj,svgData:W9,tryCombineChars:dj},dn={number:3,unit:"mu"},ya={number:4,unit:"mu"},As={number:5,unit:"mu"},bj={mord:{mop:dn,mbin:ya,mrel:As,minner:dn},mop:{mord:dn,mop:dn,mrel:As,minner:dn},mbin:{mord:ya,mop:ya,mopen:ya,minner:ya},mrel:{mord:As,mop:As,mopen:As,minner:As},mopen:{},mclose:{mop:dn,mbin:ya,mrel:As,minner:dn},mpunct:{mord:dn,mop:dn,mrel:As,mopen:dn,mclose:dn,mpunct:dn,minner:dn},minner:{mord:dn,mop:dn,mbin:ya,mrel:As,mopen:dn,mpunct:dn,minner:dn}},wj={mord:{mop:dn},mop:{mord:dn,mop:dn},mbin:{},mrel:{},mopen:{},mclose:{mop:dn},mpunct:{},minner:{mop:dn}},G9={},P0={},$0={};function Oe(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:o}=e,a={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l{var g=m.classes[0],y=p.classes[0];g==="mbin"&&xj.includes(y)?m.classes[0]="mord":y==="mbin"&&kj.includes(g)&&(p.classes[0]="mord")},{node:d},f,h),H3(s,(p,m)=>{var g=Yv(m),y=Yv(p),v=g&&y?p.hasClass("mtight")?wj[g][y]:bj[g][y]:null;if(v)return ie.makeGlue(v,c)},{node:d},f,h),s},H3=function e(t,n,r,i,s){i&&t.push(i);for(var o=0;of=>{t.splice(d+1,0,f),o++})(o)}i&&t.pop()},K9=function(t){return t instanceof of||t instanceof A2||t instanceof af&&t.hasClass("enclosing")?t:null},Cj=function e(t,n){var r=K9(t);if(r){var i=r.children;if(i.length){if(n==="right")return e(i[i.length-1],"right");if(n==="left")return e(i[0],"left")}}return t},Yv=function(t,n){return t?(n&&(t=Cj(t,n)),_j[t.classes[0]]||null):null},od=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return io(n.concat(r))},Lt=function(t,n,r){if(!t)return io();if(P0[t.type]){var i=P0[t.type](t,n);if(r&&n.size!==r.size){i=io(n.sizingClasses(r),[i],n);var s=n.sizeMultiplier/r.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new Ce("Got group of unknown type: '"+t.type+"'")};function Yf(e,t){var n=io(["base"],e,t),r=io(["strut"]);return r.style.height=Ie(n.height+n.depth),n.depth&&(r.style.verticalAlign=Ie(-n.depth)),n.children.unshift(r),n}function Qv(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=Kn(e,t,"root"),i;r.length===2&&r[1].hasClass("tag")&&(i=r.pop());for(var s=[],o=[],a=0;a0&&(s.push(Yf(o,t)),o=[]),s.push(r[a]));o.length>0&&s.push(Yf(o,t));var c;n?(c=Yf(Kn(n,t,!0)),c.classes=["tag"],s.push(c)):i&&s.push(i);var u=io(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),c){var d=c.children[0];d.style.height=Ie(u.height+u.depth),u.depth&&(d.style.verticalAlign=Ie(-u.depth))}return u}function Z9(e){return new of(e)}class Gr{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=Jo(this.classes));for(var r=0;r0&&(t+=' class ="'+At.escape(Jo(this.classes))+'"'),t+=">";for(var r=0;r",t}toText(){return this.children.map(t=>t.toText()).join("")}}class hs{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return At.escape(this.toText())}toText(){return this.text}}class Ej{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Ie(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Se={MathNode:Gr,TextNode:hs,SpaceNode:Ej,newDocumentFragment:Z9},Ei=function(t,n,r){return on[n][t]&&on[n][t].replace&&t.charCodeAt(0)!==55349&&!(j9.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=on[n][t].replace),new Se.TextNode(t)},D2=function(t){return t.length===1?t[0]:new Se.MathNode("mrow",t)},R2=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var i=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var s=t.text;if(["\\imath","\\jmath"].includes(s))return null;on[i][s]&&on[i][s].replace&&(s=on[i][s].replace);var o=ie.fontMap[r].fontName;return I2(s,o,i)?ie.fontMap[r].variant:null};function Dg(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof hs&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof hs&&n.text===","}else return!1}var Nr=function(t,n,r){if(t.length===1){var i=nn(t[0],n);return r&&i instanceof Gr&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],o,a=0;a=1&&(o.type==="mn"||Dg(o))){var c=l.children[0];c instanceof Gr&&c.type==="mn"&&(c.children=[...o.children,...c.children],s.pop())}else if(o.type==="mi"&&o.children.length===1){var u=o.children[0];if(u instanceof hs&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof hs&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),o=l}return s},ta=function(t,n,r){return D2(Nr(t,n,r))},nn=function(t,n){if(!t)return new Se.MathNode("mrow");if($0[t.type]){var r=$0[t.type](t,n);return r}else throw new Ce("Got group of unknown type: '"+t.type+"'")};function V3(e,t,n,r,i){var s=Nr(e,n),o;s.length===1&&s[0]instanceof Gr&&["mrow","mtable"].includes(s[0].type)?o=s[0]:o=new Se.MathNode("mrow",s);var a=new Se.MathNode("annotation",[new Se.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var l=new Se.MathNode("semantics",[o,a]),c=new Se.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return ie.makeSpan([u],[c])}var Y9=function(t){return new zs({style:t.displayMode?nt.DISPLAY:nt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Q9=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=ie.makeSpan(r,[t])}return t},Tj=function(t,n,r){var i=Y9(r),s;if(r.output==="mathml")return V3(t,n,i,r.displayMode,!0);if(r.output==="html"){var o=Qv(t,i);s=ie.makeSpan(["katex"],[o])}else{var a=V3(t,n,i,r.displayMode,!1),l=Qv(t,i);s=ie.makeSpan(["katex"],[a,l])}return Q9(s,r)},Lj=function(t,n,r){var i=Y9(r),s=Qv(t,i),o=ie.makeSpan(["katex"],[s]);return Q9(o,r)},Ij={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Aj=function(t){var n=new Se.MathNode("mo",[new Se.TextNode(Ij[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},Mj={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Dj=function(t){return t.type==="ordgroup"?t.body.length:1},Rj=function(t,n){function r(){var a=4e5,l=t.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(l)){var c=t,u=Dj(c.base),d,f,h;if(u>5)l==="widehat"||l==="widecheck"?(d=420,a=2364,h=.42,f=l+"4"):(d=312,a=2340,h=.34,f="tilde4");else{var p=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][p],d=[0,239,300,360,420][p],h=[0,.24,.3,.3,.36,.42][p],f=l+p):(a=[0,600,1033,2339,2340][p],d=[0,260,286,306,312][p],h=[0,.26,.286,.3,.306,.34][p],f="tilde"+p)}var m=new ea(f),g=new ro([m],{width:"100%",height:Ie(h),viewBox:"0 0 "+a+" "+d,preserveAspectRatio:"none"});return{span:ie.makeSvgSpan([],[g],n),minWidth:0,height:h}}else{var y=[],v=Mj[l],[b,_,x]=v,E=x/1e3,M=b.length,S,I;if(M===1){var F=v[3];S=["hide-tail"],I=[F]}else if(M===2)S=["halfarrow-left","halfarrow-right"],I=["xMinYMin","xMaxYMin"];else if(M===3)S=["brace-left","brace-center","brace-right"],I=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+M+" children.");for(var j=0;j0&&(i.style.minWidth=Ie(s)),i},Oj=function(t,n,r,i,s){var o,a=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(o=ie.makeSpan(["stretchy",n],[],s),n==="fbox"){var l=s.color&&s.getColor();l&&(o.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(n)&&c.push(new Kv({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new Kv({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new ro(c,{width:"100%",height:Ie(a)});o=ie.makeSvgSpan([],[u],s)}return o.height=a,o.style.height=Ie(a),o},so={encloseSpan:Oj,mathMLnode:Aj,svgSpan:Rj};function yt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function O2(e){var t=Yp(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Yp(e){return e&&(e.type==="atom"||sj.hasOwnProperty(e.type))?e:null}var P2=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=yt(e.base,"accent"),n=r.base,e.base=n,i=rj(Lt(e,t)),e.base=r):(r=yt(e,"accent"),n=r.base);var s=Lt(n,t.havingCrampedStyle()),o=r.isShifty&&At.isCharacterBox(n),a=0;if(o){var l=At.getBaseElem(n),c=Lt(l,t.havingCrampedStyle());a=R3(c).skew}var u=r.label==="\\c",d=u?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),f;if(r.isStretchy)f=so.svgSpan(r,t),f=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+Ie(2*a)+")",marginLeft:Ie(2*a)}:void 0}]},t);else{var h,p;r.label==="\\vec"?(h=ie.staticSvg("vec",t),p=ie.svgData.vec[1]):(h=ie.makeOrd({mode:r.mode,text:r.label},t,"textord"),h=R3(h),h.italic=0,p=h.width,u&&(d+=h.depth)),f=ie.makeSpan(["accent-body"],[h]);var m=r.label==="\\textcircled";m&&(f.classes.push("accent-full"),d=s.height);var g=a;m||(g-=p/2),f.style.left=Ie(g),r.label==="\\textcircled"&&(f.style.top=".2em"),f=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:f}]},t)}var y=ie.makeSpan(["mord","accent"],[f],t);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},X9=(e,t)=>{var n=e.isStretchy?so.mathMLnode(e.label):new Se.MathNode("mo",[Ei(e.label,e.mode)]),r=new Se.MathNode("mover",[nn(e.base,t),n]);return r.setAttribute("accent","true"),r},Pj=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Oe({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=N0(t[0]),r=!Pj.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:P2,mathmlBuilder:X9});Oe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:P2,mathmlBuilder:X9});Oe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Lt(e.base,t),r=so.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,s=ie.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return ie.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=so.mathMLnode(e.label),r=new Se.MathNode("munder",[nn(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Qf=e=>{var t=new Se.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Oe({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=ie.wrapFragment(Lt(e.body,r,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var o;e.below&&(r=t.havingStyle(n.sub()),o=ie.wrapFragment(Lt(e.below,r,t),t),o.classes.push(s+"-arrow-pad"));var a=so.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*a.height,c=-t.fontMetrics().axisHeight-.5*a.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*a.height+.111;u=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:o,shift:d}]},t)}else u=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:a,shift:l}]},t);return u.children[0].children[0].children[1].classes.push("svg-align"),ie.makeSpan(["mrel","x-arrow"],[u],t)},mathmlBuilder(e,t){var n=so.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=Qf(nn(e.body,t));if(e.below){var s=Qf(nn(e.below,t));r=new Se.MathNode("munderover",[n,s,i])}else r=new Se.MathNode("mover",[n,i])}else if(e.below){var o=Qf(nn(e.below,t));r=new Se.MathNode("munder",[n,o])}else r=Qf(),r=new Se.MathNode("mover",[n,r]);return r}});var $j=ie.makeSpan;function J9(e,t){var n=Kn(e.body,t,!0);return $j([e.mclass],n,t)}function e_(e,t){var n,r=Nr(e.body,t);return e.mclass==="minner"?n=new Se.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new Se.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new Se.MathNode("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Oe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Sn(i),isCharacterBox:At.isCharacterBox(i)}},htmlBuilder:J9,mathmlBuilder:e_});var Qp=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Oe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Qp(t[0]),body:Sn(t[1]),isCharacterBox:At.isCharacterBox(t[1])}}});Oe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],s=t[0],o;r!=="\\stackrel"?o=Qp(i):o="mrel";var a={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Sn(i)},l={type:"supsub",mode:s.mode,base:a,sup:r==="\\underset"?null:s,sub:r==="\\underset"?s:null};return{type:"mclass",mode:n.mode,mclass:o,body:[l],isCharacterBox:At.isCharacterBox(l)}},htmlBuilder:J9,mathmlBuilder:e_});Oe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Qp(t[0]),body:Sn(t[0])}},htmlBuilder(e,t){var n=Kn(e.body,t,!0),r=ie.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=Nr(e.body,t),r=new Se.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Nj={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},z3=()=>({type:"styling",body:[],mode:"math",style:"display"}),j3=e=>e.type==="textord"&&e.text==="@",Fj=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Hj(e,t,n){var r=Nj[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:r,mode:"math",family:"rel"},o=n.callFunction("\\Big",[s],[]),a=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,o,a]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Vj(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Ce("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],s=0;s-1))if("<>AV".indexOf(c)>-1)for(var d=0;d<2;d++){for(var f=!0,h=l+1;hAV=|." after @',o[l]);var p=Hj(c,u,e),m={type:"styling",body:[p],mode:"math",style:"display"};r.push(m),a=z3()}s%2===0?r.push(a):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var g=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:g,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}Oe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=ie.wrapFragment(Lt(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ie(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Se.MathNode("mrow",[nn(e.label,t)]);return n=new Se.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Se.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Oe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=ie.wrapFragment(Lt(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new Se.MathNode("mrow",[nn(e.fragment,t)])}});Oe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=yt(t[0],"ordgroup"),i=r.body,s="",o=0;o=1114111)throw new Ce("\\@char with invalid code point "+s);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:c}}});var t_=(e,t)=>{var n=Kn(e.body,t.withColor(e.color),!1);return ie.makeFragment(n)},n_=(e,t)=>{var n=Nr(e.body,t.withColor(e.color)),r=new Se.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Oe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=yt(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Sn(i)}},htmlBuilder:t_,mathmlBuilder:n_});Oe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=yt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var s=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:s}},htmlBuilder:t_,mathmlBuilder:n_});Oe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:i&&yt(i,"size").value}},htmlBuilder(e,t){var n=ie.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Ie(hn(e.size,t)))),n},mathmlBuilder(e,t){var n=new Se.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Ie(hn(e.size,t)))),n}});var Xv={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},r_=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ce("Expected a control sequence",e);return t},zj=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},i_=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};Oe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Xv[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=Xv[r.text]),yt(t.parseFunction(),"internal");throw new Ce("Invalid token after macro prefix",r)}});Oe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Ce("Expected a control sequence",r);for(var s=0,o,a=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),a[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ce('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Ce('Argument number "'+r.text+'" out of order');s++,a.push([])}else{if(r.text==="EOF")throw new Ce("Expected a macro definition");a[s].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),(n==="\\edef"||n==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:a},n===Xv[n]),{type:"internal",mode:t.mode}}});Oe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=r_(t.gullet.popToken());t.gullet.consumeSpaces();var i=zj(t);return i_(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Oe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=r_(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return i_(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var Eu=function(t,n,r){var i=on.math[t]&&on.math[t].replace,s=I2(i||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},$2=function(t,n,r,i){var s=r.havingBaseStyle(n),o=ie.makeSpan(i.concat(s.sizingClasses(r)),[t],r),a=s.sizeMultiplier/r.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=s.sizeMultiplier,o},s_=function(t,n,r){var i=n.havingBaseStyle(r),s=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ie(s),t.height-=s,t.depth+=s},jj=function(t,n,r,i,s,o){var a=ie.makeSymbol(t,"Main-Regular",s,i),l=$2(a,n,i,o);return r&&s_(l,i,n),l},Bj=function(t,n,r,i){return ie.makeSymbol(t,"Size"+n+"-Regular",r,i)},o_=function(t,n,r,i,s,o){var a=Bj(t,n,s,i),l=$2(ie.makeSpan(["delimsizing","size"+n],[a],i),nt.TEXT,i,o);return r&&s_(l,i,nt.TEXT),l},Rg=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=ie.makeSpan(["delimsizinginner",i],[ie.makeSpan([],[ie.makeSymbol(t,n,r)])]);return{type:"elem",elem:s}},Og=function(t,n,r){var i=fs["Size4-Regular"][t.charCodeAt(0)]?fs["Size4-Regular"][t.charCodeAt(0)][4]:fs["Size1-Regular"][t.charCodeAt(0)][4],s=new ea("inner",Kz(t,Math.round(1e3*n))),o=new ro([s],{width:Ie(i),height:Ie(n),style:"width:"+Ie(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),a=ie.makeSvgSpan([],[o],r);return a.height=n,a.style.height=Ie(n),a.style.width=Ie(i),{type:"elem",elem:a}},Jv=.008,Xf={type:"kern",size:-1*Jv},qj=["|","\\lvert","\\rvert","\\vert"],Uj=["\\|","\\lVert","\\rVert","\\Vert"],a_=function(t,n,r,i,s,o){var a,l,c,u,d="",f=0;a=c=u=t,l=null;var h="Size1-Regular";t==="\\uparrow"?c=u="⏐":t==="\\Uparrow"?c=u="‖":t==="\\downarrow"?a=c="⏐":t==="\\Downarrow"?a=c="‖":t==="\\updownarrow"?(a="\\uparrow",c="⏐",u="\\downarrow"):t==="\\Updownarrow"?(a="\\Uparrow",c="‖",u="\\Downarrow"):qj.includes(t)?(c="∣",d="vert",f=333):Uj.includes(t)?(c="∥",d="doublevert",f=556):t==="["||t==="\\lbrack"?(a="⎡",c="⎢",u="⎣",h="Size4-Regular",d="lbrack",f=667):t==="]"||t==="\\rbrack"?(a="⎤",c="⎥",u="⎦",h="Size4-Regular",d="rbrack",f=667):t==="\\lfloor"||t==="⌊"?(c=a="⎢",u="⎣",h="Size4-Regular",d="lfloor",f=667):t==="\\lceil"||t==="⌈"?(a="⎡",c=u="⎢",h="Size4-Regular",d="lceil",f=667):t==="\\rfloor"||t==="⌋"?(c=a="⎥",u="⎦",h="Size4-Regular",d="rfloor",f=667):t==="\\rceil"||t==="⌉"?(a="⎤",c=u="⎥",h="Size4-Regular",d="rceil",f=667):t==="("||t==="\\lparen"?(a="⎛",c="⎜",u="⎝",h="Size4-Regular",d="lparen",f=875):t===")"||t==="\\rparen"?(a="⎞",c="⎟",u="⎠",h="Size4-Regular",d="rparen",f=875):t==="\\{"||t==="\\lbrace"?(a="⎧",l="⎨",u="⎩",c="⎪",h="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(a="⎫",l="⎬",u="⎭",c="⎪",h="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(a="⎧",u="⎩",c="⎪",h="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(a="⎫",u="⎭",c="⎪",h="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(a="⎧",u="⎭",c="⎪",h="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(a="⎫",u="⎩",c="⎪",h="Size4-Regular");var p=Eu(a,h,s),m=p.height+p.depth,g=Eu(c,h,s),y=g.height+g.depth,v=Eu(u,h,s),b=v.height+v.depth,_=0,x=1;if(l!==null){var E=Eu(l,h,s);_=E.height+E.depth,x=2}var M=m+b+_,S=Math.max(0,Math.ceil((n-M)/(x*y))),I=M+S*x*y,F=i.fontMetrics().axisHeight;r&&(F*=i.sizeMultiplier);var j=I/2-F,P=[];if(d.length>0){var D=I-m-b,C=Math.round(I*1e3),L=Zz(d,Math.round(D*1e3)),R=new ea(d,L),O=(f/1e3).toFixed(3)+"em",V=(C/1e3).toFixed(3)+"em",q=new ro([R],{width:O,height:V,viewBox:"0 0 "+f+" "+C}),Q=ie.makeSvgSpan([],[q],i);Q.height=C/1e3,Q.style.width=O,Q.style.height=V,P.push({type:"elem",elem:Q})}else{if(P.push(Rg(u,h,s)),P.push(Xf),l===null){var te=I-m-b+2*Jv;P.push(Og(c,te,i))}else{var ee=(I-m-b-_)/2+2*Jv;P.push(Og(c,ee,i)),P.push(Xf),P.push(Rg(l,h,s)),P.push(Xf),P.push(Og(c,ee,i))}P.push(Xf),P.push(Rg(a,h,s))}var ne=i.havingBaseStyle(nt.TEXT),Z=ie.makeVList({positionType:"bottom",positionData:j,children:P},ne);return $2(ie.makeSpan(["delimsizing","mult"],[Z],ne),nt.TEXT,i,o)},Pg=80,$g=.08,Ng=function(t,n,r,i,s){var o=Gz(t,i,r),a=new ea(t,o),l=new ro([a],{width:"400em",height:Ie(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return ie.makeSvgSpan(["hide-tail"],[l],s)},Wj=function(t,n){var r=n.havingBaseSizing(),i=d_("\\surd",t*r.sizeMultiplier,u_,r),s=r.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),a,l=0,c=0,u=0,d;return i.type==="small"?(u=1e3+1e3*o+Pg,t<1?s=1:t<1.4&&(s=.7),l=(1+o+$g)/s,c=(1+o)/s,a=Ng("sqrtMain",l,u,o,n),a.style.minWidth="0.853em",d=.833/s):i.type==="large"?(u=(1e3+Pg)*zu[i.size],c=(zu[i.size]+o)/s,l=(zu[i.size]+o+$g)/s,a=Ng("sqrtSize"+i.size,l,u,o,n),a.style.minWidth="1.02em",d=1/s):(l=t+o+$g,c=t+o,u=Math.floor(1e3*t+o)+Pg,a=Ng("sqrtTall",l,u,o,n),a.style.minWidth="0.742em",d=1.056),a.height=c,a.style.height=Ie(l),{span:a,advanceWidth:d,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*s}},l_=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Gj=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],c_=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],zu=[0,1.2,1.8,2.4,3],Kj=function(t,n,r,i,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),l_.includes(t)||c_.includes(t))return o_(t,n,!1,r,i,s);if(Gj.includes(t))return a_(t,zu[n],!1,r,i,s);throw new Ce("Illegal delimiter: '"+t+"'")},Zj=[{type:"small",style:nt.SCRIPTSCRIPT},{type:"small",style:nt.SCRIPT},{type:"small",style:nt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Yj=[{type:"small",style:nt.SCRIPTSCRIPT},{type:"small",style:nt.SCRIPT},{type:"small",style:nt.TEXT},{type:"stack"}],u_=[{type:"small",style:nt.SCRIPTSCRIPT},{type:"small",style:nt.SCRIPT},{type:"small",style:nt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Qj=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},d_=function(t,n,r,i){for(var s=Math.min(2,3-i.style.size),o=s;on)return r[o]}return r[r.length-1]},f_=function(t,n,r,i,s,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var a;c_.includes(t)?a=Zj:l_.includes(t)?a=u_:a=Yj;var l=d_(t,n,a,i);return l.type==="small"?jj(t,l.style,r,i,s,o):l.type==="large"?o_(t,l.size,r,i,s,o):a_(t,n,r,i,s,o)},Xj=function(t,n,r,i,s,o){var a=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(n-a,r+a),d=Math.max(u/500*l,2*u-c);return f_(t,d,!0,i,s,o)},eo={sqrtImage:Wj,sizedDelim:Kj,sizeToMaxHeight:zu,customSizedDelim:f_,leftRightDelim:Xj},B3={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Jj=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Xp(e,t){var n=Yp(e);if(n&&Jj.includes(n.text))return n;throw n?new Ce("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ce("Invalid delimiter type '"+e.type+"'",e)}Oe({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=Xp(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:B3[e.funcName].size,mclass:B3[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?ie.makeSpan([e.mclass]):eo.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Ei(e.delim,e.mode));var n=new Se.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=Ie(eo.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function q3(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Oe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Ce("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Xp(t[0],e).text,color:n}}});Oe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Xp(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=yt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{q3(e);for(var n=Kn(e.body,t,!0,["mopen","mclose"]),r=0,i=0,s=!1,o=0;o{q3(e);var n=Nr(e.body,t);if(e.left!=="."){var r=new Se.MathNode("mo",[Ei(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new Se.MathNode("mo",[Ei(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return D2(n)}});Oe({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Xp(t[0],e);if(!e.parser.leftrightDepth)throw new Ce("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=od(t,[]);else{n=eo.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Ei("|","text"):Ei(e.delim,e.mode),r=new Se.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var N2=(e,t)=>{var n=ie.wrapFragment(Lt(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,s,o=0,a=At.isCharacterBox(e.body);if(r==="sout")s=ie.makeSpan(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=hn({number:.6,unit:"pt"},t),c=hn({number:.35,unit:"ex"},t),u=t.havingBaseSizing();i=i/u.sizeMultiplier;var d=n.height+n.depth+l+c;n.style.paddingLeft=Ie(d/2+l);var f=Math.floor(1e3*d*i),h=Uz(f),p=new ro([new ea("phase",h)],{width:"400em",height:Ie(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=ie.makeSvgSpan(["hide-tail"],[p],t),s.style.height=Ie(d),o=n.depth+l+c}else{/cancel/.test(r)?a||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var m=0,g=0,y=0;/box/.test(r)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(r==="colorbox"?0:y),g=m):r==="angl"?(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*y,g=Math.max(0,.25-n.depth)):(m=a?.2:0,g=m),s=so.encloseSpan(n,r,m,g,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=Ie(y)):r==="angl"&&y!==.049&&(s.style.borderTopWidth=Ie(y),s.style.borderRightWidth=Ie(y)),o=n.depth+g,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var v;if(e.backgroundColor)v=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:n,shift:0}]},t);else{var b=/cancel|phase/.test(r)?["svg-align"]:[];v=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:b}]},t)}return/cancel/.test(r)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(r)&&!a?ie.makeSpan(["mord","cancel-lap"],[v],t):ie.makeSpan(["mord"],[v],t)},F2=(e,t)=>{var n=0,r=new Se.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[nn(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Oe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=yt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,body:o}},htmlBuilder:N2,mathmlBuilder:F2});Oe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=yt(t[0],"color-token").color,o=yt(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,borderColor:s,body:a}},htmlBuilder:N2,mathmlBuilder:F2});Oe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});Oe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:N2,mathmlBuilder:F2});Oe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var h_={};function _s(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:o}=e,a={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new Ce("{"+e.envName+"} can be used only in display mode.")};function H2(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function ca(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:s,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var h=e.gullet.expandMacroAsText("\\arraystretch");if(h==null)o=1;else if(o=parseFloat(h),!o||o<0)throw new Ce("Invalid \\arraystretch: "+h)}e.gullet.beginGroup();var p=[],m=[p],g=[],y=[],v=l!=null?[]:void 0;function b(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function _(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new Xr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(b(),y.push(U3(e));;){var x=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},n&&(x={type:"styling",mode:e.mode,style:n,body:[x]}),p.push(x);var E=e.fetch().text;if(E==="&"){if(d&&p.length===d){if(c||a)throw new Ce("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(E==="\\end"){_(),p.length===1&&x.type==="styling"&&x.body[0].body.length===0&&(m.length>1||!u)&&m.pop(),y.length0&&(b+=.25),c.push({pos:b,isDashed:pt[Re]})}for(_(o[0]),r=0;r0&&(j+=v,Mpt))for(r=0;r=a)){var fe=void 0;(i>0||t.hskipBeforeAndAfter)&&(fe=At.deflt(ee.pregap,f),fe!==0&&(L=ie.makeSpan(["arraycolsep"],[]),L.style.width=Ie(fe),C.push(L)));var oe=[];for(r=0;r0){for(var Te=ie.makeLineSpan("hline",n,u),_e=ie.makeLineSpan("hdashline",n,u),N=[{type:"elem",elem:l,shift:0}];c.length>0;){var Be=c.pop(),je=Be.pos-P;Be.isDashed?N.push({type:"elem",elem:_e,shift:je}):N.push({type:"elem",elem:Te,shift:je})}l=ie.makeVList({positionType:"individualShift",children:N},n)}if(O.length===0)return ie.makeSpan(["mord"],[l],n);var Xe=ie.makeVList({positionType:"individualShift",children:O},n);return Xe=ie.makeSpan(["tag"],[Xe],n),ie.makeFragment([l,Xe])},eB={c:"center ",l:"left ",r:"right "},Es=function(t,n){for(var r=[],i=new Se.MathNode("mtd",[],["mtr-glue"]),s=new Se.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var p=t.cols,m="",g=!1,y=0,v=p.length;p[0].type==="separator"&&(f+="top ",y=1),p[p.length-1].type==="separator"&&(f+="bottom ",v-=1);for(var b=y;b0?"left ":"",f+=S[S.length-1].length>0?"right ":"";for(var I=1;I-1?"alignat":"align",s=t.envName==="split",o=ca(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:H2(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),a,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var u="",d=0;d0&&h&&(g=1),r[p]={type:"align",align:m,pregap:g,postgap:0}}return o.colSeparationType=h?"align":"alignat",o};_s({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Yp(t[0]),r=n?[t[0]]:yt(t[0],"ordgroup").body,i=r.map(function(o){var a=O2(o),l=a.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ce("Unknown column alignment: "+l,o)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return ca(e.parser,s,V2(e.envName))},htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,"lcr".indexOf(n)===-1)throw new Ce("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var s=ca(e.parser,r,V2(e.envName)),o=Math.max(0,...s.body.map(a=>a.length));return s.cols=new Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=ca(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Yp(t[0]),r=n?[t[0]]:yt(t[0],"ordgroup").body,i=r.map(function(o){var a=O2(o),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Ce("Unknown column alignment: "+l,o)});if(i.length>1)throw new Ce("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=ca(e.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new Ce("{subarray} can contain only one column");return s},htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=ca(e.parser,t,V2(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:m_,htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&Jp(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:H2(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ca(e.parser,t,"display")},htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:m_,htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Jp(e);var t={autoTag:H2(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ca(e.parser,t,"display")},htmlBuilder:Cs,mathmlBuilder:Es});_s({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Jp(e),Vj(e.parser)},htmlBuilder:Cs,mathmlBuilder:Es});z("\\nonumber","\\gdef\\@eqnsw{0}");z("\\notag","\\nonumber");Oe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ce(e.funcName+" valid only within array environment")}});var W3=h_;Oe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new Ce("Invalid environment name",i);for(var s="",o=0;o{var n=e.font,r=t.withFont(n);return Lt(e.body,r)},v_=(e,t)=>{var n=e.font,r=t.withFont(n);return nn(e.body,r)},G3={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Oe({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=N0(t[0]),s=r;return s in G3&&(s=G3[s]),{type:"font",mode:n.mode,font:s.slice(1),body:i}},htmlBuilder:g_,mathmlBuilder:v_});Oe({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=At.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Qp(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}});Oe({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:s}=n,o=n.parseExpression(!0,i),a="math"+r.slice(1);return{type:"font",mode:s,font:a,body:{type:"ordgroup",mode:n.mode,body:o}}},htmlBuilder:g_,mathmlBuilder:v_});var y_=(e,t)=>{var n=t;return e==="display"?n=n.id>=nt.SCRIPT.id?n.text():nt.DISPLAY:e==="text"&&n.size===nt.DISPLAY.size?n=nt.TEXT:e==="script"?n=nt.SCRIPT:e==="scriptscript"&&(n=nt.SCRIPTSCRIPT),n},z2=(e,t)=>{var n=y_(e.size,t.style),r=n.fracNum(),i=n.fracDen(),s;s=t.havingStyle(r);var o=Lt(e.numer,s,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?p=3*f:p=7*f,m=t.fontMetrics().denom1):(d>0?(h=t.fontMetrics().num2,p=f):(h=t.fontMetrics().num3,p=3*f),m=t.fontMetrics().denom2);var g;if(u){var v=t.fontMetrics().axisHeight;h-o.depth-(v+.5*d){var n=new Se.MathNode("mfrac",[nn(e.numer,t),nn(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=hn(e.barSize,t);n.setAttribute("linethickness",Ie(r))}var i=y_(e.size,t.style);if(i.size!==t.style.size){n=new Se.MathNode("mstyle",[n]);var s=i.size===nt.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",s),n.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var o=[];if(e.leftDelim!=null){var a=new Se.MathNode("mo",[new Se.TextNode(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),o.push(a)}if(o.push(n),e.rightDelim!=null){var l=new Se.MathNode("mo",[new Se.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return D2(o)}return n};Oe({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1],o,a=null,l=null,c="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,a="(",l=")";break;case"\\\\bracefrac":o=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:s,hasBarLine:o,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:z2,mathmlBuilder:j2});Oe({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Oe({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var K3=["display","text","script","scriptscript"],Z3=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Oe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],s=N0(t[0]),o=s.type==="atom"&&s.family==="open"?Z3(s.text):null,a=N0(t[1]),l=a.type==="atom"&&a.family==="close"?Z3(a.text):null,c=yt(t[2],"size"),u,d=null;c.isBlank?u=!0:(d=c.value,u=d.number>0);var f="auto",h=t[3];if(h.type==="ordgroup"){if(h.body.length>0){var p=yt(h.body[0],"textord");f=K3[Number(p.text)]}}else h=yt(h,"textord"),f=K3[Number(h.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:l,size:f}},htmlBuilder:z2,mathmlBuilder:j2});Oe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:yt(t[0],"size").value,token:i}}});Oe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=Az(yt(t[1],"infix").size),o=t[2],a=s.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:z2,mathmlBuilder:j2});var b_=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?Lt(e.sup,t.havingStyle(n.sup()),t):Lt(e.sub,t.havingStyle(n.sub()),t),i=yt(e.base,"horizBrace")):i=yt(e,"horizBrace");var s=Lt(i.base,t.havingBaseStyle(nt.DISPLAY)),o=so.svgSpan(i,t),a;if(i.isOver?(a=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=ie.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),r){var l=ie.makeSpan(["mord",i.isOver?"mover":"munder"],[a],t);i.isOver?a=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):a=ie.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return ie.makeSpan(["mord",i.isOver?"mover":"munder"],[a],t)},tB=(e,t)=>{var n=so.mathMLnode(e.label);return new Se.MathNode(e.isOver?"mover":"munder",[nn(e.base,t),n])};Oe({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:b_,mathmlBuilder:tB});Oe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=yt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Sn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Kn(e.body,t,!1);return ie.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=ta(e.body,t);return n instanceof Gr||(n=new Gr("mrow",[n])),n.setAttribute("href",e.href),n}});Oe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=yt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:n,funcName:r,token:i}=e,s=yt(t[0],"raw").string,o=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(r){case"\\htmlClass":l.class=s,a={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,a={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,a={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var c=s.split(","),u=0;u{var n=Kn(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=ie.makeSpan(r,n,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&i.setAttribute(s,e.attributes[s]);return i},mathmlBuilder:(e,t)=>ta(e.body,t)});Oe({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Sn(t[0]),mathml:Sn(t[1])}},htmlBuilder:(e,t)=>{var n=Kn(e.html,t,!1);return ie.makeFragment(n)},mathmlBuilder:(e,t)=>ta(e.mathml,t)});var Fg=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Ce("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!F9(r))throw new Ce("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};Oe({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(n[0])for(var l=yt(n[0],"raw").string,c=l.split(","),u=0;u{var n=hn(e.height,t),r=0;e.totalheight.number>0&&(r=hn(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=hn(e.width,t));var s={height:Ie(n+r)};i>0&&(s.width=Ie(i)),r>0&&(s.verticalAlign=Ie(-r));var o=new tj(e.src,e.alt,s);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Se.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=hn(e.height,t),i=0;if(e.totalheight.number>0&&(i=hn(e.totalheight,t)-r,n.setAttribute("valign",Ie(-i))),n.setAttribute("height",Ie(r+i)),e.width.number>0){var s=hn(e.width,t);n.setAttribute("width",Ie(s))}return n.setAttribute("src",e.src),n}});Oe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=yt(t[0],"size");if(n.settings.strict){var s=r[1]==="m",o=i.value.unit==="mu";s?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return ie.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=hn(e.dimension,t);return new Se.SpaceNode(n)}});Oe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=ie.makeSpan([],[Lt(e.body,t)]),n=ie.makeSpan(["inner"],[n],t)):n=ie.makeSpan(["inner"],[Lt(e.body,t)]);var r=ie.makeSpan(["fix"],[]),i=ie.makeSpan([e.alignment],[n,r],t),s=ie.makeSpan(["strut"]);return s.style.height=Ie(i.height+i.depth),i.depth&&(s.style.verticalAlign=Ie(-i.depth)),i.children.unshift(s),i=ie.makeSpan(["thinbox"],[i],t),ie.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new Se.MathNode("mpadded",[nn(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});Oe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var s=n==="\\("?"\\)":"$",o=r.parseExpression(!1,s);return r.expect(s),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:o}}});Oe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Ce("Mismatched "+e.funcName)}});var Y3=(e,t)=>{switch(t.style.size){case nt.DISPLAY.size:return e.display;case nt.TEXT.size:return e.text;case nt.SCRIPT.size:return e.script;case nt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Oe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Sn(t[0]),text:Sn(t[1]),script:Sn(t[2]),scriptscript:Sn(t[3])}},htmlBuilder:(e,t)=>{var n=Y3(e,t),r=Kn(n,t,!1);return ie.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=Y3(e,t);return ta(n,t)}});var w_=(e,t,n,r,i,s,o)=>{e=ie.makeSpan([],[e]);var a=n&&At.isCharacterBox(n),l,c;if(t){var u=Lt(t,r.havingStyle(i.sup()),r);c={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=Lt(n,r.havingStyle(i.sub()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(c&&l){var h=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;f=ie.makeVList({positionType:"bottom",positionData:h,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ie(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ie(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var p=e.height-o;f=ie.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ie(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},r)}else if(c){var m=e.depth+o;f=ie.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ie(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var g=[f];if(l&&s!==0&&!a){var y=ie.makeSpan(["mspace"],[],r);y.style.marginRight=Ie(s),g.unshift(y)}return ie.makeSpan(["mop","op-limits"],g,r)},k_=["\\smallint"],Hc=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=yt(e.base,"op"),i=!0):s=yt(e,"op");var o=t.style,a=!1;o.size===nt.DISPLAY.size&&s.symbol&&!k_.includes(s.name)&&(a=!0);var l;if(s.symbol){var c=a?"Size2-Regular":"Size1-Regular",u="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(u=s.name.slice(1),s.name=u==="oiint"?"\\iint":"\\iiint"),l=ie.makeSymbol(s.name,c,"math",t,["mop","op-symbol",a?"large-op":"small-op"]),u.length>0){var d=l.italic,f=ie.staticSvg(u+"Size"+(a?"2":"1"),t);l=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:f,shift:a?.08:0}]},t),s.name="\\"+u,l.classes.unshift("mop"),l.italic=d}}else if(s.body){var h=Kn(s.body,t,!0);h.length===1&&h[0]instanceof Ci?(l=h[0],l.classes[0]="mop"):l=ie.makeSpan(["mop"],h,t)}else{for(var p=[],m=1;m{var n;if(e.symbol)n=new Gr("mo",[Ei(e.name,e.mode)]),k_.includes(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Gr("mo",Nr(e.body,t));else{n=new Gr("mi",[new hs(e.name.slice(1))]);var r=new Gr("mo",[Ei("⁡","text")]);e.parentIsSupSub?n=new Gr("mrow",[n,r]):n=Z9([n,r])}return n},nB={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Oe({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=nB[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Hc,mathmlBuilder:lf});Oe({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Sn(r)}},htmlBuilder:Hc,mathmlBuilder:lf});var rB={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Oe({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Hc,mathmlBuilder:lf});Oe({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Hc,mathmlBuilder:lf});Oe({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=rB[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Hc,mathmlBuilder:lf});var x_=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=yt(e.base,"operatorname"),i=!0):s=yt(e,"operatorname");var o;if(s.body.length>0){for(var a=s.body.map(d=>{var f=d.text;return typeof f=="string"?{type:"textord",mode:d.mode,text:f}:d}),l=Kn(a,t.withFont("mathrm"),!0),c=0;c{for(var n=Nr(e.body,t.withFont("mathrm")),r=!0,i=0;iu.toText()).join("");n=[new Se.TextNode(a)]}var l=new Se.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new Se.MathNode("mo",[Ei("⁡","text")]);return e.parentIsSupSub?new Se.MathNode("mrow",[l,c]):Se.newDocumentFragment([l,c])};Oe({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Sn(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:x_,mathmlBuilder:iB});z("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");fl({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?ie.makeFragment(Kn(e.body,t,!1)):ie.makeSpan(["mord"],Kn(e.body,t,!0),t)},mathmlBuilder(e,t){return ta(e.body,t,!0)}});Oe({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Lt(e.body,t.havingCrampedStyle()),r=ie.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return ie.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new Se.MathNode("mo",[new Se.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Se.MathNode("mover",[nn(e.body,t),n]);return r.setAttribute("accent","true"),r}});Oe({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Sn(r)}},htmlBuilder:(e,t)=>{var n=Kn(e.body,t.withPhantom(),!1);return ie.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=Nr(e.body,t);return new Se.MathNode("mphantom",n)}});Oe({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ie.makeSpan([],[Lt(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=Nr(Sn(e.body),t),r=new Se.MathNode("mphantom",n),i=new Se.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});Oe({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ie.makeSpan(["inner"],[Lt(e.body,t.withPhantom())]),r=ie.makeSpan(["fix"],[]);return ie.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=Nr(Sn(e.body),t),r=new Se.MathNode("mphantom",n),i=new Se.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}});Oe({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=yt(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Lt(e.body,t),r=hn(e.dy,t);return ie.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new Se.MathNode("mpadded",[nn(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});Oe({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Oe({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],s=yt(t[0],"size"),o=yt(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&yt(i,"size").value,width:s.value,height:o.value}},htmlBuilder(e,t){var n=ie.makeSpan(["mord","rule"],[],t),r=hn(e.width,t),i=hn(e.height,t),s=e.shift?hn(e.shift,t):0;return n.style.borderRightWidth=Ie(r),n.style.borderTopWidth=Ie(i),n.style.bottom=Ie(s),n.width=r,n.height=i+s,n.depth=-s,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=hn(e.width,t),r=hn(e.height,t),i=e.shift?hn(e.shift,t):0,s=t.color&&t.getColor()||"black",o=new Se.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",Ie(n)),o.setAttribute("height",Ie(r));var a=new Se.MathNode("mpadded",[o]);return i>=0?a.setAttribute("height",Ie(i)):(a.setAttribute("height",Ie(i)),a.setAttribute("depth",Ie(-i))),a.setAttribute("voffset",Ie(i)),a}});function S_(e,t,n){for(var r=Kn(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,s=0;s{var n=t.havingSize(e.size);return S_(e.body,n,t)};Oe({type:"sizing",names:Q3,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:Q3.indexOf(r)+1,body:s}},htmlBuilder:sB,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Nr(e.body,n),i=new Se.MathNode("mstyle",r);return i.setAttribute("mathsize",Ie(n.sizeMultiplier)),i}});Oe({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,s=!1,o=n[0]&&yt(n[0],"ordgroup");if(o)for(var a="",l=0;l{var n=ie.makeSpan([],[Lt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new Se.MathNode("mpadded",[nn(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Oe({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:i}},htmlBuilder(e,t){var n=Lt(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=ie.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,s=i;t.style.idn.height+n.depth+o&&(o=(o+d-n.height-n.depth)/2);var f=l.height-n.height-o-c;n.style.paddingLeft=Ie(u);var h=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+f)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var p=t.havingStyle(nt.SCRIPTSCRIPT),m=Lt(e.index,p,t),g=.6*(h.height-h.depth),y=ie.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:m}]},t),v=ie.makeSpan(["root"],[y]);return ie.makeSpan(["mord","sqrt"],[v,h],t)}else return ie.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Se.MathNode("mroot",[nn(n,t),nn(r,t)]):new Se.MathNode("msqrt",[nn(n,t)])}});var X3={display:nt.DISPLAY,text:nt.TEXT,script:nt.SCRIPT,scriptscript:nt.SCRIPTSCRIPT};Oe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:o,body:s}},htmlBuilder(e,t){var n=X3[e.style],r=t.havingStyle(n).withFont("");return S_(e.body,r,t)},mathmlBuilder(e,t){var n=X3[e.style],r=t.havingStyle(n),i=Nr(e.body,r),s=new Se.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=o[e.style];return s.setAttribute("scriptlevel",a[0]),s.setAttribute("displaystyle",a[1]),s}});var oB=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===nt.DISPLAY.size||r.alwaysHandleSupSub);return i?Hc:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===nt.DISPLAY.size||r.limits);return s?x_:null}else{if(r.type==="accent")return At.isCharacterBox(r.base)?P2:null;if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?b_:null}else return null}else return null};fl({type:"supsub",htmlBuilder(e,t){var n=oB(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:s}=e,o=Lt(r,t),a,l,c=t.fontMetrics(),u=0,d=0,f=r&&At.isCharacterBox(r);if(i){var h=t.havingStyle(t.style.sup());a=Lt(i,h,t),f||(u=o.height-h.fontMetrics().supDrop*h.sizeMultiplier/t.sizeMultiplier)}if(s){var p=t.havingStyle(t.style.sub());l=Lt(s,p,t),f||(d=o.depth+p.fontMetrics().subDrop*p.sizeMultiplier/t.sizeMultiplier)}var m;t.style===nt.DISPLAY?m=c.sup1:t.style.cramped?m=c.sup3:m=c.sup2;var g=t.sizeMultiplier,y=Ie(.5/c.ptPerEm/g),v=null;if(l){var b=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof Ci||b)&&(v=Ie(-o.italic))}var _;if(a&&l){u=Math.max(u,m,a.depth+.25*c.xHeight),d=Math.max(d,c.sub2);var x=c.defaultRuleThickness,E=4*x;if(u-a.depth-(l.height-d)0&&(u+=M,d-=M)}var S=[{type:"elem",elem:l,shift:d,marginRight:y,marginLeft:v},{type:"elem",elem:a,shift:-u,marginRight:y}];_=ie.makeVList({positionType:"individualShift",children:S},t)}else if(l){d=Math.max(d,c.sub1,l.height-.8*c.xHeight);var I=[{type:"elem",elem:l,marginLeft:v,marginRight:y}];_=ie.makeVList({positionType:"shift",positionData:d,children:I},t)}else if(a)u=Math.max(u,m,a.depth+.25*c.xHeight),_=ie.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:a,marginRight:y}]},t);else throw new Error("supsub must have either sup or sub.");var F=Yv(o,"right")||"mord";return ie.makeSpan([F],[o,ie.makeSpan(["msupsub"],[_])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[nn(e.base,t)];e.sub&&s.push(nn(e.sub,t)),e.sup&&s.push(nn(e.sup,t));var o;if(n)o=r?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===nt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===nt.DISPLAY||c.limits)?o="munderover":o="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===nt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===nt.DISPLAY)?o="munder":o="msub"}else{var a=e.base;a&&a.type==="op"&&a.limits&&(t.style===nt.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||t.style===nt.DISPLAY)?o="mover":o="msup"}return new Se.MathNode(o,s)}});fl({type:"atom",htmlBuilder(e,t){return ie.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new Se.MathNode("mo",[Ei(e.text,e.mode)]);if(e.family==="bin"){var r=R2(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var __={mi:"italic",mn:"normal",mtext:"normal"};fl({type:"mathord",htmlBuilder(e,t){return ie.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new Se.MathNode("mi",[Ei(e.text,e.mode,t)]),r=R2(e,t)||"italic";return r!==__[n.type]&&n.setAttribute("mathvariant",r),n}});fl({type:"textord",htmlBuilder(e,t){return ie.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=Ei(e.text,e.mode,t),r=R2(e,t)||"normal",i;return e.mode==="text"?i=new Se.MathNode("mtext",[n]):/[0-9]/.test(e.text)?i=new Se.MathNode("mn",[n]):e.text==="\\prime"?i=new Se.MathNode("mo",[n]):i=new Se.MathNode("mi",[n]),r!==__[i.type]&&i.setAttribute("mathvariant",r),i}});var Hg={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Vg={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};fl({type:"spacing",htmlBuilder(e,t){if(Vg.hasOwnProperty(e.text)){var n=Vg[e.text].className||"";if(e.mode==="text"){var r=ie.makeOrd(e,t,"textord");return r.classes.push(n),r}else return ie.makeSpan(["mspace",n],[ie.mathsym(e.text,e.mode,t)],t)}else{if(Hg.hasOwnProperty(e.text))return ie.makeSpan(["mspace",Hg[e.text]],[],t);throw new Ce('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(Vg.hasOwnProperty(e.text))n=new Se.MathNode("mtext",[new Se.TextNode(" ")]);else{if(Hg.hasOwnProperty(e.text))return new Se.MathNode("mspace");throw new Ce('Unknown type of space "'+e.text+'"')}return n}});var J3=()=>{var e=new Se.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};fl({type:"tag",mathmlBuilder(e,t){var n=new Se.MathNode("mtable",[new Se.MathNode("mtr",[J3(),new Se.MathNode("mtd",[ta(e.body,t)]),J3(),new Se.MathNode("mtd",[ta(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var e5={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},t5={"\\textbf":"textbf","\\textmd":"textmd"},aB={"\\textit":"textit","\\textup":"textup"},n5=(e,t)=>{var n=e.font;if(n){if(e5[n])return t.withTextFontFamily(e5[n]);if(t5[n])return t.withTextFontWeight(t5[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(aB[n])};Oe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Sn(i),font:r}},htmlBuilder(e,t){var n=n5(e,t),r=Kn(e.body,n,!0);return ie.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=n5(e,t);return ta(e.body,n)}});Oe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Lt(e.body,t),r=ie.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=ie.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return ie.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new Se.MathNode("mo",[new Se.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Se.MathNode("munder",[nn(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});Oe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Lt(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return ie.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){return new Se.MathNode("mpadded",[nn(e.body,t)],["vcenter"])}});Oe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ce("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=r5(e),r=[],i=t.havingStyle(t.style.text()),s=0;se.body.replace(/ /g,e.star?"␣":" "),Ho=G9,C_=`[ \r ]`,lB="\\\\[a-zA-Z@]+",cB="\\\\[^\uD800-\uDFFF]",uB="("+lB+")"+C_+"*",dB=`\\\\( |[ \r ]+ ?)[ \r ]*`,ey="[̀-ͯ]",fB=new RegExp(ey+"+$"),hB="("+C_+"+)|"+(dB+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ey+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ey+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+uB)+("|"+cB+")");class i5{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(hB,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new Xr("EOF",new Pr(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new Ce("Unexpected character: '"+t[n]+"'",new Xr(t[n],new Pr(this,n,n+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=t.indexOf(` `,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new Xr(i,new Pr(this,n,this.tokenRegex.lastIndex))}}class pB{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ce("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,r){if(r===void 0&&(r=!1),r){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(t)&&(s[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var mB=p_;z("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});z("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});z("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});z("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});z("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});z("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");z("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var s5={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};z("\\char",function(e){var t=e.popToken(),n,r="";if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ce("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=s5[t.text],r==null||r>=n)throw new Ce("Invalid base-"+n+" digit "+t.text);for(var i;(i=s5[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new Ce("\\newcommand's first argument must be a macro name");var s=i[0].text,o=e.isDefined(s);if(o&&!t)throw new Ce("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!n)throw new Ce("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var a=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",c=e.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Ce("Invalid number of arguments: "+l);a=parseInt(l),i=e.consumeArg().tokens}return o&&r||e.macros.set(s,{tokens:i,numArgs:a}),""};z("\\newcommand",e=>B2(e,!1,!0,!1));z("\\renewcommand",e=>B2(e,!0,!1,!1));z("\\providecommand",e=>B2(e,!0,!0,!0));z("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});z("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});z("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Ho[n],on.math[n],on.text[n]),""});z("\\bgroup","{");z("\\egroup","}");z("~","\\nobreakspace");z("\\lq","`");z("\\rq","'");z("\\aa","\\r a");z("\\AA","\\r A");z("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");z("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");z("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");z("ℬ","\\mathscr{B}");z("ℰ","\\mathscr{E}");z("ℱ","\\mathscr{F}");z("ℋ","\\mathscr{H}");z("ℐ","\\mathscr{I}");z("ℒ","\\mathscr{L}");z("ℳ","\\mathscr{M}");z("ℛ","\\mathscr{R}");z("ℭ","\\mathfrak{C}");z("ℌ","\\mathfrak{H}");z("ℨ","\\mathfrak{Z}");z("\\Bbbk","\\Bbb{k}");z("·","\\cdotp");z("\\llap","\\mathllap{\\textrm{#1}}");z("\\rlap","\\mathrlap{\\textrm{#1}}");z("\\clap","\\mathclap{\\textrm{#1}}");z("\\mathstrut","\\vphantom{(}");z("\\underbar","\\underline{\\text{#1}}");z("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');z("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");z("\\ne","\\neq");z("≠","\\neq");z("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");z("∉","\\notin");z("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");z("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");z("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");z("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");z("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");z("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");z("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");z("⟂","\\perp");z("‼","\\mathclose{!\\mkern-0.8mu!}");z("∌","\\notni");z("⌜","\\ulcorner");z("⌝","\\urcorner");z("⌞","\\llcorner");z("⌟","\\lrcorner");z("©","\\copyright");z("®","\\textregistered");z("️","\\textregistered");z("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');z("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');z("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');z("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');z("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");z("⋮","\\vdots");z("\\varGamma","\\mathit{\\Gamma}");z("\\varDelta","\\mathit{\\Delta}");z("\\varTheta","\\mathit{\\Theta}");z("\\varLambda","\\mathit{\\Lambda}");z("\\varXi","\\mathit{\\Xi}");z("\\varPi","\\mathit{\\Pi}");z("\\varSigma","\\mathit{\\Sigma}");z("\\varUpsilon","\\mathit{\\Upsilon}");z("\\varPhi","\\mathit{\\Phi}");z("\\varPsi","\\mathit{\\Psi}");z("\\varOmega","\\mathit{\\Omega}");z("\\substack","\\begin{subarray}{c}#1\\end{subarray}");z("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");z("\\boxed","\\fbox{$\\displaystyle{#1}$}");z("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");z("\\implies","\\DOTSB\\;\\Longrightarrow\\;");z("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");z("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");z("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var o5={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};z("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in o5?t=o5[n]:(n.slice(0,4)==="\\not"||n in on.math&&["bin","rel"].includes(on.math[n].group))&&(t="\\dotsb"),t});var q2={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};z("\\dotso",function(e){var t=e.future().text;return t in q2?"\\ldots\\,":"\\ldots"});z("\\dotsc",function(e){var t=e.future().text;return t in q2&&t!==","?"\\ldots\\,":"\\ldots"});z("\\cdots",function(e){var t=e.future().text;return t in q2?"\\@cdots\\,":"\\@cdots"});z("\\dotsb","\\cdots");z("\\dotsm","\\cdots");z("\\dotsi","\\!\\cdots");z("\\dotsx","\\ldots\\,");z("\\DOTSI","\\relax");z("\\DOTSB","\\relax");z("\\DOTSX","\\relax");z("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");z("\\,","\\tmspace+{3mu}{.1667em}");z("\\thinspace","\\,");z("\\>","\\mskip{4mu}");z("\\:","\\tmspace+{4mu}{.2222em}");z("\\medspace","\\:");z("\\;","\\tmspace+{5mu}{.2777em}");z("\\thickspace","\\;");z("\\!","\\tmspace-{3mu}{.1667em}");z("\\negthinspace","\\!");z("\\negmedspace","\\tmspace-{4mu}{.2222em}");z("\\negthickspace","\\tmspace-{5mu}{.277em}");z("\\enspace","\\kern.5em ");z("\\enskip","\\hskip.5em\\relax");z("\\quad","\\hskip1em\\relax");z("\\qquad","\\hskip2em\\relax");z("\\tag","\\@ifstar\\tag@literal\\tag@paren");z("\\tag@paren","\\tag@literal{({#1})}");z("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ce("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});z("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");z("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");z("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");z("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");z("\\newline","\\\\\\relax");z("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var E_=Ie(fs["Main-Regular"][84][1]-.7*fs["Main-Regular"][65][1]);z("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+E_+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");z("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+E_+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");z("\\hspace","\\@ifstar\\@hspacer\\@hspace");z("\\@hspace","\\hskip #1\\relax");z("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");z("\\ordinarycolon",":");z("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");z("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');z("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');z("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');z("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');z("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');z("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');z("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');z("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');z("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');z("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');z("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');z("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');z("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');z("∷","\\dblcolon");z("∹","\\eqcolon");z("≔","\\coloneqq");z("≕","\\eqqcolon");z("⩴","\\Coloneqq");z("\\ratio","\\vcentcolon");z("\\coloncolon","\\dblcolon");z("\\colonequals","\\coloneqq");z("\\coloncolonequals","\\Coloneqq");z("\\equalscolon","\\eqqcolon");z("\\equalscoloncolon","\\Eqqcolon");z("\\colonminus","\\coloneq");z("\\coloncolonminus","\\Coloneq");z("\\minuscolon","\\eqcolon");z("\\minuscoloncolon","\\Eqcolon");z("\\coloncolonapprox","\\Colonapprox");z("\\coloncolonsim","\\Colonsim");z("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");z("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");z("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");z("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");z("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");z("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");z("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");z("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");z("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");z("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");z("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");z("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");z("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");z("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");z("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");z("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");z("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");z("\\nleqq","\\html@mathml{\\@nleqq}{≰}");z("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");z("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");z("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");z("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");z("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");z("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");z("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");z("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");z("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");z("\\imath","\\html@mathml{\\@imath}{ı}");z("\\jmath","\\html@mathml{\\@jmath}{ȷ}");z("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");z("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");z("⟦","\\llbracket");z("⟧","\\rrbracket");z("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");z("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");z("⦃","\\lBrace");z("⦄","\\rBrace");z("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");z("⦵","\\minuso");z("\\darr","\\downarrow");z("\\dArr","\\Downarrow");z("\\Darr","\\Downarrow");z("\\lang","\\langle");z("\\rang","\\rangle");z("\\uarr","\\uparrow");z("\\uArr","\\Uparrow");z("\\Uarr","\\Uparrow");z("\\N","\\mathbb{N}");z("\\R","\\mathbb{R}");z("\\Z","\\mathbb{Z}");z("\\alef","\\aleph");z("\\alefsym","\\aleph");z("\\Alpha","\\mathrm{A}");z("\\Beta","\\mathrm{B}");z("\\bull","\\bullet");z("\\Chi","\\mathrm{X}");z("\\clubs","\\clubsuit");z("\\cnums","\\mathbb{C}");z("\\Complex","\\mathbb{C}");z("\\Dagger","\\ddagger");z("\\diamonds","\\diamondsuit");z("\\empty","\\emptyset");z("\\Epsilon","\\mathrm{E}");z("\\Eta","\\mathrm{H}");z("\\exist","\\exists");z("\\harr","\\leftrightarrow");z("\\hArr","\\Leftrightarrow");z("\\Harr","\\Leftrightarrow");z("\\hearts","\\heartsuit");z("\\image","\\Im");z("\\infin","\\infty");z("\\Iota","\\mathrm{I}");z("\\isin","\\in");z("\\Kappa","\\mathrm{K}");z("\\larr","\\leftarrow");z("\\lArr","\\Leftarrow");z("\\Larr","\\Leftarrow");z("\\lrarr","\\leftrightarrow");z("\\lrArr","\\Leftrightarrow");z("\\Lrarr","\\Leftrightarrow");z("\\Mu","\\mathrm{M}");z("\\natnums","\\mathbb{N}");z("\\Nu","\\mathrm{N}");z("\\Omicron","\\mathrm{O}");z("\\plusmn","\\pm");z("\\rarr","\\rightarrow");z("\\rArr","\\Rightarrow");z("\\Rarr","\\Rightarrow");z("\\real","\\Re");z("\\reals","\\mathbb{R}");z("\\Reals","\\mathbb{R}");z("\\Rho","\\mathrm{P}");z("\\sdot","\\cdot");z("\\sect","\\S");z("\\spades","\\spadesuit");z("\\sub","\\subset");z("\\sube","\\subseteq");z("\\supe","\\supseteq");z("\\Tau","\\mathrm{T}");z("\\thetasym","\\vartheta");z("\\weierp","\\wp");z("\\Zeta","\\mathrm{Z}");z("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");z("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");z("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");z("\\bra","\\mathinner{\\langle{#1}|}");z("\\ket","\\mathinner{|{#1}\\rangle}");z("\\braket","\\mathinner{\\langle{#1}\\rangle}");z("\\Bra","\\left\\langle#1\\right|");z("\\Ket","\\left|#1\\right\\rangle");var T_=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.consumeArg().tokens,o=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=d=>f=>{e&&(f.macros.set("|",o),i.length&&f.macros.set("\\|",a));var h=d;if(!d&&i.length){var p=f.future();p.text==="|"&&(f.popToken(),h=!0)}return{tokens:h?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...s,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};z("\\bra@ket",T_(!1));z("\\bra@set",T_(!0));z("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");z("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");z("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");z("\\angln","{\\angl n}");z("\\blue","\\textcolor{##6495ed}{#1}");z("\\orange","\\textcolor{##ffa500}{#1}");z("\\pink","\\textcolor{##ff00af}{#1}");z("\\red","\\textcolor{##df0030}{#1}");z("\\green","\\textcolor{##28ae7b}{#1}");z("\\gray","\\textcolor{gray}{#1}");z("\\purple","\\textcolor{##9d38bd}{#1}");z("\\blueA","\\textcolor{##ccfaff}{#1}");z("\\blueB","\\textcolor{##80f6ff}{#1}");z("\\blueC","\\textcolor{##63d9ea}{#1}");z("\\blueD","\\textcolor{##11accd}{#1}");z("\\blueE","\\textcolor{##0c7f99}{#1}");z("\\tealA","\\textcolor{##94fff5}{#1}");z("\\tealB","\\textcolor{##26edd5}{#1}");z("\\tealC","\\textcolor{##01d1c1}{#1}");z("\\tealD","\\textcolor{##01a995}{#1}");z("\\tealE","\\textcolor{##208170}{#1}");z("\\greenA","\\textcolor{##b6ffb0}{#1}");z("\\greenB","\\textcolor{##8af281}{#1}");z("\\greenC","\\textcolor{##74cf70}{#1}");z("\\greenD","\\textcolor{##1fab54}{#1}");z("\\greenE","\\textcolor{##0d923f}{#1}");z("\\goldA","\\textcolor{##ffd0a9}{#1}");z("\\goldB","\\textcolor{##ffbb71}{#1}");z("\\goldC","\\textcolor{##ff9c39}{#1}");z("\\goldD","\\textcolor{##e07d10}{#1}");z("\\goldE","\\textcolor{##a75a05}{#1}");z("\\redA","\\textcolor{##fca9a9}{#1}");z("\\redB","\\textcolor{##ff8482}{#1}");z("\\redC","\\textcolor{##f9685d}{#1}");z("\\redD","\\textcolor{##e84d39}{#1}");z("\\redE","\\textcolor{##bc2612}{#1}");z("\\maroonA","\\textcolor{##ffbde0}{#1}");z("\\maroonB","\\textcolor{##ff92c6}{#1}");z("\\maroonC","\\textcolor{##ed5fa6}{#1}");z("\\maroonD","\\textcolor{##ca337c}{#1}");z("\\maroonE","\\textcolor{##9e034e}{#1}");z("\\purpleA","\\textcolor{##ddd7ff}{#1}");z("\\purpleB","\\textcolor{##c6b9fc}{#1}");z("\\purpleC","\\textcolor{##aa87ff}{#1}");z("\\purpleD","\\textcolor{##7854ab}{#1}");z("\\purpleE","\\textcolor{##543b78}{#1}");z("\\mintA","\\textcolor{##f5f9e8}{#1}");z("\\mintB","\\textcolor{##edf2df}{#1}");z("\\mintC","\\textcolor{##e0e5cc}{#1}");z("\\grayA","\\textcolor{##f6f7f7}{#1}");z("\\grayB","\\textcolor{##f0f1f2}{#1}");z("\\grayC","\\textcolor{##e3e5e6}{#1}");z("\\grayD","\\textcolor{##d6d8da}{#1}");z("\\grayE","\\textcolor{##babec2}{#1}");z("\\grayF","\\textcolor{##888d93}{#1}");z("\\grayG","\\textcolor{##626569}{#1}");z("\\grayH","\\textcolor{##3b3e40}{#1}");z("\\grayI","\\textcolor{##21242c}{#1}");z("\\kaBlue","\\textcolor{##314453}{#1}");z("\\kaGreen","\\textcolor{##71B307}{#1}");var L_={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gB{constructor(t,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new pB(mB,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new i5(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,r,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:n,end:r}=this.consumeArg());return this.pushToken(new Xr("EOF",r.loc)),this.pushTokens(i),new Xr("",Pr.range(n,r))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var i=this.future(),s,o=0,a=0;do{if(s=this.popToken(),n.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new Ce("Extra }",s)}else if(s.text==="EOF")throw new Ce("Unexpected end of input in a macro argument, expected '"+(t&&r?t[a]:"}")+"'",s);if(t&&r)if((o===0||o===1&&t[a]==="{")&&s.text===t[a]){if(++a,a===t.length){n.splice(-a,a);break}}else a=0}while(o!==0||r);return i.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:s}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Ce("The length of delimiters doesn't match the number of args!");for(var r=n[0],i=0;ithis.settings.maxExpand)throw new Ce("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),r=n.text,i=n.noexpand?null:this._getExpansion(r);if(i==null||t&&i.unexpandable){if(t&&i==null&&r[0]==="\\"&&!this.isDefined(r))throw new Ce("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var s=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var a=s.length-1;a>=0;--a){var l=s[a];if(l.text==="#"){if(a===0)throw new Ce("Incomplete placeholder at end of macro body",l);if(l=s[--a],l.text==="#")s.splice(a+1,1);else if(/^[1-9]$/.test(l.text))s.splice(a,2,...o[+l.text-1]);else throw new Ce("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Xr(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),n.push(i)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var i=typeof n=="function"?n(this):n;if(typeof i=="string"){var s=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var a=new i5(i,this.settings),l=[],c=a.lex();c.text!=="EOF";)l.push(c),c=a.lex();l.reverse();var u={tokens:l,numArgs:s};return u}return i}isDefined(t){return this.macros.has(t)||Ho.hasOwnProperty(t)||on.math.hasOwnProperty(t)||on.text.hasOwnProperty(t)||L_.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Ho.hasOwnProperty(t)&&!Ho[t].primitive}}var a5=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Jf=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),zg={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},l5={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class em{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new gB(t,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new Ce("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new Xr("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(em.endOfExpression.indexOf(i.text)!==-1||n&&i.text===n||t&&Ho[i.text]&&Ho[i.text].infix)break;var s=this.parseAtom(n);if(s){if(s.type==="internal")continue}else break;r.push(s)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var a=on[this.mode][n].group,l=Pr.range(t),c;if(ij.hasOwnProperty(a)){var u=a;c={type:"atom",mode:this.mode,family:u,loc:l,text:n}}else c={type:a,mode:this.mode,loc:l,text:n};o=c}else if(n.charCodeAt(0)>=128)this.settings.strict&&(N9(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:Pr.range(t),text:n};else return null;if(this.consume(),s)for(var d=0;dty.renderToString(n.text,{...e,displayMode:n.displayMode})+(t?` `:"")}function EB(e,t){const n=e&&e.nonStandard,r=n?SB:xB;return{name:"inlineKatex",level:"inline",start(i){let s,o=i;for(;o;){if(s=o.indexOf("$"),s===-1)return;if((n?s>-1:s===0||o.charAt(s-1)===" ")&&o.substring(s).match(r))return s;o=o.substring(s+1).replace(/^\$+/,"")}},tokenizer(i,s){const o=i.match(r);if(o)return{type:"inlineKatex",raw:o[0],text:o[2].trim(),displayMode:o[1].length===2}},renderer:t}}function TB(e,t){return{name:"blockKatex",level:"block",tokenizer(n,r){const i=n.match(_B);if(i)return{type:"blockKatex",raw:i[0],text:i[2].trim(),displayMode:i[1].length===2}},renderer:t}}function LB(e={}){const{highlight:t,container:n}=e;return{async:!0,async walkTokens(r){var i;if(r.type!=="code"||typeof t!="function")return;const[s="text",...o]=((i=r.lang)==null?void 0:i.split(" "))??[],{text:a}=r,l=await t(a,s,o),c=n?n.replace("%l",String(s).toUpperCase()).replace("%s",l).replace("%t",a):l;Object.assign(r,{type:"html",block:!0,text:`${c} `})}}}var ny=Object.defineProperty,IB=Object.getOwnPropertyDescriptor,AB=Object.getOwnPropertyNames,MB=Object.prototype.hasOwnProperty,G2=(e,t)=>{let n={};for(var r in e)ny(n,r,{get:e[r],enumerable:!0});return ny(n,Symbol.toStringTag,{value:"Module"}),n},DB=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=AB(t),s=0,o=i.length,a;st[l]).bind(null,a),enumerable:!(r=IB(t,a))||r.enumerable});return e},M_=(e,t,n)=>(DB(e,t,"default"),n);const tm=[{id:"abap",name:"ABAP",import:(()=>A(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>A(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>A(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>A(()=>import("./angular-html-DgL0RwuR.js").then(e=>e.a),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>A(()=>import("./angular-ts-DtEQuh-b.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>A(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>A(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>A(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>A(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>A(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>A(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>A(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>A(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>A(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>A(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>A(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>A(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>A(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>A(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>A(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>A(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>A(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>A(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>A(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>A(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>A(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>A(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>A(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>A(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>A(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>A(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>A(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>A(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>A(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>A(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>A(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>A(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>A(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>A(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>A(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>A(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>A(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>A(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>A(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>A(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>A(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>A(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>A(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>A(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>A(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>A(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>A(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>A(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>A(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>A(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>A(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>A(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>A(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>A(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>A(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>A(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>A(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>A(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>A(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>A(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>A(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>A(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>A(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>A(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>A(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>A(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>A(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>A(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>A(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>A(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>A(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>A(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>A(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>A(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>A(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>A(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>A(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>A(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>A(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>A(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>A(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>A(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>A(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>A(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>A(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>A(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>A(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>A(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>A(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>A(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>A(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>A(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>A(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>A(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>A(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>A(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>A(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>A(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>A(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>A(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>A(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>A(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>A(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>A(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>A(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>A(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>A(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>A(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>A(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>A(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>A(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>A(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>A(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>A(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>A(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>A(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>A(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>A(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>A(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>A(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>A(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>A(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>A(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>A(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>A(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>A(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>A(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>A(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>A(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>A(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>A(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>A(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>A(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>A(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>A(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>A(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>A(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>A(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>A(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>A(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>A(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>A(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>A(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>A(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>A(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>A(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>A(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>A(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>A(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>A(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>A(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>A(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>A(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>A(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>A(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>A(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>A(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>A(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>A(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>A(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>A(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>A(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>A(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>A(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>A(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>A(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>A(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>A(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>A(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>A(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>A(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>A(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>A(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>A(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>A(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>A(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>A(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>A(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>A(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>A(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>A(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>A(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>A(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>A(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>A(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>A(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>A(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>A(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>A(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>A(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>A(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>A(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>A(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>A(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>A(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>A(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>A(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>A(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>A(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>A(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>A(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>A(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>A(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>A(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>A(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>A(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>A(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>A(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>A(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>A(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>A(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>A(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>A(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>A(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>A(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>A(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>A(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>A(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>A(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>A(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>A(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>A(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>A(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>A(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>A(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>A(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>A(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>A(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>A(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>A(()=>import("./zig-VOosw3JB.js"),[]))}],K2=Object.fromEntries(tm.map(e=>[e.id,e.import])),Z2=Object.fromEntries(tm.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Za={...K2,...Z2},Y2=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>A(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>A(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>A(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>A(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>A(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>A(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>A(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>A(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>A(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>A(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>A(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>A(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>A(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>A(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>A(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>A(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>A(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>A(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>A(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>A(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>A(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>A(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>A(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>A(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>A(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>A(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>A(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>A(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>A(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>A(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>A(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>A(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>A(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>A(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>A(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>A(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>A(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>A(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>A(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>A(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>A(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>A(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>A(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>A(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>A(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>A(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>A(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>A(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>A(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>A(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>A(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>A(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>A(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>A(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>A(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>A(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>A(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>A(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>A(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>A(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>A(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>A(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Q2=Object.fromEntries(Y2.map(e=>[e.id,e.import]));var X2=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function RB(){return 2147483648}function OB(){return typeof performance<"u"?performance.now():Date.now()}const PB=(e,t)=>e+(t-e%t)%t;async function $B(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function s(h,p,m){r.HEAPU8.copyWithin(h,p,p+m)}function o(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const p=r.HEAPU8.length;h=h>>>0;const m=RB();if(h>m)return!1;for(let g=1;g<=4;g*=2){let y=p*(1+.2/g);y=Math.min(y,h+100663296);const v=Math.min(m,PB(Math.max(h,y),65536));if(o(v))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(h,p,m=1024){const g=p+m;let y=p;for(;h[y]&&!(y>=g);)++y;if(y-p>16&&h.buffer&&l)return l.decode(h.subarray(p,y));let v="";for(;p>10,56320|E&1023)}}return v}function u(h,p){return h?c(r.HEAPU8,h,p):""}const d={emscripten_get_now:OB,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const p=await e({env:d,wasi_snapshot_preview1:d});t=p.memory,i(t.buffer),Object.assign(r,p),r.UTF8ToString=u}return await f(),r}var NB=Object.defineProperty,FB=(e,t,n)=>t in e?NB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vn=(e,t,n)=>FB(e,typeof t!="symbol"?t+"":t,n);let Yn=null;function HB(e){throw new X2(e.UTF8ToString(e.getLastOnigError()))}class nm{constructor(t){Vn(this,"utf16Length"),Vn(this,"utf8Length"),Vn(this,"utf16Value"),Vn(this,"utf8Value"),Vn(this,"utf16OffsetToUtf8"),Vn(this,"utf8OffsetToUtf16");const n=t.length,r=nm._utf8ByteLength(t),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const a=new Uint8Array(r);let l=0;for(let c=0;c=55296&&u<=56319&&c+1=56320&&h<=57343&&(d=(u-55296<<10)+65536|h-56320,f=!0)}i&&(s[c]=l,f&&(s[c+1]=l),d<=127?o[l+0]=c:d<=2047?(o[l+0]=c,o[l+1]=c):d<=65535?(o[l+0]=c,o[l+1]=c,o[l+2]=c):(o[l+0]=c,o[l+1]=c,o[l+2]=c,o[l+3]=c)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&s<=56319&&r+1=56320&&l<=57343&&(o=(s-55296<<10)+65536|l-56320,a=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const rm=class os{constructor(t){if(Vn(this,"id",++os.LAST_ID),Vn(this,"_onigBinding"),Vn(this,"content"),Vn(this,"utf16Length"),Vn(this,"utf8Length"),Vn(this,"utf16OffsetToUtf8"),Vn(this,"utf8OffsetToUtf16"),Vn(this,"ptr"),!Yn)throw new X2("Must invoke loadWasm first.");this._onigBinding=Yn,this.content=t;const n=new nm(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!os._sharedPtrInUse?(os._sharedPtr||(os._sharedPtr=Yn.omalloc(1e4)),os._sharedPtrInUse=!0,Yn.HEAPU8.set(n.utf8Value,os._sharedPtr),this.ptr=os._sharedPtr):this.ptr=n.createString(Yn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===os._sharedPtr?os._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Vn(rm,"LAST_ID",0);Vn(rm,"_sharedPtr",0);Vn(rm,"_sharedPtrInUse",!1);let D_=rm;class VB{constructor(t){if(Vn(this,"_onigBinding"),Vn(this,"_ptr"),!Yn)throw new X2("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),zB(r)?r=await r.instantiator(n):jB(r)?r=await r.default(n):(BB(r)&&(r=r.data),qB(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await WB(r)(n):r=await GB(r)(n):UB(r)?r=await jg(r)(n):r instanceof WebAssembly.Module?r=await jg(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await jg(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return eh=t(),eh}function jg(e){return t=>WebAssembly.instantiate(e,t)}function WB(e){return t=>WebAssembly.instantiateStreaming(e,t)}function GB(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let R_;function KB(e){R_=e}function ZB(){return R_}async function ew(e){return e&&await J2(e),{createScanner(t){return new VB(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new D_(t)}}}const YB=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:ew,getDefaultWasmLoader:ZB,loadWasm:J2,setDefaultWasmLoader:KB},Symbol.toStringTag,{value:"Module"}));var O_=G2({});M_(O_,YB);var sn=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function QB(e){return tw(e)}function tw(e){return Array.isArray(e)?XB(e):e instanceof RegExp?e:typeof e=="object"?JB(e):e}function XB(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function $_(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?$_(e.substring(0,e.length-1)):e.substr(~t+1)}var Bg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,th=class{static hasCaptures(e){return e===null?!1:(Bg.lastIndex=0,Bg.test(e))}static replaceCaptures(e,t,n){return e.replace(Bg,(r,i,s,o)=>{let a=n[parseInt(i||s,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(o){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function N_(e,t){return et?1:0}function F_(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 i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>eq(e.parent,i.parentScopes));return r?new z_(r.fontStyle,r.foreground,r.background):null}},qg=class r0{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new r0(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!tq(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function tq(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var z_=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function nq(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,s=t.length;i1&&(g=p.slice(0,p.length-1),g.reverse()),n[r++]=new rq(m,g,i,l,c,u)}}return n}var rq=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},fr=(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))(fr||{});function iq(e,t){e.sort((l,c)=>{let u=N_(l.scope,c.scope);return u!==0||(u=F_(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let s=new sq(t),o=new z_(n,s.getId(r),s.getId(i)),a=new aq(new ry(0,null,-1,0,0),[]);for(let l=0,c=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},aq=class iy{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-t.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,s;if(r===-1?(i=t,s=""):(i=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(iy._cmpBySpecificity),n}insert(t,n,r,i,s,o){if(n===""){this._doInsertHere(t,r,i,s,o);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new iy(this._mainRule.clone(),ry.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(t+1,c,r,i,s,o)}_doInsertHere(t,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(t,r,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,s,o,a){let l=di.getLanguageId(t),c=di.getTokenType(t),u=di.containsBalancedBrackets(t)?1:0,d=di.getFontStyle(t),f=di.getForeground(t),h=di.getBackground(t);return n!==0&&(l=n),r!==8&&(c=r),i!==null&&(u=i?1:0),s!==-1&&(d=s),o!==0&&(f=o),a!==0&&(h=a),(l<<0|c<<8|u<<10|d<<11|f<<15|h<<24)>>>0}};function H0(e,t){const n=[],r=lq(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=o();if(n.push({matcher:c,priority:l}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const l=s();return c=>!!l&&!l(c)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(d5(i)){const l=[];do l.push(i),i=r.next();while(d5(i));return c=>t(l,c)}return null}function o(){const l=[];let c=s();for(;c;)l.push(c),c=s();return u=>l.every(d=>d(u))}function a(){const l=[];let c=o();for(;c&&(l.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=o()}return u=>l.some(d=>d(u))}}function d5(e){return!!e&&!!e.match(/[\w\.:]+/)}function lq(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function B_(e){typeof e.dispose=="function"&&e.dispose()}var ad=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},cq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},uq=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},dq=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ad(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new uq;for(const n of e)fq(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof ad){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function fq(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof ad?i0({baseGrammar:s,selfGrammar:i},r):sy(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const o=n.injections(e.scopeName);if(o)for(const a of o)r.add(new ad(a))}function sy(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];V0([r],t,n)}}function i0(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&V0(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&V0(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function V0(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?P_({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&V0(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const o=q_(s);switch(o.kind){case 0:i0({...t,selfGrammar:t.baseGrammar},n);break;case 1:i0(t,n);break;case 2:sy(o.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=o.scopeName===t.selfGrammar.scopeName?t.selfGrammar:o.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};o.kind===4?sy(o.ruleName,l,n):i0(l,n)}else o.kind===4?n.add(new cq(o.scopeName,o.ruleName)):n.add(new ad(o.scopeName));break}}}var hq=class{kind=0},pq=class{kind=1},mq=class{constructor(e){this.ruleName=e}kind=2},gq=class{constructor(e){this.scopeName=e}kind=3},vq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function q_(e){if(e==="$base")return new hq;if(e==="$self")return new pq;const t=e.indexOf("#");if(t===-1)return new gq(e);if(t===0)return new mq(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new vq(n,r)}}var yq=/\\(\d+)/,f5=/\\(\d+)/g,bq=-1,U_=-2;var cf=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=th.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=th.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${$_(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:th.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:th.replaceCaptures(this._contentName,e,t)}},wq=class extends cf{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},kq=class extends cf{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new ld(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new cd,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},h5=class extends cf{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(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new cd,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},oy=class extends cf{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,o,a,l,c){super(e,t,n,r),this._begin=new ld(i,this.id),this.beginCaptures=s,this._end=new ld(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new cd;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},z0=class extends cf{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,o,a,l){super(e,t,n,r),this._begin=new ld(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new ld(o,U_),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new cd;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new cd,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},W_=class cr{static createCaptureRule(t,n,r,i,s){return t.registerRule(o=>new wq(n,o,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new kq(t.$vscodeTextmateLocation,t.id,t.name,t.match,cr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=P_({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new h5(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,cr._compilePatterns(s,n,r))}return t.while?new z0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,cr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,cr._compileCaptures(t.whileCaptures||t.captures,n,r),cr._compilePatterns(t.patterns,n,r)):new oy(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,cr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,cr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,cr._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(const o in t){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in t){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let l=0;t[o].patterns&&(l=cr.getCompiledRuleId(t[o],n,r)),i[a]=cr.createCaptureRule(n,t[o].$vscodeTextmateLocation,t[o].name,t[o].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,o=t.length;st.substring(i.start,i.end));return f5.lastIndex=0,this.source.replace(f5,(i,s)=>H_(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],s,o,a,l;for(s=0,o=this.source.length;sn.source);this._cached=new p5(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new p5(e,r,this._items.map(i=>i.ruleId))}},p5=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Ug(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(ay.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Sq=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>H_(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},m5=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function K_(e,t,n,r,i,s,o,a){const l=t.content.length;let c=!1,u=-1;if(o){const h=_q(e,t,n,r,i,s);i=h.stack,r=h.linePos,n=h.isFirstLine,u=h.anchorPosition}const d=Date.now();for(;!c;){if(a!==0&&Date.now()-d>a)return new m5(i,!0);f()}return new m5(i,!1);function f(){const h=Cq(e,t,n,r,i,u);if(!h){s.produce(i,l),c=!0;return}const p=h.captureIndices,m=h.matchedRuleId,g=p&&p.length>0?p[0].end>r:!1;if(m===bq){const y=i.getRule(e);s.produce(i,p[0].start),i=i.withContentNameScopesList(i.nameScopesList),Tu(e,t,n,i,s,y.endCaptures,p),s.produce(i,p[0].end);const v=i;if(i=i.parent,u=v.getAnchorPos(),!g&&v.getEnterPos()===r){i=v,s.produce(i,l),c=!0;return}}else{const y=e.getRule(m);s.produce(i,p[0].start);const v=i,b=y.getName(t.content,p),_=i.contentNameScopesList.pushAttributed(b,e);if(i=i.push(m,r,u,p[0].end===l,null,_,_),y instanceof oy){const x=y;Tu(e,t,n,i,s,x.beginCaptures,p),s.produce(i,p[0].end),u=p[0].end;const E=x.getContentName(t.content,p),M=_.pushAttributed(E,e);if(i=i.withContentNameScopesList(M),x.endHasBackReferences&&(i=i.withEndRule(x.getEndWithResolvedBackReferences(t.content,p))),!g&&v.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),c=!0;return}}else if(y instanceof z0){const x=y;Tu(e,t,n,i,s,x.beginCaptures,p),s.produce(i,p[0].end),u=p[0].end;const E=x.getContentName(t.content,p),M=_.pushAttributed(E,e);if(i=i.withContentNameScopesList(M),x.whileHasBackReferences&&(i=i.withEndRule(x.getWhileWithResolvedBackReferences(t.content,p))),!g&&v.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),c=!0;return}}else if(Tu(e,t,n,i,s,y.captures,p),s.produce(i,p[0].end),i=i.pop(),!g){i=i.safePop(),s.produce(i,l),c=!0;return}}p[0].end>r&&(r=p[0].end,n=!1)}}function _q(e,t,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const c=l.getRule(e);c instanceof z0&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:c,findOptions:u}=Lq(l.rule,e,l.stack.endRule,n,r===o),d=c.findNextMatchSync(t,r,u);if(d){if(d.ruleId!==U_){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(l.stack,d.captureIndices[0].start),Tu(e,t,n,l.stack,s,l.rule.whileCaptures,d.captureIndices),s.produce(l.stack,d.captureIndices[0].end),o=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Cq(e,t,n,r,i,s){const o=Eq(e,t,n,r,i,s),a=e.getInjections();if(a.length===0)return o;const l=Tq(a,e,t,n,r,i,s);if(!l)return o;if(!o)return l;const c=o.captureIndices[0].start,u=l.captureIndices[0].start;return u=a)&&(a=b,l=v.captureIndices,c=v.ruleId,u=p.priority,a===i))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function Z_(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Lq(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Tu(e,t,n,r,i,s,o){if(s.length===0)return;const a=t.content,l=Math.min(s.length,o.length),c=[],u=o[0].end;for(let d=0;du)break;for(;c.length>0&&c[c.length-1].endPos<=h.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,h.start):i.produce(r,h.start),f.retokenizeCapturedWithRuleId){const m=f.getName(a,o),g=r.contentNameScopesList.pushAttributed(m,e),y=f.getContentName(a,o),v=g.pushAttributed(y,e),b=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,g,v),_=e.createOnigString(a.substring(0,h.end));K_(e,_,n&&h.start===0,h.start,b,i,!1,0),B_(_);continue}const p=f.getName(a,o);if(p!==null){const g=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,e);c.push(new Iq(g,h.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Iq=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Aq(e,t,n,r,i,s,o,a){return new Dq(e,t,n,r,i,s,o,a)}function g5(e,t,n,r,i){const s=H0(t,j0),o=W_.getCompiledRuleId(n,r,i.repository);for(const a of s)e.push({debugSelector:t,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function j0(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var Dq=class{constructor(e,t,n,r,i,s,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new xq(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=v5(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const c=H0(l,j0);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let o in i)g5(t,o,i[o],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const l=a.injectionSelector;l&&g5(t,l,a,this,a)}})}return t.sort((i,s)=>i.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=v5(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=W_.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===ly.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=bc.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=ju.createRootAndLookUpScopeName(f,d,this):h=ju.createRoot("unknown",d),t=new ly(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+` `;const s=this.createOnigString(e),o=s.content.length,a=new Oq(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=K_(this,s,i,0,t,a,!0,r);return B_(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function v5(e,t){return e=QB(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 ju=class as{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const s of n)i=qg.push(i,s.scopeNames),r=new as(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new as(null,new qg(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new qg(null,t),o=r.themeProvider.themeMatch(s),a=as.mergeAttributes(n,i,o);return new as(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return as.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,s=0,o=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,o=r.backgroundId),bc.set(t,n.languageId,n.tokenType,null,i,s,o)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return as._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=as._pushAttributed(i,s,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),s=t.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=as.mergeAttributes(t.tokenAttributes,i,o);return new as(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},ly=class Ia{constructor(t,n,r,i,s,o,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Ia(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Ia._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?ju.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Ia._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,o,a){return new Ia(this,t,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Ia(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=ju.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Ia(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ju.fromExtension(r,n.contentNameScopesList))}},Rq=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):H0(n,j0).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>H0(n,j0).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Oq=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(s)&&(r=bc.set(r,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=bc.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(t,n,r,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,s)}},cy=ly.NULL;function B0(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function jo(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Nq(e){return Array.isArray(e)?e:[e]}async function Y_(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function im(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Q_(e){return e==="ansi"||im(e)}function sm(e){return e==="none"}function X_(e){return sm(e)}const Fq=/(\r?\n)/g;function om(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(Fq);let r=0;const i=[];for(let s=0;s!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?y5.light:y5.dark),n||(n=t.type==="light"?b5.light:b5.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;const s=new Map;function o(a){if(s.has(a))return s.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?o(a):(s.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),c=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!c)return a;const u={...a,settings:{...a.settings}};if(l){const d=o(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,u.settings.foreground=d}if(c){const d=o(a.settings.background);t.colorReplacements[d]=a.settings.background,u.settings.background=d}return u});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=o(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,w5,{enumerable:!1,writable:!1,value:!0}),t}async function J_(e){return[...new Set((await Promise.all(e.filter(t=>!Q_(t)).map(async t=>await Y_(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function eC(e){return(await Promise.all(e.map(async t=>X_(t)?null:am(await Y_(t))))).filter(t=>!!t)}function tC(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new sn(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var Hq=class extends $q{_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(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=am(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=F0.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=tC(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(o=>n.map(([a])=>a).includes(o)):!1).filter(i=>!n.includes(i));throw new sn(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},Vq=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let du=0;function zq(e){du+=1,e.warnings!==!1&&du>=10&&du%10===0&&console.warn(`[Shiki] ${du} 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 sn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(am),i=new Hq(new Vq(e.engine,n),r,n,e.langAlias);let s;function o(v){return tC(v,e.langAlias)}function a(v){g();const b=i.getGrammar(typeof v=="string"?v:v.name);if(!b)throw new sn(`Language \`${v}\` not found, you may need to load it first`);return b}function l(v){if(v==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const b=i.getTheme(v);if(!b)throw new sn(`Theme \`${v}\` not found, you may need to load it first`);return b}function c(v){g();const b=l(v);return s!==v&&(i.setTheme(b),s=v),{theme:b,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...v){g(),i.loadLanguages(v.flat(1))}async function h(...v){return f(await J_(v))}function p(...v){g();for(const b of v.flat(1))i.loadTheme(b)}async function m(...v){return g(),p(await eC(v))}function g(){if(t)throw new sn("Shiki instance has been disposed")}function y(){t||(t=!0,i.dispose(),du-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:h,loadLanguageSync:f,loadTheme:m,loadThemeSync:p,dispose:y,[Symbol.dispose]:y}}async function jq(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([eC(e.themes||[]),J_(e.langs||[]),e.engine]);return zq({...e,themes:t,langs:n,engine:r})}const nC=new WeakMap;function lm(e,t){nC.set(e,t)}function ud(e){return nC.get(e)}var cm=class rC{_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 rC(Object.fromEntries(Nq(n).map(r=>[r,cy])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Bq(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Bq(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const s=i?.nameScopesList?.scopeName;s&&t.push(s),i.parent&&r(i.parent)}return r(e),t}function qq(e,t){if(!(e instanceof cm))throw new sn("Invalid grammar state");return e.getInternalStack(t)}const Uq=/,/,Wq=/ /;function iC(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(im(e.resolveLangAlias(n.lang||"text"))||sm(r))return om(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:s}=e.setTheme(r),o=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new sn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new sn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Kq(t,o,i,s,n)}function Gq(...e){if(e.length===2)return ud(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(im(i)||sm(s))throw new sn("Plain language does not have grammar state");if(i==="ansi")throw new sn("ANSI language does not have grammar state");const{theme:o,colorMap:a}=t.setTheme(s),l=t.getLanguage(i);return new cm(nw(n,l,o,a,r).stateStack,l.name,o.name)}function Kq(e,t,n,r,i){const s=nw(e,t,n,r,i),o=new cm(s.stateStack,t.name,n.name);return lm(s.tokens,o),s.tokens}function nw(e,t,n,r,i){const s=B0(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=om(e);let c=i.grammarState?qq(i.grammarState,n.name)??cy:i.grammarContextCode!=null?nw(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:cy,u=[];const d=[];for(let f=0,h=l.length;f0&&p.length>=o){u=[],d.push([{content:p,offset:m,color:"",fontStyle:0}]);continue}let g,y,v;i.includeExplanation&&(g=t.tokenizeLine(p,c,a),y=g.tokens,v=0);const b=t.tokenizeLine2(p,c,a),_=b.tokens.length/2;for(let x=0;x<_;x++){const E=b.tokens[2*x],M=x+1<_?b.tokens[2*x+2]:p.length;if(E===M)continue;const S=b.tokens[2*x+1],I=jo(r[bc.getForeground(S)],s),F=bc.getFontStyle(S),j={content:p.substring(E,M),offset:m+E,color:I,fontStyle:F};if(i.includeExplanation){const P=[];if(i.includeExplanation!=="scopeName")for(const C of n.settings){let L;switch(typeof C.scope){case"string":L=C.scope.split(Uq).map(R=>R.trim());break;case"object":L=C.scope;break;default:continue}P.push({settings:C,selectors:L.map(R=>R.split(Wq))})}j.explanation=[];let D=0;for(;E+D({scopeName:t}))}function Yq(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)k5(e[r],n[i])&&(r-=1),i-=1;return r===-1}function Xq(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const o of i)if(Qq(o,t,n)){r.push(s);break}return r}function sC(e,t,n,r=iC){const i=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=i.map(c=>{const u=r(e,t,{...n,theme:c.theme});return{tokens:u,state:ud(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),o=Jq(...s.map(c=>c.tokens)),a=o[0].map((c,u)=>c.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),o.forEach((p,m)=>{const{content:g,explanation:y,offset:v,...b}=p[u][f];h.variants[i[m].color]=b}),h})),l=s[0].state?new cm(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return l&&lm(a,l),a}function Jq(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;rl[r]),s=t.map(()=>[]);t.forEach((l,c)=>l.push(s[c]));const o=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(c=>c.content.length));for(let c=0;c4&&n.slice(0,4)==="data"&&sU.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(S5,lU);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!S5.test(s)){let o=s.replace(iU,aU);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=rw}return new i(r,t)}function aU(e){return"-"+e.toLowerCase()}function lU(e){return e.charAt(1).toUpperCase()}const cU=oC([aC,nU,uC,dC,fC],"html"),hC=oC([aC,rU,uC,dC,fC],"svg"),_5={}.hasOwnProperty;function uU(e,t){const n=t||{};function r(i,...s){let o=r.invalid;const a=r.handlers;if(i&&_5.call(i,e)){const l=String(i[e]);o=_5.call(a,l)?a[l]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const dU=/["&'<>`]/g,fU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hU=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,pU=/[|\\{}()[\]^$+*?.]/g,C5=new WeakMap;function mU(e,t){if(e=e.replace(t.subset?gU(t.subset):dU,r),t.subset||t.escapeOnly)return e;return e.replace(fU,n).replace(hU,r);function n(i,s,o){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),t)}function r(i,s,o){return t.format(i.charCodeAt(0),o.charCodeAt(s+1),t)}}function gU(e){let t=C5.get(e);return t||(t=vU(e),C5.set(e,t)),t}function vU(e){const t=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},SU=["cent","copy","divide","gt","lt","not","para","times"],pC={}.hasOwnProperty,hy={};let nh;for(nh in Gg)pC.call(Gg,nh)&&(hy[Gg[nh]]=nh);const _U=/[^\dA-Za-z]/;function CU(e,t,n,r){const i=String.fromCharCode(e);if(pC.call(hy,i)){const s=hy[i],o="&"+s;return n&&xU.includes(s)&&!SU.includes(s)&&(!r||t&&t!==61&&_U.test(String.fromCharCode(t)))?o:o+";"}return""}function EU(e,t,n){let r=bU(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=CU(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=kU(e,t,n.omitOptionalSemicolons);s.length|^->||--!>|"],IU=["<",">"];function AU(e,t,n,r){return r.settings.bogusComments?"":"";function i(s){return rc(s,Object.assign({},r.settings.characterReferences,{subset:IU}))}}function MU(e,t,n,r){return""}function E5(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function DU(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function RU(e){return e.join(" ").trim()}const OU=/[ \t\n\f\r]/g;function iw(e){return typeof e=="object"?e.type==="text"?T5(e.value):!1:T5(e)}function T5(e){return e.replace(OU,"")===""}const Zn=gC(1),mC=gC(-1),PU=[];function gC(e){return t;function t(n,r,i){const s=n?n.children:PU;let o=(r||0)+e,a=s[o];if(!i)for(;a&&iw(a);)o+=e,a=s[o];return a}}const $U={}.hasOwnProperty;function vC(e){return t;function t(n,r,i){return $U.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const sw=vC({body:FU,caption:Kg,colgroup:Kg,dd:jU,dt:zU,head:Kg,html:NU,li:VU,optgroup:BU,option:qU,p:HU,rp:L5,rt:L5,tbody:WU,td:I5,tfoot:GU,th:I5,thead:UU,tr:KU});function Kg(e,t,n){const r=Zn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&iw(r.value.charAt(0)))}function NU(e,t,n){const r=Zn(n,t);return!r||r.type!=="comment"}function FU(e,t,n){const r=Zn(n,t);return!r||r.type!=="comment"}function HU(e,t,n){const r=Zn(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function VU(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function zU(e,t,n){const r=Zn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function jU(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function L5(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function BU(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function qU(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function UU(e,t,n){const r=Zn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function WU(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function GU(e,t,n){return!Zn(n,t)}function KU(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function I5(e,t,n){const r=Zn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ZU=vC({body:XU,colgroup:JU,head:QU,html:YU,tbody:eW});function YU(e){const t=Zn(e,-1);return!t||t.type!=="comment"}function QU(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function XU(e){const t=Zn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&iw(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function JU(e,t,n){const r=mC(n,t),i=Zn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&sw(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function eW(e,t,n){const r=mC(n,t),i=Zn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&sw(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const rh={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 \f\r "&'/<=>\``.split("")]],unquoted:[[` \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function tW(e,t,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let o=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=hC);const c=nW(r,e.properties),u=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,u&&(o=!1),(c||!s||!ZU(e,t,n))&&(a.push("<",e.tagName,c?" "+c:""),o&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(u),!o&&(!s||!sw(e,t,n))&&a.push(""),a.join("")}function nW(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=rW(e,i,t[i]);s&&n.push(s)}}for(;++rE5(n,e.alternative)&&(o=e.alternative),a=o+rc(n,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?rh.single:rh.double)[i][s],attribute:!0}))+o),l+(a&&"="+a))}const iW=["<","&"];function yC(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:rc(e.value,Object.assign({},r.settings.characterReferences,{subset:iW}))}function sW(e,t,n,r){return r.settings.allowDangerousHtml?e.value:yC(e,t,n,r)}function oW(e,t,n,r){return r.all(e)}const aW=uU("type",{invalid:lW,unknown:cW,handlers:{comment:AU,doctype:MU,element:tW,raw:sW,root:oW,text:yC}});function lW(e){throw new Error("Expected node, not `"+e+"`")}function cW(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const uW={},dW={},fW=[];function ys(e,t){const n=t||uW,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:hW,all:pW,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||eU,characterReferences:n.characterReferences||dW,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?hC:cU,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function hW(e,t,n){return aW(e,t,n,this)}function pW(e){const t=[],n=e&&e.children||fW;let r=-1;for(;++ri);function n(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let s=i,o=0;for(const a of t){if(ss&&i[s])}const kW=["color","background-color"];function xW(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return nr-i);return n.length?e.map(r=>r.flatMap(i=>{const s=n.filter(o=>i.offseto-i.offset).sort((o,a)=>o-a);return s.length?xW(i,s):i})):e}function _W(e,t,n,r,i="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(u=>q0(e.variants[u])),a=new Set(o.flatMap(u=>Object.keys(u))),l={},c=(u,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[u]+(d==="color"?"":f)};return o.forEach((u,d)=>{for(const f of a){const h=u[f]||"inherit";if(d===0&&r&&kW.includes(f))if(r==="light-dark()"&&o.length>1){const p=t.findIndex(g=>g==="light"),m=t.findIndex(g=>g==="dark");if(p===-1||m===-1)throw new sn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[f]=`light-dark(${o[p][f]||"inherit"}, ${o[m][f]||"inherit"})`,i==="css-vars"&&(l[c(d,f)]=h)}else l[f]=h;else i==="css-vars"&&(l[c(d,f)]=h)}}),s.htmlStyle=l,s}function q0(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&fr.Italic&&(t["font-style"]="italic"),e.fontStyle&fr.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&fr.Underline&&n.push("underline"),e.fontStyle&fr.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function py(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function CW(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new sn(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{const a=r.lines[o.line];if(a===void 0)throw new sn(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let l=o.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new sn(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:l,offset:r.posToIndex(o.line,l)}}};const r=bW(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:i(o.start),end:i(o.end)}));EW(s),e.set(n.meta,{decorations:s,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return SW(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==r.converter.lines.length)throw new sn(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(u,d,f,h){const p=i[u];let m="",g=-1,y=-1;if(d===0&&(g=0),f===0&&(y=0),f===Number.POSITIVE_INFINITY&&(y=p.children.length),g===-1||y===-1)for(let b=0;bm);return u.tagName=d.tagName||"span",u.properties={...u.properties,...h,class:u.properties.class},d.properties?.class&&bC(u,d.properties.class),u=p(u,f)||u,u}const l=[],c=r.decorations.sort((u,d)=>d.start.offset-u.start.offset||u.end.offset-d.end.offset);for(const u of c){const{start:d,end:f}=u;if(d.line===f.line)s(d.line,d.character,f.character,u);else if(d.lineo(h,u));s(f.line,0,f.character,u)}}l.forEach(u=>u())}}}function EW(e){for(let t=0;tn.end.offset)throw new sn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;rNumber.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function AW(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Zg[r]&&t.push({type:"setDecoration",value:Zg[r]});else if(r<=29){const i=Zg[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Na[r-30]}});else if(r===38){const i=M5(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Na[r-40]}});else if(r===48){const i=M5(e);i&&t.push({type:"setBackgroundColor",value:i})}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:Na[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Na[r-100+8]}})}return t}function MW(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const o=IW(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:e,background:t,decorations:new Set(n)}),o.sequence){const l=AW(o.sequence);for(const c of l)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of l)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}s=o.position}while(sMath.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c{const l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,e.colors?.[l]||$W[a]]}))),o=MW();return i.map(a=>o.parse(a[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?s.value(l.background):e.bg,u=l.foreground?s.value(l.foreground):e.fg):(c=l.foreground?s.value(l.foreground):e.fg,u=l.background?s.value(l.background):void 0),c=jo(c,r),u=jo(u,r),l.decorations.has("dim")&&(c=FW(c));let d=fr.None;return l.decorations.has("bold")&&(d|=fr.Bold),l.decorations.has("italic")&&(d|=fr.Italic),l.decorations.has("underline")&&(d|=fr.Underline),l.decorations.has("strikethrough")&&(d|=fr.Strikethrough),{content:l.value,offset:a[1],color:c,bgColor:u,fontStyle:d}}))}function FW(e){const t=e.match(OW);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],s=r[1],o=r[2],a=r[3];return`#${i}${i}${s}${s}${o}${o}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const i=r[0],s=r[1],o=r[2];return`#${i}${i}${s}${s}${o}${o}80`}}}const n=e.match(PW);return n?`var(${n[1]}-dim)`:e}function my(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!im(r)&&!sm(i)&&r==="ansi"){const{theme:s}=e.setTheme(i);return NW(s,t,n)}return iC(e,t,n)}function W0(e,t,n){let r,i,s,o,a,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,f=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,v)=>y.color===c?-1:v.color===c?1:0);if(f.length===0)throw new sn("`themes` option must not be empty");const h=sC(e,t,n,my);if(l=ud(h),c&&c!=="light-dark()"&&!f.some(y=>y.color===c))throw new sn(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=f.map(y=>e.getTheme(y.theme)),m=f.map(y=>y.color);s=h.map(y=>y.map(v=>_W(v,m,u,c,d))),l&&lm(s,l);const g=f.map(y=>B0(y.theme,n));i=D5(f,p,g,u,c,"fg",d),r=D5(f,p,g,u,c,"bg",d),o=`shiki-themes ${p.map(y=>y.name).join(" ")}`,a=c?void 0:[i,r].join(";")}else if("theme"in n){const c=B0(n.theme,n);s=my(e,t,n);const u=e.getTheme(n.theme);r=jo(u.bg,c),i=jo(u.fg,c),o=u.name,l=ud(s)}else throw new sn("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:a,grammarState:l}}function D5(e,t,n,r,i,s,o){return e.map((a,l)=>{const c=jo(t[l][s],n[l])||"inherit",u=`${r+a.color}${s==="bg"?"-bg":""}:${c}`;if(l===0&&i){if(i==="light-dark()"&&e.length>1){const d=e.findIndex(h=>h.color==="light"),f=e.findIndex(h=>h.color==="dark");if(d===-1||f===-1)throw new sn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${jo(t[d][s],n[d])||"inherit"}, ${jo(t[f][s],n[f])||"inherit"});${u}`}return c}return o==="css-vars"?u:null}).filter(a=>!!a).join(";")}const kC=/^\s+$/,HW=/^(\s*)(.*?)(\s*)$/;function G0(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>G0(e,i,s),codeToTokens:(i,s)=>W0(e,i,s)}){let i=t;for(const p of U0(n))i=p.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:c,grammarState:u}=W0(e,i,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?s=zW(s):d==="never"&&(s=jW(s)),f&&(s=BW(s));const h={...r,get source(){return i}};for(const p of U0(n))s=p.tokens?.call(h,s)||s;return VW(s,{...n,fg:o,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},h,u)}function VW(e,t,n,r=ud(e)){const i=U0(t),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(const[m,g]of Object.entries(t.meta||{}))m.startsWith("_")||(c[m]=g);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:s};const f=[],h={...n,structure:a,addClassToHast:bC,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((m,g)=>{g&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:` `}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},v=0;for(const b of m){let _={type:"element",tagName:"span",properties:{...b.htmlAttrs},children:[{type:"text",value:b.content}]};const x=py(b.htmlStyle||q0(b));x&&(_.properties.style=x);for(const E of i)_=E?.span?.call(h,_,g+1,v,y,b)||_;a==="inline"?o.children.push(_):a==="classic"&&y.children.push(_),v+=b.content.length}if(a==="classic"){for(const b of i)y=b?.line?.call(h,y,g+1)||y;f.push(y),s.push(y)}else a==="inline"&&f.push(y)}),a==="classic"){for(const m of i)d=m?.code?.call(h,d)||d;u.children.push(d);for(const m of i)u=m?.pre?.call(h,u)||u;o.children.push(u)}else if(a==="inline"){const m=[];let g={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const v of o.children)v.type==="element"&&v.tagName==="br"?(m.push(g),g={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(v.type==="element"||v.type==="text")&&g.children.push(v);m.push(g);let y={type:"element",tagName:"code",properties:{},children:m};for(const v of i)y=v?.code?.call(h,y)||y;o.children=[];for(let v=0;v0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const b=y.children[v];b.type==="element"&&o.children.push(...b.children)}}let p=o;for(const m of i)p=m?.root?.call(h,p)||p;return r&&lm(p,r),p}function zW(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((s,o)=>{const a=!(s.fontStyle&&(s.fontStyle&fr.Underline||s.fontStyle&fr.Strikethrough));a&&kC.test(s.content)&&t[o+1]?(i===void 0&&(i=s.offset),r+=s.content):r?(a?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=void 0,r=""):n.push(s)}),n})}function jW(e){return e.map(t=>t.flatMap(n=>{if(kC.test(n.content))return n;const r=n.content.match(HW);if(!r)return n;const[,i,s,o]=r;if(!i&&!o)return n;const a=[{...n,offset:n.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:n.offset}),o&&a.push({content:o,offset:n.offset+i.length+s.length}),a}))}function BW(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n.at(-1),s=py(i.htmlStyle||q0(i)),o=py(r.htmlStyle||q0(r)),a=i.fontStyle&&(i.fontStyle&fr.Underline||i.fontStyle&fr.Strikethrough),l=r.fontStyle&&(r.fontStyle&fr.Underline||r.fontStyle&fr.Strikethrough);!a&&!l&&s===o?i.content+=r.content:n.push({...r})}return n})}const qW=ys;function UW(e,t,n){const r={meta:{},options:n,codeToHast:(s,o)=>G0(e,s,o),codeToTokens:(s,o)=>W0(e,s,o)};let i=qW(G0(e,t,n,r));for(const s of U0(n))i=s.postprocess?.call(r,i,n)||i;return i}async function WW(e){const t=await jq(e);return{getLastGrammarState:(...n)=>Gq(t,...n),codeToTokensBase:(n,r)=>my(t,n,r),codeToTokensWithThemes:(n,r)=>sC(t,n,r),codeToTokens:(n,r)=>W0(t,n,r),codeToHast:(n,r)=>G0(t,n,r),codeToHtml:(n,r)=>UW(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function GW(e){const t=e.langs,n=e.themes,r=e.engine;async function i(s){function o(d){if(typeof d=="string"){if(d=s.langAlias?.[d]||d,Q_(d))return[];const f=t[d];if(!f)throw new sn(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function a(d){if(X_(d))return"none";if(typeof d=="string"){const f=n[d];if(!f)throw new sn(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}const l=(s.themes??[]).map(d=>a(d)),c=(s.langs??[]).map(d=>o(d)),u=await WW({engine:s.engine??r(),...s,themes:l,langs:c});return{...u,loadLanguage(...d){return u.loadLanguage(...d.map(o))},loadTheme(...d){return u.loadTheme(...d.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function KW(e){let t;async function n(r={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{t=e({...r,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function ZW(e,t){const n=KW(e);async function r(i,s){const o=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),a=await t?.guessEmbeddedLanguages?.(i,s.lang,o);return a&&await o.loadLanguage(...a),o}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,s){return(await r(i,s)).codeToHtml(i,s)},async codeToHast(i,s){return(await r(i,s)).codeToHast(i,s)},async codeToTokens(i,s){return(await r(i,s)).codeToTokens(i,s)},async codeToTokensBase(i,s){return(await r(i,s)).codeToTokensBase(i,s)},async codeToTokensWithThemes(i,s){return(await r(i,s)).codeToTokensWithThemes(i,s)},async getLastGrammarState(i,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(i,s)}}}var YW=G2({bundledLanguages:()=>Za,bundledLanguagesAlias:()=>Z2,bundledLanguagesBase:()=>K2,bundledLanguagesInfo:()=>tm,bundledThemes:()=>Q2,bundledThemesInfo:()=>Y2,codeToHast:()=>SC,codeToHtml:()=>xC,codeToTokens:()=>_C,codeToTokensBase:()=>CC,codeToTokensWithThemes:()=>EC,createHighlighter:()=>um,getLastGrammarState:()=>LC,getSingletonHighlighter:()=>TC});const um=GW({langs:Za,themes:Q2,engine:()=>(0,O_.createOnigurumaEngine)(A(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:xC,codeToHast:SC,codeToTokens:_C,codeToTokensBase:CC,codeToTokensWithThemes:EC,getSingletonHighlighter:TC,getLastGrammarState:LC}=ZW(um,{guessEmbeddedLanguages:wW}),R5=4294967295;var QW=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const o=r?.get(s);if(o){if(o instanceof RegExp)return o;if(n)return null;throw o}try{const a=i(s);return r?.set(s,a),a}catch(a){if(r?.set(s,a),n)return null;throw a}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,i=[];function s(o,a,l=0){return{index:o,captureIndices:a.indices.map(c=>c==null?{start:R5,end:R5,length:0}:{start:c[0]+l,end:c[1]+l,length:c[1]-c[0]})}}for(let o=0;oa[1].index));for(const[a,l,c]of i)if(l.index===o)return s(a,l,c)}return null}};function zc(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function XW(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const ow=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),tr=String.raw;function jc(e,t){if(e==null)throw new Error(t??"Value expected");return e}const IC=tr`\[\^?`,AC=`c.? | C(?:-.?)?|${tr`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${tr`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${tr`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${tr`o\{[^\}]*\}?`}|${tr`\d{1,3}`}`,aw=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ih=new RegExp(tr` \\ (?: ${AC} | [gk]<[^>]*>? | [gk]'[^']*'? | . ) | \( (?: \? (?: [:=!>({] | <[=!] | <[^>]*> | '[^']*' | ~\|? | #(?:[^)\\]|\\.?)* | [^:)]*[:)] )? | \*[^\)]*\)? )? | (?:${aw.source})+ | ${IC} | . `.replace(/\s+/g,""),"gsu"),Yg=new RegExp(tr` \\ (?: ${AC} | . ) | \[:(?:\^?\p{Alpha}+|\^):\] | ${IC} | && | . `.replace(/\s+/g,""),"gsu");function JW(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=yG(n.flags),i=[r.extended],s={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:n.rules.singleline};let o=[],a;for(ih.lastIndex=0;a=ih.exec(e);){const d=eG(s,e,a[0],ih.lastIndex);d.tokens?o.push(...d.tokens):d.token&&o.push(d.token),d.lastIndex!==void 0&&(ih.lastIndex=d.lastIndex)}const l=[];let c=0;o.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++c:d.raw==="("&&l.push(d)}),c||l.forEach((d,f)=>{d.kind="capturing",d.number=f+1});const u=c||l.length;return{tokens:o.map(d=>d.type==="EscapedNumber"?wG(d,u):d).flat(),flags:r}}function eG(e,t,n,r){const[i,s]=n;if(n==="["||n==="[^"){const o=tG(t,n,r);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:O5(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:dG(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:DC(n)}}if(s==="K")return{token:RC("keep",n)};if(s==="N"||s==="R")return{token:Fa("newline",n,{negate:s==="N"})};if(s==="O")return{token:Fa("any",n)};if(s==="X")return{token:Fa("text_segment",n)};const o=MC(n,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(i==="("){if(s==="*")return{token:mG(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:pG(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:zl("group",n)};if(n==="(?>")return{token:zl("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?")||n.startsWith("(?'")&&n.endsWith("'"))return{token:zl("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:zl("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:lG(n)}}if(e.getCurrentModX()){if(n==="#"){const o=t.indexOf(` `,r);return{lastIndex:o===-1?t.length:o}}if(/^\s$/.test(n)){const o=/\s+/y;return o.lastIndex=r,{lastIndex:o.exec(t)?o.lastIndex:r}}}if(n===".")return{token:Fa("dot",n)};if(n==="^"||n==="$"){const o=e.singleline?{"^":tr`\A`,$:tr`\Z`}[n]:n;return{token:O5(o,n)}}return n==="|"?{token:rG(n)}:aw.test(n)?{tokens:kG(n)}:{token:Gs(zc(n),n)}}function tG(e,t,n){const r=[P5(t[1]==="^",t)];let i=1,s;for(Yg.lastIndex=n;s=Yg.exec(e);){const o=s[0];if(o[0]==="["&&o[1]!==":")i++,r.push(P5(o[1]==="^",o));else if(o==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Gs(93,o));else if(i--,r.push(iG(o)),!i)break}else{const a=nG(o);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:Yg.lastIndex||e.length}}function nG(e){if(e[0]==="\\")return MC(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?\^?)(?[a-z]+):\]/.exec(e);if(!t||!ow.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Fa("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?sG(e):e==="&&"?oG(e):Gs(zc(e),e)}function MC(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return hG(e);if("dDhHsSwW".includes(n))return gG(e);if(e.startsWith(tr`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return vG(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{const r=e.split(/\\x/).slice(1).map(o=>parseInt(o,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),s=new TextEncoder;return[...i].map(o=>{const a=[...s.encode(o)].map(l=>`\\x${l.toString(16)}`).join("");return Gs(zc(o),a)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Gs(bG(e),e);if($5.has(n))return Gs($5.get(n),e);if(/\d/.test(n))return aG(t,e);if(e==="\\")throw new Error(tr`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Gs(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function rG(e){return{type:"Alternator",raw:e}}function O5(e,t){return{type:"Assertion",kind:e,raw:t}}function DC(e){return{type:"Backreference",raw:e}}function Gs(e,t){return{type:"Character",value:e,raw:t}}function iG(e){return{type:"CharacterClassClose",raw:e}}function sG(e){return{type:"CharacterClassHyphen",raw:e}}function oG(e){return{type:"CharacterClassIntersector",raw:e}}function P5(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Fa(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function RC(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:jc(n.flags),raw:t}}function aG(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function lG(e){return{type:"GroupClose",raw:e}}function zl(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function cG(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function uG(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function dG(e){return{type:"Subroutine",raw:e}}const fG=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),$5=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function hG(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Gs(zc(t.toUpperCase())-64,e)}function pG(e,t){let{on:n,off:r}=/^\(\?(?[imx]*)(?:-(?[-imx]*))?/.exec(e).groups;r??="";const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),s=F5(n),o=F5(r),a={};if(s&&(a.enable=s),o&&(a.disable=o),e.endsWith(")"))return t.replaceCurrentModX(i),RC("flags",e,{flags:a});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,zl("group",e,{...(s||o)&&{flags:a}});throw new Error(`Unexpected flag modifier "${e}"`)}function mG(e){const t=/\(\*(?[A-Za-z_]\w*)?(?:\[(?(?:[A-Za-z_]\w*)?)\])?(?:\{(?[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=i?i.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[o,a,l]=s,c=fG.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof o=="string")throw new Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(s.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return cG(c,r??null,i?.split(",")??null,e)}function N5(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:s}=/^\{(?\d*)(?:,(?\d*))?/.exec(e).groups,o=1e5;if(+i>o||s&&+s>o)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=s===void 0?+i:s===""?1/0:+s,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return uG(t,n,r,e)}function gG(e){const t=e[1].toLowerCase();return Fa({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function vG(e){const{p:t,neg:n,value:r}=/^\\(?

    [pP])\{(?\^?)(?[^}]+)/.exec(e).groups;return Fa("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function F5(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function yG(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function wG(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[DC(n)];const s=[],o=i.match(/^[0-7]+|\d/g);for(let a=0;a127)throw new Error(tr`Octal encoded byte above 177 unsupported "${n}"`)}else c=zc(l);s.push(Gs(c,(a===0?"\\":"")+l))}return s}function kG(e){const t=[],n=new RegExp(aw,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const s=/^\{(?\d+),(?\d+)\}\??$/.exec(i);if(s){const{min:o,max:a}=s.groups;if(+o>+a&&i.endsWith("?")){n.lastIndex--,t.push(N5(i.slice(0,-1)));continue}}}t.push(N5(i))}return t}function OC(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function xG(e){return SG.has(e.type)}const SG=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function PC(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=JW(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(f,h)=>{const p=r.tokens[s.nextIndex];switch(s.parent=f,s.nextIndex++,p.type){case"Alternator":return Ya();case"Assertion":return _G(p);case"Backreference":return CG(p,s);case"Character":return dm(p.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return EG(p,s,h);case"CharacterClassOpen":return TG(p,s,h);case"CharacterSet":return LG(p,s);case"Directive":return OG(p.kind,{flags:p.flags});case"GroupOpen":return IG(p,s,h);case"NamedCallout":return $G(p.kind,p.tag,p.arguments);case"Quantifier":return AG(p,s);case"Subroutine":return MG(p,s);default:throw new Error(`Unexpected token type "${p.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=FG(PG(r.flags));let a=o.body[0];for(;s.nextIndexl.length)throw new Error("Subroutine uses a group number that's not defined");f&&(l[f-1].isSubroutined=!0)}else if(u.has(f)){if(u.get(f).length>1)throw new Error(tr`Subroutine uses a duplicate group name "\g<${f}>"`);u.get(f)[0].isSubroutined=!0}else throw new Error(tr`Subroutine uses a group name that's not defined "\g<${f}>"`);return o}function _G({kind:e}){return gy(jc({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===tr`\B`||e===tr`\Y`})}function CG({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(s,o=!1)=>{const a=t.capturingGroups.length;let l=!1;if(s>a)if(t.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,vy(o?a+1-s:s,{orphan:l})};if(n){const s=/^(?-?)0*(?[1-9]\d*)$/.exec(r);if(s)return i(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return vy(r)}return i(+r)}function EG(e,t,n){const{tokens:r,walk:i}=t,s=t.parent,o=s.body.at(-1),a=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){const l=i(s,{...n,isCheckingRangeEnd:!0});if(o.type==="Character"&&l.type==="Character")return s.body.pop(),RG(o,l);throw new Error("Invalid character class range")}return dm(zc("-"))}function TG({negate:e},t,n){const{tokens:r,walk:i}=t,s=[s0()],o=r[t.nextIndex];let a=z5(o);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")s.push(s0()),t.nextIndex++;else{const c=s.at(-1);c.body.push(i(c,n))}a=z5(r[t.nextIndex],o)}const l=s0({negate:e});return s.length===1?l.body=s[0].body:(l.kind="intersection",l.body=s.map(c=>c.body.length===1?c.body[0]:c)),t.nextIndex++,l}function LG({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o}=r;if(e==="property"){const a=fm(n);if(ow.has(a)&&!o?.has(a))e="posix",n=a;else return jl(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o})}return e==="posix"?NG(n,{negate:t}):yy(e,{negate:t})}function IG(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:o,walk:a}=t,l=HG(e),c=l.type==="AbsenceFunction",u=V5(l),d=u&&l.negate;if(l.type==="CapturingGroup"&&(i.push(l),l.name&&XW(s,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=j5(r[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")l.body.push(Ya()),t.nextIndex++;else{const h=l.body.at(-1),p=a(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(h.body.push(p),(u||n.isInLookbehind)&&!o){const m="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(H5(p)||p.type==="CapturingGroup")throw new Error(m)}else if(H5(p)||V5(p)&&p.negate)throw new Error(m)}}f=j5(r[t.nextIndex])}return t.nextIndex++,l}function AG({kind:e,min:t,max:n},r){const i=r.parent,s=i.body.at(-1);if(!s||!xG(s))throw new Error("Quantifier requires a repeatable token");const o=NC(e,t,n,s);return i.body.pop(),o}function MG({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const s=/^(?[-+]?)0*(?[1-9]\d*)$/.exec(i);if(s){const a=+s.groups.num,l=n.length;if(t.hasNumberedRef=!0,i={"":a,"+":l+a,"-":l+1-a}[s.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const o=FC(i);return r.push(o),o}function DG(e,t){return{type:"AbsenceFunction",kind:e,body:df(t?.body)}}function Ya(e){return{type:"Alternative",body:HC(e?.body)}}function gy(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function vy(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function $C(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!VG(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:df(t?.body)}}function dm(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function s0(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:HC(e?.body)}}function RG(e,t){if(t.valuen)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function FG(e,t){return{type:"Regex",body:df(t?.body),flags:e}}function FC(e){return{type:"Subroutine",ref:e}}function jl(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(fm(e));if(!r){if(n.normalizeUnknownPropertyNames)r=zG(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(tr`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function HG({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return DG("repeater");case"atomic":return zi({atomic:!0});case"capturing":return $C(i,{name:n});case"group":return zi({flags:e});case"lookahead":case"lookbehind":return Ra({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function df(e){if(e===void 0)e=[Ya()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function HC(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function H5(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function V5(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function VG(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function zG(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function fm(e){return e.replace(/[- _]+/g,"").toLowerCase()}function z5(e,t){const n=t;return jc(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function j5(e){return jc(e,"Unclosed group")}function Bu(e,t,n=null){function r(s,o){for(let a=0;aA-Za-z\-]|<[=!]|\(DEFINE\))`;function BG(e,t){for(let n=0;n=t&&e[n]++}function qG(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const vi=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function lw(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let o=0,a="";for(const l of e.matchAll(i)){const{0:c,groups:{$skip:u}}=l;if(!u&&(!r||r===vi.DEFAULT==!o)){n instanceof Function?a+=n(l,{context:o?vi.CHAR_CLASS:vi.DEFAULT,negated:s[s.length-1]}):a+=n;continue}c[0]==="["?(o++,s.push(c[1]==="^")):c==="]"&&o&&(o--,s.pop()),a+=c}return a}function VC(e,t,n,r){lw(e,t,n,r)}function UG(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let s=0,o;for(;o=i.exec(e);){const{0:a,groups:{$skip:l}}=o;if(!l&&(!r||r===vi.DEFAULT==!s))return o;a==="["?s++:a==="]"&&s&&s--,i.lastIndex==o.index&&i.lastIndex++}return null}function oh(e,t,n){return!!UG(e,t,0,n)}function WG(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,s=1,o;for(;o=n.exec(e);){const[a]=o;if(a==="[")i++;else if(i)a==="]"&&i--;else if(a==="(")s++;else if(a===")"&&(s--,!s)){r=o.index;break}}return e.slice(t,r)}const B5=new RegExp(String.raw`(?${jG})|(?\((?:\?<[^>]+>)?)|\\?.`,"gsu");function GG(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",s="(?:(?=(",o=[0],a=[];let l=0,c=0,u=NaN,d;do{d=!1;let f=0,h=0,p=!1,m;for(B5.lastIndex=Number.isNaN(u)?0:u+s.length;m=B5.exec(e);){const{0:g,index:y,groups:{capturingStart:v,noncapturingStart:b}}=m;if(g==="[")f++;else if(f)g==="]"&&f--;else if(g===i&&!p)u=y,p=!0;else if(p&&b)h++;else if(v)p?h++:(l++,o.push(l+c));else if(g===")"&&p){if(!h){c++;const _=l+c;if(e=`${e.slice(0,u)}${s}${e.slice(u+i.length,y)}))<$$${_}>)${e.slice(y+1)}`,d=!0,a.push(_),BG(n,_),r.size){const x=new Map;r.forEach((E,M)=>{x.set(M>=_?M+1:M,E.map(S=>S>=_?S+1:S))}),r=x}break}h--}}}while(d);return n.push(...a),e=lw(e,String.raw`\\(?[1-9]\d*)|<\$\$(?\d+)>`,({0:f,groups:{backrefNum:h,wrappedBackrefNum:p}})=>{if(h){const m=+h;if(m>o.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${o[m]}`}return`\\${p}`},vi.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const zC=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Qg=new RegExp(String.raw` \\(?: \d+ | c[A-Za-z] | [gk]<[^>]+> | [pPu]\{[^\}]+\} | u[A-Fa-f\d]{4} | x[A-Fa-f\d]{2} ) | \((?: \? (?: [:=!>] | <(?:[=!]|[^>]+>) | [A-Za-z\-]+: | \(DEFINE\) ))? | (?${zC})(?[?+]?)(?[?*+\{]?) | \\?. `.replace(/\s+/g,""),"gsu");function KG(e){if(!new RegExp(`${zC}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",s=0,o;for(Qg.lastIndex=0;o=Qg.exec(e);){const{0:a,index:l,groups:{qBase:c,qMod:u,invalidQ:d}}=o;if(a==="[")s||(r=l),s++;else if(a==="]")s?s--:r=null;else if(!s)if(u==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${a}"`);let f=-1;if(/^\{\d+\}$/.test(c))e=qG(e,l+c.length,u,"");else{if(i===")"||i==="]"){const h=i===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,h)}(?>${e.slice(h,l)}${c})${e.slice(l+a.length)}`}else e=`${e.slice(0,l-i.length)}(?>${i}${c})${e.slice(l+a.length)}`;f+=4}Qg.lastIndex+=f}else a[0]==="("?t.push(l):a===")"&&(n=t.length?t.pop():null);i=a}return{pattern:e}}const mi=String.raw,ZG=mi`\\g<(?[^>&]+)&R=(?[^>]+)>`,by=mi`\(\?R=(?[^\)]+)\)|${ZG}`,hm=mi`\(\?<(?![=!])(?[^>]+)>`,jC=mi`${hm}|(?\()(?!\?)`,ba=new RegExp(mi`${hm}|${by}|\(\?|\\?.`,"gsu"),Xg="Cannot use multiple overlapping recursions";function YG(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=t?.captureTransfers??new Map;if(!new RegExp(by,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&oh(e,mi`\(\?\(DEFINE\)`,vi.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],o=oh(e,mi`\\[1-9]`,vi.DEFAULT),a=new Map,l=[];let c=!1,u=0,d=0,f;for(ba.lastIndex=0;f=ba.exec(e);){const{0:h,groups:{captureName:p,rDepth:m,gRNameOrNum:g,gRDepth:y}}=f;if(h==="[")u++;else if(u)h==="]"&&u--;else if(m){if(q5(m),c)throw new Error(Xg);if(o)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const v=e.slice(0,f.index),b=e.slice(ba.lastIndex);if(oh(b,by,vi.DEFAULT))throw new Error(Xg);const _=+m-1;e=U5(v,b,_,!1,n,s,d),i=G5(i,v,_,s.length,0,d);break}else if(g){q5(y);let v=!1;for(const P of l)if(P.name===g||P.num===+g){if(v=!0,P.hasRecursedWithin)throw new Error(Xg);break}if(!v)throw new Error(mi`Recursive \g cannot be used outside the referenced group "${r==="external"?g:mi`\g<${g}&R=${y}>`}"`);const b=a.get(g),_=WG(e,b);if(o&&oh(_,mi`${hm}|\((?!\?)`,vi.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const x=e.slice(b,f.index),E=_.slice(x.length+h.length),M=s.length,S=+y-1,I=U5(x,E,S,!0,n,s,d);i=G5(i,x,S,s.length-M,M,d);const F=e.slice(0,b),j=e.slice(b+_.length);e=`${F}${I}${j}`,ba.lastIndex+=I.length-h.length-x.length-E.length,l.forEach(P=>P.hasRecursedWithin=!0),c=!0}else if(p)d++,a.set(String(d),ba.lastIndex),a.set(p,ba.lastIndex),l.push({num:d,name:p});else if(h[0]==="("){const v=h==="(";v&&(d++,a.set(String(d),ba.lastIndex)),l.push(v?{num:d}:{})}else h===")"&&l.pop()}return n.push(...s),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function q5(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function U5(e,t,n,r,i,s,o){const a=new Set;r&&VC(e+t,hm,({groups:{captureName:c}})=>{a.add(c)},vi.DEFAULT);const l=[n,r?a:null,i,s,o];return`${e}${W5(`(?:${e}`,"forward",...l)}(?:)${W5(`${t})`,"backward",...l)}${t}`}function W5(e,t,n,r,i,s,o){const l=u=>t==="forward"?u+2:n-u+2-1;let c="";for(let u=0;u[^>]+)>`,({0:f,groups:{captureName:h,unnamed:p,backref:m}})=>{if(m&&r&&!r.has(m))return f;const g=`_$${d}`;if(p||h){const y=o+s.length+1;return s.push(y),QG(i,y),p?f:`(?<${h}${g}>`}return mi`\k<${m}${g}>`},vi.DEFAULT)}return c}function QG(e,t){for(let n=0;n=t&&e[n]++}function G5(e,t,n,r,i,s){if(e.size&&r){let o=0;VC(t,jC,()=>o++,vi.DEFAULT);const a=s-o+i,l=new Map;return e.forEach((c,u)=>{const d=(r-o*n)/n,f=o*n,h=u>a+o?u+r:u,p=[];for(const m of c)if(m<=a)p.push(m);else if(m>a+o+d)p.push(m+r);else if(m<=a+o)for(let g=0;g<=n;g++)p.push(m+o*g);else for(let g=0;g<=n;g++)p.push(m+f+d*g);l.set(h,p)}),l}return e}var zn=String.fromCodePoint,ht=String.raw,Ui={},pm=globalThis.RegExp;Ui.flagGroups=(()=>{try{new pm("(?i:)")}catch{return!1}return!0})();Ui.unicodeSets=(()=>{try{new pm("[[]]","v")}catch{return!1}return!0})();Ui.bugFlagVLiteralHyphenIsRange=Ui.unicodeSets?(()=>{try{new pm(ht`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Ui.bugNestedClassIgnoresNegation=Ui.unicodeSets&&new pm("[[^a]]","v").test("a");function K0(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function dd(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function wy(e,t){return K5[e]>=K5[t]}function XG(e,t){if(e==null)throw new Error(t??"Value expected");return e}var K5={ES2025:2025,ES2024:2024,ES2018:2018},JG={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function BC(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!JG[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Ui.flagGroups?"ES2025":Ui.unicodeSets?"ES2024":"ES2018"),t}var eK="[ -\r ]",tK=new Set([zn(304),zn(305)]),Ms=ht`[\p{L}\p{M}\p{N}\p{Pc}]`;function qC(e){if(tK.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=iK.get(n),s=nK.get(n),o=rK.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),s&&t.add(s),[...t]}var cw=new Map(`C Other Cc Control cntrl Cf Format Cn Unassigned Co Private_Use Cs Surrogate L Letter LC Cased_Letter Ll Lowercase_Letter Lm Modifier_Letter Lo Other_Letter Lt Titlecase_Letter Lu Uppercase_Letter M Mark Combining_Mark Mc Spacing_Mark Me Enclosing_Mark Mn Nonspacing_Mark N Number Nd Decimal_Number digit Nl Letter_Number No Other_Number P Punctuation punct Pc Connector_Punctuation Pd Dash_Punctuation Pe Close_Punctuation Pf Final_Punctuation Pi Initial_Punctuation Po Other_Punctuation Ps Open_Punctuation S Symbol Sc Currency_Symbol Sk Modifier_Symbol Sm Math_Symbol So Other_Symbol Z Separator Zl Line_Separator Zp Paragraph_Separator Zs Space_Separator ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component EComp Emoji_Modifier EMod Emoji_Modifier_Base EBase Emoji_Presentation EPres Extended_Pictographic ExtPict Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`.split(/\s/).map(e=>[fm(e),e])),nK=new Map([["s",zn(383)],[zn(383),"s"]]),rK=new Map([[zn(223),zn(7838)],[zn(107),zn(8490)],[zn(229),zn(8491)],[zn(969),zn(8486)]]),iK=new Map([Io(453),Io(456),Io(459),Io(498),...Jg(8072,8079),...Jg(8088,8095),...Jg(8104,8111),Io(8124),Io(8140),Io(8188)]),sK=new Map([["alnum",ht`[\p{Alpha}\p{Nd}]`],["alpha",ht`\p{Alpha}`],["ascii",ht`\p{ASCII}`],["blank",ht`[\p{Zs}\t]`],["cntrl",ht`\p{Cc}`],["digit",ht`\p{Nd}`],["graph",ht`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ht`\p{Lower}`],["print",ht`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ht`[\p{P}\p{S}]`],["space",ht`\p{space}`],["upper",ht`\p{Upper}`],["word",ht`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ht`\p{AHex}`]]);function oK(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Io(e){const t=zn(e);return[t.toLowerCase(),t]}function Jg(e,t){return oK(e,t).map(n=>Io(n))}var UC=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function aK(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};WC(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:wy(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Bu(e,lK,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Bu(e,cK,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Bu(e,uK,o),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var lK={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const s=zi();s.body[0].body.push(Ra({negate:!0,body:r}),jl("Any"));const o=zi();o.body[0].body.push(NC("greedy",0,1/0,s)),n(yn(o,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(s=>s.kind==="flags");for(let s=n+1;s\r\n|${i?ht`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(l==="hex")n(Ao(jl("AHex",{negate:c}),t));else if(l==="newline")n(yn(Ds(c?`[^ ]`:`(?>\r ?|[ \v\f…\u2028\u2029])`),t));else if(l==="posix")if(!i&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[u];c&&(d=`\0-${zn(d.codePointAt(0)-1)}${zn(d.codePointAt(2)+1)}-􏿿`),n(yn(Ds(`[${d}]`),t))}else n(yn(n1(Ds(sK.get(u)),c),t));else if(l==="property")cw.has(fm(u))||(e.key="sc");else if(l==="space")n(Ao(jl("space",{negate:c}),t));else if(l==="word")n(yn(n1(Ds(Ms),c),t));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:o}){const{kind:a,flags:l}=e;if(a==="flags")if(!l.enable&&!l.disable)r();else{const c=zi({flags:l});c.body[0].body=o(),i(yn(c,t),{traverse:!0})}else if(a==="keep"){const c=n.body[0],d=n.body.length===1&&OC(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(ht`Uses "\K" in a way that's unsupported`);const f=Ra({behind:!0});f.body[0].body=s(),i(yn(f,t))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(yn(Ra({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=zi();t.body[0].body.push(e.body),e.body=yn(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const o=YC(s.body);o?(r=!0,Array.isArray(o)?n.push(...o):n.push(o)):i=!0}r&&!i&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(ht`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!t1(n)&&(n=e1(n,t),e.ref=n)}},cK={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:a,reffedNodesByReferencer:l}){const c=i.get(e);if(c&&a.has(e.number)){const d=Ao(Z5(e.number),t);l.set(d,a.get(e.number)),n(d);return}a.set(e.number,e),o.set(e.number,[]),e.name&&dd(o,e.name,[]);const u=o.get(e.name??e.number);for(let d=0;df.type==="Group"&&!!f.flags)),d=u?K0(r.globalFlags,u):r.globalFlags;dK(d,r.currentFlags)||(c=zi({flags:pK(d)}),c.body[0].body.push(l))}n(yn(c,t),{traverse:!a})}},uK={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const s=r.reffedNodesByReferencer.get(e).filter(o=>fK(o,e));if(!s.length)n(yn(Ra({negate:!0}),t));else if(s.length>1){const o=zi({atomic:!0,body:s.reverse().map(a=>Ya({body:[vy(a.number)]}))});n(yn(o,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r{t.forEach(i=>{r.enable?.[i]&&(delete n.disable[i],n.enable[i]=!0),r.disable?.[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function pK({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function ZC(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function YC(e){const t=e.find(n=>n.kind==="search_start"||vK(n,{negate:!1})||!mK(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=YC(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function QC(e,t){const n=ZC(e)??[];for(const r of n)if(r===t||QC(r,t))return!0;return!1}function mK({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function gK(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function vK(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&OC(e.body[0],{type:"Assertion",kind:"search_start"})}function t1(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Ds(e,t){const r=PC(e,{...t,unicodePropertyMap:cw}).body;return r.length>1||r[0].body.length>1?zi({body:r}):r[0].body[0]}function n1(e,t){return e.negate=t,e}function Ao(e,t){return e.parent=t,e}function yn(e,t){return WC(e),e.parent=t,e}function yK(e,t){const n=BC(t),r=wy(n.target,"ES2024"),i=wy(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,a=null;if(!i){const h=[e.flags.ignoreCase];Bu(e,bK,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(p){h.push(p)},setHasCasedChar(){h.at(-1)?o=!0:a=!0}})}const l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!a)};let c=e;const u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&o&&a),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(h){return u.lastNode=c,c=h,XG(wK[h.type],`Unexpected node type "${h.type}"`)(h,u,d)}const f={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((h,p)=>{h.hidden&&f._hiddenCaptures.push(p),h.transferTo&&dd(f._captureTransfers,h.transferTo,[]).push(p)}),f}var bK={"*":{enter({node:e},t){if(Q5(e)){const n=t.getCurrentModI();t.pushModI(e.flags?K0({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Q5(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){uw(zn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),XC(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&UC.has(e.value)&&t.setHasCasedChar()}},wK={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?ht`\B`:ht`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:s}=e,o={ignoreCase:t.currentFlags.ignoreCase},a=t.originMap.get(e);return a&&(o.hidden=!0,s>a.number&&(o.transferTo=a.number)),t.captureMap.set(s,o),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=zn(e),r=Tl(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&uw(n)){const i=qC(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:s}=e;let{body:o}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Ui.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(X5)&&(o=[dm(45),...o.filter(c=>!X5(c))]);const a=()=>`[${i?"^":""}${o.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Ui.bugNestedClassIgnoresNegation)&&!i){const u=o.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(u.length){const d=zi(),f=d.body[0];return d.parent=s,f.parent=d,o=o.filter(h=>!u.includes(h)),e.body=o,o.length?(e.parent=f,f.body.push(e)):d.body.pop(),u.forEach(h=>{const p=Ya({body:[h]});h.parent=p,p.parent=d,d.body.push(p)}),n(d)}}t.inCharClass=!0;const c=a();return t.inCharClass=!1,c}const l=o[0];if(r==="union"&&!i&&l&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(Ui.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&o.length===1&&l.type!=="CharacterClassRange"))return o.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Tl(n,i),o=Tl(r,i),a=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const l=XC(e);CK(l).forEach(u=>{a.add(Array.isArray(u)?`${Tl(u[0],i)}-${Tl(u[1],i)}`:Tl(u,i))})}return`${s}-${o}${[...a].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":ht`[^\n]`;if(e==="digit")return t?ht`\D`:ht`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&UC.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?ht`\P`:ht`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?ht`\W`:ht`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,s){const o=i.currentFlags;n&&(i.currentFlags=K0(o,n));const a=t.map(s).join("|"),l=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?a:`(?${EK(e,n,i.useFlagMods)}${a})`;return i.currentFlags=o,l},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+TK(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:ht`\g<${t}&R=${r}>`}},kK=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),xK=new Set(["-","\\","]","^","["]),SK=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Y5=new Map([[9,ht`\t`],[10,ht`\n`],[11,ht`\v`],[12,ht`\f`],[13,ht`\r`],[8232,ht`\u2028`],[8233,ht`\u2029`],[65279,ht`\uFEFF`]]),_K=/^\p{Cased}$/u;function uw(e){return _K.test(e)}function XC(e,t){const n=!!t?.firstOnly,r=e.min.value,i=e.max.value,s=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return s;for(let o=r;o<=i;o++){const a=zn(o);if(!uw(a))continue;const l=qC(a).filter(c=>{const u=c.codePointAt(0);return ui});if(l.length&&(s.push(...l),n))break}return s}function Tl(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Y5.has(e))return Y5.get(e);if(e<32||e>126&&e<160||e>262143||t&&LK(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?SK:xK:kK,s=zn(e);return(i.has(s)?"\\":"")+s}function CK(e){const t=e.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),n=[];let r=null;for(let i=0;i";let r="";if(t&&n){const{enable:i,disable:s}=t;r=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${r}:`}function TK({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function Q5({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function LK(e){return e>47&&e<58}function X5({type:e,value:t}){return e==="Character"&&t===45}var IK=class ky extends RegExp{#t=new Map;#e=null;#n;#i=null;#r=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,n),this.#n=s.source,s instanceof ky&&(this.#t=s.#t,this.#i=s.#i,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#n=t,this.#t=MK(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=r??{}}i||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:i,...s}=this.rawOptions;this.#e=new ky(this.#n,this.flags,s)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#r==="clip_search"&&n&&r){this.lastIndex=0;const i=this.#s(t.slice(r));return i&&(AK(i,r,t,this.hasIndices),this.lastIndex+=r),i}return this.#s(t)}#s(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const r=[...n];n.length=1;let i;this.hasIndices&&(i=[...n.indices],n.indices.length=1);const s=[0];for(let o=1;o{const a=s[o];a&&(s[o]=[a[0]+t,a[1]+t])})}}function MK(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const s of i)dd(n,s,{}).transferTo=r;return n}function DK(e){const t=/(?\((?:\?<(?![=!])(?[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,s;for(;s=t.exec(e);){const{0:o,groups:{capture:a,name:l}}=s;o==="["?r++:r?o==="]"&&r--:a&&(i++,l&&n.set(i,l))}return n}function RK(e,t){const n=OK(e,t);return n.options?new IK(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function OK(e,t){const n=BC(t),r=PC(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:cw}),i=aK(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=yK(i,n),o=YG(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),a=KG(o.pattern),l=GG(a.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),c={pattern:l.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const u=l.hiddenCaptures.sort((p,m)=>p-m),d=Array.from(l.captureTransfers),f=i._strategy,h=c.pattern.length>=n.lazyCompileLength;(u.length||d.length||f||h)&&(c.options={...u.length&&{hiddenCaptures:u},...d.length&&{transfers:d},...f&&{strategy:f},...h&&{lazyCompile:h}})}return c}function JC(e,t){return RK(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function eE(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>JC(n,{target:t.target}),{createScanner(n){return new QW(n,t)},createString(n){return{content:n}}}}M_(G2({bundledLanguages:()=>Za,bundledLanguagesAlias:()=>Z2,bundledLanguagesBase:()=>K2,bundledLanguagesInfo:()=>tm,bundledThemes:()=>Q2,bundledThemesInfo:()=>Y2,codeToHast:()=>SC,codeToHtml:()=>xC,codeToTokens:()=>_C,codeToTokensBase:()=>CC,codeToTokensWithThemes:()=>EC,createHighlighter:()=>um,createJavaScriptRegexEngine:()=>eE,createOnigurumaEngine:()=>ew,defaultJavaScriptRegexConstructor:()=>JC,getLastGrammarState:()=>LC,getSingletonHighlighter:()=>TC,loadWasm:()=>J2}),YW);const Z0="diffs-container";(()=>{try{return!1}catch{return!1}})();const PK=/(?=^From [a-f0-9]+ .+$)/m,tE=/(?=^diff --git)/gm,$K=/(?<=\n)/,NK=/^(---|\+\+\+)\s+([^\t\r\n]+)/,FK=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,HK=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,VK=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,dw="header-prefix",fw="header-metadata",hw="header-custom",_n={dark:"pierre-dark",light:"pierre-light"},fd="data-theme-css",hd="data-unsafe-css",zK="data-diffs-scrollbar-measure",nE="--diffs-scrollbar-gutter-measured",qr=1,pd=1e5,mm={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...mm});const jK=Object.freeze({fromStart:0,fromEnd:0}),Y0={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},rE={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};let o0=new Set,xy=null;function Ri(e){o0.add(e),xy??=requestAnimationFrame(iE)}function iE(e){const t=new Set(o0);o0.clear();for(const n of t)try{n(e)}catch(r){console.error(r)}o0.size>0?xy=requestAnimationFrame(iE):xy=null}function Q0(e,t,n){if(e===t||e==null||t==null)return e===t;const r=new Set(n),i=Object.keys(e),s=new Set(Object.keys(t));for(const o of i)if(s.delete(o),!r.has(o)&&(!(o in t)||e[o]!==t[o]))return!1;for(const o of Array.from(s))if(!r.has(o))return!1;return!0}function Bc(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function pw(e,t){const n=e?.theme??_n,r=t?.theme??_n,i=J5(e),s=J5(t);return Bc(n,r)&&Q0(e,t,["theme","parseDiffOptions"])&&Q0(i,s)}function J5(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function e7(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function t7({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:r=!1,fitPerfectlyOverscroll:i=0,overscrollSize:s}){const o=n+s*2,a=r?n+i*2:o;if(t=Math.max(t,a),o>=t||r){const u=Math.max(e-i,0),d=Math.min(e+a,t);return{top:u,bottom:Math.max(d,u)}}let l=e+n/2-o/2,c=l+o;return l<0&&(l=0),c>t&&(c=t),l=Math.floor(Math.max(l,0)),{top:l,bottom:Math.ceil(Math.max(Math.min(c,t),l))}}function bs(e){return{type:"text",value:e}}function gt({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function X0({name:e,width:t=16,height:n=16,properties:r}){return gt({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...r},children:[gt({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function BK(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Zl(e){return gt({tagName:"div",properties:{"data-gutter":""},children:e})}function sE(e,t,n,r={}){return gt({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t!=null?[gt({tagName:"span",properties:{"data-line-number-content":""},children:[bs(`${t}`)]})]:void 0})}function hi(e,t,n){return gt({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function qK(){return gt({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[X0({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function UK(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var oE=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();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||e7(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=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:s}=this.options;t==null&&n==null&&r==null&&s==null&&i==null||this.options.onGutterUtilityClick!=null&&lh(e.composedPath())||(Rs(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:s,enableGutterUtility:o=!1}=this.options;t==="disabled"&&!o&&n==null&&r==null&&i==null&&s==null||(Rs(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(Rs(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){Rs(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,r=t.composedPath();Rs(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:r});const i=this.resolvePointerTarget(r);Rs(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",i);const{onLineClick:s,onLineNumberClick:o,onLineEnter:a,onLineLeave:l,onTokenClick:c,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:h}=this.options;switch(e){case"move":{const p=r1(i)&&this.hoveredLine?.lineElement===i.lineElement;a0(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),a0(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),p||(this.hoveredLine!=null&&(l?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),r1(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),a?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(i==null)break;if(KK(i)&&h!=null){h(i);break}if(GK(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?"both":i.direction,i.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!r1(i))break;a0(i)&&c!=null&&c(this.toTokenEventBaseProps(i),t);const p=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...p,event:t}):s?.({...p,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:r,onLineNumberClick:i,onLineEnter:s,onLineLeave:o,onTokenClick:a,onTokenEnter:l,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:h=!1,onGutterUtilityClick:p}=this.options,m=p!=null,g=n!=="disabled"||r!=null||i!=null||s!=null||o!=null||a!=null||l!=null||c!=null||u!=null||d!=null||f||h||m;g&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,Rs(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const b=[];return(t==="both"||t==="click")&&(r!=null&&b.push("onLineClick"),i!=null&&b.push("onLineNumberClick"),u!=null&&b.push("expandable hunk separators"),d!=null&&b.push("merge conflict actions")),b})()),Rs(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Rs(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!g&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const y=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",v=this.pointerSession.mode==="gutterSelecting";(!h&&y||!m&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,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;const t=e.composedPath();lh(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:r}=this;if(r==null)return;e.preventDefault();const{lineNumber:i,eventSide:s,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){const a=this.getIndexesFromSelection(this.selectedRange,r.getAttribute("data-diff-type")==="split");if(a==null)return;const l=a.start<=a.end?o>=a.start:o<=a.end;this.selectionAnchor={lineNumber:l?this.selectedRange.start:this.selectedRange.end,side:l?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){const a={lineNumber:i,side:s};this.selectionAnchor=a,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:a,pending:a},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:s},this.updateSelection(i,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),s=r?.top??i;i==null||s==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:s,current:i},t&&(this.selectionAnchor={lineNumber:s.lineNumber,side:s.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const 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();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const r={lineNumber:n.lineNumber,side:n.eventSide};if(UK(this.pointerSession.pending,r))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{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();const 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){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=ys(qK());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Lu(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(!(r==null||i==null))return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const i of r){if(!(i instanceof HTMLElement))continue;const s=this.resolvePointerTarget(ah(i));if(Lu(s)&&!(this.mode==="diff"&&e.side!=null&&s.side!==e.side))return s}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Lu(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Lu(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const r=this.pathFromCoordinates(e,n);return r!==void 0?r??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&lh(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=ah(e);if(t&&lh(n))return;const r=YK(e);return r!=null?ah(r):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=XK(QK(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?ah(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=r7(t)?t:r7(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const r=this.getCurrentSelectionRange();let i;if(e==null)i=null;else{const s=this.selectionAnchor?.side??t,o=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(o,e,s,t)}e7(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;const n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const a of e)a.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const 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}),new Error("InteractionManager.renderSelection: No valid rowRange");const i=r.start===r.end,s=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(const a of t){const[l,c]=a.children,u=c.children.length;if(u!==l.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let d=0;do)break;if(p==null||pNumber.parseInt(r,10)).filter(r=>!Number.isNaN(r));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function J0({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:s,onLineLeave:o,onLineNumberClick:a,onTokenClick:l,onTokenEnter:c,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:h,controlledSelection:p,onLineSelected:m,onLineSelectionStart:g,onLineSelectionChange:y,onLineSelectionEnd:v},b,_,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:WK({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:b,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:s,onLineLeave:o,onLineNumberClick:a,onTokenClick:l,onTokenEnter:c,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:h,controlledSelection:p,onLineSelected:m,onLineSelectionStart:g,onLineSelectionChange:y,onLineSelectionEnd:v,getLineIndex:_}}function WK({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Lu(e){return e!=null&&"kind"in e&&e.kind==="line"}function a0(e){return e!=null&&"kind"in e&&e.kind==="token"}function r1(e){return Lu(e)||a0(e)}function GK(e){return"type"in e&&e.type==="line-info"}function KK(e){return"kind"in e&&e.kind==="merge-conflict-action"}function ZK(e){return e==="current"||e==="incoming"||e==="both"}function n7(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function ah(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function YK(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute("data-line")||r.hasAttribute("data-column-number"))?r:void 0}function QK(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function XK(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(Number.isFinite(n))return{lineNumber:n,side:t[1]}}function r7(e){return e!=null&&typeof e.elementFromPoint=="function"}function i7(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function s7(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function lh(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function Rs(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var aE=class Hs{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=Hs.resizeObserver??new ResizeObserver(Hs.handleSharedResizeEntries);return Hs.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const r of t){const i=Hs.managersByElement.get(r.target);if(i==null)continue;const s=n.get(i);s==null?n.set(i,[r]):s.push(r)}for(const[r,i]of n)r.handleResizeEntries(i)}observedNodes=new Map;setup(t,n){const r=new Set;let i=0;const s=new Map(this.observedNodes);this.observedNodes.clear();for(const o of t.children){if(i===2)break;const a=(()=>{if(o instanceof HTMLElement&&o.tagName==="CODE")return o})();if(a==null)continue;i++;let l=s.get(a);if(l!=null&&l.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let c=a.firstElementChild;c instanceof HTMLElement||(c=null),l!=null?(this.observedNodes.set(a,l),s.delete(a),l.numberElement!==c?(l.numberElement!=null&&(this.unobserve(l.numberElement),s.delete(l.numberElement)),c!=null&&(this.observe(c),s.delete(c),this.observedNodes.set(c,l)),l.numberElement=c,l.numberWidth=0):l.numberElement!=null?(s.delete(l.numberElement),this.observedNodes.set(l.numberElement,l)):l.numberWidth=0):(l={type:"code",codeElement:a,numberElement:c,codeWidth:"auto",numberWidth:0},this.observedNodes.set(a,l),this.observe(a),c!=null&&(this.observedNodes.set(c,l),this.observe(c)))}if(i>1&&!n){const o=t.querySelectorAll('[data-line-annotation*=","]'),a=new Map;for(const l of o){if(!(l instanceof HTMLElement))continue;const c=l.getAttribute("data-line-annotation")??"";if(!/^\d+,\d+$/.test(c)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:c,element:l});continue}let u=a.get(c);u==null&&(u=[],a.set(c,u)),u.push(l)}for(const[l,c]of a){if(c.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",l,c);continue}const[u,d]=c,f=u.firstElementChild,h=d.firstElementChild;if(!(u instanceof HTMLElement)||!(d instanceof HTMLElement)||!(f instanceof HTMLElement)||!(h instanceof HTMLElement))continue;let p=s.get(f);if(p!=null){this.observedNodes.set(f,p),this.observedNodes.set(h,p),s.delete(f),s.delete(h);continue}const m=f.getBoundingClientRect().height,g=h.getBoundingClientRect().height;p={type:"annotations",column1:{container:u,child:f,childHeight:m},column2:{container:d,child:h,childHeight:g},currentHeight:"auto"},r.add({child1:f,child2:h,item:p,newHeight:Math.max(m,g)})}for(const l of r)this.applyNewHeight(l.item,l.newHeight),this.observedNodes.set(l.child1,l.item),this.observedNodes.set(l.child2,l.item),this.observe(l.child1),this.observe(l.child2);r.clear()}for(const[o,a]of s)this.unobserve(o),a.type==="code"?tZ(a):nZ(a);s.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=Hs,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),Hs.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:r}=Hs,i=n.get(t);if(i!=null){if(i!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),Hs.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,r=new Set;for(const i of t){const{target:s,borderBoxSize:o,contentBoxSize:a}=i;if(!(s instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",i);continue}const l=this.observedNodes.get(s);if(l==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",i);continue}if(l.type==="annotations"){const c=(()=>{if(s===l.column1.child)return l.column1;if(s===l.column2.child)return l.column2})();if(c==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:l,target:s});continue}c.childHeight=o[0].blockSize,r.add(l)}else if(l.type==="code"){const c=n.get(l)??{},u=a[0].inlineSize;s===l.codeElement?c.codeInlineSize=u:s===l.numberElement&&(c.numberInlineSize=u),n.set(l,c)}}this.applyAnnotationUpdates(r),r.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,r]of t){const i=r.codeInlineSize!=null?JK(r.codeInlineSize):n.codeWidth,s=r.numberInlineSize!=null?eZ(r.numberInlineSize):n.numberWidth,o=i!==n.codeWidth,a=s!==n.numberWidth;if(!(!o&&!a)&&(n.codeWidth=i,n.numberWidth=s,o&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof i=="number"?`${i}px`:"auto"}`),a&&n.codeElement.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),o||a&&i!=="auto")){const l=typeof i=="number"?Math.max(i-s,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${l>0?`${l}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function JK(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function eZ(e){return Math.max(Math.ceil(e),0)}function tZ(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 nZ(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Qa=new Map,i1=new Map,rZ=new Map,Sy=new Set;function ep(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!Sy.has(t))return!1;return!0}function o7(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(Sy.has(n.name))continue;let r=Qa.get(n.name);r==null&&(r=n,Qa.set(n.name,r)),Sy.add(r.name),t.loadLanguageSync(r.data)}}function lE(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function cE(e){if(lE())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=i1.get(e);if(t!=null)return t;try{let n=rZ.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Za,e)&&(n=Za[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const r=n().then(({default:i})=>{const s={name:e,data:i};return Qa.has(e)||Qa.set(e,s),s});return i1.set(e,r),await r}finally{i1.delete(e)}}function uE(e){return Qa.get(e)??cE(e)}const _y=new Set;function md(e){const t=[],n=new Set;for(const d of iZ(e.themes)){const f=dE(d)?d.getThemes():[d];for(const h of f){if(n.has(h.name))throw new Error(`Theme collection already contains theme "${h.name}"`);n.add(h.name),t.push(h)}}const r=Object.freeze([...t]),i=Object.freeze(r.filter(d=>d.colorScheme==="light")),s=Object.freeze(r.filter(d=>d.colorScheme==="dark")),o=new Map(r.map(d=>[d.name,d])),a=Object.freeze(r.map(d=>d.name)),l=Object.freeze(i.map(d=>d.name)),c=Object.freeze(s.map(d=>d.name));function u(d){if(d==null)return r;const{colorScheme:f,collection:h}=d;return h==null?f==="light"?i:f==="dark"?s:r:r.filter(p=>p.collection!==h?!1:f==null||p.colorScheme===f)}return{getTheme(d){return o.get(d)},getThemes(d){return u(d)},getThemeNames(d){return d?.collection==null?d?.colorScheme==="light"?l:d?.colorScheme==="dark"?c:a:u(d).map(f=>f.name)},hasTheme(d){return o.has(d)},orderBy(d){return md({themes:r.map((f,h)=>({descriptor:f,index:h})).sort((f,h)=>{const p=d(f.descriptor,h.descriptor);return p!==0?p:f.index-h.index}).map(f=>f.descriptor)})},pick(d){const f=[],h=new Set;for(const p of d){if(h.has(p))throw new Error(`Theme collection pick already includes theme "${p}"`);h.add(p);const m=o.get(p);if(m==null)throw new Error(`Theme collection does not contain theme "${p}"`);f.push(m)}return md({themes:f})},registerInto(d){for(const f of r)d.registerThemeIfAbsent(f.name,f.load)}}}function iZ(e){return sZ(e)?[e]:e}function sZ(e){return dE(e)||oZ(e)}function oZ(e){return typeof e.name=="string"&&typeof e.load=="function"}function dE(e){return typeof e.getThemes=="function"}function fE(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var hE=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},aZ=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},lZ=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function cZ(){const e=new Map,t=new Map,n=new Map;let r=0;function i(y,v){if(e.has(y))throw new hE(y);e.set(y,v)}function s(y,v){return e.has(y)?!1:(e.set(y,v),!0)}function o(y){return e.has(y)}function a(y){const v=t.get(y);if(v!==void 0)return Promise.resolve(v);const b=n.get(y);if(b!==void 0)return b;const _=e.get(y);if(_===void 0)return Promise.reject(new aZ(y));const x=r,E=_().then(M=>{const S=fE(M);return x===r&&t.set(y,S),n.get(y)===E&&n.delete(y),S}).catch(M=>{throw n.get(y)===E&&n.delete(y),M});return n.set(y,E),E}function l(y){return Promise.all(y.map(v=>a(v)))}function c(y,v){t.set(y,v)}function u(y){for(const[v,b]of y)c(v,b)}function d(y){return t.get(y)}function f(y){const v=[];for(const b of y){const _=t.get(b);if(_===void 0)throw new lZ(b);v.push(_)}return v}function h(y){return t.has(y)}function p(y){for(const v of y)if(!t.has(v))return!1;return!0}function m(y){const v=t.get(y);return v!==void 0?v:a(y)}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:m,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:h,hasResolvedThemes:p,registerTheme:i,registerThemeIfAbsent:s,resolveTheme:a,resolveThemes:l,seedResolvedTheme:c,seedResolvedThemes:u}}const ki=cZ();function Cy(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let r;if(typeof n=="string"){if(r=ki.getResolvedTheme(n),r==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else r=n,n=n.name,ki.getResolvedTheme(n)==null&&ki.seedResolvedTheme(n,r);_y.has(n)||(_y.add(n),t.loadThemeSync(r))}}function mw({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:uZ(t)}}function uZ(e){return async()=>am(fE(await e()))}const dZ="pierre",pE=["pierre-light","pierre-light-soft"],fZ=["pierre-dark","pierre-dark-soft"],hZ=[...pE,...fZ],pZ=new Set(pE);function mZ(e){return pZ.has(e)?"light":"dark"}const gZ={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant"},vZ={"pierre-dark":()=>A(()=>import("./pierre-dark-Dy3oF52j.js"),[]),"pierre-dark-soft":()=>A(()=>import("./pierre-dark-soft-K7D5SChL.js"),[]),"pierre-dark-vibrant":()=>A(()=>import("./pierre-dark-vibrant-KQ6p6T2R.js"),[]),"pierre-light":()=>A(()=>import("./pierre-light-DhMpYZcV.js"),[]),"pierre-light-soft":()=>A(()=>import("./pierre-light-soft-cPlVRKcQ.js"),[]),"pierre-light-vibrant":()=>A(()=>import("./pierre-light-vibrant-0cUW3kII.js"),[])};function yZ(e){return async()=>({...(await vZ[e]()).default,name:e})}function bZ(e){return mw({name:e,collection:dZ,colorScheme:mZ(e),displayName:gZ[e],load:yZ(e)})}const mE=md({themes:hZ.map(e=>bZ(e))}),wZ="shiki",gE=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],kZ=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],xZ=new Set(gE);function SZ(e){return xZ.has(e)?"light":"dark"}const _Z={andromeeda:()=>A(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>A(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>A(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>A(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>A(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>A(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>A(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>A(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>A(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>A(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>A(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>A(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>A(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>A(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>A(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>A(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>A(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>A(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>A(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>A(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>A(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>A(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>A(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>A(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>A(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>A(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>A(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>A(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>A(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>A(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>A(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>A(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>A(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>A(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>A(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>A(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>A(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>A(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>A(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>A(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>A(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>A(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>A(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>A(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>A(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>A(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>A(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>A(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>A(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>A(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>A(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>A(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>A(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>A(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>A(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>A(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>A(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>A(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>A(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>A(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>A(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>A(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>A(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>A(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>A(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function a7(e){return mw({name:e,collection:wZ,colorScheme:SZ(e),load:_Z[e]})}const CZ=Object.freeze([...gE.map(e=>a7(e)),...kZ.map(e=>a7(e))]),vE=md({themes:CZ});md({themes:[mE,vE]});function yE(e){if(lE())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(ki.hasRegisteredTheme(e))return;const t=vE.getTheme(e);if(t!=null){ki.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function bE(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function EZ(e){yE(e);const t=await ki.resolveTheme(e);return bE(e,t),t}function TZ(e){return ki.getResolvedTheme(e)??EZ(e)}let us;async function wc({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){us??=um({themes:[],langs:["text"],engine:n==="shiki-wasm"?ew(A(()=>import("./wasm-CG6Dc4jp.js"),[])):eE()});const r=LZ(us)?await us:us;us=r;const i=[];for(const o of t){if(o==="text"||o==="ansi")continue;const a=uE(o);"then"in a?i.push(a):o7(a,r)}const s=[];for(const o of e){const a=TZ(o);"then"in a?s.push(a):Cy(a,us)}return(i.length>0||s.length>0)&&await Promise.all([Promise.all(i).then(o=>{o7(o,r)}),Promise.all(s).then(o=>{Cy(o,r)})]),r}function wE(){if(us!=null&&!("then"in us))return us}function LZ(e=us){return e!=null&&"then"in e}for(const e of mE.getThemes())ki.registerThemeIfAbsent(e.name,e.load);function gd(e=_n){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function qu(e){for(const t of gd(e))if(!_y.has(t))return!1;return!0}function Ey(e){return ki.hasResolvedThemes(e)}function $o(e,t){return Bc(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ps(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function gm(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function kE(e){return gt({tagName:"div",children:[gt({tagName:"div",children:e.annotations?.map(t=>gt({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function IZ(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function xE({fileOrDiff:e,mode:t,stickyHeader:n}){const r="type"in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?"":void 0};return gt({tagName:"div",children:[t==="custom"?gt({tagName:"slot",properties:{name:hw}}):AZ({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:r?.type??"file"}),...t==="custom"?[]:[MZ(r)]],properties:i})}function AZ({name:e,prevName:t,iconType:n}){const r=[gt({tagName:"slot",properties:{name:dw}}),X0({name:IZ(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(gt({tagName:"div",children:[gt({tagName:"bdi",children:[bs(t)]})],properties:{"data-prev-name":""}})),r.push(X0({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),r.push(gt({tagName:"div",children:[gt({tagName:"bdi",children:[bs(e)]})],properties:{"data-title":""}})),gt({tagName:"div",children:r,properties:{"data-header-content":""}})}function MZ(e){const t=[];if(e!=null){let n=0,r=0;for(const i of e.hunks)n+=i.additionLines,r+=i.deletionLines;(r>0||n===0)&&t.push(gt({tagName:"span",children:[bs(`-${r}`)],properties:{"data-deletions-count":""}})),(n>0||r===0)&&t.push(gt({tagName:"span",children:[bs(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(gt({tagName:"slot",properties:{name:fw}})),gt({tagName:"div",children:t,properties:{"data-metadata":""}})}function SE(e){return gt({tagName:"pre",properties:DZ(e)})}function DZ({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:s,type:o,customProperties:a}){return{...a,"data-diff":o==="diff"?"":void 0,"data-file":o==="file"?"":void 0,"data-diff-type":o==="diff"?i?"split":"single":void 0,"data-overflow":r,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}const Aa=new Map;let RZ=0;const fu={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function _r(e){if(Aa.has(e))return Aa.get(e)??"text";if(fu[e]!=null)return fu[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Aa.has(t[1]))return Aa.get(t[1])??"text";if(fu[t[1]]!=null)return fu[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Aa.has(n)?Aa.get(n)??"text":fu[n]??"text"}function OZ(){return RZ}function PZ(){return Object.fromEntries(Aa)}function _E(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:gd(t),preferredHighlighter:n}}function Xa(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function Ja(e){return e.replace(/\n$|\r\n$/,"")}function $Z(e,t,n){const r=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(r==null){const i=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(i,{node:e,line:t,state:n}),new Error(i)}return e.tagName="div",e.properties["data-line"]=r.lineNumber,e.properties["data-alt-line"]=r.altLineNumber,e.properties["data-line-type"]=r.type,e.properties["data-line-index"]=r.lineIndex,e.children.length===0&&e.children.push(bs(` `)),e}const ch=Symbol("no-token"),s1=Symbol("multiple-tokens");function CE(e){const t=NZ(e);if(t!=null)return t;let n=ch;const r=[];let i=[],s;const o=()=>{if(i.length===0||s==null){i=[],s=void 0;return}if(i.length===1){const l=i[0];if(l?.type==="element"){FZ(l,s);for(const c of l.children)l0(c)}else l0(l);r.push(l),i=[],s=void 0;return}for(const l of i)l0(l);r.push(gt({tagName:"span",properties:{"data-char":s},children:i})),i=[],s=void 0},a=l=>{if(l!==ch){if(l===s1){n=s1;return}if(n===ch){n=l;return}n!==l&&(n=s1)}};for(const l of e.children){const c=l.type==="element"?CE(l):ch;if(a(c),typeof c!="number"){o(),r.push(l);continue}s!=null&&s!==c&&o(),s??=c,i.push(l)}return o(),e.children=r,n}function NZ(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function l0(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)l0(t)}}function FZ(e,t){e.properties["data-char"]=t}function HZ(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:r=a=>a}=e,i=new Map;function s(a){return Object.entries(a).map(([l,c])=>`${l}:${c}`).join(";")}function o(a){const l=typeof a=="string"?a:s(a);let c=t+VZ(l)+n;return c=r(c),i.has(c)||i.set(c,typeof a=="string"?a:{...a}),c}return{name:"@shikijs/transformers:style-to-class",pre(a){if(!a.properties.style)return;const l=o(a.properties.style);delete a.properties.style,this.addClassToHast(a,l)},tokens(a){for(const l of a)for(const c of l){if(!c.htmlStyle)continue;const u=o(c.htmlStyle);c.htmlStyle={},c.htmlAttrs||={},c.htmlAttrs.class?c.htmlAttrs.class+=` ${u}`:c.htmlAttrs.class=u}},getClassRegistry(){return i},getCSS(){let a="";for(const[l,c]of i.entries())a+=`.${l}{${typeof c=="string"?c:s(c)}}`;return a},clearRegistry(){i.clear()}}}function VZ(e,t=0){let n=3735928559^t,r=1103547991^t;for(let i=0,s;i>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function EE(e=!1,t=!1){const n={lineInfo:[]},r=[{line(i){return delete i.properties.class,i},pre(i){const s=BK(i),o=[];if(s!=null){let a=1;for(const l of s.children)l.type==="element"&&(e&&CE(l),o.push($Z(l,a,n)),a++);s.children=o}return i},...e?{tokens(i){for(const s of i){let o=0;for(const a of s){const l=a;l.__lineChar??=o,o+=a.content.length}}},preprocess(i,s){s.mergeWhitespaces="never"},span(i,s,o,a,l){if(l?.offset!=null&&l.content!=null){const c=l.__lineChar;return c!=null&&(i.properties["data-char"]=c),i}return i}}:null}];return t&&r.push(zZ,l7),{state:n,transformers:r,toClass:l7}}const l7=HZ({classPrefix:"hl-"}),zZ={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const r={};n.color!=null&&(r.color=n.color),n.bgColor!=null&&(r["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(r["font-style"]="italic"),(n.fontStyle&2)!==0&&(r["font-weight"]="bold"),(n.fontStyle&4)!==0&&(r["text-decoration"]="underline")),Object.keys(r).length>0&&(n.htmlStyle=r)}}};function Ur(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const jZ=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,BZ=/^0(?:\.0+)?%?$/;function qZ(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const r=e.slice(t+1,-1).trim();if(r.length===0)return;const i=r.lastIndexOf("/");if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const s=r.split(",");if(s.length===4)return s[3]?.trim()}}function UZ(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let r,i=1;return n.length===3?r=n.split("").map(s=>s+s).join(""):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function o1(e){if(e==null)return null;const t=UZ(e);if(t==null)return null;const n=t[0]/255,r=t[1]/255,i=t[2]/255,s=o=>o<=.03928?o/12.92:((o+.055)/1.055)**2.4;return .2126*s(n)+.7152*s(r)+.0722*s(i)}function c7(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||jZ.test(t))return!0;const n=qZ(t);return n!=null&&BZ.test(n)}function WZ(e,t,n){if(t==null||n==null)return!1;const r=o1(e),i=o1(t),s=o1(n);return r==null||i==null||s==null?!1:Math.abs(r-s){const o=e.at(-1);return o===""||o===` `||o===`\r `||o==="\r"?Math.max(0,e.length-2):e.length-1})();for(let o=t;o0||a<1/0,{state:u,transformers:d}=EE(i),f=s?"text":e.lang??_r(e.name),h=typeof n=="string"?t.getTheme(n).type:void 0,p=TE({theme:n,highlighter:t});u.lineInfo=v=>({type:"context",lineIndex:v-1+o,lineNumber:v+o});const m=typeof n=="string"?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:Ur("token"),tokenizeMaxLineLength:r}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:Ur("token"),tokenizeMaxLineLength:r},g=Ty(t.codeToHast(c?ZZ(l??Ly(e.contents),o,a):Ja(e.contents),m)),y=c?new Array(o):g;return c&&y.push(...g),{code:y,themeStyles:p,baseThemeType:h}}function ZZ(e,t,n){let r="";return tp({lines:e,startingLine:t,totalLines:n,callback({content:i}){r+=i}}),r}function IE(e,t){return gt({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function vd(e){return(e.lang??_r(e.name))==="text"}function AE(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}let YZ=-1;var QZ=class{__id=`file-renderer:${++YZ}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:_n},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=qu(e.theme??_n)?wE():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e),n=u1(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let r=this.workerManager?.getFileResultCache(e);r!=null&&!$o(t,r.options)&&(r=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!vd(e),result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??_r(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:r=_n,tokenizeMaxLineLength:i=1e3}=this.options;return{theme:r,useTokenTransformer:AE(this.options),tokenizeMaxLineLength:i}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!ps(e,n.file)||!$o(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,Ly(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:Ly(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=Y0){if(e==null)return;let{options:n,forceHighlight:r}=this.getRenderOptions(e);const i=this.getMatchingWorkerResultCache(e,n);i!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...i},r=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const s=this.getOrCreateLineCache(e),o=e.contents.length>0,a=!o||vd(e)||u1(s.length,this.getTokenizeMaxLength()),l=!ps(e,this.renderCache.file),c=!gm(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(a||this.renderCache.result==null||!this.renderCache.highlighted&&(l||c))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||l||c||r)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,s)),this.renderCache.renderRange=t),!a&&o&&(!this.renderCache.highlighted||r)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??_r(e.name);const u=this.highlighter!=null&&qu(n.theme),d=this.highlighter!=null&&ep(this.computedLang),f=!a&&d;if(this.highlighter!=null&&u&&(r||a||!this.renderCache.highlighted&&f||this.renderCache.result==null)){const{result:h,options:p}=this.renderFileWithHighlighter(e,this.highlighter,a||!d);this.renderCache={file:e,options:p,highlighted:f,result:h,renderRange:void 0}}(!u||!a&&!d)&&this.asyncHighlight(e).then(({result:h,options:p})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,h,p,!a)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=Y0){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=u1(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??_r(e.name);const n=this.highlighter!=null&&Ey(gd(this.options.theme)),r=t||this.highlighter!=null&&ep(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e);return{result:LE(e,t,r,{forcePlainText:n}),options:r}}processFileResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){const{disableFileHeader:s=!1}=this.options,o=[],a=Zl(),l=this.getOrCreateLineCache(e);let c=0;return tp({lines:l,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:u,lineNumber:d})=>{const f=n[u];if(f==null){const h="FileRenderer.processFileResult: Line doesnt exist";throw console.error(h,{name:e.name,lineIndex:u,lineNumber:d,lines:l}),new Error(h)}if(f!=null){a.children.push(sE("context",d,`${u}`)),o.push(f),c++;const h=this.lineAnnotations[d];h!=null&&(a.children.push(hi("context","annotation",1)),o.push(kE({hunkIndex:0,lineIndex:d,annotations:h.map(p=>Xa(p))})),c++)}}}),a.properties.style=`grid-row: span ${c}`,{gutterAST:a.children??[],contentAST:o,preAST:this.createPreElement(l.length),headerAST:s?void 0:this.renderHeader(e),totalLines:l.length,rowCount:c,themeStyles:r,baseThemeType:i,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return xE({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return ys(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(gt({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=Zl();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,IE(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return ys(t?gt({tagName:"code",children:e,properties:{"data-code":""}}):e)}async initializeHighlighter(){return this.highlighter=await wc(_E(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;const i=!ps(e,this.renderCache.file)||!this.renderCache.highlighted||!$o(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!$o(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&ps(e,n.file)&&$o(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??pd}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return SE({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function u1(e,t){return e>t}const ME=``;function XZ(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function DE(e,t){return e==null||t==null?e===t:JZ(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const d7={};function JZ(e=d7,t=d7){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}function RE(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function OE(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function PE(){const e=document.createElement("style");return e.setAttribute(hd,""),e}var eY='@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-context-gutter:var(--diffs-bg-context-gutter-override,light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)),color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr}[data-dehydrated]:is([data-diff],[data-file]){--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}:is([data-diff],[data-file]):hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));-webkit-text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}@media (pointer:fine){:is([data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]):where([data-hovered]){--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-selected-line-bg) 97%, var(--diffs-bg-hover-override,var(--diffs-mixer))),color-mix(in lab, var(--diffs-computed-selected-line-bg) 91%, var(--diffs-bg-hover-override,var(--diffs-mixer))));--diffs-line-bg:var(--diffs-computed-hovered-line-bg,inherit)}}[data-decoration-bg]:is([data-line],[data-no-newline]){--mix-deco-light:92%;--mix-deco-dark:85%}[data-decoration-bg][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]){--mix-deco-light:88%;--mix-deco-dark:80%}[data-decoration-bg][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]){--mix-deco-light:85%;--mix-deco-dark:78%}@media (pointer:fine){[data-decoration-bg][data-hovered]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:85%;--mix-deco-dark:85%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:83%;--mix-deco-dark:83%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:81%;--mix-deco-dark:81%}}[data-decoration-bg]:is([data-line],[data-no-newline]){--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-computed-diff-line-bg:var(--diffs-annotation-bg);--diffs-computed-selected-line-bg:var(--diffs-annotation-bg);--diffs-line-bg:var(--diffs-annotation-bg)}[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-computed-diff-line-bg:var(--diffs-bg-context);--diffs-computed-selected-line-bg:var(--diffs-bg-context);--diffs-line-bg:var(--diffs-bg-context)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);--diffs-line-bg:var(--diffs-bg)}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number]{--mix-light:91%;--mix-dark:85%}:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--mix-light:88%;--mix-dark:80%}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg)}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base))}@media (pointer:fine){[data-line-type=change-deletion][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:75%}}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base))}@media (pointer:fine){[data-line-type=change-addition][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base))}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}@media (pointer:fine){[data-merge-conflict=current][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base))}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}@media (pointer:fine){[data-merge-conflict=incoming][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base))}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--mix-selection-light:82%;--mix-selection-dark:75%}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:75%;--mix-selection-dark:70%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base))}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:70%;--mix-selection-dark:55%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)));--diffs-line-bg:var(--diffs-computed-selected-line-bg,inherit)}[data-selected-line]:is([data-gutter-buffer],[data-column-number]){color:var(--diffs-selection-number-fg)}[data-no-newline]{-webkit-user-select:none;user-select:none}[data-no-newline] span{opacity:.6}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid}[data-diff-type=split][data-overflow=scroll] [data-additions]{border-left:1px solid var(--diffs-bg)}[data-diff-type=split][data-overflow=scroll] [data-deletions]{border-right:1px solid var(--diffs-bg)}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]) [data-code],[data-overflow=wrap]:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]){padding-top:0}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative}[data-gutter] [data-gutter-buffer],[data-gutter] [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid}[data-diff-type=split][data-overflow=wrap] [data-deletions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-gutter]{grid-column:1}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}[data-diff-type=split][data-overflow=wrap] [data-additions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-content]{grid-column:4}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch}[data-gutter-buffer]:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, var(--diffs-bg-buffer) 4.242px, var(--diffs-bg-buffer) 5.656px);grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{-webkit-user-select:none;user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback))}[data-separator=line-info] [data-separator-wrapper]{min-width:16px}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch}[data-expand-button]:hover{color:var(--diffs-fg)}[data-expand-button][data-expand-all-button]{display:none}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-content]{-webkit-user-select:none;user-select:none;height:100%;overflow:clip}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified] [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi}:is([data-unified] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content]{border-radius:6px}[data-unified] [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-gutter] [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}[data-gutter] [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-gutter] [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-additions] [data-content] [data-separator=line-info]{background-color:var(--diffs-bg)}:is([data-additions] [data-content] [data-separator=line-info]) [data-separator-wrapper]{display:none}[data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block}:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block}:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}@media (pointer:fine){[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto}:is([data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]) [data-separator-content]{grid-column:unset;grid-row:unset}@supports (width:1cqi){:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up],[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid}[data-separator-wrapper][data-separator-multi-button] [data-separator-content]{grid-area:1/2/-1;min-width:min-content}[data-separator-wrapper][data-separator-multi-button] [data-expand-button]{grid-column:1}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}:is([data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion]),[data-line]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion])):before{-webkit-user-select:none;user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}:is([data-line]:is([data-indicators=classic] [data-line-type=change-addition]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition])):before{content:"+";color:var(--diffs-addition-base)}:is([data-line]:is([data-indicators=classic] [data-line-type=change-deletion]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-deletion])):before{content:"-";color:var(--diffs-deletion-base)}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion],[data-indicators=bars] [data-line-type=change-addition]):before{content:"";-webkit-user-select:none;user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion]):before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh/round(1lh / 2px)) calc(1lh/round(1lh / 2px))}[data-column-number]:is([data-indicators=bars] [data-line-type=change-addition]):before{background-color:var(--diffs-addition-base)}[data-overflow=wrap] [data-line],[data-overflow=wrap] [data-annotation-content]{white-space:pre-wrap;word-break:break-word}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;-webkit-user-select:none;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]{min-width:4px;padding:0}:is([data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]):before{min-width:0}[data-disable-line-numbers] [data-line-number-content]{display:none}[data-disable-line-numbers] [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}[data-disable-line-numbers][data-indicators=bars] [data-gutter-utility-slot]{left:6px}[data-file][data-disable-line-numbers] [data-gutter-buffer],[data-file][data-disable-line-numbers] [data-column-number]{border-right:0;min-width:0}[data-diff-span]{-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex}:is([data-merge-conflict=marker-start],[data-merge-conflict=marker-end]):after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;-webkit-user-select:none;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + var(--diffs-gap-block,var(--diffs-gap-fallback))*3);z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[data-utility-button]:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px}[data-decoration-bar-depth="1"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] [data-decoration-bar-stack]{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] [data-decoration-bar-stack]{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto}[data-error-wrapper] [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}[data-error-wrapper] [data-error-stack]{color:var(--diffs-fg-number)}}@layer theme,rendered,unsafe;';let uh;function yd(e){if(uh!=null)return uh;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const n=document.createElement("div");n.setAttribute("data-code",""),n.setAttribute(zK,"true");const r=document.createElement("div");return r.style.position="relative",r.style.width="200%",r.style.height="200%",n.appendChild(r),e.appendChild(n),uh=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),uh}function $E(e){return`${nE}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const NE="@layer base, theme, rendered, unsafe;",tY=new RegExp(`${nY(nE)}\\s*:\\s*[^;]+;`);function FE(e){return`${NE} @layer unsafe { ${e} }`}function HE(e,t="system",n){return`${NE} @layer rendered { :host {${t==="system"?"":` color-scheme: ${t};`} ${$E(n)} ${e} } }`}function VE(e,t){const n=$E(t);return e.replace(tY,n)}function nY(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c0({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),n!=null&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),r!=null?e.style.setProperty("grid-row",`span ${r}`):e.style.removeProperty("grid-row"),i?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function zE(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function jE(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:s,split:o,totalLines:a,customProperties:l}){if(l!=null)for(const c in l){const u=l[c];u!=null&&e.setAttribute(c,`${u}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators");break}return i?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),r?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",o?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${a}`.length}ch`),e}function np(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function f7(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function BE({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===""){t?.remove();return}return t??=rY(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function rY(){const e=document.createElement("style");return e.setAttribute(fd,""),e}if(typeof HTMLElement<"u"&&customElements.get(Z0)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const r=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(eY)),r.adoptedStyleSheets=[e]}connectedCallback(){yd(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(Z0,t)}const qE=!0,iY=[];let sY=-1;var UE=class{static LoadedCustomComponent=qE;__id=`file:${++sY}`;type="file";fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;constructor(t={theme:_n},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.fileRenderer=new QZ(t,this.handleHighlightRender,this.workerManager),this.resizeManager=new aE,this.interactionManager=new oE("file",J0(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){!this.enabled||this.file==null||this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(J0(this.options))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Bc(this.appliedThemeCSS.theme,this.options.theme??_n)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t,n){this.interactionManager.setSelection(t,n)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t==="wrap"),this.managersDirty=!1}cleanUp(t=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,this.lineAnnotations=[],this.annotationCache.clear(),this.pre=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder=void 0,this.unsafeCSSStyle=void 0,t?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:n,prerenderedHTML:r,preventEmit:i=!1,file:s,lineAnnotations:o}=t;this.hydrateElements(n,r),oY(this.pre,s,this.options.collapsed)||aY(this.headerElement,s,this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({file:s,lineAnnotations:o}),i||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),zE(t,n);for(const r of Array.from(t.shadowRoot?.children??[])){if(r instanceof SVGElement){this.spriteSVG=r;continue}if(r instanceof HTMLElement){if(r instanceof HTMLPreElement){this.pre=r,this.appliedPreAttributes=void 0;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute(fd)){this.themeCSSStyle=r;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute(hd)){this.unsafeCSSStyle=r,this.appliedUnsafeCSS=r.textContent;continue}if("diffsHeader"in r.dataset){this.headerElement=r,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({file:t,lineAnnotations:n}){this.lineAnnotations=n??this.lineAnnotations,this.file=t,this.fileRenderer.setOptions(f7(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(t),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(t=this.file){return t!=null?this.fileRenderer.getOrCreateLineCache(t):iY}render({file:t,fileContainer:n,forceRender:r=!1,preventEmit:i=!1,containerWrapper:s,deferManagers:o=!1,lineAnnotations:a,renderRange:l}){const{collapsed:c=!1,themeType:u="system"}=this.options;if(!this.enabled)throw new Error("File.render: attempting to call render after cleaned up");const d=c?void 0:l,f=this.renderRange,h=this.hasThemeChanged(),p=a!=null&&(a.length>0||this.lineAnnotations.length>0)?a!==this.lineAnnotations:!1,m=!ps(this.file,t);if(!c&&!r&&gm(d,this.renderRange)&&!m&&!p&&!h)return this.applyCachedThemeState(u);this.renderRange=d,m&&(this.cachedHeaderHTML=void 0),this.file=t,this.fileRenderer.setOptions(f7(this.options)),this.syncInteractionOptions(),a!=null&&this.setLineAnnotations(a),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:g=!1,disableFileHeader:y=!1}=this.options;if(y&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),n=this.getOrCreateFileContainerNode(n,s),this.applyCachedThemeState(u),c){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const v=this.fileRenderer.renderFile(t,rE);v!=null&&this.applyThemeState(n,v.themeStyles,u,v.baseThemeType),v?.headerAST!=null&&this.applyHeaderToDOM(v.headerAST,n),this.injectUnsafeCSS()}catch(v){if(g)throw v;console.error(v),v instanceof Error&&this.applyErrorToDOM(v,n)}return i||this.emitPostRender(),!0}try{const v=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(r,p,m||h)||!this.applyPartialRender(f,d)){const b=this.fileRenderer.renderFile(t,d);if(b==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(n,b.themeStyles,u,b.baseThemeType),b.headerAST!=null&&this.applyHeaderToDOM(b.headerAST,n),this.applyFullRender(b,v)}this.applyBuffers(v,d),this.injectUnsafeCSS(),this.managersDirty=!0,o||this.flushManagers(),this.renderAnnotations(),this.renderGutterUtility()}catch(v){if(g)throw v;console.error(v),v instanceof Error&&this.applyErrorToDOM(v,n)}return i||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:r}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;r?.(n,this,"unmount");return}if(n==null)return;const i=this.mounted?"update":"mount";this.mounted=!0,r?.(n,this,i)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(t,n,r){return!(t||n||r)}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}primeHighlightCache(){const{file:t,workerManager:n}=this;t==null||t.cacheKey==null||n==null||vd(t)||this.fileRenderer.getOrCreateLineCache(t).length>(this.options.tokenizeMaxLength??pd)||n.primeFileHighlightCache(t)}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:r}of this.annotationCache.values())r.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[r,i]of this.lineAnnotations.entries()){const s=`${r}-${Xa(i)}`;let o=this.annotationCache.get(s);if(o==null||!XZ(i,o.annotation)){o?.element.remove();const a=n(i);if(a==null)continue;o={element:RE(Xa(i)),annotation:i},o.element.appendChild(a),this.fileContainer.appendChild(o.element),this.annotationCache.set(s,o)}t.delete(s)}for(const[r,{element:i}]of t.entries())this.annotationCache.delete(r),i.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const r=OE();r.appendChild(n),this.fileContainer.appendChild(r),this.gutterUtilityContent=r}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=PE(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=FE(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,r,i){const s=t.shadowRoot??t.attachShadow({mode:"open"}),o=i??r,a=this.options.theme??_n,l=typeof a=="string"?a:{...a},c=yd(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===o&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=l;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:l,themeStyles:n,themeType:o,baseThemeType:i,scrollbarGutter:c};return}this.themeCSSStyle=BE({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:HE(n,o,c)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:l,themeStyles:n,themeType:o,baseThemeType:i,scrollbarGutter:c}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=VE(this.themeCSSStyle.textContent??"",yd(t)))}applyFullRender(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,t),this.code=c0({code:this.code}),this.code.innerHTML=this.fileRenderer.renderPartialHTML(this.fileRenderer.renderCodeAST(t)),n.replaceChildren(this.code),this.lastRowCount=t.rowCount}applyPartialRender(t,n){if(t==null||n==null)return!1;const{file:r,code:i}=this,s=i!=null?this.getColumns(i):void 0;if(r==null||i==null||s==null)return!1;const o=t.startingLine,a=n.startingLine,l=t.totalLines===1/0?Number.POSITIVE_INFINITY:o+t.totalLines,c=n.totalLines===1/0?Number.POSITIVE_INFINITY:a+n.totalLines,u=Math.max(o,a),d=Math.min(l,c);if(d<=u||!this.trimDOMToOverlap(s.gutter,u,d)||!this.trimDOMToOverlap(s.content,u,d))return!1;let{length:f}=s.content.children;const h=(y,v)=>{if(!(v<=0))return this.fileRenderer.renderFile(r,{startingLine:y,totalLines:v,bufferBefore:0,bufferAfter:0})},p=ad?h(d,m):void 0;return g===void 0&&c>d?!1:(this.cleanupErrorWrapper(),p!=null&&(s.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(p.gutterAST)),s.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(p.contentAST)),f+=p.rowCount),g!=null&&(s.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(g.gutterAST)),s.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(g.contentAST)),f+=g.rowCount),this.lastRowCount!==f&&(s.gutter.style.setProperty("grid-row",`span ${f}`),s.content.style.setProperty("grid-row",`span ${f}`),this.lastRowCount=f),!0)}getColumns(t){const n=t.children[0],r=t.children[1];if(!(!(n instanceof HTMLElement)||!(r instanceof HTMLElement)||n.dataset.gutter==null||r.dataset.content==null))return{gutter:n,content:r}}trimDOMToOverlap(t,n,r){const i=this.getDOMBoundaryIndices(t,[n,r]),s=i.get(n)??t.children.length,o=i.get(r)??t.children.length;if(s>o)return!1;for(let a=t.children.length-1;a>=o;a-=1)t.children[a]?.remove();for(let a=s-1;a>=0;a-=1)t.children[a]?.remove();return!0}getDOMBoundaryIndices(t,n){const r=[...new Set(n)].sort((l,c)=>l-c),i=new Map;if(r.length===0)return i;let s=0,o=r[s];const{children:a}=t;for(let l=0;l=o;)i.set(o,l),s+=1,o=r[s];if(s>=r.length)break}}for(const l of r)i.has(l)||i.set(l,a.length);return i}getLineIndexFromDOMNode(t){const n=t.dataset.lineIndex;if(n==null)return;const r=Number(n);return Number.isNaN(r)?void 0:r}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(t,n){const{file:r}=this;if(r==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const i=this.cachedHeaderHTML??ys(t);if(this.cachedHeaderHTML=i,i!==this.lastRenderedHeaderHTML){const l=document.createElement("div");l.innerHTML=i;const c=l.firstElementChild;if(!(c instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(c,this.headerElement):n.shadowRoot?.prepend(c),this.headerElement=c,this.lastRenderedHeaderHTML=i}if(this.isContainerManaged)return;const{renderHeaderPrefix:s,renderCustomHeader:o,renderHeaderMetadata:a}=this.options;if(o!=null){const l=o(r)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,hw,l),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0}else{const l=s?.(r)??void 0,c=a?.(r)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,dw,l),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,fw,c),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,r,i){if(i==null){n?.remove();return}const s=n??this.createHeaderSlotElement(r);return n==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,i),s}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}getOrCreateFileContainerNode(t,n){const{fileContainer:r}=this,i=t??r??document.createElement(Z0),s=r!==i;return s&&this.emitPostRender(!0),this.fileContainer=i,r!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const r of n.children)r instanceof SVGElement?this.spriteSVG??=r:np(r)&&r.hasAttribute(fd)?(this.themeCSSStyle??=r,this.hasAdoptedThemeCSS=!0):np(r)&&r.hasAttribute(hd)&&(this.unsafeCSSStyle??=r,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=ME;const i=r.firstChild;i instanceof SVGElement&&(this.spriteSVG=i)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(t.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(t){this.code=void 0;for(const n of Array.from(t.children))if(n instanceof HTMLElement&&n.hasAttribute("data-code")){this.code=n;return}}applyPreNodeAttributes(t,{totalLines:n}){const{overflow:r="scroll",disableLineNumbers:i=!1}=this.options,s={type:"file",split:!1,overflow:r,disableLineNumbers:i,diffIndicators:"none",disableBackground:!0,totalLines:n};DE(s,this.appliedPreAttributes)||(jE(t,s),this.appliedPreAttributes=s)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const r=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",r.appendChild(this.errorWrapper);const i=document.createElement("div");i.dataset.errorMessage="",i.innerText=t.message,this.errorWrapper.appendChild(i);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function oY(e,t,n=!1){return!n&&e==null&&t!=null}function aY(e,t,n=!1){return e==null&&t!=null&&!n}function d1(e){return{...mm,...e}}function ds(e,t){const n=lY(e,t);return t?n:e.diffHeaderHeight+n}function lY(e,t){return e.paddingTop??(t?e.spacing:0)}function rp(e){return e.paddingBottom??e.spacing}function cY(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}const uY=5e3;let dY=-1;function fY(e,t){return(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS}var hY=class extends UE{__id=`virtualized-file:${++dY}`;top;height=0;cache={heights:new Map,checkpoints:[]};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=mm,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){!t&&Q0(this.metrics,e)||(this.metrics=e,this.resetLayoutCache())}getLineHeight(e,t=!1){const n=this.cache.heights.get(e);if(n!=null)return n;const r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!pw(t,e),r=fY(t,e);super.setOptions(e),r&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1){this.layoutDirty=!0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.file==null)return this.height!==0&&(e=!0),this.height=0,e;const{overflow:t="scroll"}=this.options;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled()||this.code==null)return e;const n=this.code.children[1];if(!(n instanceof HTMLElement))return e;for(const r of n.children){if(!(r instanceof HTMLElement))continue;const i=r.dataset.lineIndex;if(i==null)continue;const s=Number(i);let o=r.getBoundingClientRect().height,a=!1;r.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in r.nextElementSibling.dataset||"noNewline"in r.nextElementSibling.dataset)&&("noNewline"in r.nextElementSibling.dataset&&(a=!0),o+=r.nextElementSibling.getBoundingClientRect().height);const l=this.getLineHeight(s,a);o!==l&&(e=!0,o===this.metrics.lineHeight*(a?2:1)?this.cache.heights.delete(s):this.cache.heights.set(s,o))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n){let r=n?.resetFileLayoutCache===!0;n?.metrics!=null&&(this.metrics=n.metrics,r=!0);const{collapsed:i=!1}=this.options;return this.currentCollapsed!==i&&(this.currentCollapsed=i,r=!0),r&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(this.file==null)return;const{disableFileHeader:t=!1,collapsed:n=!1}=this.options,r=h7(this.getOrCreateLineCache(this.file));let i=ds(this.metrics,t);if(n||r<0)return{top:i,height:0};const s=Math.min(Math.max(e-1,0),r),{overflow:o="scroll"}=this.options,{lineHeight:a}=this.metrics;if(o==="scroll"&&this.lineAnnotations.length===0)return{top:i+s*a,height:a};const l=this.getLayoutCheckpointBeforeLineIndex(s);i=l?.top??i;for(let c=l?.lineIndex??0;ca?void 0:{lineNumber:d+1,top:s+d*c}}let l=s+this.renderRange.bufferBefore;for(let c=o;c<=a;c++){if(l>=e)return{lineNumber:c+1,top:l};l+=this.getLineHeight(c)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.file==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.file,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:r,totalLines:i}=t;let s=0;if(i===0){const o=e??this.virtualizer.getWindowSpecs();this.top{this.addLayoutCheckpoint(u,this.height),this.height+=this.getLineHeight(u,!1)}}),a.length>0&&(this.height+=c),this.fileContainer!=null&&t&&!n){const u=this.fileContainer.getBoundingClientRect();u.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:this.file.name,elementHeight:u.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.file==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}render({fileContainer:e,file:t,forceRender:n=!1,...r}){const{forceRenderOverride:i,isSetup:s}=this;if(this.forceRenderOverride=void 0,this.file??=t,e=this.getOrCreateFileContainerNode(e),this.file==null)return console.error("VirtualizedFile.render: attempting to virtually render when we dont have file"),!1;if(s)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const c=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(c==null)throw new Error("VirtualizedFile.render: simple virtualizer is not available");c.connect(e,this),this.isVisible=c.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const o=this.virtualizer.getWindowSpecs(),a=this.top??0,l=this.computeRenderRangeFromWindow(this.file,a,o);return super.render({file:this.file,fileContainer:e,renderRange:l,forceRender:i??n,...r})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}addLayoutCheckpoint(e,t){e%uY===0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){const i=t+n>>1,s=this.cache.checkpoints[i];if(s==null)throw new Error("VirtualizedFile: invalid checkpoint index");s.lineIndex<=e?(r=s,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){const s=n+r>>1,o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFile: invalid checkpoint index");o.top<=e?(i=s,n=s+1):r=s-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let s=i;s>=0;s--){const o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFile: invalid checkpoint index");if(o.lineIndex%t===0)return o}}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:i=!1,overflow:s="scroll"}=this.options,{hunkLineCount:o,lineHeight:a}=this.metrics,l=this.getOrCreateLineCache(e),c=l.length,u=this.height,d=ds(this.metrics,i),f=c>0?rp(this.metrics):0;if(tr)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:u-d-f};if(c<=o)return{startingLine:0,totalLines:o,bufferBefore:0,bufferAfter:0};const h=Math.ceil(Math.max(r-n,0)/a),p=Math.ceil(h/o)*o+o*2,m=p/o,g=(n+r)/2;if(s==="scroll"&&this.lineAnnotations.length===0){const R=Math.floor((g-(t+d))/a),O=Math.floor(R/o)-Math.floor(m/2),V=Math.ceil(c/o),q=Math.max(0,Math.min(O,V))*o,Q=O<0?p+O*o:p,te=q*a,ee=Math.min(Q,c-q);return{startingLine:q,totalLines:Q,bufferBefore:te,bufferAfter:Math.max(0,(c-q-ee)*a)}}const y=m,v=[],b=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-p*a*2),o);let _=t+(b?.top??d),x=b?.lineIndex??0,E,M,S;if(tp({lines:l,startingLine:b?.lineIndex??0,callback:({lineIndex:R})=>{const O=x%o===0,V=Math.floor(x/o);if(O&&(v[V]=_-(t+d),S!=null)){if(S<=0)return!0;S--}const q=this.getLineHeight(R,!1);return _>n-q&&_g&&(M??=V),S==null&&_>=r&&O&&(S=y),x++,_+=q,!1}}),E==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:u-d-f};M??=E;const I=Math.round(M-m/2),F=Math.max(0,Math.ceil(c/o)-m),j=Math.max(0,Math.min(I,F)),P=j*o,D=I<0?p+I*o:p,C=v[j]??0,L=j+D/o;return{startingLine:P,totalLines:D,bufferBefore:C,bufferAfter:L0&&(h[h.length-1]===` `||h[h.length-1]==="\r"||h[h.length-1]===`\r `||h[h.length-1]==="");)h.pop();const{additionStart:_,deletionStart:x}=m;u=c?u:x-1,d=c?d:_-1;const E={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:m.additionCount,additionStart:_,additionLines:g,deletionCount:m.deletionCount,deletionStart:x,deletionLines:y,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:v7(m.hunkContext),hunkSpecs:Hn(p),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let M=0,S=0;for(let I=1;I=E.additionCount&&S>=E.deletionCount&&!F.startsWith("\\")){if(s&&_Y(F)&&!CY(F))throw Error("parsePatchContent: hunk has more lines than expected");break}const j=F[0];if(j!=="+"&&j!=="-"&&j!==" "&&j!=="\\"){if(s)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${j}", full line: "${F}"`),console.error("processFile: invalid rawLine:",F);continue}const P=LY(j);if(P==="addition"){if(s&&M>=E.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const D=f1(F);(v==null||v.type!=="change")&&(v=h1("change",u,d),E.hunkContent.push(v)),d++,M++,c&&l.additionLines.push(D),v.additions++,g++,b="addition"}else if(P==="deletion"){if(s&&S>=E.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const D=f1(F);(v==null||v.type!=="change")&&(v=h1("change",u,d),E.hunkContent.push(v)),u++,S++,c&&l.deletionLines.push(D),v.deletions++,y++,b="deletion"}else if(P==="context"){if(s&&(S>=E.deletionCount||M>=E.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const D=f1(F);(v==null||v.type!=="context")&&(v=h1("context",u,d),E.hunkContent.push(v)),d++,u++,M++,S++,c&&(l.deletionLines.push(D),l.additionLines.push(D)),v.lines++,b="context"}else if(P==="metadata"&&v!=null){if(v.type==="context"?(E.noEOFCRAdditions=!0,E.noEOFCRDeletions=!0):b==="deletion"?E.noEOFCRDeletions=!0:b==="addition"&&(E.noEOFCRAdditions=!0),c&&(b==="addition"||b==="context")){const D=l.additionLines.length-1;D>=0&&(l.additionLines[D]=Ja(l.additionLines[D]))}if(c&&(b==="deletion"||b==="context")){const D=l.deletionLines.length-1;D>=0&&(l.deletionLines[D]=Ja(l.deletionLines[D]))}}}if(s&&(M!==E.additionCount||S!==E.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");E.additionLines=g,E.deletionLines=y,E.collapsedBefore=Math.max(E.additionStart-1-o,0),l.hunks.push(E),o=E.additionStart+E.additionCount-1;for(const I of E.hunkContent)I.type==="context"?(E.splitLineCount+=I.lines,E.unifiedLineCount+=I.lines):(E.splitLineCount+=Math.max(I.additions,I.deletions),E.unifiedLineCount+=I.deletions+I.additions);E.splitLineStart=l.splitLineCount+E.collapsedBefore,E.unifiedLineStart=l.unifiedLineCount+E.collapsedBefore,l.splitLineCount+=E.collapsedBefore+E.splitLineCount,l.unifiedLineCount+=E.collapsedBefore+E.unifiedLineCount}if(l!=null){if(s&&c&&!n&&l.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(l.hunks.length>0&&!c&&l.additionLines.length>0&&l.deletionLines.length>0){const f=l.hunks[l.hunks.length-1],h=f.additionStart+f.additionCount-1,p=l.additionLines.length,m=Math.max(p-h,0);l.splitLineCount+=m,l.unifiedLineCount+=m}return n||(l.prevName!=null&&l.name!==l.prevName?l.hunks.length>0?l.type="rename-changed":l.type="rename-pure":(r==null||r.contents==="")&&i!=null&&i.contents!==""?l.type="new":r!=null&&r.contents!==""&&(i==null||i.contents==="")&&(l.type="deleted")),l.type!=="rename-pure"&&l.type!=="rename-changed"&&(l.prevName=void 0),l}}function Gbe(e,t,n=!1){const r=[],i=wY(e)?e.split(PK):[e];for(const s of i)try{r.push(vY(s,t!=null?`${t}-${r.length}`:void 0,n))}catch(o){if(n)throw o;console.error(o)}return r}function wY(e){return e.startsWith("From ")||e.includes(` From `)}function p7(e){const t=KE(e);for(let n=0;nn&&t.push(e.slice(n,r)),n=r,o=!0,r=Ay(e,a);continue}if(o&&e.startsWith("@@ -",r)){const c=YE(e.slice(r,a));c!=null&&(i=c.deletionCount,s=c.additionCount)}r=a;continue}const l=e[r];if(l==="\\"){r=a;continue}l===" "?(i=Math.max(i-1,0),s=Math.max(s-1,0)):l==="-"?i=Math.max(i-1,0):l==="+"&&(s=Math.max(s-1,0)),r=a}return t.push(e.slice(n)),t}function SY(e){return ZE(e,0)}function ZE(e,t){const n=Ay(e,t);return m7(e,t,"---")&&m7(e,n,"+++")}function m7(e,t,n){if(!e.startsWith(n,t))return!1;const r=e[t+n.length];if(r!==" "&&r!==" ")return!1;for(let i=t+n.length+1;i9)break;r=r*10+i}if(n!==t)return{value:r,endIndex:n}}function EY(e){return e.endsWith(`\r `)?e.slice(0,-2):e.endsWith(` `)?e.slice(0,-1):e}function TY(e){return e.startsWith("diff --git")||e.includes(` diff --git`)}function QE(e,t){if(e.length===0)return[""];const n=` ${t}`,r=e.startsWith(t)?0:g7(e,n,0);if(r===-1)return[e];const i=[];r>0&&i.push(e.slice(0,r));let s=r;for(;;){const o=g7(e,n,s+1);if(o===-1)break;i.push(e.slice(s,o)),s=o}return i.push(e.slice(s)),i}function g7(e,t,n){const r=e.indexOf(t,n);return r===-1?-1:r+1}function v7(e){return e==null?e:Hn(e)}function LY(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function f1(e){const t=e.slice(1);return Hn(t===""?` `:t)}function h1(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}let gw=class{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const s=this.castInput(t,r),o=this.castInput(n,r),a=this.removeEmpty(this.tokenize(s,r)),l=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(a,l,r,i)}diffWithOptionsObj(t,n,r,i){var s;const o=v=>{if(v=this.postProcess(v,r),i){setTimeout(function(){i(v)},0);return}else return v},a=n.length,l=t.length;let c=1,u=a+l;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));const d=(s=r.timeout)!==null&&s!==void 0?s:1/0,f=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}];let p=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=l&&p+1>=a)return o(this.buildValues(h[0].lastComponent,n,t));let m=-1/0,g=1/0;const y=()=>{for(let v=Math.max(m,-c);v<=Math.min(g,c);v+=2){let b;const _=h[v-1],x=h[v+1];_&&(h[v-1]=void 0);let E=!1;if(x){const S=x.oldPos-v;E=x&&0<=S&&S=l&&p+1>=a)return o(this.buildValues(b.lastComponent,n,t))||!0;h[v]=b,b.oldPos+1>=l&&(g=Math.min(g,v-1)),p+1>=a&&(m=Math.max(m,v+1))}c++};if(i)(function v(){setTimeout(function(){if(c>u||Date.now()>f)return i(void 0);y()||v()},0)})();else for(;c<=u&&Date.now()<=f;){const v=y();if(v)return v}}addToPath(t,n,r,i,s){const o=t.lastComponent;return o&&!s.oneChangePerToken&&o.added===n&&o.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:o.count+1,added:n,removed:r,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:o}}}extractCommon(t,n,r,i,s){const o=n.length,a=r.length;let l=t.oldPos,c=l-i,u=0;for(;c+1f.length?p:f}),u.value=this.join(d)}else u.value=this.join(n.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return i}};class IY extends gw{}const AY=new IY;function MY(e,t,n){return AY.diff(e,t,n)}const y7="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class DY extends gw{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${y7}]+|[^\\S\\n\\r]+|[^${y7}]`,"ug");return t.match(n)||[]}}const RY=new DY;function OY(e,t,n){return RY.diff(e,t,n)}class PY extends gw{constructor(){super(...arguments),this.tokenize=NY}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(` `))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(` `))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(` `)&&(t=t.slice(0,-1)),n.endsWith(` `)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const $Y=new PY;function b7(e,t,n){return $Y.diff(e,t,n)}function NY(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` `));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i"u"&&(a.context=4);const l=a.context;if(a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){const{callback:u}=a;b7(n,r,Object.assign(Object.assign({},a),{callback:d=>{const f=c(d);u(f)}}))}else return c(b7(n,r,a));function c(u){if(!u)return;u.push({value:"",lines:[]});function d(v){return v.map(function(b){return" "+b})}const f=[];let h=0,p=0,m=[],g=1,y=1;for(let v=0;v0?d(x.lines.slice(-l)):[],h-=m.length,p-=m.length)}for(const x of _)m.push((b.added?"+":"-")+x);b.added?y+=_.length:g+=_.length}else{if(h)if(_.length<=l*2&&v1&&!t.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(r=>My(r,t)).join(` `)}const n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push("Index: "+e.oldFileName),t.includeUnderline&&n.push("==================================================================="),t.includeFileHeaders&&(n.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),n.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let r=0;r{a(l?My(l,o.headerOptions):void 0)}}))}else{const a=w7(e,t,n,r,i,s,o);return a?My(a,o?.headerOptions):void 0}}function VY(e){const t=e.endsWith(` `),n=e.split(` `).map(r=>r+` `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Dy(e,t,n,r=!1){const i=bY(HY(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(i==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return t.lang!=null&&(i.lang=t.lang),i}var zY=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,n){if(t==null||n==null)for(const r of e.children??[])r instanceof HTMLElement&&("deletions"in r.dataset?t=r:"additions"in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function qs(e,t){return Bc(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function fh(e){return gt({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function hh(e){return gt({tagName:"div",children:[gt({tagName:"span",children:[bs("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function p1(e){return gt({tagName:"div",children:[X0({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function Ll({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:s,isLastHunk:o}){let a=0;const l=[];if(e==="metadata"&&t!=null&&l.push(gt({tagName:"div",children:[bs(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const c=[];n!=null&&(r?(s||(c.push(p1("up")),a++),o||(c.push(p1("down")),a++)):(c.push(p1(!s&&!o?"both":s?"down":"up")),a++)),c.push(gt({tagName:"div",children:[gt({tagName:"span",children:[bs(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),r&&n!=null&&c.push(gt({tagName:"div",children:[bs("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),l.push(gt({tagName:"div",children:c,properties:{"data-separator-wrapper":"","data-separator-multi-button":a>1?"":void 0}}))}return e==="custom"&&i!=null&&l.push(gt({tagName:"slot",properties:{name:i}})),gt({tagName:"div",children:l,properties:{"data-separator":l.length===0?"simple":e,"data-expand-index":n,"data-separator-first":s?"":void 0,"data-separator-last":o?"":void 0}})}function jY(e,t){return`hunk-separator-${e}-${t}`}function BY(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function qY(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function k7({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function ph({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){const s=t[t.length-1];if(s==null||i||!n){t.push([r?0:1,e.value]);return}const o=s[0]===0;if(r===o||r&&e.value.length===1&&!o){s[1]+=e.value;return}t.push([r?0:1,e.value])}function bd({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(n===!0||s<=i)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const o=n?.get(r),a=Math.min(Math.max(o?.fromStart??0,0),s),l=Math.min(Math.max(o?.fromEnd??0,0),s),c=a+l,u=c>=s;return{fromStart:u?s:a,fromEnd:u?0:l,rangeSize:s,collapsedLines:Math.max(s-c,0),renderAll:u}}function XE({fileDiff:e,errorPrefix:t}){const n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const r=e.additionLines.length-(n.additionLineIndex+n.additionCount),i=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw new Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function wd({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;const s=XE({fileDiff:e,errorPrefix:i});if(s<=0)return;if(n===!0||s<=r)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const o=n?.get(e.hunks.length),a=Math.min(Math.max(o?.fromStart??0,0),s);return{fromStart:a,fromEnd:0,rangeSize:s,collapsedLines:s-a,renderAll:a>=s}}function JE({type:e,metrics:t}){return t.hunkSeparatorHeight??cY(e)}function eT({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function UY({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return n!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function WY(e){return e!=="simple"&&e!=="metadata"}function Iu({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!UY({type:e,hunkIndex:n,hunkSpecs:r}))return;const i=JE({type:e,metrics:t}),s=eT({type:e,metrics:t}),o=n>0?s:0,a=s;return{height:i,gapBefore:o,gapAfter:a,totalHeight:o+i+a}}function Au({type:e,metrics:t}){if(!WY(e))return;const n=JE({type:e,metrics:t}),r=eT({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function Uu({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:s=qr,callback:o}){const a=GY({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:s}),l={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:a.splitCount,unifiedCount:a.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!l.isWindowedHighlight)return!1;const c=l.unifiedCount>=n+r,u=l.splitCount>=n+r;return t==="unified"?c:(t==="split"||c)&&u},shouldSkip(c,u){if(!l.isWindowedHighlight)return!1;const d=l.unifiedCount+c=n-c&&l.unifiedCount=n-c&&l.splitCount0?0:t==="unified"?S===u.unifiedLineStart+u.unifiedLineCount-1?f.collapsedLines:0:I===u.splitLineStart+u.splitLineCount-1?f.collapsedLines:0},g=function(){return m?0:(m=!0,d.collapsedLines)};const u=e.hunks[c];if(u==null)throw new Error("iterateOverDiff: invalid hunk index");if(l.shouldBreak())break;const d=bd({isPartial:e.isPartial,rangeSize:u.collapsedBefore,expandedHunks:i,hunkIndex:c,collapsedContextThreshold:s}),f=c===l.finalHunkIndex?wd({fileDiff:e,hunkIndex:c,expandedHunks:i,collapsedContextThreshold:s,errorPrefix:"iterateOverDiff"}):void 0,h=d.fromStart+d.fromEnd;let m=d.collapsedLines===0;if(l.shouldSkip(h,h))l.incrementCounts(h,h),g();else{let S=u.unifiedLineStart-d.rangeSize,I=u.splitLineStart-d.rangeSize,F=u.deletionLineIndex-d.rangeSize,j=u.additionLineIndex-d.rangeSize,P=u.deletionStart-d.rangeSize,D=u.additionStart-d.rangeSize;if(mh(l,d.fromStart,t,C=>l.emit({hunkIndex:c,hunk:u,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:P+C,lineIndex:F+C,noEOFCR:!1,unifiedLineIndex:S+C,splitLineIndex:I+C},additionLine:{unifiedLineIndex:S+C,splitLineIndex:I+C,lineIndex:j+C,lineNumber:D+C,noEOFCR:!1}}))||(S=u.unifiedLineStart-d.fromEnd,I=u.splitLineStart-d.fromEnd,F=u.deletionLineIndex-d.fromEnd,j=u.additionLineIndex-d.fromEnd,P=u.deletionStart-d.fromEnd,D=u.additionStart-d.fromEnd,mh(l,d.fromEnd,t,C=>l.emit({hunkIndex:c,hunk:u,collapsedBefore:g(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:P+C,lineIndex:F+C,noEOFCR:!1,unifiedLineIndex:S+C,splitLineIndex:I+C},additionLine:{unifiedLineIndex:S+C,splitLineIndex:I+C,lineIndex:j+C,lineNumber:D+C,noEOFCR:!1}}),()=>{g()})))break e}let y=u.unifiedLineStart,v=u.splitLineStart,b=u.deletionLineIndex,_=u.additionLineIndex,x=u.deletionStart,E=u.additionStart;const M=u.hunkContent.at(-1);for(const S of u.hunkContent){if(l.shouldBreak())break e;const I=S===M;if(S.type==="context"){if(l.shouldSkip(S.lines,S.lines))l.incrementCounts(S.lines,S.lines),g();else if(mh(l,S.lines,t,F=>{const j=I&&F===S.lines-1,P=y+F,D=v+F;return l.emit({hunkIndex:c,hunk:u,collapsedBefore:g(),collapsedAfter:p(P,D),type:"context",deletionLine:{lineNumber:x+F,lineIndex:b+F,noEOFCR:j&&u.noEOFCRDeletions,unifiedLineIndex:P,splitLineIndex:D},additionLine:{unifiedLineIndex:P,splitLineIndex:D,lineIndex:_+F,lineNumber:E+F,noEOFCR:j&&u.noEOFCRAdditions}})},()=>{g()}))break e;y+=S.lines,v+=S.lines,b+=S.lines,_+=S.lines,x+=S.lines,E+=S.lines}else{const F=Math.max(S.deletions,S.additions),j=S.deletions+S.additions;if(!l.shouldSkip(j,F)){const P=YY(l,S,t);(P[0]?.[0]??0)>0&&g();for(const[D,C]of P)for(let L=D;L{const D=P===j-1;return l.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:D?S:0,type:"context-expanded",deletionLine:{lineNumber:x+P,lineIndex:b+P,noEOFCR:!1,unifiedLineIndex:y+P,splitLineIndex:v+P},additionLine:{unifiedLineIndex:y+P,splitLineIndex:v+P,lineIndex:_+P,lineNumber:E+P,noEOFCR:!1}})},void 0,()=>l.shouldBreak()))break e}}}function GY({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=KY({diff:e,expandedHunks:r,collapsedContextThreshold:i});let o=0,a=e.hunks.length-1,l=e.hunks.length;for(;o<=a;){const u=o+a>>1,d=s[u+1];if(d==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?d.unifiedCount:d.splitCount)>n?(l=u,a=u-1):o=u+1}if(l>=e.hunks.length){const u=s[e.hunks.length];if(u==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:u.splitCount,unifiedCount:u.unifiedCount}}const c=s[l];if(c==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:l,splitCount:c.splitCount,unifiedCount:c.unifiedCount}}function KY({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0;const s=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let a=0;al&&r.push([l,c])}if(n!=="split"&&i(e.unifiedCount),n!=="unified"&&i(e.splitCount),r.length===0)return[0,0];let s=r[0][0],o=r[0][1];for(let a=1;a0&&(e.incrementCounts(o,o),i?.());let l=o;for(;l=a){e.incrementCounts(t-l,t-l);break}if(e.isInWindow(0,0)){if(r(l)===!0)return!0}else e.incrementCounts(1,1);l++}return!1}function YY(e,t,n){if(!e.isWindowedHighlight)return[[0,n==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const r=n!=="split",i=n!=="unified",s=n==="unified"?"unified":"split",o=[];function a(d,f){if(d+f<=e.viewportStart||d>=e.viewportEnd)return;const h=Math.max(0,e.viewportStart-d),p=Math.min(f,e.viewportEnd-d);return p>h?[h,p]:void 0}function l(d,f){return s==="split"?d:f==="additions"?[d[0]+t.deletions,d[1]+t.deletions]:d}function c(d,f){if(d==null)return;const[h,p]=l(d,f);p>h&&o.push([h,p])}if(r&&(c(a(e.unifiedCount,t.deletions),"deletions"),c(a(e.unifiedCount+t.deletions,t.additions),"additions")),i&&(c(a(e.splitCount,t.deletions),"deletions"),c(a(e.splitCount,t.additions),"additions")),o.length===0)return o;o.sort((d,f)=>d[0]-f[0]);const u=[o[0]];for(const[d,f]of o.slice(1)){const h=u[u.length-1];d<=h[1]?h[1]=Math.max(h[1],f):u.push([d,f])}return u}function QY({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:s,unifiedLineIndex:o,splitLineIndex:a,additionLineIndex:l,deletionLineIndex:c,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:h,unifiedCount:p,splitCount:m}){const g=s=f.deletions?o+s:void 0:s=f.deletions?l+(s-f.deletions):void 0:s=f.deletions?u+(s-f.deletions):void 0:s0||s<1/0,c=typeof n.theme=="string"?t.getTheme(n.theme).type:void 0,u=TE({theme:n.theme,highlighter:t}),d=r&&!l&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:h}=n,p=!r&&!e.isPartial,m=r?o:void 0,g=new Map;function y(b){const _=p?0:b,x=g.get(_)??eQ();return g.set(_,x),x}function v(b,_,x,E){if(l){let M=x.at(-1);(M==null||M.targetIndex+M.count!==_)&&(M={targetIndex:_,originalOffset:E.length,count:0},x.push(M)),M.count++}E.push(b)}Uu({diff:e,diffStyle:"both",startingLine:i,totalLines:s,expandedHunks:l?m:!0,collapsedContextThreshold:a,callback:({hunkIndex:b,additionLine:_,deletionLine:x,type:E})=>{const M=y(b),S=_!=null?_.splitLineIndex:x.splitLineIndex;E==="change"&&_!=null&&x!=null&&JY({additionLine:e.additionLines[_.lineIndex],deletionLine:e.deletionLines[x.lineIndex],deletionLineIndex:M.deletionContent.length,additionLineIndex:M.additionContent.length,deletionDecorations:M.deletionDecorations,additionDecorations:M.additionDecorations,lineDiffType:d,maxLineDiffLength:h}),x!=null&&(v(e.deletionLines[x.lineIndex],x.lineIndex,M.deletionSegments,M.deletionContent),M.deletionInfo.push({type:E==="change"?"change-deletion":E,lineNumber:x.lineNumber,altLineNumber:E==="change"?void 0:_.lineNumber??void 0,lineIndex:`${x.unifiedLineIndex},${S}`})),_!=null&&(v(e.additionLines[_.lineIndex],_.lineIndex,M.additionSegments,M.additionContent),M.additionInfo.push({type:E==="change"?"change-addition":E,lineNumber:_.lineNumber,altLineNumber:E==="change"?void 0:x.lineNumber??void 0,lineIndex:`${_.unifiedLineIndex},${S}`}))}});for(const b of g.values()){if(b.deletionContent.length===0&&b.additionContent.length===0)continue;const _={name:e.prevName??e.name,contents:b.deletionContent.value},x={name:e.name,contents:b.additionContent.value},{deletionLines:E,additionLines:M}=tQ({deletionFile:_,deletionInfo:b.deletionInfo,deletionDecorations:b.deletionDecorations,additionFile:x,additionInfo:b.additionInfo,additionDecorations:b.additionDecorations,highlighter:t,options:n,languageOverride:r?"text":e.lang});if(p){f.deletionLines=E,f.additionLines=M;continue}if(b.deletionSegments.length>0)for(const S of b.deletionSegments)for(let I=0;I0)for(const S of b.additionSegments)for(let I=0;Ia||t.length>a))return;const l=o==="char"?MY(e,t):OY(e,t),c=[],u=[],d=o==="word-alt",f=l.at(-1);for(const p of l){const m=p===f;!p.added&&!p.removed?(ph({item:p,arr:c,enableJoin:d,isNeutral:!0,isLastItem:m}),ph({item:p,arr:u,enableJoin:d,isNeutral:!0,isLastItem:m})):p.removed?ph({item:p,arr:c,enableJoin:d,isLastItem:m}):ph({item:p,arr:u,enableJoin:d,isLastItem:m})}let h=0;for(const p of c)p[0]===1&&i.push(k7({line:n,spanStart:h,spanLength:p[1].length})),h+=p[1].length;h=0;for(const p of u)p[0]===1&&s.push(k7({line:r,spanStart:h,spanLength:p[1].length})),h+=p[1].length}function eQ(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function tQ({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:s,additionDecorations:o,languageOverride:a,options:{theme:l=_n,...c}}){const u=a??_r(e.name),d=a??_r(t.name),{state:f,transformers:h}=EE(c.useTokenTransformer),p=typeof l=="string"?{...c,lang:"text",theme:l,transformers:h,decorations:void 0,defaultColor:!1,cssVariablePrefix:Ur("token")}:{...c,lang:"text",themes:l,transformers:h,decorations:void 0,defaultColor:!1,cssVariablePrefix:Ur("token")};return{deletionLines:e.contents===""?[]:(p.lang=u,f.lineInfo=n,p.decorations=s,Ty(i.codeToHast(Ja(e.contents),p))),additionLines:t.contents===""?[]:(p.lang=d,p.decorations=o,f.lineInfo=r,Ty(i.codeToHast(Ja(t.contents),p)))}}function kd(e){const t=e.lang??_r(e.name),n=e.lang??(e.prevName!=null?_r(e.prevName):"text");return t==="text"&&n==="text"}let nQ=-1;var rQ=class{__id=`diff-hunks-renderer:${++nQ}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:_n},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=qu(e.theme??_n)?wE():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){const r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(r.fromStart+=n),(t==="down"||t==="both")&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??jK}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),r=n[t.lineNumber]??[];n[t.lineNumber]=r,r.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(e){return kE(e)}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:s=!1,collapsed:o=!1,expandUnchanged:a=!1,collapsedContextThreshold:l=qr,expansionLineCount:c=100,hunkSeparators:u="line-info",lineDiffType:d="word-alt",maxLineDiffLength:f=1e3,overflow:h="scroll",stickyHeader:p=!1,theme:m=_n,headerRenderMode:g="default",tokenizeMaxLineLength:y=1e3,tokenizeMaxLength:v=pd,useTokenTransformer:b=!1,useCSSClasses:_=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:s,collapsed:o,expandUnchanged:a,collapsedContextThreshold:l,expansionLineCount:c,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:h,stickyHeader:p,theme:this.workerManager?.getDiffRenderOptions().theme??m,headerRenderMode:g,tokenizeMaxLineLength:y,tokenizeMaxLength:v,useTokenTransformer:b,useCSSClasses:_}}async initializeHighlighter(){return this.highlighter=await wc(_E(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),n=g1(e,this.getTokenizeMaxLength());let r=this.workerManager?.getDiffResultCache(e);r!=null&&!qs(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!kd(e),options:t,result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??_r(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:r,tokenizeMaxLineLength:i,lineDiffType:s,maxLineDiffLength:o}=this.getOptionsWithDefaults();return{theme:r,useTokenTransformer:AE(this.options),tokenizeMaxLineLength:i,lineDiffType:s,maxLineDiffLength:o}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!Yl(e,n.diff)||!qs(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=Y0){if(e==null)return;const{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults();let{options:i,forceHighlight:s}=this.getRenderOptions(e);const o=this.getMatchingWorkerResultCache(e,i);o!=null&&!this.hasHighlightedRenderCache(e,i)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o},s=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};const a=e.additionLines.length>0||e.deletionLines.length>0,l=!a||kd(e)||g1(e,this.getTokenizeMaxLength()),c=!Yl(e,this.renderCache.diff),u=!gm(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(l||this.renderCache.result==null||!this.renderCache.highlighted&&(c||u))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||c||u||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,qY(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!l&&a&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??_r(e.name);const d=this.highlighter!=null&&qu(i.theme),f=this.highlighter!=null&&ep(this.computedLang),h=!l&&f;if(this.highlighter!=null&&d&&(s||l||!this.renderCache.highlighted&&h||this.renderCache.result==null)){const{result:p,options:m}=this.renderDiffWithHighlighter(e,this.highlighter,l||!f);this.renderCache={diff:e,options:m,highlighted:h,result:p,renderRange:void 0}}(!d||!l&&!f)&&this.asyncHighlight(e).then(({result:p,options:m})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,p,m,!l)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=Y0){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){const{diffIndicators:r,disableBackground:i,disableLineNumbers:s,overflow:o}=this.getOptionsWithDefaults();return SE({type:"diff",diffIndicators:r,disableBackground:i,disableLineNumbers:s,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){const t=g1(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??_r(e.name);const n=this.highlighter!=null&&qu(this.options.theme??_n),r=t||this.highlighter!=null&&ep(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:tT(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;const i=!this.renderCache.highlighted||!qs(this.renderCache.options,n)||!Yl(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!qs(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Yl(e,n.diff)&&qs(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??pd}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){const{diffStyle:s,disableFileHeader:o,expandUnchanged:a,expansionLineCount:l,collapsedContextThreshold:c,hunkSeparators:u}=this.getOptionsWithDefaults();this.diff=e;const d=s==="unified";let f=[],h=[],p=[];const m=[],{additionLines:g,deletionLines:y}=n,v={rowCount:0,hunkSeparators:u,additionsContentAST:f,deletionsContentAST:h,unifiedContentAST:p,unifiedGutterAST:Zl(),deletionsGutterAST:Zl(),additionsGutterAST:Zl(),expansionLineCount:l,hunkData:m,incrementRowCount(D=1){v.rowCount+=D},pushToGutter(D,C){switch(D){case"unified":v.unifiedGutterAST.children.push(C);break;case"deletions":v.deletionsGutterAST.children.push(C);break;case"additions":v.additionsGutterAST.children.push(C);break}}},b=XE({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),_={size:0,side:void 0,increment(){this.size+=1},flush(){if(s!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(v.pushToGutter("additions",hi(void 0,"buffer",this.size)),f?.push(fh(this.size))):(v.pushToGutter("deletions",hi(void 0,"buffer",this.size)),h?.push(fh(this.size))),this.size=0,this.side=void 0}}},x=(D,C,L,R,O)=>{v.pushToGutter(D,sE(C,L,R,O))};function E(D){_.flush(),s==="unified"?m1("unified",D,v):(m1("deletions",D,v),m1("additions",D,v))}Uu({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:a?!0:this.expandedHunks,collapsedContextThreshold:c,callback:({hunkIndex:D,hunk:C,collapsedBefore:L,collapsedAfter:R,additionLine:O,deletionLine:V,type:q})=>{const Q=V!=null?V.splitLineIndex:O.splitLineIndex,te=O!=null?O.unifiedLineIndex:V.unifiedLineIndex;s==="split"&&q!=="change"&&_.flush(),L>0&&E({hunkIndex:D,collapsedLines:L,rangeSize:Math.max(C?.collapsedBefore??0,0),hunkSpecs:C?.hunkSpecs,isFirstHunk:D===0,isLastHunk:!1,isExpandable:!e.isPartial});const ee=s==="unified"?te:Q,ne={type:q,hunkIndex:D,lineIndex:ee,unifiedLineIndex:te,splitLineIndex:Q,deletionLine:V,additionLine:O};if(s==="unified"){const ue=this.getUnifiedInjectedRowsForLine?.(ne);ue?.before!=null&&S7(ue.before,v);let ae=V!=null?y[V.lineIndex]:void 0,we=O!=null?g[O.lineIndex]:void 0;if(ae==null&&we==null){const N="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(N,{file:e.name}),new Error(N)}const Te=q==="change"?O!=null?"change-addition":"change-deletion":q,_e=this.getUnifiedLineDecoration({type:q,lineType:Te,additionLineIndex:O?.lineIndex,deletionLineIndex:V?.lineIndex});x("unified",_e.gutterLineType,O!=null?O.lineNumber:V.lineNumber,`${te},${Q}`,_e.gutterProperties),we!=null?we=gh(we,_e.contentProperties):ae!=null&&(ae=gh(ae,_e.contentProperties)),C7({diffStyle:"unified",type:q,deletionLine:ae,additionLine:we,unifiedSpan:this.getAnnotations("unified",V?.lineNumber,O?.lineNumber,D,ee),createAnnotationElement:N=>this.createAnnotationElement(N),context:v}),ue?.after!=null&&S7(ue.after,v)}else{const ue=this.getSplitInjectedRowsForLine?.(ne);ue?.before!=null&&_7(ue.before,v,_);let ae=V!=null?y[V.lineIndex]:void 0,we=O!=null?g[O.lineIndex]:void 0;const Te=this.getSplitLineDecoration({side:"deletions",type:q,lineIndex:V?.lineIndex}),_e=this.getSplitLineDecoration({side:"additions",type:q,lineIndex:O?.lineIndex});if(ae==null&&we==null){const je="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(je,{file:e.name}),new Error(je)}const N=(()=>{if(q==="change"){if(we==null)return"additions";if(ae==null)return"deletions"}})();if(N!=null){if(_.side!=null&&_.side!==N)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");_.side=N,_.increment()}const Be=this.getAnnotations("split",V?.lineNumber,O?.lineNumber,D,ee);if(Be!=null&&_.size>0&&_.flush(),V!=null){const je=gh(ae,Te.contentProperties);x("deletions",Te.gutterLineType,V.lineNumber,`${V.unifiedLineIndex},${Q}`,Te.gutterProperties),je!=null&&(ae=je)}if(O!=null){const je=gh(we,_e.contentProperties);x("additions",_e.gutterLineType,O.lineNumber,`${O.unifiedLineIndex},${Q}`,_e.gutterProperties),je!=null&&(we=je)}C7({diffStyle:"split",type:q,additionLine:we,deletionLine:ae,...Be,createAnnotationElement:je=>this.createAnnotationElement(je),context:v}),ue?.after!=null&&_7(ue.after,v,_)}const Z=s==="split"&&C!=null&&Q===C.splitLineStart+C.splitLineCount-1,W=Z?C.noEOFCRDeletions:!1,se=Z?C.noEOFCRAdditions:!1,fe=(V?.noEOFCR??!1)||W,oe=(O?.noEOFCR??!1)||se;if(oe||fe){if(s==="split"&&_.flush(),fe){const ue=q==="context"||q==="context-expanded"?q:"change-deletion";s==="unified"?(v.unifiedContentAST.push(hh(ue)),v.pushToGutter("unified",hi(ue,"metadata",1))):(v.deletionsContentAST.push(hh(ue)),v.pushToGutter("deletions",hi(ue,"metadata",1)),oe||(v.pushToGutter("additions",hi(void 0,"buffer",1)),v.additionsContentAST.push(fh(1))))}if(oe){const ue=q==="context"||q==="context-expanded"?q:"change-addition";s==="unified"?(v.unifiedContentAST.push(hh(ue)),v.pushToGutter("unified",hi(ue,"metadata",1))):(v.additionsContentAST.push(hh(ue)),v.pushToGutter("additions",hi(ue,"metadata",1)),fe||(v.pushToGutter("deletions",hi(void 0,"buffer",1)),v.deletionsContentAST.push(fh(1))))}v.incrementRowCount(1)}R>0&&u!=="simple"&&E({hunkIndex:q==="context-expanded"?D:D+1,collapsedLines:R,rangeSize:b,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),v.incrementRowCount(1)}}),s==="split"&&_.flush();const M=Math.max(BY(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),S=t.bufferBefore>0||t.bufferAfter>0,I=!d&&e.type!=="deleted",F=!d&&e.type!=="new",j=v.rowCount>0||S;f=I&&j?f:void 0,h=F&&j?h:void 0,p=d&&j?p:void 0;const P=this.createPreElement(h!=null&&f!=null,M);return{unifiedGutterAST:d&&j?v.unifiedGutterAST.children:void 0,unifiedContentAST:p,deletionsGutterAST:F&&j?v.deletionsGutterAST.children:void 0,deletionsContentAST:h,additionsGutterAST:I&&j?v.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:m,preNode:P,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:M,rowCount:v.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const n=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,r=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;const i=Zl(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,IE(r,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",r=this.renderCodeAST("unified",e);if(r!=null)return t.push(gt({tagName:"code",children:r,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const i=this.renderCodeAST("deletions",e);i!=null&&t.push(gt({tagName:"code",children:i,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(gt({tagName:"code",children:s,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return ys(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?ys(e):ys(gt({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}getAnnotations(e,t,n,r,i){const s={type:"annotation",hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(const a of this.deletionAnnotations[t]??[])s.annotations.push(Xa(a));const o={type:"annotation",hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(const a of this.additionAnnotations[n]??[])(e==="unified"?s:o).annotations.push(Xa(a));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(o.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:o}}renderHeader(e){const{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return xE({fileOrDiff:e,mode:t,stickyHeader:n})}};function x7(e){return`${e} unmodified line${e>1?"s":""}`}function S7(e,t){for(const n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function _7(e,t,n){for(const{deletion:r,addition:i}of e){if(r==null&&i==null)continue;const s=r!=null&&i!=null?void 0:r==null?"deletions":"additions";(s==null||n.side!==s)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter("deletions",r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter("additions",i.gutter)),s!=null&&(n.side=s,n.increment()),t.incrementRowCount(1)}}function C7({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:s,additionSpan:o,createAnnotationElement:a,context:l}){let c=!1;if(e==="unified"){if(r!=null?l.unifiedContentAST.push(r):n!=null&&l.unifiedContentAST.push(n),i!=null){const u=t==="change"?n!=null?"change-deletion":"change-addition":t;l.unifiedContentAST.push(a(i)),l.pushToGutter("unified",hi(u,"annotation",1)),c=!0}}else if(e==="split"){if(n!=null&&l.deletionsContentAST.push(n),r!=null&&l.additionsContentAST.push(r),s!=null){const u=t==="change"?n!=null?"change-deletion":"context":t;l.deletionsContentAST.push(a(s)),l.pushToGutter("deletions",hi(u,"annotation",1)),c=!0}if(o!=null){const u=t==="change"?r!=null?"change-addition":"context":t;l.additionsContentAST.push(a(o)),l.pushToGutter("additions",hi(u,"annotation",1)),c=!0}}c&&l.incrementRowCount(1)}function m1(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:s,isLastHunk:o,isExpandable:a},l){if(n<=0)return;const c=e==="unified"?l.unifiedContentAST:e==="deletions"?l.deletionsContentAST:l.additionsContentAST;if(l.hunkSeparators==="metadata"){i!=null&&(l.pushToGutter(e,Ll({type:"metadata",content:i,isFirstHunk:s,isLastHunk:o})),c.push(Ll({type:"metadata",content:i,isFirstHunk:s,isLastHunk:o})),e!=="additions"&&l.incrementRowCount(1));return}if(l.hunkSeparators==="simple"){t>0&&(l.pushToGutter(e,Ll({type:"simple",isFirstHunk:s,isLastHunk:!1})),c.push(Ll({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&l.incrementRowCount(1));return}const u=jY(e,t),d=r>l.expansionLineCount,f=a?t:void 0;l.pushToGutter(e,Ll({type:l.hunkSeparators,content:x7(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:s,isLastHunk:o})),c.push(Ll({type:l.hunkSeparators,content:x7(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:s,isLastHunk:o})),e!=="additions"&&l.incrementRowCount(1),l.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:a?{up:!s,down:!o,chunked:d}:void 0})}function gh(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function g1(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function iQ(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function sQ(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function oQ(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}let aQ=-1;var nT=class{static LoadedCustomComponent=qE;__id=`file-diff:${++aQ}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(e={theme:_n},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new aE,this.scrollSyncManager=new zY,this.interactionManager=new oE("diff",J0(e,typeof e.hunkSeparators=="function"||(e.hunkSeparators??"line-info")==="line-info"||e.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return oQ(e)}createHunksRenderer(e){return new rQ(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t="additions")=>{if(this.fileDiff==null)return;const n=this.fileDiff.hunks.at(-1);let r,i;e:for(const s of this.fileDiff.hunks){let o=t==="deletions"?s.deletionStart:s.additionStart;const a=t==="deletions"?s.deletionCount:s.additionCount;let l=s.splitLineStart,c=s.unifiedLineStart;if(e=o+a){if(s===n){const u=e-(o+a);r=c+s.unifiedLineCount+u,i=l+s.splitLineCount+u;break e}continue}for(const u of s.hunkContent)if(u.type==="context")if(ethis.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators=="function")}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:e="split",overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t==="wrap"),t==="scroll"&&e==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,this.lineAnnotations=[],this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){const{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:i,oldFile:s,newFile:o,fileDiff:a}=e;this.hydrateElements(t,n),uQ(this.pre,lQ({fileDiff:a,oldFile:s,newFile:o}),this.options.collapsed)||dQ(this.headerElement,cQ({fileDiff:a,oldFile:s,newFile:o}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:a,oldFile:s,newFile:o,lineAnnotations:i}),r||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),zE(e,t);for(const n of e.shadowRoot?.children??[]){if(n instanceof SVGElement){this.spriteSVG=n;continue}if(n instanceof HTMLElement){if(n instanceof HTMLPreElement){this.pre=n;for(const r of n.children)!(r instanceof HTMLElement)||r.tagName.toLowerCase()!=="code"||("deletions"in r.dataset&&(this.codeDeletions=r),"additions"in r.dataset&&(this.codeAdditions=r),"unified"in r.dataset&&(this.codeUnified=r));continue}if("diffsHeader"in n.dataset){this.headerElement=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute(fd)){this.themeCSSStyle=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute(hd)){this.unsafeCSSStyle=n,this.appliedUnsafeCSS=n.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?Dy(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,deferManagers:r=!1,forceRender:i=!1,preventEmit:s=!1,lineAnnotations:o,fileContainer:a,containerWrapper:l,renderRange:c}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:u=!1,themeType:d="system"}=this.options,f=u?void 0:c,h=this.hasThemeChanged(),p=e!=null&&t!=null&&(!ps(e,this.deletionFile)||!ps(t,this.additionFile));let m=n!=null&&n!==this.fileDiff;const g=o!=null&&(o.length>0||this.lineAnnotations.length>0)?o!==this.lineAnnotations:!1;if(!u&&gm(f,this.renderRange)&&!i&&!g&&!h&&(n!=null&&n===this.fileDiff||n==null&&!p))return this.applyCachedThemeState(d);const{renderRange:y}=this;if(this.renderRange=f,this.deletionFile=e,this.additionFile=t,n!=null?this.fileDiff=n:e!=null&&t!=null&&p&&(m=!0,this.fileDiff=Dy(e,t,this.options.parseDiffOptions)),m&&(this.cachedHeaderHTML=void 0),o!=null&&this.setLineAnnotations(o),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:v=!1,disableFileHeader:b=!1}=this.options;if(b&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,l),this.applyCachedThemeState(d),u){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const _=this.hunksRenderer.renderDiff(this.fileDiff,rE);_!=null&&this.applyThemeState(a,_.themeStyles,d,_.baseThemeType),_?.headerElement!=null&&this.applyHeaderToDOM(_.headerElement,a),this.renderSeparators([]),this.injectUnsafeCSS()}catch(_){if(v)throw _;console.error(_),_ instanceof Error&&this.applyErrorToDOM(_,a)}return s||this.emitPostRender(),!0}try{const _=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(i,g,p||m||h)&&this.applyPartialRender({previousRenderRange:y,renderRange:f}))){const x=this.hunksRenderer.renderDiff(this.fileDiff,f);if(x==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(a,x.themeStyles,d,x.baseThemeType),x.headerElement!=null&&this.applyHeaderToDOM(x.headerElement,a),x.additionsContentAST!=null||x.deletionsContentAST!=null||x.unifiedContentAST!=null?this.applyHunksToDOM(_,x):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(x.hunkData)}this.applyBuffers(_,f),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,r||this.flushManagers()}catch(_){if(v)throw _;console.error(_),_ instanceof Error&&this.applyErrorToDOM(_,a)}return s||this.emitPostRender(),!0}emitPostRender(e=!1){const{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,"unmount");return}if(t==null)return;const r=this.mounted?"update":"mount";this.mounted=!0,n?.(t,this,r)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(const{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const t=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",t.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${e}px`),!0}primeHighlightCache(){const{fileDiff:e,workerManager:t}=this;if(e==null||t==null||kd(e))return;const n=this.options.tokenizeMaxLength??pd;Math.max(e.additionLines.length,e.deletionLines.length)>n||t.primeDiffHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){const{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!="function"){for(const{element:r}of this.separatorCache.values())r.remove();this.separatorCache.clear();return}const n=new Map(this.separatorCache);for(const r of e){const i=r.slotName;let s=this.separatorCache.get(i);if(s==null||!sQ(r,s.hunkData)){s?.element.remove();const o=document.createElement("div");o.style.display="contents",o.slot=r.slotName;const a=t(r,this);a!=null&&o.appendChild(a),this.fileContainer.appendChild(o),s={element:o,hunkData:r},this.separatorCache.set(i,s)}n.delete(i)}for(const[r,{element:i}]of n.entries())this.separatorCache.delete(r),i.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear();return}const e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(const[n,r]of this.lineAnnotations.entries()){const i=`${n}-${Xa(r)}`;let s=this.annotationCache.get(i);if(s==null||!iQ(r,s.annotation)){s?.element.remove();const o=t(r);if(o==null)continue;s={element:RE(Xa(r)),annotation:r},s.element.appendChild(o),this.fileContainer.appendChild(s.element),this.annotationCache.set(i,s)}e.delete(i)}for(const[n,{element:r}]of e.entries())this.annotationCache.delete(n),r.remove()}renderGutterUtility(){const{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=OE();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){const{fileContainer:n}=this,r=e??n??document.createElement(Z0),i=n!==r;return i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){const{shadowRoot:t}=e;if(t!=null)for(const n of t.children)n instanceof SVGElement?this.spriteSVG??=n:np(n)&&n.hasAttribute(fd)?(this.themeCSSStyle??=n,this.hasAdoptedThemeCSS=!0):np(n)&&n.hasAttribute(hd)&&(this.unsafeCSSStyle??=n,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});if(this.spriteSVG==null){const n=document.createElement("div");n.innerHTML=ME;const r=n.firstChild;r instanceof SVGElement&&(this.spriteSVG=r)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute("data-unified")?this.codeUnified=t:t.hasAttribute("data-deletions")?this.codeDeletions=t:t.hasAttribute("data-additions")&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:n}=this,r=this.cachedHeaderHTML??ys(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){const c=document.createElement("div");c.innerHTML=r;const u=c.firstElementChild;if(!(u instanceof HTMLElement))return;this.headerElement!=null?t.shadowRoot?.replaceChild(u,this.headerElement):t.shadowRoot?.prepend(u),this.headerElement=u,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;const{renderCustomHeader:i,renderHeaderPrefix:s,renderHeaderMetadata:o}=this.options;if(i!=null){const c=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,hw,c),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const a=s?.(n)??void 0,l=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,dw,a),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,fw,l),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}const i=t??this.createHeaderSlotElement(n);return t==null&&e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){const t=document.createElement("div");return t.slot=e,t}injectUnsafeCSS(){const{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=PE(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=FE(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){const i=e.shadowRoot??e.attachShadow({mode:"open"}),s=r??n,o=this.options.theme??_n,a=typeof o=="string"?o:{...o},l=yd(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===s&&this.appliedThemeCSS.scrollbarGutter===l){this.appliedThemeCSS.theme=a;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:a,themeStyles:t,themeType:s,baseThemeType:r,scrollbarGutter:l};return}this.themeCSSStyle=BE({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:HE(t,s,l)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:a,themeStyles:t,themeType:s,baseThemeType:r,scrollbarGutter:l}:void 0}hydrateMeasuredScrollbar(){const e=this.fileContainer?.shadowRoot;e==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=VE(this.themeCSSStyle.textContent??"",yd(e)))}applyHunksToDOM(e,t){const{overflow:n="scroll"}=this.options,r=(this.options.hunkSeparators??"line-info")==="line-info",i=n==="wrap"?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let s=!1;const o=[],a=this.hunksRenderer.renderCodeAST("unified",t),l=this.hunksRenderer.renderCodeAST("deletions",t),c=this.hunksRenderer.renderCodeAST("additions",t);a!=null?(s=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=c0({code:this.codeUnified,columnType:"unified",rowSpan:i,containerSize:r}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(a),o.push(this.codeUnified)):l!=null||c!=null?(l!=null?(s=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=c0({code:this.codeDeletions,columnType:"deletions",rowSpan:i,containerSize:r}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(l),o.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),c!=null?(s=s||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=c0({code:this.codeAdditions,columnType:"additions",rowSpan:i,containerSize:r}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(c),o.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),o.length===0?e.textContent="":s&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){const{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:s,options:{diffStyle:o="split"}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;const a=this.getCodeColumns(o,r,s,i);if(a==null)return!1;const l=e.startingLine,c=t.startingLine,u=l+e.totalLines,d=c+t.totalLines,f=Math.max(l,c),h=Math.min(u,d);if(h<=f)return!1;const p=Math.max(0,f-l),m=Math.max(0,u-h),g=this.trimColumns({columns:a,trimStart:p,trimEnd:m,previousStart:l,overlapStart:f,overlapEnd:h,diffStyle:o});if(g<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount{if(!(M<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:E,totalLines:M,bufferBefore:0,bufferAfter:0})},b=v(c,Math.max(f-c,0));if(b==null&&ch)return!1;const x=(E,M)=>{if(E!=null){if(o==="unified"&&!Array.isArray(a))this.insertPartialHTML(o,a,E,M);else if(o==="split"&&Array.isArray(a))this.insertPartialHTML(o,a,E,M);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");y+=E.rowCount}};return this.cleanupErrorWrapper(),x(b,"afterbegin"),x(_,"beforeend"),this.lastRowCount!==y&&(this.applyRowSpan(o,a,y),this.lastRowCount=y),!0}insertPartialHTML(e,t,n,r){if(e==="unified"&&!Array.isArray(t)){const i=this.hunksRenderer.renderCodeAST("unified",n);this.renderPartialColumn(t,i,r)}else if(e==="split"&&Array.isArray(t)){const i=this.hunksRenderer.renderCodeAST("deletions",n),s=this.hunksRenderer.renderCodeAST("additions",n);this.renderPartialColumn(t[0],i,r),this.renderPartialColumn(t[1],s,r)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(e,t,n){if(e==null||t==null)return;const r=E7(t[0]),i=E7(t[1]);if(r==null||i==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const s=i.at(0);n==="beforeend"&&s?.type==="element"&&typeof s.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(s.properties["data-buffer-size"],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);const o=i.at(-1);n==="afterbegin"&&o?.type==="element"&&typeof o.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(o.properties["data-buffer-size"],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,s){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;const o=this.getBufferSize(t.dataset);o!=null&&(s?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){const r=i=>{i!=null&&(i.gutter.style.setProperty("grid-row",`span ${n}`),i.content.style.setProperty("grid-row",`span ${n}`))};if(e==="unified"&&!Array.isArray(t))r(t);else if(e==="split"&&Array.isArray(t))r(t[0]),r(t[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(e,t,n){let r=0,i=0,s=0,o=!1;const a=n>=0;if(e==null)return 0;const l=Array.from(e.content.children),c=Array.from(e.gutter.children);if(l.length!==c.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;s0||a&&r>=n)&&(u.remove(),d.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if("separator"in u.dataset&&"separator"in d.dataset){(t>0||a&&r>=n)&&(u.remove(),d.remove(),i++);continue}if(u.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in d.dataset){(t>0||a&&r>=n)&&(u.remove(),d.remove(),i++);continue}if(u.dataset.gutterBuffer==="metadata"&&"noNewline"in d.dataset){(t>0||a&&r>=n)&&(u.remove(),d.remove(),i++);continue}if(u.dataset.gutterBuffer==="buffer"&&"contentBuffer"in d.dataset){const f=this.getBufferSize(d.dataset);if(f==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(t>0){const h=Math.min(t,f),p=f-h;p>0?(this.updateBufferSize(u,p),this.updateBufferSize(d,p),i+=h):(u.remove(),d.remove(),i+=f),t-=h,t===0&&p===0&&(o=!0)}else if(a){const h=r,p=r+f-1;if(n<=h)u.remove(),d.remove(),i+=f;else if(n<=p){const m=p-n+1,g=f-m;this.updateBufferSize(u,g),this.updateBufferSize(d,g),i+=m}}r+=f;continue}throw console.error({gutterElement:u,contentElement:d}),new Error("FileDiff.trimColumnRows: unknown row elements")}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:s,trimStart:o}){const a=Math.max(0,r-i),l=n-i;if(l<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const c=o>0,u=s>0;if(!c&&!u)return 0;const d=c?a:0,f=u?l:-1;if(t==="unified"&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t==="split"&&Array.isArray(e)){const h=this.trimColumnRows(e[0],d,f),p=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&h!==p)throw new Error("FileDiff.trimColumns: split columns out of sync");return e[0]!=null?h:p}else throw console.error({diffStyle:t,columns:e}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(e){const t=Number.parseInt(e?.bufferSize??"",10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty("grid-row",`span ${t}`),e.style.setProperty("min-height",`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,r){function i(s){if(s==null)return;const o=s.children[0],a=s.children[1];if(!(!(o instanceof HTMLElement)||!(a instanceof HTMLElement)||o.dataset.gutter==null||a.dataset.content==null))return{gutter:o,content:a}}if(e==="unified")return i(t);{const s=i(n),o=i(r);return s!=null||o!=null?[s,o]:void 0}}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",e.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${t.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",e.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${t.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){const{diffIndicators:s="bars",disableBackground:o=!1,disableLineNumbers:a=!1,overflow:l="scroll",diffStyle:c="split"}=this.options,u={type:"diff",diffIndicators:s,disableBackground:o,disableLineNumbers:a,overflow:l,split:c==="unified"?!1:t!=null&&n!=null,totalLines:r,customProperties:i};DE(u,this.appliedPreAttributes)||(jE(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const n=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",n.appendChild(this.errorWrapper);const r=document.createElement("div");r.dataset.errorMessage="",r.innerText=e.message,this.errorWrapper.appendChild(r);const i=document.createElement("pre");i.dataset.errorStack="",i.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function lQ({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function cQ({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function uQ(e,t,n=!1){return!n&&e==null&&t}function dQ(e,t,n=!1){return e==null&&t&&!n}function E7(e){if(!(e==null||e.type!=="element"))return e.children??[]}function fQ({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:s,collapsedContextThreshold:o}){let a=ds(t,n),l=a;const c=i?!0:s,u=e.hunks.length-1;for(let d=0;d0){const y=Iu({type:r,metrics:t,hunkIndex:d,hunkSpecs:f.hunkSpecs})?.totalHeight??0;a+=y,l+=y}a+=f.splitLineCount*t.lineHeight,l+=f.unifiedLineCount*t.lineHeight;const m=hQ(f);a+=m.split*t.lineHeight,l+=m.unified*t.lineHeight;const g=d===u?wd({fileDiff:e,hunkIndex:d,expandedHunks:c,collapsedContextThreshold:o,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(g!=null){const y=(g.fromStart+g.fromEnd)*t.lineHeight;if(a+=y,l+=y,g.collapsedLines>0){const v=Au({type:r,metrics:t})?.totalHeight??0;a+=v,l+=v}}}if(e.hunks.length>0){const d=rp(t);a+=d,l+=d}return{splitHeight:a,unifiedHeight:l}}function hQ(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const n=t.lines>0?1:0;return{split:n,unified:n}}return pQ(e,t)}function pQ(e,t){const n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}const Ry=5e3;let mQ=-1;var gQ=class extends nT{__id=`little-virtualized-file-diff:${++mQ}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=d1(n)}setMetrics(e,t=!1){const n=d1(e);!t&&Q0(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!pw(t,e),r=n&&kQ(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:xQ(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const n=this.getDiffStyle(),r=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(const i of r){if(i==null)continue;const s=i.children[1];if(s instanceof HTMLElement)for(const o of s.children){if(!(o instanceof HTMLElement))continue;const a=o.dataset.lineIndex;if(a==null)continue;const l=_Q(a,n);let c=o.getBoundingClientRect().height,u=!1;o.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in o.nextElementSibling.dataset||"noNewline"in o.nextElementSibling.dataset)&&("noNewline"in o.nextElementSibling.dataset&&(u=!0),c+=o.nextElementSibling.getBoundingClientRect().height);const d=this.getEstimatedLineHeight(u),f=this.cache.heightDeltas.get(l)??0,h=c-d;h!==f&&(e=!0,this.cache.measuredHeightDeltaTotal+=h-f,h===0?this.cache.heightDeltas.delete(l):this.cache.heightDeltas.set(l,h))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,n){const r=!Yl(this.fileDiff,e);let i=n?.resetDiffLayoutCache===!0||r,s=r||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=d1(n.metrics),i=!0,s=!0);const{collapsed:o=!1}=this.options;return this.currentCollapsed!==o&&(this.currentCollapsed=o,i=!0),i&&this.resetLayoutCache({includeEstimatedHeights:s}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null)return;const n=this.getLineIndex(e,t);if(n==null)return;const{disableFileHeader:r=!1,expandUnchanged:i=!1,collapsed:s=!1,collapsedContextThreshold:o=qr}=this.options,a=this.getDiffStyle(),l=this.getHunkSeparatorType(),c=a==="split"?n[1]:n[0];this.approximateLayoutCheckpoints();const u=this.getLayoutCheckpointBeforeLineIndex(c);let d=u?.top??ds(this.metrics,r);if(s)return{top:d,height:0};let f;return Uu({diff:this.fileDiff,diffStyle:a,startingLine:u?.renderedLineIndex??0,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:h,hunk:p,collapsedBefore:m,collapsedAfter:g,deletionLine:y,additionLine:v})=>{const b=a==="split"?v?.splitLineIndex??y?.splitLineIndex:v?.unifiedLineIndex??y?.unifiedLineIndex;if(b==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(m>0){const x=Iu({type:l,metrics:this.metrics,hunkIndex:h,hunkSpecs:p?.hunkSpecs});if(x!=null){if(d+=x.gapBefore,c>=b-m&&c0){const x=Au({type:l,metrics:this.metrics});if(x!=null){if(c>b&&c<=b+g)return f={top:d+x.gapBefore,height:x.height},!0;d+=x.totalHeight}}return!1}}),f}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:i=qr}=this.options;if(r)return;const s=this.getDiffStyle(),o=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const a=this.getLayoutCheckpointBeforeTop(e);let l=a?.top??ds(this.metrics,t),c;return Uu({diff:this.fileDiff,diffStyle:s,startingLine:a?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({hunkIndex:u,hunk:d,collapsedBefore:f,collapsedAfter:h,deletionLine:p,additionLine:m})=>{const g=s==="split"?m?.splitLineIndex??p?.splitLineIndex:m?.unifiedLineIndex??p?.unifiedLineIndex;if(g==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(f>0){const v=Iu({type:o,metrics:this.metrics,hunkIndex:u,hunkSpecs:d?.hunkSpecs});v!=null&&(l+=v.totalHeight)}if(l>=e&&(p!=null?c={lineNumber:p.lineNumber,side:"deletions",top:l}:m!=null&&(c={lineNumber:m.lineNumber,side:"additions",top:l}),c!=null))return!0;const y=this.getLineHeight(g,(m?.noEOFCR??!1)||(p?.noEOFCR??!1));if(l+=y,h>0){const v=Au({type:o,metrics:this.metrics});v!=null&&(l+=v.totalHeight)}return!1}}),c}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:r,totalLines:i}=t;let s=0;if(i===0){const o=e??this.virtualizer.getWindowSpecs();this.top{this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){const t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;const n=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:r=!1,collapsed:i=!1}=this.options,s=ds(this.metrics,r);if(this.height+=s,i){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!n&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const e=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=qr}=this.options,{splitHeight:r,unifiedHeight:i}=fQ({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n});this.cache.estimatedSplitHeight=r,this.cache.estimatedUnifiedHeight=i}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,forceRender:i=!1,...s}={}){const{forceRenderOverride:o,isSetup:a}=this;if(this.forceRenderOverride=void 0,this.fileDiff??=r??(t!=null&&n!=null?Dy(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(a)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const d=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(d==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");d.connect(e,this),this.isVisible=d.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const l=this.virtualizer.getWindowSpecs(),c=this.top??0,u=this.computeRenderRangeFromWindow(this.fileDiff,c,l);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:u,oldFile:t,newFile:n,forceRender:o??i,...s})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return SQ(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=qr}=this.options,r=this.fileDiff.hunks.length-1,i=this.getDiffStyle(),s=this.getHunkSeparatorType(),o=t?!0:this.hunksRenderer.getExpandedHunksMap(),a=vQ(this.cache.heightDeltas);let l=ds(this.metrics,e),c=0;const u=({rowCount:d,startLineIndex:f,preSeparatorHeight:h=0,postSeparatorHeight:p=0,metadataOffsets:m=[]})=>{if(d<=0)return;const g=c,y=c+d;let v=yQ(g);for(;v0?h:0)+b*this.metrics.lineHeight+bQ(m,b)*this.metrics.lineHeight+T7(a,f,f+b);this.cache.checkpoints.push({renderedLineIndex:v,lineIndex:f+b,top:_}),v+=Ry}l+=h+d*this.metrics.lineHeight+m.length*this.metrics.lineHeight+T7(a,f,f+d)+p,c=y};for(let d=0;d0?Iu({type:s,metrics:this.metrics,hunkIndex:d,hunkSpecs:f.hunkSpecs})?.totalHeight??0:0;u({rowCount:h.fromStart,startLineIndex:(i==="split"?f.splitLineStart:f.unifiedLineStart)-h.rangeSize});let m=p;u({rowCount:h.fromEnd,startLineIndex:(i==="split"?f.splitLineStart:f.unifiedLineStart)-h.fromEnd,preSeparatorHeight:m}),h.fromEnd>0&&(m=0);const g=d===r?wd({fileDiff:this.fileDiff,hunkIndex:d,expandedHunks:o,collapsedContextThreshold:n,errorPrefix:"VirtualizedFileDiff"}):void 0,y=g!=null&&g.collapsedLines>0?Au({type:s,metrics:this.metrics})?.totalHeight??0:0,v=g!=null?g.fromStart+g.fromEnd:0,b=i==="split"?f.splitLineCount:f.unifiedLineCount,_=i==="split"?f.splitLineStart:f.unifiedLineStart;u({rowCount:b,startLineIndex:_,preSeparatorHeight:m,postSeparatorHeight:v===0?y:0,metadataOffsets:wQ({diffStyle:i,hunk:f,rowCount:b})}),g!=null&&v>0&&u({rowCount:v,startLineIndex:_+b,postSeparatorHeight:y})}this.cache.totalLines=c}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){const i=t+n>>1,s=this.cache.checkpoints[i];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(r=s,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){const s=n+r>>1,o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");o.top<=e?(i=s,n=s+1):r=s-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let s=i;s>=0;s--){const o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(o.renderedLineIndex%t===0)return o}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const a of e.hunks)n+=t==="split"?a.splitLineCount:a.unifiedLineCount;return n}const{expandUnchanged:r=!1,collapsedContextThreshold:i=qr}=this.options,s=r?!0:this.hunksRenderer.getExpandedHunksMap();for(const[a,l]of e.hunks.entries()){const c=t==="split"?l.splitLineCount:l.unifiedLineCount;n+=c;const u=Math.max(l.collapsedBefore,0),{fromStart:d,fromEnd:f,renderAll:h}=bd({isPartial:e.isPartial,rangeSize:u,expandedHunks:s,hunkIndex:a,collapsedContextThreshold:i});u>0&&(n+=h?u:d+f)}const o=wd({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:s,collapsedContextThreshold:i,errorPrefix:"VirtualizedFileDiff"});return o!=null&&(n+=o.fromStart+o.fromEnd),n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:i=!1,expandUnchanged:s=!1,collapsedContextThreshold:o=qr}=this.options,{hunkLineCount:a,lineHeight:l}=this.metrics,c=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=this.height;let f=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,c);const h=ds(this.metrics,i),p=e.hunks.length>0?rp(this.metrics):0;if(tr)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-h-p};if(f<=a||e.hunks.length===0)return{startingLine:0,totalLines:a,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),f=this.cache.totalLines>0?this.cache.totalLines:f;const m=Math.ceil(Math.max(r-n,0)/l),g=Math.ceil(m/a)*a+a,y=g/a,v=y,b=[],_=(n+r)/2,x=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-g*l*2),a);let E=t+(x?.top??h),M=x?.renderedLineIndex??0,S,I,F;if(Uu({diff:e,diffStyle:c,startingLine:x?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:V,hunk:q,collapsedBefore:Q,collapsedAfter:te,deletionLine:ee,additionLine:ne})=>{const Z=ne!=null?ne.splitLineIndex:ee.splitLineIndex,W=ne!=null?ne.unifiedLineIndex:ee.unifiedLineIndex,se=(ne?.noEOFCR??!1)||(ee?.noEOFCR??!1),fe=(Q>0?Iu({type:u,metrics:this.metrics,hunkIndex:V,hunkSpecs:q?.hunkSpecs}):void 0)?.totalHeight??0;E+=fe;const oe=M%a===0,ue=Math.floor(M/a);if(oe&&(b[ue]=E-(t+h+fe),F!=null)){if(F<=0)return!0;F--}const ae=this.getLineHeight(c==="split"?Z:W,se);return E>n-ae&&E_&&(I=ue),F==null&&E>=r&&oe&&(F=v),M++,E+=ae,te>0&&(E+=Au({type:u,metrics:this.metrics})?.totalHeight??0),!1}}),S==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-h-p};I??=S;const j=Math.round(I-y/2),P=Math.max(0,Math.ceil(f/a)-y),D=Math.max(0,Math.min(j,P)),C=D*a,L=j<0?g+j*a:g,R=b[D]??0,O=D+L/a;return{startingLine:C,totalLines:L,bufferBefore:R,bufferAfter:Os[0]-o[0]),n=[],r=[0];let i=0;for(const[s,o]of t)n.push(s),i+=o,r.push(i);return{lineIndexes:n,prefixTotals:r}}function T7({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;const i=L7(e,n);return(t[L7(e,r)]??0)-(t[i]??0)}function L7(e,t){let n=0,r=e.length;for(;n>1,s=e[i];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const o=[],a=n-s;return r.deletions>0&&t.noEOFCRDeletions&&o.push(a+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function kQ(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??qr)!==(t.collapsedContextThreshold??qr)||e.unsafeCSS!==t.unsafeCSS}function xQ(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??qr)!==(t.collapsedContextThreshold??qr)}function SQ(e){return typeof e=="function"?"custom":e??"line-info"}function _Q(e,t){const[n,r]=e.split(",").map(Number);return t==="split"?r:n}function CQ(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}const rT=1e3,EQ=rT*4,TQ=[0,1e-6,.99999,1],LQ={overscrollSize:rT,intersectionObserverMargin:EQ,resizeDebugging:!1};let vh=0,IQ=-1;var iT=class ls{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++IQ}`;config;type="simple";intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(t){this.config={...LQ,...t}}setup(t,n){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:TQ,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{ls.__STOP?(ls.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:ls.__lastScrollPosition}),Ri(this.computeRenderRangeAndEmit)):(ls.__lastScrollPosition=this.getScrollTop(),ls.__STOP=!0)};for(const[r,i]of this.connectQueue.entries())this.connect(r,i);this.connectQueue.clear(),this.markDOMDirty(),Ri(this.computeRenderRangeAndEmit)}}instanceChanged(t,n){this.instancesChanged.add(t),n&&this.markDOMDirty(),Ri(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=t7({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}isInstanceVisible(t,n){const r=this.getScrollTop(),i=this.getHeight(),s=this.config.intersectionObserverMargin,o=r-s,a=r+i+s;return!(ta)}handleContainerResize=t=>{if(this.root==null)return;let n=!1;for(const r of t){const i=r.borderBoxSize[0].blockSize;this.root instanceof Document?i!==this.scrollHeight&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:i-vh,newSize:i}),vh=i)):r.target===this.root?i!==this.height&&(this.heightDirty=!0,n=!0):r.target===this.contentContainer&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:i-vh,newSize:i}),vh=i))}n&&Ri(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(t){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),t??=this.root.firstElementChild??void 0,t instanceof HTMLElement&&(this.contentContainer=t,this.resizeObserver?.observe(t))}cleanUp(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0}getOffsetInScrollContainer(t){return this.getScrollTop()+hu(t,this.getScrollContainerElement())}connect(t,n){if(this.observers.has(t))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(t,n):(this.intersectionObserver.observe(t),this.observers.set(t,n),this.instancesChanged.add(n),this.markDOMDirty(),Ri(this.computeRenderRangeAndEmit)),()=>this.disconnect(t)}disconnect(t){const n=this.observers.get(t);this.connectQueue.delete(t),n!=null&&(this.intersectionObserver?.unobserve(t),this.observers.delete(t),this.visibleInstances.delete(t)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),Ri(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{ls.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,Ri(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{ls.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,Ri(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{ls.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,Ri(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(ls.__STOP)return;const t=this.heightDirty||this.scrollHeightDirty;if(!this.scrollDirty&&!this.scrollHeightDirty&&!this.heightDirty&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.instancesChanged.size===0)return;let n=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const s=t7({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&CQ(this.windowSpecs,s)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty)return;this.windowSpecs=s}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const r=this.getScrollAnchor(this.height),i=new Set;for(const s of t?this.observers.values():this.visibleInstances.values())s.onRender(t)&&i.add(s);for(const s of this.instancesChanged)i.has(s)||s.onRender(t)&&i.add(s);this.scrollFix(r);for(const s of i)s.reconcileHeights();n||=this.instancesChanged.size>0,n&&this.markDOMDirty(),(n||t)&&Ri(this.computeRenderRangeAndEmit),i.clear(),this.instancesChanged.clear()};scrollFix(t){if(t==null)return;const n=this.getScrollContainerElement(),{lineIndex:r,lineOffset:i,fileElement:s,fileOffset:o,fileTypeOffset:a}=t;if(r!=null&&i!=null){const c=s.shadowRoot?.querySelector(`[data-line][data-line-index="${r}"]`);if(c instanceof HTMLElement){const u=hu(c,n);if(u!==i){const d=u-i;this.applyScrollFix(d)}return}}const l=hu(s,n);if(a==="top")l!==o&&this.applyScrollFix(l-o);else{const c=l+s.getBoundingClientRect().height;c!==o&&this.applyScrollFix(c-o)}}applyScrollFix(t){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+t,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+t,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(t){const n=this.getScrollContainerElement();let r;for(const[i]of this.visibleInstances.entries()){const s=hu(i,n),o=s+i.offsetHeight;let a,l;o<=0?(a=o,l="bottom"):(a=s,l="top");let c,u;if(o>0&&s=0&&(r.fileOffset<0||ar.fileOffset))&&(d=!0),d&&(r={fileElement:i,fileTypeOffset:l,fileOffset:a,lineIndex:c,lineOffset:u})}return r}handleIntersectionChange=t=>{this.scrollDirty=!0;for(const{target:n,isIntersecting:r}of t){if(!(n instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const i=this.observers.get(n);i!=null&&(r&&!this.visibleInstances.has(n)?(i.setVisibility(!0),this.visibleInstances.set(n,i),this.visibleInstancesDirty=!0):!r&&this.visibleInstances.has(n)&&(i.setVisibility(!1),this.visibleInstances.delete(n),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&Ri(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let t=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return t=Math.max(0,Math.min(t,this.getScrollHeight()-this.getHeight())),this.scrollTop=t,t}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function hu(e,t){const n=e.getBoundingClientRect(),r=t?.getBoundingClientRect().top??0;return n.top-r}function I7(e){const t=[];for(const n of e){const r=Qa.get(n);if(r==null)throw new Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(r)}return t}function A7(e){for(const t of Array.isArray(e)?e:[e])if(!Qa.has(t))return!1;return!0}async function M7(e){const t=[],n=[];for(const r of e){if(r==="text"||r==="ansi")continue;const i=uE(r)??cE(r);"then"in i?n.push(i):t.push(i)}return n.length>0&&await Promise.all(n).then(r=>{for(const i of r){if(i==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(i)}}),t}function D7(e){return ki.getResolvedThemes(e)}function AQ(e,t){try{const n=mw({name:e,load:t});ki.registerTheme(n.name,n.load)}catch(n){if(n instanceof hE){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}throw n}}async function R7(e){for(const n of e)yE(n);const t=await ki.resolveThemes(e);for(let n=0;nPromise.resolve(MQ));function DQ(e){let t=e;const n=/\$\$([\s\S]*?)\$\$/g;t=t.replace(n,(i,s)=>{try{return ty.renderToString(s,{displayMode:!0,throwOnError:!1})}catch{return`$$${s}$$`}});const r=/(?{try{return ty.renderToString(s,{displayMode:!1,throwOnError:!1})}catch{return`$${s}$`}}),t}function RQ(e){const t=/(<(?:pre|code|kbd)[^>]*>[\s\S]*?<\/(?:pre|code|kbd)>)/gi;return e.split(t).map((r,i)=>i%2===1?r:DQ(r)).join("")}async function OQ(e){const t=/

    ([\s\S]*?)<\/code><\/pre>/g,n=[...e.matchAll(t)];if(n.length===0)return e;const r=await wc({themes:["OpenCode"],langs:[],preferredHighlighter:"shiki-wasm"});let i=e;for(const s of n){const[o,a,l]=s,c=l.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'");let u=a||"text";u in Za||(u="text"),r.getLoadedLanguages().includes(u)||await r.loadLanguage(u);const d=r.codeToHtml(c,{lang:u,theme:"OpenCode",tabindex:!1});i=i.replace(o,()=>d)}return i}const{use:Zbe,provider:PQ}=an({name:"Marked",init:e=>{const t=qt.use({renderer:{link({href:n,title:r,text:i}){const s=r?` title="${r}"`:"";return`${i}`}}},CB({throwOnError:!1,nonStandard:!0}),LB({async highlight(n,r){const i=await wc({themes:["OpenCode"],langs:[],preferredHighlighter:"shiki-wasm"});return r in Za||(r="text"),i.getLoadedLanguages().includes(r)||await i.loadLanguage(r),i.codeToHtml(n,{lang:r||"text",theme:"OpenCode",tabindex:!1})}}));if(e.nativeParser){const n=e.nativeParser;return{async parse(r){const i=await n(r),s=RQ(i);return OQ(s)}}}return t}});function kt(e){const t=new TextEncoder().encode(e),n=Array.from(t,r=>String.fromCharCode(r)).join("");return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $Q(e){const t=atob(e.replace(/-/g,"+").replace(/_/g,"/")),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function xd(e){if(!e)return;let t=2166136261;for(let n=0;n>>0).toString(36)}function O7(e,t=5e5){if(!e)return;if(e.length<=t)return xd(e);const n=4096,i=[0,Math.floor(e.length*.25),Math.floor(e.length*.5),Math.floor(e.length*.75),e.length-n].map(s=>{const o=Math.max(0,Math.min(e.length-n,s-Math.floor(n/2)));return xd(e.slice(o,o+n))??""}).join(":");return`${e.length}:${i}`}const sT=`
    [data-annotation-slot] {
      padding: 12px;
      box-sizing: border-box;
    }
    
    [data-component="line-comment"] {
      position: absolute;
      right: 24px;
      z-index: var(--line-comment-z, 30);
    }
    
    [data-component="line-comment"][data-inline] {
      position: relative;
      right: auto;
      display: flex;
      width: 100%;
      min-width: 0;
      align-items: flex-start;
    }
    
    [data-component="line-comment"][data-open] {
      z-index: var(--line-comment-open-z, 100);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-button"] {
      width: 20px;
      height: 20px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--icon-interactive-base);
      box-shadow: var(--shadow-xs);
      cursor: default;
      border: none;
    }
    
    [data-component="line-comment"][data-variant="add"] [data-slot="line-comment-button"] {
      background: var(--syntax-diff-add);
    }
    
    [data-component="line-comment"] [data-component="icon"] {
      color: var(--white);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-icon"] {
      width: 12px;
      height: 12px;
      color: var(--white);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-button"]:focus {
      outline: none;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-button"]:focus-visible {
      box-shadow: var(--shadow-xs-border-focus);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-popover"] {
      position: absolute;
      top: calc(100% + 4px);
      right: -8px;
      z-index: var(--line-comment-popover-z, 40);
      min-width: 200px;
      max-width: none;
      box-sizing: border-box;
      border-radius: 8px;
      background: var(--surface-raised-stronger-non-alpha);
      box-shadow: var(--shadow-xxs-border);
      padding: 12px;
    }
    
    [data-component="line-comment"][data-inline] [data-slot="line-comment-popover"] {
      position: relative;
      top: auto;
      right: auto;
      margin-left: 8px;
      flex: 1 1 0%;
      width: auto;
      max-width: 100%;
      min-width: 0;
    }
    
    [data-component="line-comment"][data-inline] [data-slot="line-comment-popover"][data-inline-body] {
      margin-left: 0;
    }
    
    [data-component="line-comment"][data-inline][data-variant="default"] [data-slot="line-comment-popover"][data-inline-body] {
      cursor: pointer;
    }
    
    [data-component="line-comment"][data-variant="editor"] [data-slot="line-comment-popover"] {
      width: 380px;
      max-width: none;
      padding: 8px;
      border-radius: 14px;
    }
    
    [data-component="line-comment"][data-inline][data-variant="editor"] [data-slot="line-comment-popover"] {
      width: 100%;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-content"] {
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 100%;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-head"] {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-text"] {
      flex: 1;
      min-width: 0;
      font-family: var(--font-family-sans);
      font-size: var(--font-size-base);
      font-weight: var(--font-weight-regular);
      line-height: var(--line-height-x-large);
      letter-spacing: var(--letter-spacing-normal);
      color: var(--text-strong);
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-tools"] {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-label"],
    [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      font-weight: var(--font-weight-medium);
      line-height: var(--line-height-large);
      letter-spacing: var(--letter-spacing-normal);
      color: var(--text-weak);
      min-width: 0;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-editor"] {
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 100%;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-textarea"] {
      width: 100%;
      box-sizing: border-box;
      resize: vertical;
      padding: 8px;
      border-radius: var(--radius-md);
      background: var(--surface-base);
      border: 1px solid var(--border-base);
      color: var(--text-strong);
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      line-height: var(--line-height-large);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-textarea"]:focus {
      outline: none;
      box-shadow: var(--shadow-xs-border-select);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-list"] {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-height: 180px;
      overflow: auto;
      padding: 4px;
      border: 1px solid var(--border-base);
      border-radius: var(--radius-md);
      background: var(--surface-base);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-item"] {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-width: 0;
      padding: 6px 8px;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-strong);
      text-align: left;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-item"][data-active] {
      background: var(--surface-raised-base-hover);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-path"] {
      display: flex;
      align-items: center;
      min-width: 0;
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      line-height: var(--line-height-large);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-dir"] {
      min-width: 0;
      color: var(--text-weak);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-file"] {
      color: var(--text-strong);
      white-space: nowrap;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-actions"] {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      padding-left: 8px;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
      flex: 1 1 220px;
      margin-right: auto;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"] {
      border: 1px solid var(--border-base);
      background: var(--surface-base);
      color: var(--text-strong);
      border-radius: var(--radius-md);
      height: 28px;
      padding: 0 10px;
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      font-weight: var(--font-weight-medium);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"][data-variant="ghost"] {
      background: transparent;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"][data-variant="primary"] {
      background: var(--text-strong);
      border-color: var(--text-strong);
      color: var(--background-base);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"]:disabled {
      opacity: 0.5;
      pointer-events: none;
    }
    `;let v1=!1;function Ybe(){if(v1||typeof document>"u")return;const e="opencode-line-comment-styles";if(document.getElementById(e)){v1=!0;return}const t=document.createElement("style");t.id=e,t.textContent=sT,document.head.appendChild(t),v1=!0}const NQ=`
    [data-diff],
    [data-file] {
      /* Pierre 1.2 mixes these override targets at 12% in light mode and 20% in dark mode. */
      --diffs-bg-deletion-override: light-dark(
        color-mix(in lab, var(--diffs-bg) 33.333%, var(--diffs-deletion-base)),
        color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-deletion-base))
      );
      --diffs-bg-addition-override: light-dark(
        color-mix(in lab, var(--diffs-bg) 33.333%, var(--diffs-addition-base)),
        color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-addition-base))
      );
      --diffs-selection-base: var(--surface-warning-strong);
      --diffs-selection-border: var(--border-warning-base);
      --diffs-selection-number-fg: #1c1917;
      /* Use explicit alpha instead of color-mix(..., transparent) to avoid Safari's non-premultiplied interpolation bugs. */
      --diffs-bg-selection: var(--diffs-bg-selection-override, rgb(from var(--surface-warning-base) r g b / 0.65));
      --diffs-bg-selection-number: var(
        --diffs-bg-selection-number-override,
        rgb(from var(--surface-warning-base) r g b / 0.85)
      );
      --diffs-bg-selection-text: rgb(from var(--surface-warning-strong) r g b / 0.2);
    }
    
    :host([data-color-scheme='dark']) [data-diff],
    :host([data-color-scheme='dark']) [data-file] {
      --diffs-selection-number-fg: #fdfbfb;
      --diffs-bg-selection: var(--diffs-bg-selection-override, rgb(from var(--solaris-dark-6) r g b / 0.65));
      --diffs-bg-selection-number: var(
        --diffs-bg-selection-number-override,
        rgb(from var(--solaris-dark-6) r g b / 0.85)
      );
    }
    
    [data-diff] ::selection,
    [data-file] ::selection {
      background-color: var(--diffs-bg-selection-text);
    }
    
    ::highlight(opencode-find) {
      background-color: rgb(from var(--surface-warning-base) r g b / 0.35);
    }
    
    ::highlight(opencode-find-current) {
      background-color: rgb(from var(--surface-warning-strong) r g b / 0.55);
    }
    
    [data-diff] [data-line][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-file] [data-line][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-diff] [data-column-number][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-file] [data-column-number][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-diff] [data-line-annotation][data-comment-selected]:not([data-selected-line]) [data-annotation-content] {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-file] [data-line-annotation][data-comment-selected]:not([data-selected-line]) [data-annotation-content] {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-diff] [data-line][data-selected-line] {
      background-color: var(--diffs-bg-selection);
      box-shadow: inset 2px 0 0 var(--diffs-selection-border);
    }
    
    [data-file] [data-line][data-selected-line] {
      background-color: var(--diffs-bg-selection);
      box-shadow: inset 2px 0 0 var(--diffs-selection-border);
    }
    
    [data-diff] [data-column-number][data-selected-line] {
      background-color: var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-file] [data-column-number][data-selected-line] {
      background-color: var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-diff] [data-column-number][data-line-type='context'][data-selected-line],
    [data-diff] [data-column-number][data-line-type='context-expanded'][data-selected-line],
    [data-diff] [data-column-number][data-line-type='change-addition'][data-selected-line],
    [data-diff] [data-column-number][data-line-type='change-deletion'][data-selected-line] {
      color: var(--diffs-selection-number-fg);
    }
    
    /* The deletion word-diff emphasis is stronger than additions; soften it while selected so the selection highlight reads consistently. */
    [data-diff] [data-line][data-line-type='change-deletion'][data-selected-line] {
      --diffs-bg-deletion-emphasis: light-dark(
        rgb(from var(--diffs-deletion-base) r g b / 0.07),
        rgb(from var(--diffs-deletion-base) r g b / 0.1)
      );
    }
    
    [data-diff-header],
    [data-diff],
    [data-file] {
      [data-separator] {
        height: 24px;
      }
      [data-column-number] {
        background-color: var(--background-stronger);
        cursor: default !important;
      }
    
      &[data-interactive-line-numbers] [data-column-number] {
        cursor: default !important;
      }
    
      &[data-interactive-lines] [data-line] {
        cursor: auto !important;
      }
      [data-code] {
        overflow-x: auto !important;
        overflow-y: clip !important;
      }
    }
    
    ${sT}
    
    `;function oT(e){return{theme:"OpenCode",themeType:"system",disableLineNumbers:!1,overflow:"wrap",diffStyle:e??"unified",diffIndicators:"bars",lineHoverHighlight:"both",disableBackground:!1,expansionLineCount:20,hunkSeparators:"line-info-basic",lineDiffType:e==="split"?"word-alt":"none",maxLineDiffLength:1e3,maxLineLengthForHighlighting:1e3,disableFileHeader:!0,unsafeCSS:NQ}}const FQ={"--diffs-font-family":"var(--font-family-mono)","--diffs-font-size":"var(--font-size-small)","--diffs-line-height":"24px","--diffs-tab-size":2,"--diffs-font-features":"var(--font-family-mono--font-feature-settings)","--diffs-header-font-family":"var(--font-family-sans)","--diffs-gap-block":0,"--diffs-min-number-column-width":"4ch"};function aT(e){const t=e.closest("[data-line], [data-alt-line]");if(t instanceof HTMLElement){const r=t.dataset.lineType;if(r==="change-deletion")return"deletions";if(r==="change-addition"||r==="change-additions")return"additions"}const n=e.closest("[data-code]");return n instanceof HTMLElement&&n.hasAttribute("data-deletions")?"deletions":"additions"}function Oy(e,t){const n=t.dataset.lineIndex;if(!n)return;const r=n.split(",").map(i=>parseInt(i,10)).filter(i=>!Number.isNaN(i));if(r.length!==0)return e&&r.length===2?r[1]:r[0]}function ip(e,t,n,r){const i=Array.from(e.querySelectorAll(`[data-line="${n}"], [data-alt-line="${n}"]`)).filter(o=>o instanceof HTMLElement);if(i.length===0)return;const s=r??"additions";for(const o of i)if(aT(o)===s||parseInt(o.dataset.altLine??"",10)===n)return Oy(t,o)}function P7(e,t){if(!t)return t;if(!e)return;const n=e.querySelector("[data-diff]");if(!(n instanceof HTMLElement))return;const r=n.dataset.diffType==="split",i=ip(e,r,t.start,t.side),s=ip(e,r,t.end,t.endSide??t.side);if(i===void 0||s===void 0)return e.querySelector("[data-line], [data-alt-line]")==null?void 0:null;if(i<=s)return t;const o=t.endSide??t.side,a={start:t.end,end:t.start};return o&&(a.side=o),t.endSide&&t.side&&(a.endSide=t.side),a}function lT(e){const t=e.dataset.lineAnnotation?.split(",")[1];if(!t)return;const n=parseInt(t,10);if(!Number.isNaN(n))return n}function cT(e){const t=Array.from(e.querySelectorAll("[data-comment-selected]"));for(const n of t)n instanceof HTMLElement&&n.removeAttribute("data-comment-selected")}function HQ(e,t){cT(e);const n=e.querySelector("[data-diff]");if(!(n instanceof HTMLElement))return;const r=n.dataset.diffType==="split",i=Array.from(n.querySelectorAll("[data-line-index]")).filter(o=>o instanceof HTMLElement);if(i.length===0)return;const s=Array.from(n.querySelectorAll("[data-line-annotation]")).filter(o=>o instanceof HTMLElement);for(const o of t){const a=ip(e,r,o.start,o.side);if(a===void 0)continue;const l=o.end===o.start&&(o.endSide==null||o.endSide===o.side)?a:ip(e,r,o.end,o.endSide??o.side);if(l===void 0)continue;const c=Math.min(a,l),u=Math.max(a,l);for(const d of i){const f=Oy(r,d);f===void 0||fu||d.setAttribute("data-comment-selected","")}for(const d of s){const f=lT(d);f===void 0||fu||d.setAttribute("data-comment-selected","")}}}function VQ(e,t){cT(e);const n=Array.from(e.querySelectorAll("[data-line-annotation]")).filter(r=>r instanceof HTMLElement);for(const r of t){const i=Math.max(1,Math.min(r.start,r.end)),s=Math.max(r.start,r.end);for(let o=i;o<=s;o++){const a=Array.from(e.querySelectorAll(`[data-line="${o}"], [data-column-number="${o}"]`));for(const l of a)l instanceof HTMLElement&&l.setAttribute("data-comment-selected","")}for(const o of n){const a=lT(o);a===void 0||as||o.setAttribute("data-comment-selected","")}}}function zQ(e,t){const n=new ResizeObserver(e);return pe(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function jQ(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=zQ(o=>{for(const a of o){const{contentRect:l,target:c}=a,u=Math.round(l.width),d=Math.round(l.height),f=r.get(c);(!f||f.width!==u||f.height!==d)&&(t(l,c,a),r.set(c,{width:u,height:d}))}},n);de(o=>{const a=XS(I0(be(e)));return JS(a,o,i,s),a},[])}const sp=Symbol("store-raw"),ic=Symbol("store-node"),js=Symbol("store-has"),uT=Symbol("store-self");function dT(e){let t=e[Gi];if(!t&&(Object.defineProperty(e,Gi,{value:t=new Proxy(e,UQ)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,s=n.length;ie[Gi][t]),n}function fT(e){yv()&&Sd(op(e,ic),uT)()}function qQ(e){return fT(e),Reflect.ownKeys(e)}const UQ={get(e,t,n){if(t===sp)return e;if(t===Gi)return n;if(t===k0)return fT(e),n;const r=op(e,ic),i=r[t];let s=i?i():e[t];if(t===ic||t===js||t==="__proto__")return s;if(!i){const o=Object.getOwnPropertyDescriptor(e,t);yv()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(o&&o.get)&&(s=Sd(r,t,s)())}return xs(s)?dT(s):s},has(e,t){return t===sp||t===Gi||t===k0||t===ic||t===js||t==="__proto__"?!0:(yv()&&Sd(op(e,js),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:qQ,getOwnPropertyDescriptor:BQ};function Or(e,t,n,r=!1){if(!r&&e[t]===n)return;const i=e[t],s=e.length;n===void 0?(delete e[t],e[js]&&e[js][t]&&i!==void 0&&e[js][t].$()):(e[t]=n,e[js]&&e[js][t]&&i===void 0&&e[js][t].$());let o=op(e,ic),a;if((a=Sd(o,t,i))&&a.$(()=>n),Array.isArray(e)&&e.length!==s){for(let l=e.length;l1){r=t.shift();const o=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l1){Mu(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let s=t[0];typeof s=="function"&&(s=s(i,n),s===i)||r===void 0&&s==null||(s=Kr(s),r===void 0||xs(i)&&xs(s)&&!Array.isArray(s)?hT(i,s):Or(e,r,s))}function Ke(...[e,t]){const n=Kr(e||{}),r=Array.isArray(n),i=dT(n);function s(...o){dt(()=>{r&&o.length===1?WQ(n,o[0]):Mu(n,o)})}return[i,s]}const Py=Symbol("store-root");function Bl(e,t,n,r,i){const s=t[n];if(e===s)return;const o=Array.isArray(e);if(n!==Py&&(!xs(e)||!xs(s)||o!==Array.isArray(s)||i&&e[i]!==s[i])){Or(t,n,e);return}if(o){if(e.length&&s.length&&(!r||i&&e[0]&&e[0][i]!=null)){let c,u,d,f,h,p,m,g;for(d=0,f=Math.min(s.length,e.length);d=d&&h>=d&&(s[f]===e[h]||i&&s[f]&&e[h]&&s[f][i]&&s[f][i]===e[h][i]);f--,h--)y[h]=s[f];if(d>h||d>f){for(u=d;u<=h;u++)Or(s,u,e[u]);for(;ue.length&&Or(s,"length",e.length);return}for(m=new Array(h+1),u=h;u>=d;u--)p=e[u],g=i&&p?p[i]:p,c=v.get(g),m[u]=c===void 0?-1:c,v.set(g,u);for(c=d;c<=f;c++)p=s[c],g=i&&p?p[i]:p,u=v.get(g),u!==void 0&&u!==-1&&(y[u]=s[c],u=m[u],v.set(g,u));for(u=d;ue.length&&Or(s,"length",e.length);return}const a=Object.keys(e);for(let c=0,u=a.length;c{if(!xs(s)||!xs(i))return i;const o=Bl(i,{[Py]:s},Py,n,r);return o===void 0?s:o}}const ap=new WeakMap,pT={get(e,t){if(t===sp)return e;const n=e[t];let r;return xs(n)?ap.get(n)||(ap.set(n,r=new Proxy(n,pT)),r):n},set(e,t,n){return Or(e,t,Kr(n)),!0},deleteProperty(e,t){return Or(e,t,void 0,!0),!0}};function Ge(e){return t=>{if(xs(t)){let n;(n=ap.get(t))||ap.set(t,n=new Proxy(t,pT)),e(n)}return t}}const lp=new Set;let Mo,fi,$7=!1;function GQ(e){return e instanceof HTMLElement?e.closest("[data-prevent-autofocus]")||e.isContentEditable?!0:/^(INPUT|TEXTAREA|SELECT|BUTTON)$/.test(e.tagName):!1}function N7(e){if(e instanceof Node)for(const t of lp){const n=t.element();if(n&&n.isConnected&&n.contains(e))return t}}function KQ(){$7||typeof window>"u"||($7=!0,window.addEventListener("keydown",e=>{if(e.defaultPrevented||GQ(e.target)||!(e.metaKey||e.ctrlKey))return;const n=e.key.toLowerCase();if(n==="g"){const s=fi;if(!s||!s.isOpen())return;e.preventDefault(),e.stopPropagation(),s.next(e.shiftKey?-1:1);return}if(n!=="f")return;const r=fi;if(r&&r.isOpen()){e.preventDefault(),e.stopPropagation(),r.open();return}const i=N7(document.activeElement)??N7(e.target)??Mo??Array.from(lp)[0];i&&(e.preventDefault(),e.stopPropagation(),i.open())},{capture:!0}))}function Il(){const e=globalThis.CSS?.highlights;e&&(e.delete("opencode-find"),e.delete("opencode-find-current"))}function F7(){const e=globalThis;return typeof e.Highlight=="function"&&e.CSS?.highlights!=null}function H7(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(n.overflowY==="auto"||n.overflowY==="scroll")return t;t=t.parentElement}}function ZQ(e){let t,n,r="overlay",i=[];const[s,o]=xe([]),[a,l]=Ke({open:!1,query:"",index:0,count:0,pos:{top:8,right:8}}),c=()=>a.open,u=()=>a.query,d=()=>a.index,f=()=>a.count,h=()=>a.pos,p=()=>{o([])},m=()=>{const D=e.overlay();D&&(n!==void 0&&(cancelAnimationFrame(n),n=void 0),D.innerHTML="")},g=()=>{if(r!=="overlay"){m();return}const D=e.wrapper(),C=e.overlay();if(!D||!C||(m(),i.length===0))return;const L=D.getBoundingClientRect(),R=d(),O=document.createDocumentFragment();for(let V=0;V{n=void 0,g()}))}const v=()=>{if(r!=="overlay")return;const D=e.getRoot(),C=D?Array.from(D.querySelectorAll("[data-code]")).filter(R=>R instanceof HTMLElement):[],L=s();C.length===L.length&&C.every((R,O)=>R===L[O])||(p(),o(C))},b=()=>{Il(),m(),p(),i=[],l("count",0),l("index",0)},_=()=>{if(typeof window>"u")return;const D=e.wrapper();if(!D)return;const C=H7(D)??D,L=C.getBoundingClientRect(),R=parseFloat(getComputedStyle(C).getPropertyValue("--session-title-height")),O=Number.isNaN(R)?0:R;l("pos",{top:Math.round(L.top)+O-4,right:Math.round(window.innerWidth-L.right)+8})},x=(D,C)=>{const L=C.toLowerCase(),R=[],O=Array.from(D.querySelectorAll("[data-content] [data-line], [data-column-content]")).filter(V=>V instanceof HTMLElement);for(const V of O){const q=V.textContent;if(!q)continue;const Q=q.toLowerCase();let te=Q.indexOf(L);if(te===-1)continue;const ee=[],ne=[],Z=document.createTreeWalker(V,NodeFilter.SHOW_TEXT);let W=Z.nextNode(),se=0;for(;W;)W instanceof Text&&(se+=W.data.length,ee.push(W),ne.push(se)),W=Z.nextNode();if(ee.length===0)continue;const fe=oe=>{let ue=0,ae=ne.length-1;for(;ue>1;ne[Te]>=oe?ae=Te:ue=Te+1}const we=ue===0?0:ne[ue-1];return{node:ee[ue],offset:oe-we}};for(;te!==-1;){const oe=fe(te),ue=fe(te+C.length),ae=document.createRange();ae.setStart(oe.node,oe.offset),ae.setEnd(ue.node,ue.offset),R.push(ae),te=Q.indexOf(L,te+C.length)}}return R},E=D=>{const C=D.startContainer;(C instanceof Element?C:C.parentElement)?.scrollIntoView({block:"center",inline:"center"})},M=(D,C)=>{const L=globalThis.CSS?.highlights,R=globalThis.Highlight;if(!L||typeof R!="function")return!1;L.delete("opencode-find"),L.delete("opencode-find-current");const O=D[C];O&&L.set("opencode-find-current",new R(O));const V=D.filter((q,Q)=>Q!==C);return V.length>0&&L.set("opencode-find",new R(...V)),!0},S=D=>{if(!c())return;const C=u().trim();if(!C){b();return}const L=e.getRoot();if(!L)return;r=F7()?"highlights":"overlay";const R=x(L,C),O=R.length,V=D?.reset?0:d(),q=O?Math.min(V,O-1):0;i=R,l("count",O),l("index",q);const Q=R[q];if(r==="highlights"){m(),p(),M(R,q)||(r="overlay",Il(),v(),y()),D?.scroll&&Q&&E(Q);return}Il(),v(),D?.scroll&&Q&&E(Q),y()},I=()=>{l("open",!1),l("query",""),b(),fi===P&&(fi=void 0)},F=()=>{fi&&fi!==P&&fi.close(),fi=P,Mo=P,c()||l("open",!0),requestAnimationFrame(()=>{S({scroll:!0}),t?.focus(),t?.select()})},j=D=>{if(!c())return;const C=f();if(C<=0)return;const L=(d()+D+C)%C;l("index",L);const R=i[L];if(R){if(r==="highlights"){if(!M(i,L)){r="overlay",S({reset:!0,scroll:!0});return}E(R);return}Il(),v(),E(R),y()}},P={element:e.wrapper,isOpen:()=>c(),next:j,open:F,close:I};return de(()=>{for(const D of s())Bt(D,"scroll",y,{passive:!0})}),Ht(()=>{r=F7()?"highlights":"overlay",KQ(),lp.add(P),Mo||(Mo=P),pe(()=>{lp.delete(P),fi===P&&(fi=void 0,Il()),Mo===P&&(Mo=void 0)})}),de(()=>{if(!c())return;const D=()=>_();requestAnimationFrame(D),Bt(window,"resize",D,{passive:!0});const C=e.wrapper();if(!C)return;const L=H7(C)??C;jQ(L,D)}),pe(()=>{p(),m(),fi===P&&(fi=void 0,Il())}),{open:c,query:u,count:f,index:d,pos:h,setInput:D=>{t=D},setQuery:D=>{l("query",D),l("index",0),S({reset:!0,scroll:!0})},focus:F,close:I,next:j,refresh:D=>S(D),onPointerDown:()=>{Mo=P,e.wrapper()?.focus({preventScroll:!0})},onFocus:()=>{Mo=P},onInputKeyDown:D=>{if(D.key==="Escape"){D.preventDefault(),I();return}D.key==="Enter"&&(D.preventDefault(),j(D.shiftKey?-1:1))}}}function YQ(){return{token:0}}function Wu(e){e.observer?.disconnect(),e.observer=void 0}function mT(e){if(!e)return;const t=e.querySelector("diffs-container");if(t instanceof HTMLElement)return t}function QQ(e){return mT(e)?.shadowRoot??void 0}function $y(e){if(!e||typeof document>"u")return;const t=document.documentElement.dataset.colorScheme;if(t==="dark"||t==="light"){e.dataset.colorScheme=t;return}e.removeAttribute("data-color-scheme")}function XQ(e){if(typeof document>"u")return()=>{};if($y(e()),typeof MutationObserver>"u")return()=>{};const t=document.documentElement,n=new MutationObserver(()=>$y(e()));return n.observe(t,{attributes:!0,attributeFilter:["data-color-scheme"]}),()=>n.disconnect()}function JQ(e){Wu(e.state),e.state.token+=1;const t=e.state.token,n=Math.max(0,e.settleFrames??0),r=()=>{const o=a=>{if(t===e.state.token){if(a<=0){e.onReady();return}requestAnimationFrame(()=>o(a-1))}};requestAnimationFrame(()=>o(n))},i=o=>{if(e.isReady(o)){r();return}typeof MutationObserver>"u"||(Wu(e.state),e.state.observer=new MutationObserver(()=>{t===e.state.token&&e.isReady(o)&&(Wu(e.state),r())}),e.state.observer.observe(o,{childList:!0,subtree:!0}))},s=e.getRoot();if(!s){if(typeof MutationObserver>"u")return;e.state.observer=new MutationObserver(()=>{if(t!==e.state.token)return;const o=e.getRoot();o&&i(o)}),e.state.observer.observe(e.container,{childList:!0,subtree:!0});return}i(s)}function Qbe(e,t){const n=Math.min(e.start,e.end),r=Math.max(e.start,e.end);return n===r?t("ui.sessionReview.selection.line",{line:n}):t("ui.sessionReview.selection.lines",{start:n,end:r})}function Xbe(e,t){const n=Math.max(1,Math.min(t.start,t.end)),r=Math.max(t.start,t.end),i=e.split(`
    `).slice(n-1,r);if(i.length!==0)return i.slice(0,2).join(`
    `)}function Jbe(e){const t={start:e.start,end:e.end};return e.side&&(t.side=e.side),e.endSide&&(t.endSide=e.endSide),t}function e2e(e,t,n){if(!e)return!1;const r=Math.min(e.start,e.end),i=Math.max(e.start,e.end);if(ti)return!1;if(!n)return!0;const s=e.side,o=e.endSide??s;return!s&&!o?!0:!s||!o?(s??o)===n:s===o||t===r?s===n:t===i?o===n:!0}function eX(e){return e?e.start===e.end&&(e.endSide==null||e.endSide===e.side):!1}function tX(e){if(e instanceof Range)return e;const t=new Range;return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}function gT(e,t){!e||!t||requestAnimationFrame(()=>{const n=e.getSelection?.()??window.getSelection();if(n)try{n.removeAllRanges(),n.addRange(t)}catch{}})}function nX(){let e="none",t,n=!1,r=!1;const i=()=>{e="none",t=void 0,n=!1};return{begin(s,o){if(!s){e="text";return}e="numbers",t=o,n=!1},track(s,o){return e!=="numbers"?!1:(s&1)===0?(i(),!0):(o!==void 0&&t!==void 0&&o!==t&&(n=!0),!0)},finish(){const s=e;return r=s==="numbers"&&n,i(),s},consume(s){const o=r&&!eX(s);return r=!1,o},reset(){r=!1,i()}}}function vm(e){if(e)return e instanceof HTMLElement?e:e.parentElement??void 0}function rX(e){const t=vm(e);if(!t)return;const n=t.closest("[data-line]");if(!(n instanceof HTMLElement))return;const r=parseInt(n.dataset.line??"",10);if(!Number.isNaN(r))return r}function V7(e){const t=vm(e);if(!t)return;const n=t.closest("[data-line], [data-alt-line]");if(!(n instanceof HTMLElement))return;const r=parseInt(n.dataset.line??"",10);if(!Number.isNaN(r))return r;const i=parseInt(n.dataset.altLine??"",10);if(!Number.isNaN(i))return i}function iX(e){const t=vm(e);if(!t)return;const n=t.closest("[data-code]");if(n instanceof HTMLElement)return n.hasAttribute("data-deletions")?"deletions":"additions"}function vT(e){const t=e.root.getSelection?.()??window.getSelection();if(!t||t.isCollapsed)return;const n=t.getComposedRanges?.({shadowRoots:[e.root]})?.[0]??(t.rangeCount>0?t.getRangeAt(0):void 0),r=n?.startContainer??t.anchorNode,i=n?.endContainer??t.focusNode;if(!r||!i||!e.root.contains(r)||!e.root.contains(i))return;const s=e.lineForNode(r),o=e.lineForNode(i);if(s===void 0||o===void 0)return;const a=e.sideForNode?.(r),l=e.sideForNode?.(i),c=a??l,u={start:s,end:o};return c&&(u.side=c),l&&c&&l!==c&&(u.endSide=l),{range:u,text:e.preserveTextSelection&&n?tX(n).cloneRange():void 0}}const yh=new WeakMap,sX={lineHeight:24,hunkSeparatorHeight:24,spacing:0};function oX(e){return e==="auto"||e==="scroll"||e==="overlay"}function z7(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(oX(n.overflowY))return t;t=t.parentElement}}function aX(e){if(typeof document>"u")return;const t=e.closest("[data-component='session-review']");if(t instanceof HTMLElement){const r=z7(e)??t,i=t.querySelector("[data-slot='session-review-container']");return{key:t,root:r,content:i instanceof HTMLElement?i:void 0}}const n=z7(e);if(n){const r=n.querySelector("[role='log']");return{key:n,root:n,content:r instanceof HTMLElement?r:void 0}}return{key:document,root:document,content:void 0}}function lX(e){const t=aX(e);if(!t)return;let n=yh.get(t.key);if(!n){const i=new iT;i.setup(t.root,t.content),n={virtualizer:i,refs:0},yh.set(t.key,n)}n.refs+=1;let r=!1;return{virtualizer:n.virtualizer,release(){if(r)return;r=!0;const i=yh.get(t.key);i&&(i.refs-=1,!(i.refs>0)&&(i.virtualizer.cleanUp(),yh.delete(t.key)))}}}function yT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Du={exports:{}},cX=Du.exports,j7;function uX(){return j7||(j7=1,(function(e,t){(function(n,r){r(t)})(cX,function(n){const r=Symbol("newer"),i=Symbol("older");class s{constructor(d,f){typeof d!="number"&&(f=d,d=0),this.size=0,this.limit=d,this.oldest=this.newest=void 0,this._keymap=new Map,f&&(this.assign(f),d<1&&(this.limit=this.size))}_markEntryAsUsed(d){d!==this.newest&&(d[r]&&(d===this.oldest&&(this.oldest=d[r]),d[r][i]=d[i]),d[i]&&(d[i][r]=d[r]),d[r]=void 0,d[i]=this.newest,this.newest&&(this.newest[r]=d),this.newest=d)}assign(d){let f,h=this.limit||Number.MAX_VALUE;this._keymap.clear();let p=d[Symbol.iterator]();for(let m=p.next();!m.done;m=p.next()){let g=new o(m.value[0],m.value[1]);if(this._keymap.set(g.key,g),f?(f[r]=g,g[i]=f):this.oldest=g,f=g,h--==0)throw new Error("overflow")}this.newest=f,this.size=this._keymap.size}get(d){var f=this._keymap.get(d);return f?(this._markEntryAsUsed(f),f.value):void 0}set(d,f){var h=this._keymap.get(d);return h?(h.value=f,this._markEntryAsUsed(h),this):(this._keymap.set(d,h=new o(d,f)),this.newest?(this.newest[r]=h,h[i]=this.newest):this.oldest=h,this.newest=h,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var d=this.oldest;if(d)return this.oldest[r]?(this.oldest=this.oldest[r],this.oldest[i]=void 0):(this.oldest=void 0,this.newest=void 0),d[r]=d[i]=void 0,this._keymap.delete(d.key),--this.size,[d.key,d.value]}find(d){let f=this._keymap.get(d);return f?f.value:void 0}has(d){return this._keymap.has(d)}delete(d){var f=this._keymap.get(d);return f?(this._keymap.delete(f.key),f[r]&&f[i]?(f[i][r]=f[r],f[r][i]=f[i]):f[r]?(f[r][i]=void 0,this.oldest=f[r]):f[i]?(f[i][r]=void 0,this.newest=f[i]):this.oldest=this.newest=void 0,this.size--,f.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new l(this.oldest)}values(){return new c(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(d,f){typeof f!="object"&&(f=this);let h=this.oldest;for(;h;)d.call(f,h.value,h.key,this),h=h[r]}toJSON(){for(var d=new Array(this.size),f=0,h=this.oldest;h;)d[f++]={key:h.key,value:h.value},h=h[r];return d}toString(){for(var d="",f=this.oldest;f;)d+=String(f.key)+":"+f.value,f=f[r],f&&(d+=" < ");return d}}n.LRUMap=s;function o(u,d){this.key=u,this.value=d,this[r]=void 0,this[i]=void 0}function a(u){this.entry=u}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let u=this.entry;return u?(this.entry=u[r],{done:!1,value:[u.key,u.value]}):{done:!0,value:void 0}};function l(u){this.entry=u}l.prototype[Symbol.iterator]=function(){return this},l.prototype.next=function(){let u=this.entry;return u?(this.entry=u[r],{done:!1,value:u.key}):{done:!0,value:void 0}};function c(u){this.entry=u}c.prototype[Symbol.iterator]=function(){return this},c.prototype.next=function(){let u=this.entry;return u?(this.entry=u[r],{done:!1,value:u.value}):{done:!0,value:void 0}}})})(Du,Du.exports)),Du.exports}var dX=uX();const B7=yT(dX),bh=Symbol("IGNORE_RESPONSE");var y1=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated")}},fX=class{highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=_n,useTokenTransformer:r=!1,lineDiffType:i="word-alt",maxLineDiffLength:s=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:a="shiki-js"}){this.options=e,this.preferredHighlighter=a,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:s,tokenizeMaxLineLength:o},this.fileCache=new B7.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new B7.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??_n,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:s}=this,o=++this.renderOptionsRequestVersion,a=()=>this.isCurrentLifecycle(s)&&this.renderOptionsRequestVersion===o;try{const l={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!a()||qs(l,this.renderOptions))return;const c=gd(e);let u=[];if(Bc(l.theme,this.renderOptions.theme)||(Ey(c)?u=D7(c):u=await R7(c)),!a())return;if(this.highlighter!=null)Cy(u,this.highlighter);else{const f=await wc({themes:c,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!a())return;this.highlighter=f}const d=this.setRenderOptionsOnWorkers(l,u);this.renderOptions=l,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const f of this.themeSubscribers)f.onThemeChange();await d}catch(l){if(l instanceof y1||!a())return;throw l}}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const n=[];for(const r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");n.push(new Promise((i,s)=>{const o=this.generateRequestId(),a={type:"set-render-options",id:o,request:{type:"set-render-options",id:o,renderOptions:e,resolvedThemes:t},resolve:i,reject:s,requestStart:Date.now()};this.activeTaskById.set(o,a),r.pendingSetupRequestId=o,r.worker.postMessage(a.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast==null&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(t!=null){const n=this.activeTaskById.get(t);wa(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){const{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{const i=gd(this.renderOptions.theme);let s=[];if(Ey(i)?s=D7(i):s=await R7(i),!this.isCurrentLifecycle(t)){n();return}let o=[];if(A7(e)?o=I7(e):o=await M7(e),!this.isCurrentLifecycle(t)){n();return}const[a]=await Promise.all([wc({themes:i,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(s,o)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=a,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(i){if(i instanceof y1||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0,this.queueBroadcastStateChanges(),r(i)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const n=[],r=void 0;this.workers.length>0&&this.terminateWorkers();for(let i=0;i<(this.options.poolSize??8);i++){const s=this.options.workerFactory(),o={worker:s,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:a})=>a)]),customExtensionsVersion:0};s.addEventListener("message",a=>{this.handleWorkerMessage(o,a.data)}),s.addEventListener("error",a=>console.error("Worker error:",a,o)),this.workers.push(o),n.push(new Promise((a,l)=>{const c=this.generateRequestId(),u={type:"initialize",id:c,request:{type:"initialize",id:c,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:void 0,customExtensionMap:r},resolve(){o.initialized=!0,a()},reject:l,requestStart:Date.now()};this.activeTaskById.set(c,u),this.executeTask(o,u)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e "${e.name}".`);return}const t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||kd(e)||t!=null&&qs(t.options,this.getDiffRenderOptions()))return;const r=this.getTaskByHighlightKey(n);r!=null?r.primeCache=!0:this.submitCacheTask({type:"diff",diff:e},n)}getPlainDiffAST(e,t,n,r,i){return this.highlighter!=null?tT(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(t=>{console.error(t)})}cancelActiveWorkerTasks(){const e=new y1;for(const t of this.activeTaskById.values())"reject"in t&&t.reject(e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?"waiting":this.initialized!==!0?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.getHighlightKeyForRequest(t),r=n!=null?this.getTaskByHighlightKey(n):void 0;if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);const i=this.generateRequestId(),s=Date.now(),{renderOptionsVersion:o}=this,a=(()=>{switch(t.type){case"file":return{type:"file",id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:s};case"diff":return{type:"diff",id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:s}}})();this.enqueueRenderTask(a,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,s=(()=>{switch(e.type){case"file":return{type:"file",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r};case"diff":return{type:"diff",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r}}})();this.enqueueRenderTask(s)}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{const r=n.filter(i=>!e.langs.has(i));if(r.length>0&&(A7(r)?t.request.resolvedLanguages=I7(r):t.request.resolvedLanguages=await M7(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch{this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const n=this.activeTaskById.get(t.id);try{if(n==null)throw bh;if(t.type==="error"){const r=new Error(t.error);if(t.stack&&(r.stack=t.stack),"reject"in n)n.reject(r);else if(wa(n))this.notifyHighlightError(n,r);else throw new Error("handleWorkerMessage: unknown task type");throw r}else switch(t.requestType){case"initialize":if(n.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case"set-render-options":if(n.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"file":{if(n.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!$o(i,this.getFileRenderOptions()))throw bh;const{request:s}=n;this.syncCustomExtensionVersion(e,s),s.file.cacheKey!=null&&this.fileCache.set(s.file.cacheKey,{result:r,options:i}),this.notifyFileInstances(n,r,i);break}case"diff":{if(n.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!qs(i,this.getDiffRenderOptions()))throw bh;const{request:s}=n;this.syncCustomExtensionVersion(e,s),s.diff.cacheKey!=null&&this.diffCache.set(s.diff.cacheKey,{result:r,options:i}),this.notifyDiffInstances(n,r,i);break}}}catch(r){r!==bh&&console.error(r,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,wa(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(wa(t)&&(this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){hX(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(const n of q7(t))e.langs.add(n);try{e.worker.postMessage(t.request)}catch(n){console.error("Failed to post message to worker:",n),wa(t)?this.notifyHighlightError(t,n):"reject"in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;const n=OZ();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=PZ())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(const i of e)if(!n.langs.has(i)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case"file":return this.getFileHighlightKey(e.file);case"diff":return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(const t of pu(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){const n=this.queuedTaskByInstance.get(e);n==null||n===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))wa(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of pu(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of pu(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of pu(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(const r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(const r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(const n of pu(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="file"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&ps(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="diff"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Yl(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())wa(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function hX(e){return e.type==="initialize"||e.type==="file"||e.type==="diff"}function q7(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??_r(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??_r(e.request.diff.name)),t.add(e.request.diff.lang??_r(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}function wa(e){return e?.type==="file"||e?.type==="diff"}function pu(e){return e.instances}const pX="/assets/worker-CU6mbanM.js";function mX(){return new Worker(pX,{type:"module"})}function U7(e){const t=new fX({workerFactory:mX,poolSize:2},{theme:"OpenCode",lineDiffType:e,preferredHighlighter:"shiki-wasm"});return t.initialize(),t}let b1,w1;function Ny(e){if(!(typeof window>"u"))return e==="split"?(w1||(w1=U7("word-alt")),w1):(b1||(b1=U7("none")),b1)}const gX=new Set(["png","jpg","jpeg","gif","webp","avif","bmp","ico","tif","tiff","heic"]),vX=new Set(["mp3","wav","ogg","m4a","aac","flac","opus"]);function ym(e){if(!(!e||typeof e!="object"))return e}function vw(e){if(!e)return;const t=e.split(";",1)[0]?.trim().toLowerCase();if(t)return t==="audio/x-aac"?"audio/aac":t==="audio/x-m4a"?"audio/mp4":t}function yX(e){if(!e)return"";const t=e.lastIndexOf(".");return t===-1?"":e.slice(t+1).toLowerCase()}function bX(e){const t=yX(e);if(t==="svg")return"svg";if(gX.has(t))return"image";if(vX.has(t))return"audio"}function wX(e){return ym(e)?.type==="binary"}function kX(e,t){if(t==="svg")return e.startsWith("data:image/svg+xml")?e:void 0;if(t==="image")return e.startsWith("data:image/")?e:void 0;if(e.startsWith("data:audio/x-aac;"))return e.replace("data:audio/x-aac;","data:audio/aac;");if(e.startsWith("data:audio/x-m4a;"))return e.replace("data:audio/x-m4a;","data:audio/mp4;");if(e.startsWith("data:audio/"))return e}function k1(e,t){if(!e)return;if(typeof e=="string")return kX(e,t);const n=ym(e);if(!n||typeof n.content!="string")return;const r=vw(typeof n.mimeType=="string"?n.mimeType:void 0);if(r){if(t==="svg")return r!=="image/svg+xml"?void 0:n.encoding==="base64"?`data:image/svg+xml;base64,${n.content}`:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n.content)}`;if(!(t==="image"&&!r.startsWith("image/"))&&!(t==="audio"&&!r.startsWith("audio/"))&&n.encoding==="base64")return`data:${r};base64,${n.content}`}}function xX(e){if(typeof atob=="function")try{const t=atob(e),n=Uint8Array.from(t,r=>r.charCodeAt(0));return typeof TextDecoder=="function"?new TextDecoder().decode(n):t}catch{}}function SX(e){const t=ym(e);if(!(!t||typeof t.content!="string"||vw(typeof t.mimeType=="string"?t.mimeType:void 0)!=="image/svg+xml"))return t.encoding==="base64"?xX(t.content):t.content}function x1(e){if(typeof e=="string")return e.length>0;const t=ym(e);return t?typeof t.content=="string"&&t.content.length>0:!1}var _X=le('
    '),wh=le('
    '),CX=le('
    '),EX=le('