const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BdAV_C_H.js","assets/tex-CxkMU7Pf.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-CE9lU5zL.js","assets/csharp-K5feNrxe.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-DnHKYNfI.js","assets/vue-html-CChd_i61.js","assets/vue-vine-8moa0y9V.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/dialog-select-provider-B5WuXk09.js","assets/list-DLBnHJ9T.js","assets/provider-icon-9oaHUzYK.js","assets/dialog-connect-provider-D7Oil8xj.js","assets/dialog-select-server-BYjlh-Tv.js","assets/server-row-Cca8KGP8.js","assets/index-Db5L4Wg1.js","assets/dialog-settings-D3HGgc1u.js","assets/select-qYF6iP7R.js","assets/switch-_9lEHSwF.js","assets/dialog-select-directory-DxIO8o_l.js","assets/file-icon--ekfYwF5.js","assets/home-6zZjxdZq.js","assets/session-DR9YDGpN.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 Me={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return _2(this.context.count)},getNextContextId(){return _2(this.context.count++)}};function _2(e){const t=String(e),n=t.length-1;return Me.context.id+(n?String.fromCharCode(96+n):"")+t}function rs(e){Me.context=e}const g7=!1,jL=(e,t)=>e===t,ui=Symbol("solid-proxy"),y7=typeof Proxy=="function",If=Symbol("solid-track"),Af={equals:jL};let Ic=null,v7=x7;const qr=1,Vc=2,b7={owned:null,cleanups:null,context:null,owner:null},hp={};var Ze=null;let xe=null,qL=null,kt=null,qn=null,wn=null,F0=0;function Sn(e,t){const n=kt,r=Ze,i=e.length===0,s=t===void 0?r:t,o=i?b7:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>Ye(()=>Qs(o)));Ze=o,kt=null;try{return wr(a,!0)}finally{kt=n,Ze=r}}function ye(e,t){t=t?Object.assign({},Af,t):Af;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(xe&&xe.running&&xe.sources.has(n)?i=i(n.tValue):i=i(n.value)),k7(n,i));return[w7.bind(n),r]}function Ii(e,t,n){const r=bu(e,t,!0,qr);El(r)}function Ve(e,t,n){const r=bu(e,t,!1,qr);El(r)}function ie(e,t,n){v7=YL;const r=bu(e,t,!1,qr),i=zo&&dt(zo);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),wn?wn.push(r):El(r)}function U(e,t,n){n=n?Object.assign({},Af,n):Af;const r=bu(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,El(r),w7.bind(r)}function BL(e){return e&&typeof e=="object"&&"then"in e}function ks(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=hp,l=null,c=!1,u=!1,d="initialValue"in s,f=typeof r=="function"&&U(r);const h=new Set,[p,m]=(s.storage||ye)(s.initialValue),[g,y]=ye(void 0),[v,w]=ye(void 0,{equals:!1}),[E,x]=ye(d?"ready":"unresolved");Me.context&&(l=Me.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:Me.load&&Me.has(l)&&(a=Me.load(l)));function k(z,H,O,L){return o===z&&(o=null,L!==void 0&&(d=!0),(z===a||H===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(L,{value:H})),a=hp,xe&&z&&c?(xe.promises.delete(z),c=!1,wr(()=>{xe.running=!0,S(H,O)},!1)):S(H,O)),H}function S(z,H){wr(()=>{H===void 0&&m(()=>z),x(H!==void 0?"errored":d?"ready":"unresolved"),y(H);for(const O of h.keys())O.decrement();h.clear()},!1)}function I(){const z=zo&&dt(zo),H=p(),O=g();if(O!==void 0&&!o)throw O;return kt&&!kt.user&&z&&Ii(()=>{v(),o&&(z.resolved&&xe&&c?xe.promises.add(o):h.has(z)||(z.increment(),h.add(z)))}),H}function A(z=!0){if(z!==!1&&u)return;u=!1;const H=f?f():r;if(c=xe&&xe.running,H==null||H===!1){k(o,Ye(p));return}xe&&o&&xe.promises.delete(o);let O;const L=a!==hp?a:Ye(()=>{try{return i(H,{value:p(),refetching:z})}catch(C){O=C}});if(O!==void 0){k(o,void 0,rf(O),H);return}else if(!BL(L))return k(o,L,void 0,H),L;return o=L,"v"in L?(L.s===1?k(o,L.v,void 0,H):k(o,void 0,rf(L.v),H),L):(u=!0,queueMicrotask(()=>u=!1),wr(()=>{x(d?"refreshing":"pending"),w()},!1),L.then(C=>k(L,C,void 0,H),C=>k(L,void 0,rf(C),H)))}Object.defineProperties(I,{state:{get:()=>E()},error:{get:()=>g()},loading:{get(){const z=E();return z==="pending"||z==="refreshing"}},latest:{get(){if(!d)return I();const z=g();if(z&&!o)throw z;return p()}}});let D=Ze;return f?Ii(()=>(D=Ze,A(!1))):A(!1),[I,{refetch:z=>is(D,()=>A(z)),mutate:m}]}function Ge(e){return wr(e,!1)}function Ye(e){if(kt===null)return e();const t=kt;kt=null;try{return e()}finally{kt=t}}function Mt(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 Pt(e){ie(()=>Ye(e))}function ae(e){return Ze===null||(Ze.cleanups===null?Ze.cleanups=[e]:Ze.cleanups.push(e)),e}function UL(e,t){Ic||(Ic=Symbol("error")),Ze=bu(void 0,void 0,!0),Ze.context={...Ze.context,[Ic]:[t]},xe&&xe.running&&xe.sources.add(Ze);try{return e()}catch(n){wu(n)}finally{Ze=Ze.owner}}function sg(){return kt}function di(){return Ze}function is(e,t){const n=Ze,r=kt;Ze=e,kt=null;try{return wr(t,!0)}catch(i){wu(i)}finally{Ze=n,kt=r}}function WL(e){if(xe&&xe.running)return e(),xe.done;const t=kt,n=Ze;return Promise.resolve().then(()=>{kt=t,Ze=n;let r;return zo&&(r=xe||(xe={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),wr(e,!1),kt=Ze=null,r?r.done:void 0})}const[mue,C2]=ye(!1);function GL(e){wn.push.apply(wn,e),e.length=0}function gt(e,t){const n=Symbol("context");return{id:n,Provider:QL(n),defaultValue:e}}function dt(e){let t;return Ze&&Ze.context&&(t=Ze.context[e.id])!==void 0?t:e.defaultValue}function H0(e){const t=U(e),n=U(()=>og(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let zo;function KL(){return zo||(zo=gt())}function w7(){const e=xe&&xe.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===qr)El(this);else{const t=qn;qn=null,wr(()=>Df(this),!1),qn=t}if(kt){const t=this.observers?this.observers.length:0;kt.sources?(kt.sources.push(this),kt.sourceSlots.push(t)):(kt.sources=[this],kt.sourceSlots=[t]),this.observers?(this.observers.push(kt),this.observerSlots.push(kt.sources.length-1)):(this.observers=[kt],this.observerSlots=[kt.sources.length-1])}return e&&xe.sources.has(this)?this.tValue:this.value}function k7(e,t,n){let r=xe&&xe.running&&xe.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(xe){const i=xe.running;(i||!n&&xe.sources.has(e))&&(xe.sources.add(e),e.tValue=t),i||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&wr(()=>{for(let i=0;i1e6)throw qn=[],new Error},!1)}return t}function El(e){if(!e.fn)return;Qs(e);const t=F0;E2(e,xe&&xe.running&&xe.sources.has(e)?e.tValue:e.value,t),xe&&!xe.running&&xe.sources.has(e)&&queueMicrotask(()=>{wr(()=>{xe&&(xe.running=!0),kt=Ze=e,E2(e,e.tValue,t),kt=Ze=null},!1)})}function E2(e,t,n){let r;const i=Ze,s=kt;kt=Ze=e;try{r=e.fn(t)}catch(o){return e.pure&&(xe&&xe.running?(e.tState=qr,e.tOwned&&e.tOwned.forEach(Qs),e.tOwned=void 0):(e.state=qr,e.owned&&e.owned.forEach(Qs),e.owned=null)),e.updatedAt=n+1,wu(o)}finally{kt=s,Ze=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?k7(e,r,!0):xe&&xe.running&&e.pure?(xe.sources.has(e)||(e.value=r),xe.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function bu(e,t,n,r=qr,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ze,context:Ze?Ze.context:null,pure:n};return xe&&xe.running&&(s.state=0,s.tState=r),Ze===null||Ze!==b7&&(xe&&xe.running&&Ze.pure?Ze.tOwned?Ze.tOwned.push(s):Ze.tOwned=[s]:Ze.owned?Ze.owned.push(s):Ze.owned=[s]),s}function Mf(e){const t=xe&&xe.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Vc)return Df(e);if(e.suspense&&Ye(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(xe.disposed.has(i))return}if((t?e.tState:e.state)===qr)El(e);else if((t?e.tState:e.state)===Vc){const i=qn;qn=null,wr(()=>Df(e,n[0]),!1),qn=i}}}function wr(e,t){if(qn)return e();let n=!1;t||(qn=[]),wn?n=!0:wn=[],F0++;try{const r=e();return ZL(n),r}catch(r){n||(wn=null),qn=null,wu(r)}}function ZL(e){if(qn&&(x7(qn),qn=null),e)return;let t;if(xe){if(!xe.promises.size&&!xe.queue.size){const r=xe.sources,i=xe.disposed;wn.push.apply(wn,xe.effects),t=xe.resolve;for(const s of wn)"tState"in s&&(s.state=s.tState),delete s.tState;xe=null,wr(()=>{for(const s of i)Qs(s);for(const s of r){if(s.value=s.tValue,s.owned)for(let o=0,a=s.owned.length;ov7(n),!1),t&&t()}function x7(e){for(let t=0;t=0;t--)Qs(e.tOwned[t]);delete e.tOwned}if(xe&&xe.running&&e.pure)_7(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Qs(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}xe&&xe.running?e.tState=0:e.state=0}function _7(e,t){if(t||(e.tState=0,xe.disposed.add(e)),e.owned)for(let n=0;ni=Ye(()=>(Ze.context={...Ze.context,[e]:r.value},H0(()=>r.children))),void 0),i}}const ag=Symbol("fallback");function Of(e){for(let t=0;t1?[]:null;return ae(()=>Of(s)),()=>{let l=e()||[],c=l.length,u,d;return l[If],Ye(()=>{let h,p,m,g,y,v,w,E,x;if(c===0)o!==0&&(Of(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[ag],i[0]=Sn(k=>(s[0]=k,n.fallback())),o=1);else if(o===0){for(i=new Array(c),d=0;d=v&&E>=v&&r[w]===l[E];w--,E--)m[E]=i[w],g[E]=s[w],a&&(y[E]=a[w]);for(h=new Map,p=new Array(E+1),d=E;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<=w;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;dOf(s)),()=>{const c=e()||[],u=c.length;return c[If],Ye(()=>{if(u===0)return a!==0&&(Of(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[ag],i[0]=Sn(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===ag&&(s[0](),s=[],r=[],i=[],a=0),l=0;lc[l]):l>=r.length&&(i[l]=Sn(d));for(;le(t||{}))}function id(){return!0}const lg={get(e,t,n){return t===ui?n:e.get(t)},has(e,t){return t===ui?!0:e.has(t)},set:id,deleteProperty:id,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:id,deleteProperty:id}},ownKeys(e){return e.keys()}};function pp(e){return(e=typeof e=="function"?e():e)?e:{}}function eI(){for(let e=0,t=this.length;e=0;a--){const l=pp(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in pp(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:eI.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 he(e,...t){const n=t.length;if(y7&&ui 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)}},lg));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))}},lg)),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=Me.context;if(s){const[a,l]=ye();Me.count||(Me.count=0),Me.count++,(n||(n=e())).then(c=>{!Me.done&&rs(s),Me.count--,l(()=>c.default),rs()}),t=a}else if(!t){const[a]=ks(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return U(()=>(o=t())?Ye(()=>{if(!s||Me.done)return o(i);const a=Me.context;rs(s);const l=o(i);return rs(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}let tI=0;function Cn(){return Me.context?Me.getNextContextId():`cl-${tI++}`}const E7=e=>`Stale read from <${e}>.`;function Ai(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(XL(()=>e.each,e.children,t||void 0))}function gue(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(JL(()=>e.each,e.children,t||void 0))}function Se(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?Ye(()=>s(t?i:()=>{if(!Ye(r))throw E7("Show");return n()})):s}return e.fallback},void 0,void 0)}function V0(e){const t=H0(()=>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?Ye(()=>a(o.keyed?s():()=>{if(Ye(n)()?.[0]!==i)throw E7("Match");return s()})):a},void 0,void 0)}function Rr(e){return e}let Wa;function nI(){Wa&&[...Wa].forEach(e=>e())}function rI(e){let t;Me.context&&Me.load&&(t=Me.load(Me.getContextId()));const[n,r]=ye(t,void 0);return Wa||(Wa=new Set),Wa.add(r),ae(()=>Wa.delete(r)),U(()=>{let i;if(i=n()){const s=e.fallback;return typeof s=="function"&&s.length?Ye(()=>s(i,()=>r())):s}return UL(()=>e.children,r)},void 0,void 0)}const iI=gt();function sI(e){let t=0,n,r,i,s,o;const[a,l]=ye(!1),c=KL(),u={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:a,effects:[],resolved:!1},d=di();if(Me.context&&Me.load){const p=Me.getContextId();let m=Me.load(p);if(m&&(typeof m!="object"||m.s!==1?i=m:Me.gather(p)),i&&i!=="$$f"){const[g,y]=ye(void 0,{equals:!1});s=g,i.then(()=>{if(Me.done)return y();Me.gather(p),rs(r),y(),rs()},v=>{o=v,y()})}}const f=dt(iI);f&&(n=f.register(u.inFallback));let h;return ae(()=>h&&h()),T(c.Provider,{value:u,get children(){return U(()=>{if(o)throw o;if(r=Me.context,s)return s(),s=void 0;r&&i==="$$f"&&rs();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,GL(u.effects),p();if(v)return h?m:Sn(w=>(h=w,r&&(rs({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const oI=["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"],aI=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...oI]),lI=new Set(["innerHTML","textContent","innerText","children"]),cI=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),uI=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 dI(e,t){const n=uI[e];return typeof n=="object"?n[t]?n.$:void 0:n}const fI=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),hI=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"]),pI={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Qe=e=>U(()=>e());function mI(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():X(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function fe(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?()=>Ye(()=>document.importNode(i||(i=s()),!0)):()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function Gr(e,t=window.document){const n=t[L2]||(t[L2]=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 $t(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;si.children=zc(e,t.children,i.children)),Ve(()=>typeof t.ref=="function"&&kr(t.ref,e)),Ve(()=>bI(e,t,n,!0,i,!0)),i}function kr(e,t,n){return Ye(()=>e(t,n))}function X(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return zc(e,t,r,n);Ve(i=>zc(e,t(),i,n),r)}function bI(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=A2(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=A2(e,o,a,i[o],n,s,t)}}function wI(e){let t,n;return!ra()||!(t=Me.registry.get(n=SI()))?e():(Me.completed&&Me.completed.add(t),Me.registry.delete(n),t)}function ra(e){return!!Me.context&&!Me.done&&(!e||e.isConnected)}function kI(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function I2(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i-1&&pI[t.split(":")[0]];f?yI(e,f,t,n):pt(e,cI[t]||t,n)}return n}function xI(e){if(Me.registry&&Me.events&&Me.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}}),Me.registry&&!Me.done&&(Me.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=zc(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(cg(l,t,n,i))return Ve(()=>n=zc(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=xa(e,n,r),a)return n}else c?n.length===0?M2(e,l,r):mI(e,n,l):(n&&xa(e),M2(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=xa(e,n,r,t);xa(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function cg(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 SI(){return Me.getNextContextId()}const ug=!1,_I="http://www.w3.org/2000/svg";function T7(e,t=!1,n=void 0){return t?document.createElementNS(_I,e):document.createElement(e,{is:n})}function ia(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=di();let s,o=!!Me.context;return ie(()=>{o&&(di().user=o=!1),s||(s=is(i,()=>U(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=ye(!1),u=()=>c(!0);Sn(d=>X(a,()=>l()?d():s(),null)),ae(u)}else{const l=T7(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}),X(c,s),a.appendChild(l),e.ref&&e.ref(l),ae(()=>a.removeChild(l))}},void 0,{render:!o}),n}function CI(e,t){const n=U(e);return U(()=>{const r=n();switch(typeof r){case"function":return Ye(()=>r(t));case"string":const i=hI.has(r),s=Me.context?wI():T7(r,i,Ye(()=>t.is));return Br(s,t,i),s}})}function L7(e){const[,t]=he(e,["component"]);return CI(()=>e.component,t)}const tt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ct=globalThis,$o="10.36.0";function z0(){return j0(Ct),Ct}function j0(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||$o,t[$o]=t[$o]||{}}function Tl(e,t,n=Ct){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[$o]=r[$o]||{};return i[e]||(i[e]=t())}const EI=["debug","info","warn","error","log","assert","trace"],TI="Sentry Logger ",Pf={};function Ll(e){if(!("console"in Ct))return e();const t=Ct.console,n={},r=Object.keys(Pf);r.forEach(i=>{const s=Pf[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function LI(){Sy().enabled=!0}function II(){Sy().enabled=!1}function I7(){return Sy().enabled}function AI(...e){xy("log",...e)}function MI(...e){xy("warn",...e)}function DI(...e){xy("error",...e)}function xy(e,...t){tt&&I7()&&Ll(()=>{Ct.console[e](`${TI}[${e}]:`,...t)})}function Sy(){return tt?Tl("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const qe={enable:LI,disable:II,isEnabled:I7,log:AI,warn:MI,error:DI},A7=50,jo="?",D2=/\(error: (.*)\)/,O2=/captureMessage|captureException/;function M7(...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=D2.test(l)?l.replace(D2,"$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>=A7+i)break}}return PI(s.slice(i))}}function OI(e){return Array.isArray(e)?M7(...e):e}function PI(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(sd(t).function||"")&&t.pop(),t.reverse(),O2.test(sd(t).function||"")&&(t.pop(),O2.test(sd(t).function||"")&&t.pop()),t.slice(0,A7).map(n=>({...n,filename:n.filename||sd(t).filename,function:n.function||jo}))}function sd(e){return e[e.length-1]||{}}const mp="";function Xs(e){try{return!e||typeof e!="function"?mp:e.name||mp}catch{return mp}}function P2(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 D7(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const sf={},R2={};function sa(e,t){sf[e]=sf[e]||[],sf[e].push(t)}function oa(e,t){if(!R2[e]){R2[e]=!0;try{t()}catch(n){tt&&qe.error(`Error while instrumenting ${e}`,n)}}}function ai(e,t){const n=e&&sf[e];if(n)for(const r of n)try{r(t)}catch(i){tt&&qe.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${Xs(r)} Error:`,i)}}let gp=null;function RI(e){const t="error";sa(t,e),oa(t,NI)}function NI(){gp=Ct.onerror,Ct.onerror=function(e,t,n,r,i){return ai("error",{column:r,error:i,line:n,msg:e,url:t}),gp?gp.apply(this,arguments):!1},Ct.onerror.__SENTRY_INSTRUMENTED__=!0}let yp=null;function $I(e){const t="unhandledrejection";sa(t,e),oa(t,FI)}function FI(){yp=Ct.onunhandledrejection,Ct.onunhandledrejection=function(e){return ai("unhandledrejection",e),yp?yp.apply(this,arguments):!0},Ct.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const O7=Object.prototype.toString;function q0(e){switch(O7.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Js(e,Error)}}function Il(e,t){return O7.call(e)===`[object ${t}]`}function P7(e){return Il(e,"ErrorEvent")}function N2(e){return Il(e,"DOMError")}function HI(e){return Il(e,"DOMException")}function ls(e){return Il(e,"String")}function _y(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function B0(e){return e===null||_y(e)||typeof e!="object"&&typeof e!="function"}function jc(e){return Il(e,"Object")}function U0(e){return typeof Event<"u"&&Js(e,Event)}function VI(e){return typeof Element<"u"&&Js(e,Element)}function zI(e){return Il(e,"RegExp")}function xu(e){return!!(e?.then&&typeof e.then=="function")}function jI(e){return jc(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Js(e,t){try{return e instanceof t}catch{return!1}}function R7(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function N7(e){return typeof Request<"u"&&Js(e,Request)}const Cy=Ct,qI=80;function $7(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||qI;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 BI(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Cy.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&&ls(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 Ey(){try{return Cy.document.location.href}catch{return""}}function UI(e){if(!Cy.HTMLElement)return null;let t=e;const n=5;for(let r=0;r"}}function F2(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 WI(e){const t=Object.keys(H7(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Sa;function W0(e){if(Sa!==void 0)return Sa?Sa(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Ct;return t in n&&typeof n[t]=="function"?(Sa=n[t],Sa(e)):(Sa=null,e())}function Rf(){return W0(()=>Math.random())}function G0(){return W0(()=>Date.now())}function dg(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function H2(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rof(e,r,n))}function GI(){const e=Ct;return e.crypto||e.msCrypto}let vp;function KI(){return Rf()*16}function Vr(e=GI()){try{if(e?.randomUUID)return W0(()=>e.randomUUID()).replace(/-/g,"")}catch{}return vp||(vp="10000000100040008000"+1e11),vp.replace(/[018]/g,t=>(t^(KI()&15)>>t/4).toString(16))}function V7(e){return e.exception?.values?.[0]}function Lo(e){const{message:t,event_id:n}=e;if(t)return t;const r=V7(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function fg(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 dl(e,t){const n=V7(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 V2(e){if(ZI(e))return!0;try{eo(e,"__sentry_captured__",!0)}catch{}return!1}function ZI(e){try{return e.__sentry_captured__}catch{}}const z7=1e3;function Su(){return G0()/z7}function YI(){const{performance:e}=Ct;if(!e?.now||!e.timeOrigin)return Su;const t=e.timeOrigin;return()=>(t+W0(()=>e.now()))/z7}let z2;function cs(){return(z2??(z2=YI()))()}function QI(e){const t=cs(),n={sid:Vr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>JI(n)};return e&&fl(n,e),n}function fl(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||cs(),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:Vr()),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 XI(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),fl(e,n)}function JI(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 _u(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]=_u(r[i],t[i],n-1));return r}function j2(){return Vr()}function j7(){return Vr().substring(16)}const hg="_sentrySpan";function q2(e,t){t?eo(e,hg,t):delete e[hg]}function B2(e){return e[hg]}const eA=100;class hs{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:j2(),sampleRand:Rf()}}clone(){const t=new hs;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,q2(t,B2(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&&fl(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 hs?n.getScopeData():jc(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,q2(this,void 0),this._attachments=[],this.setPropagationContext({traceId:j2(),sampleRand:Rf()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:eA;if(r<=0)return this;const i={timestamp:Su(),...t,message:t.message?dg(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:B2(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=_u(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Vr();if(!this._client)return tt&&qe.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||Vr();if(!this._client)return tt&&qe.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||Vr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(tt&&qe.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 tA(){return Tl("defaultCurrentScope",()=>new hs)}function nA(){return Tl("defaultIsolationScope",()=>new hs)}class rA{constructor(t,n){let r;t?r=t:r=new hs;let i;n?i=n:i=new hs,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 xu(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 hl(){const e=z0(),t=j0(e);return t.stack=t.stack||new rA(tA(),nA())}function iA(e){return hl().withScope(e)}function sA(e,t){const n=hl();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function U2(e){return hl().withScope(()=>e(hl().getIsolationScope()))}function oA(){return{withIsolationScope:U2,withScope:iA,withSetScope:sA,withSetIsolationScope:(e,t)=>U2(t),getCurrentScope:()=>hl().getScope(),getIsolationScope:()=>hl().getIsolationScope()}}function Ly(e){const t=j0(e);return t.acs?t.acs:oA()}function ao(){const e=z0();return Ly(e).getCurrentScope()}function Cu(){const e=z0();return Ly(e).getIsolationScope()}function aA(){return Tl("globalScope",()=>new hs)}function lA(...e){const t=z0(),n=Ly(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Dn(){return ao().getClient()}function cA(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,s={trace_id:n,span_id:i||j7()};return r&&(s.parent_span_id=r),s}const uA="sentry.source",dA="sentry.sample_rate",fA="sentry.previous_trace_sample_rate",hA="sentry.op",pA="sentry.origin",q7="sentry.profile_id",B7="sentry.exclusive_time",mA=0,gA=1,yA="_sentryScope",vA="_sentryIsolationScope";function bA(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function U7(e){const t=e;return{scope:t[yA],isolationScope:bA(t[vA])}}const wA="sentry-",kA=/^sentry-/;function xA(e){const t=SA(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(kA)){const o=i.slice(wA.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function SA(e){if(!(!e||!ls(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=W2(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):W2(e)}function W2(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 _A=/^o(\d+)\./,CA=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function EA(e){return e==="http"||e==="https"}function Eu(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 TA(e){const t=CA.exec(e);if(!t){Ll(()=>{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 W7({host:s,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function W7(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function LA(e){if(!tt)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(qe.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?EA(r)?t&&isNaN(parseInt(t,10))?(qe.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(qe.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(qe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function IA(e){return e.match(_A)?.[1]}function AA(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=IA(n)),r}function MA(e){const t=typeof e=="string"?TA(e):W7(e);if(!(!t||!LA(t)))return t}function DA(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 G7=1;let G2=!1;function OA(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Iy(e).parent_span_id,s=U7(e).scope,o=r?s?.getPropagationContext().propagationSpanId||j7():t;return{parent_span_id:i,span_id:o,trace_id:n}}function PA(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===G7,attributes:s,...i}))}function K2(e){return typeof e=="number"?Z2(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Z2(e.getTime()):cs()}function Z2(e){return e>9999999999?e/1e3:e}function Iy(e){if(NA(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(RA(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:K2(i),timestamp:K2(o)||void 0,status:FA(a),op:r[hA],origin:r[pA],links:PA(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function RA(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function NA(e){return typeof e.getSpanJSON=="function"}function $A(e){const{traceFlags:t}=e.spanContext();return t===G7}function FA(e){if(!(!e||e.code===mA))return e.code===gA?"ok":e.message||"internal_error"}const HA="_sentryRootSpan";function K7(e){return e[HA]||e}function Y2(){G2||(Ll(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),G2=!0)}function VA(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Dn()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Q2(e){qe.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function X2(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(jA(n)){if(of(e.description,n))return tt&&Q2(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?of(e.description,n.name):!0,i=n.op?e.op&&of(e.op,n.op):!0;if(r&&i)return tt&&Q2(e),!0}return!1}function zA(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 jA(e){return typeof e=="string"||e instanceof RegExp}const Ay="production",qA="_frozenDsc";function Z7(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Ay,release:n.release,public_key:r,trace_id:e,org_id:AA(t)};return t.emit("createDsc",i),i}function BA(e,t){const n=t.getPropagationContext();return n.dsc||Z7(n.traceId,e)}function UA(e){const t=Dn();if(!t)return{};const n=K7(e),r=Iy(n),i=r.data,s=n.spanContext().traceState,o=s?.get("sentry.sample_rate")??i[dA]??i[fA];function a(p){return(typeof o=="number"||typeof o=="string")&&(p.sample_rate=`${o}`),p}const l=n[qA];if(l)return a(l);const c=s?.get("sentry.dsc"),u=c&&xA(c);if(u)return a(u);const d=Z7(e.spanContext().traceId,t),f=i[uA],h=r.description;return f!=="url"&&h&&(d.transaction=h),VA()&&(d.sampled=String($A(n)),d.sample_rand=s?.get("sentry.sample_rand")??U7(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function Ji(e,t=100,n=1/0){try{return pg("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Y7(e,t=3,n=100*1024){const r=Ji(e,t);return ZA(r)>n?Y7(e,t-1,n):r}function pg(e,t,n=1/0,r=1/0,i=YA()){const[s,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=WA(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 pg("",h,l-1,r,i)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const f=H7(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]=pg(h,p,l-1,r,i),d++}return o(t),u}function WA(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(R7(t))return D7(t);if(jI(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Xs(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=GA(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function GA(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function KA(e){return~-encodeURI(e).split(/%..|./).length}function ZA(e){return KA(JSON.stringify(e))}function YA(){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 Al(e,t=[]){return[e,t]}function QA(e,t){const[n,r]=e;return[n,[...r,t]]}function mg(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 XA(e,t){return mg(e,(n,r)=>t.includes(r))}function gg(e){const t=j0(Ct);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function JA(e){const[t,n]=e;let r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[gg(r),s]:r.push(typeof s=="string"?gg(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(Ji(a))}i(l)}}return typeof r=="string"?r:eM(r)}function eM(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 tM(e){const t=typeof e.data=="string"?gg(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const nM={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 J2(e){return nM[e]}function Q7(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function rM(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:Eu(r)},...i&&{trace:i}}}function iM(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 sM(e,t,n,r){const i=Q7(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Eu(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Al(s,[o])}function oM(e,t,n,r){const i=Q7(n),s=e.type&&e.type!=="replay_event"?e.type:"event";iM(e,n?.sdk);const o=rM(e,i,r,t);return delete e.sdkProcessingMetadata,Al(o,[[{type:s},e]])}const bp=0,e4=1,t4=2;function Z0(e){return new qc(t=>{t(e)})}function My(e){return new qc((t,n)=>{n(e)})}class qc{constructor(t){this._state=bp,this._handlers=[],this._runExecutor(t)}then(t,n){return new qc((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 qc((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===bp)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===e4&&n[1](this._value),this._state===t4&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,o)=>{if(this._state===bp){if(xu(o)){o.then(r,i);return}this._state=s,this._value=o,this._executeHandlers()}},r=s=>{n(e4,s)},i=s=>{n(t4,s)};try{t(r,i)}catch(s){i(s)}}}function aM(e,t,n,r=0){try{const i=yg(t,n,e,r);return xu(i)?i:Z0(i)}catch(i){return My(i)}}function yg(e,t,n,r){const i=n[r];if(!e||!i)return e;const s=i({...e},t);return tt&&s===null&&qe.log(`Event processor "${i.id||"?"}" dropped event`),xu(s)?s.then(o=>yg(o,t,n,r+1)):yg(s,t,n,r+1)}let go,n4,r4,Ds;function lM(e){const t=Ct._sentryDebugIds,n=Ct._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(Ds&&r.length===n4&&i.length===r4)return Ds;n4=r.length,r4=i.length,Ds={},go||(go={});const s=(o,a)=>{for(const l of o){const c=a[l],u=go?.[l];if(u&&Ds&&c)Ds[u[0]]=c,go&&(go[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&&Ds&&go){Ds[p]=c,go[l]=[p,c];break}}}}};return t&&s(r,t),n&&s(i,n),Ds}function cM(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;dM(e,t),r&&pM(e,r),mM(e,n),fM(e,i),hM(e,s)}function i4(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;tc(e,"extra",n),tc(e,"tags",r),tc(e,"attributes",i),tc(e,"user",s),tc(e,"contexts",o),e.sdkProcessingMetadata=_u(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 tc(e,t,n){e[t]=_u(e[t],n,1)}function uM(e,t){const n=aA().getScopeData();return e&&i4(n,e.getScopeData()),t&&i4(n,t.getScopeData()),n}function dM(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 fM(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function hM(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function pM(e,t){e.contexts={trace:OA(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:UA(t),...e.sdkProcessingMetadata};const n=K7(t),r=Iy(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function mM(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 gM(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Vr(),timestamp:t.timestamp||Su()},c=n.integrations||e.integrations.map(g=>g.name);yM(l,e),wM(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&vM(l,e.stackParser);const u=xM(r,n.captureContext);n.mechanism&&dl(l,n.mechanism);const d=i?i.getEventProcessors():[],f=uM(s,u),h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),cM(l,f);const p=[...d,...f.eventProcessors];return aM(p,l,n).then(g=>(g&&bM(g),typeof o=="number"&&o>0?kM(g,o,a):g))}function yM(e,t){const{environment:n,release:r,dist:i,maxValueLength:s}=t;e.environment=e.environment||n||Ay,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const o=e.request;o?.url&&s&&(o.url=dg(o.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=dg(a.value,s))})}function vM(e,t){const n=lM(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function bM(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 wM(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function kM(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Ji(i.data,t,n)}}))},...e.user&&{user:Ji(e.user,t,n)},...e.contexts&&{contexts:Ji(e.contexts,t,n)},...e.extra&&{extra:Ji(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ji(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Ji(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ji(e.contexts.flags,3,n)),r}function xM(e,t){if(!t)return e;const n=e?e.clone():new hs;return n.update(t),n}function Dy(e,t){return ao().captureException(e,void 0)}function X7(e,t){return ao().captureEvent(e,t)}function SM(){const e=Dn();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function s4(e){const t=Cu(),n=ao(),{userAgent:r}=Ct.navigator||{},i=QI({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&fl(s,{status:"exited"}),J7(),t.setSession(i),i}function J7(){const e=Cu(),n=ao().getSession()||e.getSession();n&&XI(n),e8(),e.setSession()}function e8(){const e=Cu(),t=Dn(),n=e.getSession();n&&t&&t.captureSession(n)}function o4(e=!1){if(e){J7();return}e8()}const _M="7";function CM(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function EM(e){return`${CM(e)}${e.projectId}/envelope/`}function TM(e,t){const n={sentry_version:_M};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function LM(e,t,n){return t||`${EM(e)}?${TM(e,n)}`}const a4=[];function IM(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 AM(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 IM(r)}function MM(e,t){const n={};return t.forEach(r=>{r&&t8(e,r,n)}),n}function l4(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function t8(e,t,n){if(n[t.name]){tt&&qe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!a4.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),a4.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)}tt&&qe.log(`Integration installed: ${t.name}`)}function DM(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function OM(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Eu(r)),Al(i,[DM(e)])}function n8(e,t){const n=t??PM(e)??[];if(n.length===0)return;const r=e.getOptions(),i=OM(n,r._metadata,r.tunnel,e.getDsn());r8().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function PM(e){return r8().get(e)}function r8(){return Tl("clientToLogBufferMap",()=>new WeakMap)}function RM(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function NM(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Eu(r)),Al(i,[RM(e)])}function i8(e,t){const n=t??$M(e)??[];if(n.length===0)return;const r=e.getOptions(),i=NM(n,r._metadata,r.tunnel,e.getDsn());s8().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function $M(e){return s8().get(e)}function s8(){return Tl("clientToMetricBufferMap",()=>new WeakMap)}const Oy=Symbol.for("SentryBufferFullError");function Py(e=100){const t=new Set;function n(){return t.sizer(a),()=>r(a)),a}function s(o){if(!t.size)return Z0(!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 FM=60*1e3;function HM(e,t=G0()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?FM:r-t}function VM(e,t){return e[t]||e.all||0}function zM(e,t,n=G0()){return VM(e,t)>n}function jM(e,{statusCode:t,headers:n},r=G0()){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+HM(o,r):t===429&&(i.all=r+60*1e3);return i}const o8=64;function qM(e,t,n=Py(e.bufferSize||o8)){let r={};const i=o=>n.drain(o);function s(o){const a=[];if(mg(o,(d,f)=>{const h=J2(f);zM(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):a.push(d)}),a.length===0)return Promise.resolve({});const l=Al(o[0],a),c=d=>{if(XA(l,["client_report"])){tt&&qe.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}mg(l,(f,h)=>{e.recordDroppedEvent(d,J2(h))})},u=()=>t({body:JA(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&tt&&qe.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=jM(r,d),d),d=>{throw c("network_error"),tt&&qe.error("Encountered error running transport request:",d),d});return n.add(u).then(d=>d,d=>{if(d===Oy)return tt&&qe.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:s,flush:i}}function BM(e,t,n){const r=[{type:"client_report"},{timestamp:Su(),discarded_events:e}];return Al(t?{dsn:t}:{},[r])}function a8(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 UM(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?.[q7],exclusive_time:o?.[B7],measurements:e.measurements,is_segment:!0}}function WM(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&&{[q7]:e.profile_id},...e.exclusive_time&&{[B7]:e.exclusive_time}}}},measurements:e.measurements}}const c4="Not capturing exception because it's already been captured.",u4="Discarded session because of missing or non-string release",l8=Symbol.for("SentryInternalError"),c8=Symbol.for("SentryDoNotSendEventError"),GM=5e3;function af(e){return{message:e,[l8]:!0}}function wp(e){return{message:e,[c8]:!0}}function d4(e){return!!e&&typeof e=="object"&&l8 in e}function f4(e){return!!e&&typeof e=="object"&&c8 in e}function h4(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)},GM))}),e.on("flush",()=>{i(e)})}class KM{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Py(t.transportOptions?.bufferSize??o8),t.dsn?this._dsn=MA(t.dsn):tt&&qe.warn("No DSN provided, client will not send events."),this._dsn){const r=LM(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&&h4(this,"afterCaptureLog","flushLogs",XM,n8),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&h4(this,"afterCaptureMetric","flushMetrics",QM,i8)}captureException(t,n,r){const i=Vr();if(V2(t))return tt&&qe.log(c4),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:Vr(),...r},o=_y(t)?t:String(t),a=B0(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=Vr();if(n?.originalException&&V2(n.originalException))return tt&&qe.log(c4),i;const s={event_id:i,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope,c=p4(t.type);return this._process(()=>this._captureEvent(t,s,a||r,l),c),s.event_id}captureSession(t){this.sendSession(t),fl(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];t8(this,t,this._integrations),n||l4(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=oM(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=QA(r,tM(i));this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){const{release:n,environment:r=Ay}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){tt&&qe.warn(u4);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){tt&&qe.warn(u4);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=sM(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}`;tt&&qe.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 tt&&qe.error("Error while sending envelope:",n),{}}return tt&&qe.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=MM(this,t),l4(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)&&(fl(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),gM(s,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:cA(r),...a.contexts};const l=BA(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=ao(),i=Cu()){return tt&&vg(t)&&qe.log(`Captured error event \`${a8(t)[0]||""}\``),this._processEvent(t,n,r,i).then(s=>s.event_id,s=>{tt&&(f4(s)?qe.log(s.message):d4(s)?qe.warn(s.message):qe.warn(s))})}_processEvent(t,n,r,i){const s=this.getOptions(),{sampleRate:o}=s,a=u8(t),l=vg(t),u=`before send for type \`${t.type||"error"}\``,d=typeof o>"u"?void 0:DA(o);if(l&&typeof d=="number"&&Rf()>d)return this.recordDroppedEvent("sample_rate","error"),My(wp(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=p4(t.type);return this._prepareEvent(t,n,r,i).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f),wp("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return h;const m=YM(this,s,h,n);return ZM(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 wp(`${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 f4(h)||d4(h)?h:(this.captureException(h,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:h}),af(`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===Oy&&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(){tt&&qe.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){tt&&qe.log("No outcomes to send");return}if(!this._dsn){tt&&qe.log("No dsn provided, will not send outcomes");return}tt&&qe.log("Sending outcomes:",t);const n=BM(t,this._options.tunnel&&Eu(this._dsn));this.sendEnvelope(n)}}function p4(e){return e==="replay_event"?"replay":e||"error"}function ZM(e,t){const n=`${t} must return \`null\` or a valid event.`;if(xu(e))return e.then(r=>{if(!jc(r)&&r!==null)throw af(n);return r},r=>{throw af(`${t} rejected with ${r}`)});if(!jc(e)&&e!==null)throw af(n);return e}function YM(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o,ignoreSpans:a}=t;let l=n;if(vg(l)&&i)return i(l,r);if(u8(l)){if(o||a){const c=UM(l);if(a?.length&&X2(c,a))return null;if(o){const u=o(c);u?l=_u(n,WM(u)):Y2()}if(l.spans){const u=[],d=l.spans;for(const h of d){if(a?.length&&X2(h,a)){zA(d,h);continue}if(o){const p=o(h);p?u.push(p):(Y2(),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 vg(e){return e.type===void 0}function u8(e){return e.type==="transaction"}function QM(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+d8(e.attributes)}function XM(e){let t=0;return e.message&&(t+=e.message.length*2),t+d8(e.attributes)}function d8(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*m4(n[0]):B0(n)?t+=m4(n):t+=100}),t}function m4(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function JM(e){return q0(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function g4(e){return JM(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function eD(e,t){t.debug===!0&&(tt?qe.enable():Ll(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ao().update(t.initialScope);const r=new e(t);return tD(r),r.init(),r}function tD(e){ao().setClient(e)}function kp(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 nD(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 rD(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 f8(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:$o})),version:$o}),e._metadata=i}const iD=100;function qo(e,t){const n=Dn(),r=Cu();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=iD}=n.getOptions();if(s<=0)return;const a={timestamp:Su(),...e},l=i?Ll(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,s))}let y4;const sD="FunctionToString",v4=new WeakMap,oD=(()=>({name:sD,setupOnce(){y4=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ty(this),n=v4.has(Dn())&&t!==void 0?t:this;return y4.apply(n,e)}}catch{}},setup(e){v4.set(e,!0)}})),aD=oD,lD=[/^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$/],cD="EventFilters",uD=(e={})=>{let t;return{name:cD,setup(n){const r=n.getOptions();t=b4(e,r)},processEvent(n,r,i){if(!t){const s=i.getOptions();t=b4(e,s)}return fD(n,t)?null:n}}},dD=((e={})=>({...uD(e),name:"InboundFilters"}));function b4(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:lD],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function fD(e,t){if(e.type){if(e.type==="transaction"&&pD(e,t.ignoreTransactions))return tt&&qe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${Lo(e)}`),!0}else{if(hD(e,t.ignoreErrors))return tt&&qe.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${Lo(e)}`),!0;if(vD(e))return tt&&qe.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${Lo(e)}`),!0;if(mD(e,t.denyUrls))return tt&&qe.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Lo(e)}. Url: ${Nf(e)}`),!0;if(!gD(e,t.allowUrls))return tt&&qe.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Lo(e)}. Url: ${Nf(e)}`),!0}return!1}function hD(e,t){return t?.length?a8(e).some(n=>K0(n,t)):!1}function pD(e,t){if(!t?.length)return!1;const n=e.transaction;return n?K0(n,t):!1}function mD(e,t){if(!t?.length)return!1;const n=Nf(e);return n?K0(n,t):!1}function gD(e,t){if(!t?.length)return!0;const n=Nf(e);return n?K0(n,t):!0}function yD(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 Nf(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?yD(n):null}catch{return tt&&qe.error(`Cannot extract url for event ${Lo(e)}`),null}}function vD(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function bD(e,t,n,r,i,s){if(!i.exception?.values||!s||!Js(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=bg(e,t,r,s.originalException,n,i.exception.values,o,0))}function bg(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(Js(r[i],Error)){w4(o,a);const c=e(t,r[i]),u=l.length;k4(c,i,u,a),l=bg(e,t,n,r[i],i,[c,...l],c,u)}return Array.isArray(r.errors)&&r.errors.forEach((c,u)=>{if(Js(c,Error)){w4(o,a);const d=e(t,c),f=l.length;k4(d,`errors[${u}]`,f,a),l=bg(e,t,n,c,i,[d,...l],d,f)}}),l}function w4(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function k4(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function wD(e){const t="console";sa(t,e),oa(t,kD)}function kD(){"console"in Ct&&EI.forEach(function(e){e in Ct.console&&br(Ct.console,e,function(t){return Pf[e]=t,function(...n){ai("console",{args:n,level:e}),Pf[e]?.apply(Ct.console,n)}})})}function xD(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const SD="Dedupe",_D=(()=>{let e;return{name:SD,processEvent(t){if(t.type)return t;try{if(ED(t,e))return tt&&qe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),CD=_D;function ED(e,t){return t?!!(TD(e,t)||LD(e,t)):!1}function TD(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!p8(e,t)||!h8(e,t))}function LD(e,t){const n=x4(t),r=x4(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!p8(e,t)||!h8(e,t))}function h8(e,t){let n=P2(e),r=P2(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 Bc=Ct;function ID(){return"history"in Bc&&!!Bc.history}function AD(){if(!("fetch"in Bc))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function wg(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function MD(){if(typeof EdgeRuntime=="string")return!0;if(!AD())return!1;if(wg(Bc.fetch))return!0;let e=!1;const t=Bc.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=wg(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){tt&&qe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function DD(e,t){const n="fetch";sa(n,e),oa(n,()=>OD(void 0,t))}function OD(e,t=!1){t&&!MD()||br(Ct,"fetch",function(n){return function(...r){const i=new Error,{method:s,url:o}=PD(r),a={args:r,fetchData:{method:s,url:o},startTimestamp:cs()*1e3,virtualError:i,headers:RD(r)};return ai("fetch",{...a}),n.apply(Ct,r).then(async l=>(ai("fetch",{...a,endTimestamp:cs()*1e3,response:l}),l),l=>{ai("fetch",{...a,endTimestamp:cs()*1e3,error:l}),q0(l)&&l.stack===void 0&&(l.stack=i.stack,eo(l,"framesToPop",1));const u=Dn()?.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})`:eo(l,"__sentry_fetch_url_host__",h)}catch{}throw l})}})}function lf(e,t){return!!e&&typeof e=="object"&&!!e[t]}function S4(e){return typeof e=="string"?e:e?lf(e,"url")?e.url:e.toString?e.toString():"":""}function PD(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:S4(n),method:lf(r,"method")?String(r.method).toUpperCase():N7(n)&&lf(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:S4(t),method:lf(t,"method")?String(t.method).toUpperCase():"GET"}}function RD(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(N7(t))return new Headers(t.headers)}catch{}}function ND(){return"npm"}const Zt=Ct;let kg=0;function g8(){return kg>0}function $D(){kg++,setTimeout(()=>{kg--})}function pl(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(Ty(e))return e}catch{return e}const r=function(...i){try{const s=i.map(o=>pl(o,t));return e.apply(this,s)}catch(s){throw $D(),lA(o=>{o.addEventProcessor(a=>(t.mechanism&&(fg(a,void 0),dl(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),Dy(s)}),s}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}F7(r,e),eo(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function FD(){const e=Ey(),{referrer:t}=Zt.document||{},{userAgent:n}=Zt.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function Ry(e,t){const n=Ny(e,t),r={type:qD(t),value:BD(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function HD(e,t,n,r){const s=Dn()?.getOptions().normalizeDepth,o=ZD(t),a={__serialized__:Y7(t,s)};if(o)return{exception:{values:[Ry(e,o)]},extra:a};const l={exception:{values:[{type:U0(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:GD(t,{isUnhandledRejection:r})}]},extra:a};if(n){const c=Ny(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function xp(e,t){return{exception:{values:[Ry(e,t)]}}}function Ny(e,t){const n=t.stacktrace||t.stack||"",r=zD(t),i=jD(t);try{return e(n,r,i)}catch{}return[]}const VD=/Minified React error #\d+;/i;function zD(e){return e&&VD.test(e.message)?1:0}function jD(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function y8(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function qD(e){const t=e?.name;return!t&&y8(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function BD(e){const t=e?.message;return y8(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?g4(t.error):g4(e):"No error message"}function UD(e,t,n,r){const i=n?.syntheticException||void 0,s=$y(e,t,i,r);return dl(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),Z0(s)}function WD(e,t,n="info",r,i){const s=r?.syntheticException||void 0,o=xg(e,t,s,i);return o.level=n,r?.event_id&&(o.event_id=r.event_id),Z0(o)}function $y(e,t,n,r,i){let s;if(P7(t)&&t.error)return xp(e,t.error);if(N2(t)||HI(t)){const o=t;if("stack"in t)s=xp(e,t);else{const a=o.name||(N2(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=xg(e,l,n,r),fg(s,l)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return q0(t)?xp(e,t):jc(t)||U0(t)?(s=HD(e,t,n,i),dl(s,{synthetic:!0}),s):(s=xg(e,t,n,r),fg(s,`${t}`),dl(s,{synthetic:!0}),s)}function xg(e,t,n,r){const i={};if(r&&n){const s=Ny(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]}),dl(i,{synthetic:!0})}if(_y(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 GD(e,{isUnhandledRejection:t}){const n=WI(e),r=t?"promise rejection":"exception";return P7(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:U0(e)?`Event \`${KD(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function KD(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ZD(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class YD extends KM{constructor(t){const n=QD(t),r=Zt.SENTRY_SDK_SOURCE||ND();f8(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;Zt.document&&(s||o||c)&&Zt.document.addEventListener("visibilitychange",()=>{Zt.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),o&&n8(this),c&&i8(this))}),i&&this.on("beforeSendSession",rD)}eventFromException(t,n){return UD(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return WD(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 QD(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Zt.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const XD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Gn=Ct,JD=1e3;let _4,Sg,_g;function eO(e){sa("dom",e),oa("dom",tO)}function tO(){if(!Gn.document)return;const e=ai.bind(null,"dom"),t=C4(e,!0);Gn.document.addEventListener("click",t,!1),Gn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=Gn[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(br(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=C4(e);u.handler=d,s.call(this,o,d,l)}u.refCount++}catch{}return s.call(this,o,a,l)}}),br(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 nO(e){if(e.type!==Sg)return!1;try{if(!e.target||e.target._sentryId!==_g)return!1}catch{}return!0}function rO(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function C4(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=iO(n);if(rO(n.type,r))return;eo(n,"_sentryCaptured",!0),r&&!r._sentryId&&eo(r,"_sentryId",Vr());const i=n.type==="keypress"?"input":n.type;nO(n)||(e({event:n,name:i,global:t}),Sg=n.type,_g=r?r._sentryId:void 0),clearTimeout(_4),_4=Gn.setTimeout(()=>{_g=void 0,Sg=void 0},JD)}}function iO(e){try{return e.target}catch{return null}}let od;function v8(e){const t="history";sa(t,e),oa(t,sO)}function sO(){if(Gn.addEventListener("popstate",()=>{const t=Gn.location.href,n=od;if(od=t,n===t)return;ai("history",{from:n,to:t})}),!ID())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=od,s=oO(String(r));if(od=s,i===s)return t.apply(this,n);ai("history",{from:i,to:s})}return t.apply(this,n)}}br(Gn.history,"pushState",e),br(Gn.history,"replaceState",e)}function oO(e){try{return new URL(e,Gn.location.origin).toString()}catch{return e}}const cf={};function aO(e){const t=cf[e];if(t)return t;let n=Gn[e];if(wg(n))return cf[e]=n.bind(Gn);const r=Gn.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){XD&&qe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(cf[e]=n.bind(Gn))}function lO(e){cf[e]=void 0}const gc="__sentry_xhr_v3__";function cO(e){sa("xhr",e),oa("xhr",uO)}function uO(){if(!Gn.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,s=cs()*1e3,o=ls(r[0])?r[0].toUpperCase():void 0,a=dO(r[1]);if(!o||!a)return t.apply(n,r);n[gc]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const c=n[gc];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:cs()*1e3,startTimestamp:s,xhr:n,virtualError:i};ai("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[gc];return p&&ls(f)&&ls(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[gc];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const s={startTimestamp:cs()*1e3,xhr:n};return ai("xhr",s),t.apply(n,r)}})}function dO(e){if(ls(e))return e;try{return e.toString()}catch{}}const fO=40;function hO(e,t=aO("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 lO("fetch"),l}finally{n-=o,r--}}return qM(e,i,Py(e.bufferSize||fO))}const Y0=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pO=30,mO=50;function Cg(e,t,n,r){const i={filename:e,function:t===""?jo:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const gO=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,yO=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vO=/\((\S*)(?::(\d+))(?::(\d+))\)/,bO=/at (.+?) ?\(data:(.+?),/,wO=e=>{const t=e.match(bO);if(t)return{filename:``,function:t[1]};const n=gO.exec(e);if(n){const[,i,s,o]=n;return Cg(i,jo,+s,+o)}const r=yO.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=vO.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,o]=b8(r[1]||jo,r[2]);return Cg(o,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},kO=[pO,wO],xO=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,SO=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,_O=e=>{const t=xO.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=SO.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]||jo;return[i,r]=b8(i,r),Cg(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},CO=[mO,_O],EO=[kO,CO],TO=M7(...EO),b8=(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]:jo,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},ad=1024,LO="Breadcrumbs",IO=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:LO,setup(n){t.console&&wD(OO(n)),t.dom&&eO(DO(n,t.dom)),t.xhr&&cO(PO(n)),t.fetch&&DD(RO(n)),t.history&&v8(NO(n)),t.sentry&&n.on("beforeSendEvent",MO(n))}}}),AO=IO;function MO(e){return function(n){Dn()===e&&qo({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Lo(n)},{event:n})}}function DO(e,t){return function(r){if(Dn()!==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>ad&&(Y0&&qe.warn(`\`dom.maxStringLength\` cannot exceed ${ad}, but a value of ${a} was configured. Sentry will use ${ad} instead.`),a=ad),typeof o=="string"&&(o=[o]);try{const c=r.event,u=$O(c)?c.target:c;i=$7(u,{keyAttrs:o,maxStringLength:a}),s=UI(u)}catch{i=""}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};s&&(l.data={"ui.component_name":s}),qo(l,{event:r.event,name:r.name,global:r.global})}}function OO(e){return function(n){if(Dn()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:xD(n.level),message:H2(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${H2(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;qo(r,{input:n.args,level:n.level})}}function PO(e){return function(n){if(Dn()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[gc];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:m8(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),qo(f,d)}}function RO(e){return function(n){if(Dn()!==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),qo(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:m8(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),qo(l,a)}}}function NO(e){return function(n){if(Dn()!==e)return;let r=n.from,i=n.to;const s=kp(Zt.location.href);let o=r?kp(r):void 0;const a=kp(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),qo({category:"navigation",data:{from:r,to:i}})}}function $O(e){return!!e&&!!e.target}const FO=["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"],HO="BrowserApiErrors",VO=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:HO,setupOnce(){t.setTimeout&&br(Zt,"setTimeout",E4),t.setInterval&&br(Zt,"setInterval",E4),t.requestAnimationFrame&&br(Zt,"requestAnimationFrame",jO),t.XMLHttpRequest&&"XMLHttpRequest"in Zt&&br(XMLHttpRequest.prototype,"send",qO);const n=t.eventTarget;n&&(Array.isArray(n)?n:FO).forEach(i=>BO(i,t))}}}),zO=VO;function E4(e){return function(...t){const n=t[0];return t[0]=pl(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Xs(e)}`}}),e.apply(this,t)}}function jO(e){return function(t){return e.apply(this,[pl(t,{mechanism:{data:{handler:Xs(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function qO(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&br(n,i,function(s){const o={mechanism:{data:{handler:Xs(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=Ty(s);return a&&(o.mechanism.data.handler=Xs(a)),pl(s,o)})}),e.apply(this,t)}}function BO(e,t){const r=Zt[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(br(r,"addEventListener",function(i){return function(s,o,a){try{UO(o)&&(o.handleEvent=pl(o.handleEvent,{mechanism:{data:{handler:Xs(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&WO(this,s,o),i.apply(this,[s,pl(o,{mechanism:{data:{handler:Xs(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),br(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 UO(e){return typeof e.handleEvent=="function"}function WO(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const GO=()=>({name:"BrowserSession",setupOnce(){if(typeof Zt.document>"u"){Y0&&qe.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}s4({ignoreDuration:!0}),o4(),v8(({from:e,to:t})=>{e!==void 0&&e!==t&&(s4({ignoreDuration:!0}),o4())})}}),KO="GlobalHandlers",ZO=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:KO,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(QO(n),T4("onerror")),t.onunhandledrejection&&(XO(n),T4("onunhandledrejection"))}}}),YO=ZO;function QO(e){RI(t=>{const{stackParser:n,attachStacktrace:r}=w8();if(Dn()!==e||g8())return;const{msg:i,url:s,line:o,column:a,error:l}=t,c=tP($y(n,l||i,void 0,r,!1),s,o,a);c.level="error",X7(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function XO(e){$I(t=>{const{stackParser:n,attachStacktrace:r}=w8();if(Dn()!==e||g8())return;const i=JO(t),s=B0(i)?eP(i):$y(n,i,void 0,r,!0);s.level="error",X7(s,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function JO(e){if(B0(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 eP(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function tP(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=nP(t)??Ey();return l.length===0&&l.push({colno:c,filename:d,function:jo,in_app:!0,lineno:u}),e}function T4(e){Y0&&qe.log(`Global Handler attached: ${e}`)}function w8(){return Dn()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function nP(e){if(!(!ls(e)||e.length===0))return e.startsWith("data:")?`<${nD(e,!1)}>`:e}const rP=()=>({name:"HttpContext",preprocessEvent(e){if(!Zt.navigator&&!Zt.location&&!Zt.document)return;const t=FD(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),iP="cause",sP=5,oP="LinkedErrors",aP=((e={})=>{const t=e.limit||sP,n=e.key||iP;return{name:oP,preprocessEvent(r,i,s){const o=s.getOptions();bD(Ry,o.stackParser,n,t,r,i)}}}),lP=aP;function cP(){return uP()?(Y0&&Ll(()=>{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 uP(){if(typeof Zt.window>"u")return!1;const e=Zt;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Ey(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Zt===Zt.top&&r.some(s=>n.startsWith(`${s}://`)))}function dP(e){return[dD(),aD(),zO(),AO(),YO(),lP(),CD(),rP(),GO()]}function fP(e={}){const t=!e.skipBrowserExtensionCheck&&cP();let n=e.defaultIntegrations==null?dP():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:OI(e.stackParser||TO),integrations:AM({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||hO};return eD(YD,r)}function hP(e){const t={...e};return f8(t,"solid"),fP(t)}const pP="modulepreload",mP=function(e){return"/"+e},L4={},P=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=mP(c),c in L4)return;L4[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":pP,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 Gt(e){const t=gt();return{provider:n=>{const r=e.init(n);if(!(e.gate??!0))return T(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 T(Se,{get when(){return s()},get children(){return T(t.Provider,{value:r,get children(){return n.children}})}})},use(){const n=dt(t);if(!n)throw new Error(`${e.name} context must be used within a context provider`);return n}}}const{use:yue,provider:gP}=Gt({name:"Data",init:e=>({get store(){return e.data},get directory(){return e.directory},navigateToSession:e.onNavigateToSession,sessionHref:e.onSessionHref})}),k8=Gt({name:"FileComponent",init:e=>e.component}),yP=k8.provider,vue=k8.use,vP=e=>e!=null,bP=e=>e.filter(vP);function wP(e){return(...t)=>{for(const n of e)n&&n(...t)}}const ce=e=>typeof e=="function"&&!e.length?e():e,Eg=e=>Array.isArray(e)?e:e?[e]:[];function kP(e,...t){return typeof e=="function"?e(...t):e}const Fy=ae;function xP(e,t,n){if(Me.context){const[r,i]=ye(e,n);return Pt(()=>i(()=>t())),[r,i]}return ye(t(),n)}function SP(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o{Eg(ce(e)).forEach(s=>{s&&Eg(ce(t)).forEach(o=>Wt(s,o,n,r))})};typeof e=="function"?ie(i):Ve(i)}function CP(e,t=di()){let n=0,r,i;return()=>(n++,ae(()=>{n--,queueMicrotask(()=>{!n&&i&&(i(),i=r=void 0)})}),i||Sn(s=>r=e(i=s),t),r)}function EP(e){const t=di(),n=CP(e,t);return()=>Me.context?Sn(e,t):n()}function Hy(e,t=!1){const n=window.matchMedia(e),[r,i]=xP(t,()=>n.matches);return Wt(n,"change",()=>i(n.matches)),r}function TP(e){return Hy("(prefers-color-scheme: dark)",e)}TP.bind(void 0,!1);const LP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function I4(e){const t={};let n;for(;n=LP.exec(e);)t[n[1]]=n[2];return t}function gi(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=I4(e)}else typeof t=="string"&&(t=I4(t));return{...e,...t}}function Nt(...e){return wP(e)}function IP(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Tg(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function AP(e){return typeof e=="number"}function Ha(e){return Object.prototype.toString.call(e)==="[object String]"}function x8(e){return typeof e=="function"}function Fi(e){return t=>`${e()}-${t}`}function MP(){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 ae(()=>{r()}),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function rn(e,t){return e?e===t||e.contains(t):!1}function yc(e,t=!1){const{activeElement:n}=Qn(e);if(!n?.nodeName)return null;if(S8(n)&&n.contentDocument)return yc(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Qn(n).getElementById(r);if(i)return i}}return n}function Vy(e){return Qn(e).defaultView||window}function Qn(e){return e?e.ownerDocument||e:document}function S8(e){return e.tagName==="IFRAME"}var _8=(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))(_8||{});function C8(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 zy(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Q0(){return zy(/^Mac/i)}function DP(){return zy(/^iPhone/i)}function OP(){return zy(/^iPad/i)||Q0()&&navigator.maxTouchPoints>1}function PP(){return DP()||OP()}function RP(){return Q0()||PP()}function bue(){return C8(/AppleWebKit/i)&&!NP()}function NP(){return C8(/Chrome/i)}function Ke(e,t){return t&&(x8(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function tn(e){return t=>{for(const n of e)Ke(t,n)}}function $P(e){return Q0()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function fn(e){if(e)if(FP())e.focus({preventScroll:!0});else{const t=HP(e);e.focus(),VP(t)}}var ld=null;function FP(){if(ld==null){ld=!1;try{document.createElement("div").focus({get preventScroll(){return ld=!0,!0}})}catch{}}return ld}function HP(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight{if(S8(i)&&i.contentDocument){const o=i.contentDocument.body,a=T8(o,!1);r.splice(s,1,...a)}}),r}function A4(e){return L8(e)&&!qP(e)}function L8(e){return e.matches(jy)&&qy(e)}function qP(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function qy(e,t){return e.nodeName!=="#comment"&&BP(e)&&UP(e,t)&&(!e.parentElement||qy(e.parentElement,e))}function BP(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 UP(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function WP(e,t,n){const r=t?.tabbable?jP:jy,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return t?.from?.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&qy(s)&&(!t?.accept||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function M4(e){let t=e;for(;t&&!GP(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function GP(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function KP(){}function I8(e){return[e.clientX,e.clientY]}function By(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 Xe(e,t){return re(e,t)}var nc=new Map,D4=new Set;function O4(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=nc.get(n.target);r||(r=new Set,nc.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=nc.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),nc.delete(n.target)),nc.size===0)){for(const i of D4)i();D4.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?O4():document.addEventListener("DOMContentLoaded",O4));function Lg(e,t){const n=P4(e,t,"left"),r=P4(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 P4(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 ZP(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let i=M4(e);for(;e&&i&&e!==n&&i!==n;)Lg(i,e),e=i,i=M4(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 YP={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"},Uc="data-kb-top-layer",A8,Ig=!1,ps=[];function Wc(e){return ps.findIndex(t=>t.node===e)}function QP(e){return ps[Wc(e)]}function XP(e){return ps[ps.length-1].node===e}function M8(){return ps.filter(e=>e.isPointerBlocking)}function JP(){return[...M8()].slice(-1)[0]}function Uy(){return M8().length>0}function D8(e){const t=Wc(JP()?.node);return Wc(e)e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),l=()=>Qn(t()),c=()=>{const p=l().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,YP),p},u=()=>{const p=t();return p?T8(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=yc(p);return!m||rn(p,m)?!1:L8(m)};ie(()=>{const p=t();if(!p)return;N4.add(i);const m=yc(p);if(!rn(p,m)){const y=new CustomEvent(Sp,R4);p.addEventListener(Sp,o),p.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{fn(d()),yc(p)===m&&fn(p)},0)}ae(()=>{p.removeEventListener(Sp,o),setTimeout(()=>{const y=new CustomEvent(_p,R4);h()&&y.preventDefault(),p.addEventListener(_p,a),p.dispatchEvent(y),y.defaultPrevented||fn(m??l().body),p.removeEventListener(_p,a),N4.remove(i)},0)})}),ie(()=>{const p=t();if(!p||!ce(e.trapFocus)||n())return;const m=y=>{const v=y.target;v?.closest(`[${Uc}]`)||(rn(p,v)?s=v:fn(s))},g=y=>{const w=y.relatedTarget??yc(p);w?.closest(`[${Uc}]`)||rn(p,w)||fn(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",g),ae(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",g)})}),ie(()=>{const p=t();if(!p||!ce(e.trapFocus)||n())return;const m=c();p.insertAdjacentElement("afterbegin",m);const g=c();p.insertAdjacentElement("beforeend",g);function y(w){const E=d(),x=f();w.relatedTarget===E?fn(x):fn(E)}m.addEventListener("focusin",y),g.addEventListener("focusin",y);const v=new MutationObserver(w=>{for(const E of w)E.previousSibling===g&&(g.remove(),p.insertAdjacentElement("beforeend",g)),E.nextSibling===m&&(m.remove(),p.insertAdjacentElement("afterbegin",m))});v.observe(p,{childList:!0,subtree:!1}),ae(()=>{m.removeEventListener("focusin",y),g.removeEventListener("focusin",y),m.remove(),g.remove(),v.disconnect()})})}var sR="data-live-announcer";function P8(e){ie(()=>{ce(e.isDisabled)||ae(oR(ce(e.targets),ce(e.root)))})}var rc=new WeakMap,Lr=[];function oR(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${sR}], [${Uc}]`))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=rc.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),rc.set(l,c+1))};Lr.length&&Lr[Lr.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 Lr.push(a),()=>{o.disconnect();for(const l of r){const c=rc.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),rc.delete(l)):rc.set(l,c-1)}a===Lr[Lr.length-1]?(Lr.pop(),Lr.length&&Lr[Lr.length-1].observe()):Lr.splice(Lr.indexOf(a),1)}}var $4="interactOutside.pointerDownOutside",F4="interactOutside.focusOutside";function aR(e,t){let n,r=KP;const i=()=>Qn(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(`[${Uc}]`)||!rn(i(),f)||rn(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const h=t(),p=d.target;if(!h||!p||!l(d))return;const m=tn([s,a]);p.addEventListener($4,m,{once:!0});const g=new CustomEvent($4,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||$P(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=tn([o,a]);h.addEventListener(F4,p,{once:!0});const m=new CustomEvent(F4,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};ie(()=>{ce(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),ae(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}function lR(e){const t=n=>{n.key===_8.Escape&&e.onEscapeKeyDown?.(n)};ie(()=>{if(ce(e.isDisabled))return;const n=e.ownerDocument?.()??Qn();n.addEventListener("keydown",t),ae(()=>{n.removeEventListener("keydown",t)})})}function ft(e){const[t,n]=he(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return T(L7,re(n,{get component(){return t.as}}))}var R8=gt();function cR(){return dt(R8)}function X0(e){let t;const n=cR(),[r,i]=he(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?.()}};aR({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>rn(f(),d))||[...s].some(f=>rn(f,d)):!1,onPointerDownOutside:d=>{!t||dr.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!dr.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),lR({ownerDocument:()=>Qn(t),onEscapeKeyDown:d=>{!t||!dr.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Pt(()=>{if(!t)return;dr.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);dr.assignPointerEventToLayers(),dr.disableBodyPointerEvents(t),ae(()=>{t&&(dr.removeLayer(t),d?.(),dr.assignPointerEventToLayers(),dr.restoreBodyPointerEvents(t))})}),ie(Mt([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=dr.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,dr.assignPointerEventToLayers()),f&&dr.disableBodyPointerEvents(d),ae(()=>{dr.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:o};return T(R8.Provider,{value:u,get children(){return T(ft,re({as:"div",ref(d){var f=Nt(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function Tu(e){const[t,n]=ye(e.defaultValue?.()),r=U(()=>e.value?.()!==void 0),i=U(()=>r()?e.value?.():t());return[i,o=>{Ye(()=>{const a=kP(o,i());return Object.is(a,i())||(r()||n(a),e.onChange?.(a)),a})}]}function N8(e){const[t,n]=Tu(e);return[()=>t()??!1,n]}function uR(e){const[t,n]=Tu(e);return[()=>t()??[],n]}function aa(e={}){const[t,n]=N8({value:()=>ce(e.open),defaultValue:()=>!!ce(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 Lu(e,t){const[n,r]=ye(H4(t?.()));return ie(()=>{r(e()?.tagName.toLowerCase()||H4(t?.()))}),n}function H4(e){return Ha(e)?e:void 0}var dR=Object.defineProperty,yi=(e,t)=>{for(var n in t)dR(e,n,{get:t[n],enumerable:!0})},fR={};yi(fR,{Button:()=>Wy,Root:()=>la});var hR=["button","color","file","image","reset","submit"];function pR(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?hR.indexOf(e.type)!==-1:!1}function la(e){let t;const n=Xe({type:"button"},e),[r,i]=he(n,["ref","type","disabled"]),s=Lu(()=>t,()=>"button"),o=U(()=>{const c=s();return c==null?!1:pR({tagName:c,type:r.type})}),a=U(()=>s()==="input"),l=U(()=>s()==="a"&&t?.getAttribute("href")!=null);return T(ft,re({as:"button",ref(c){var u=Nt(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return Qe(()=>!!(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 Qe(()=>!!(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 Wy=la;function zn(e){return t=>(e(t),()=>e(void 0))}var Nn=e=>typeof e=="function"?e():e,Ag=(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},cd=new Map,mR=e=>{ie(()=>{const t=Nn(e.style)??{},n=Nn(e.properties)??[],r={};for(const s in t)r[s]=e.element.style[s];const i=cd.get(e.key);i?i.activeCount++:cd.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);ae(()=>{const s=cd.get(e.key);if(s){if(s.activeCount!==1){s.activeCount--;return}cd.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?.()}})})},V4=mR,gR=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},yR=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},vR=(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]=gR(i,t),d=u-l-r*c;(c!==0||d!==0)&&yR(i,t)&&(s+=d,o+=c),i===(n??document.documentElement)?a=!0:i=i._$host??i.parentElement}while(i&&!a);return[s,o]},[z4,j4]=ye([]),bR=e=>z4().indexOf(e)===z4().length-1,wR=e=>{const t=re({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Cn();let r=[0,0],i=null,s=null;ie(()=>{Nn(t.enabled)&&(j4(c=>[...c,n]),ae(()=>{j4(c=>c.filter(u=>u!==n))}))}),ie(()=>{if(!Nn(t.enabled)||!Nn(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(Nn(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(Nn(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;V4({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Nn(t.restoreScrollPosition)&&u>0&&window.scrollTo(p,h)}})}else V4({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),ie(()=>{!bR(n)||!Nn(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),ae(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=c=>{r=q4(c),i=null,s=null},a=c=>{const u=c.target,d=Nn(t.element),f=kR(c),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",p=h==="x"?f[0]:f[1],m=B4(u,h,p,d);let g;d&&Ag(d,u)?g=!m:g=!0,g&&c.cancelable&&c.preventDefault()},l=c=>{const u=Nn(t.element),d=c.target;let f;if(c.touches.length===2)f=!Nn(t.allowPinchZoom);else{if(i==null||s===null){const h=q4(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=B4(d,i,s,u);u&&Ag(u,d)?f=!h:f=!0}}f&&c.cancelable&&c.preventDefault()}},kR=e=>[e.deltaX,e.deltaY],q4=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],B4=(e,t,n,r)=>{const i=r!==null&&Ag(r,e),[s,o]=vR(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},xR=wR,$8=xR,SR=e=>{const t=U(()=>{const o=Nn(e.element);if(o)return getComputedStyle(o)}),n=()=>t()?.animationName??"none",[r,i]=ye(Nn(e.show)?"present":"hidden");let s="none";return ie(o=>{const a=Nn(e.show);return Ye(()=>{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}),ie(()=>{const o=Nn(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),ae(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:i}},_R=SR,Bo=_R,CR={};yi(CR,{CloseButton:()=>H8,Content:()=>V8,Description:()=>z8,Dialog:()=>Bs,Overlay:()=>j8,Portal:()=>q8,Root:()=>B8,Title:()=>U8,Trigger:()=>W8,useDialogContext:()=>lo});var F8=gt();function lo(){const e=dt(F8);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function H8(e){const t=lo(),[n,r]=he(e,["aria-label","onClick"]);return T(la,re({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:s=>{Ke(s,n.onClick),t.close()}},r))}function V8(e){let t;const n=lo(),r=Xe({id:n.generateId("content")},e),[i,s]=he(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)),rn(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{i.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),fn(n.triggerRef())):(f.defaultPrevented||(o||fn(n.triggerRef()),f.preventDefault()),o=!1,a=!1)};return P8({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),$8({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),O8({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),ie(()=>ae(n.registerContentId(s.id))),T(Se,{get when(){return n.contentPresent()},get children(){return T(X0,re({ref(f){var h=Nt(p=>{n.setContentRef(p),t=p},i.ref);typeof h=="function"&&h(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Qe(()=>!!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 z8(e){const t=lo(),n=Xe({id:t.generateId("description")},e),[r,i]=he(n,["id"]);return ie(()=>ae(t.registerDescriptionId(r.id))),T(ft,re({as:"p",get id(){return r.id}},i))}function j8(e){const t=lo(),[n,r]=he(e,["ref","style","onPointerDown"]),i=s=>{Ke(s,n.onPointerDown),s.target===s.currentTarget&&s.preventDefault()};return T(Se,{get when(){return t.overlayPresent()},get children(){return T(ft,re({as:"div",ref(s){var o=Nt(t.setOverlayRef,n.ref);typeof o=="function"&&o(s)},get style(){return gi({"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 q8(e){const t=lo();return T(Se,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return T(ia,e)}})}var U4={dismiss:"Dismiss"};function B8(e){const t=`dialog-${Cn()}`,n=Xe({id:t,modal:!0,translations:U4},e),[r,i]=ye(),[s,o]=ye(),[a,l]=ye(),[c,u]=ye(),[d,f]=ye(),[h,p]=ye(),m=aa({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:E=>n.onOpenChange?.(E)}),g=()=>n.forceMount||m.isOpen(),{present:y}=Bo({show:g,element:()=>c()??null}),{present:v}=Bo({show:g,element:()=>d()??null}),w={translations:()=>n.translations??U4,isOpen:m.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??w.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:Fi(()=>n.id),registerContentId:zn(i),registerTitleId:zn(o),registerDescriptionId:zn(l)};return T(F8.Provider,{value:w,get children(){return n.children}})}function U8(e){const t=lo(),n=Xe({id:t.generateId("title")},e),[r,i]=he(n,["id"]);return ie(()=>ae(t.registerTitleId(r.id))),T(ft,re({as:"h2",get id(){return r.id}},i))}function W8(e){const t=lo(),[n,r]=he(e,["ref","onClick"]);return T(la,re({ref(s){var o=Nt(t.setTriggerRef,n.ref);typeof o=="function"&&o(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Qe(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:s=>{Ke(s,n.onClick),t.toggle()}},r))}var Bs=Object.assign(B8,{CloseButton:H8,Content:V8,Description:z8,Overlay:j8,Portal:q8,Title:U8,Trigger:W8}),ER=fe("
");const G8=gt();function TR(){const[e,t]=ye(),n={current:void 0},r={value:!1};ae(()=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0)});const i=()=>{const o=e();if(!o||r.value)return;r.value=!0,o.onClose?.(),o.setClosing(!0);const a=o.id;n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),n.current=setTimeout(()=>{n.current=void 0,o.dispose(),e()?.id===a&&t(void 0),r.value=!1},100)};return ie(()=>{if(!e())return;Wt(window,"keydown",a=>{a.key==="Escape"&&(i(),a.preventDefault(),a.stopPropagation())},{capture:!0})}),{get active(){return e()},close:i,show:(o,a,l)=>{const c=e();c&&(c.dispose(),t(void 0)),n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1;const u=Math.random().toString(36).slice(2);let d,f;const h=is(a,()=>Sn(p=>{d=p;const[m,g]=ye(!1);return f=g,T(Bs,{modal:!0,get open(){return!m()},onOpenChange:y=>{y||i()},get children(){return T(Bs.Portal,{get children(){return[T(Bs.Overlay,{"data-component":"dialog-overlay",onClick:i}),Qe(()=>o())]}})}})}));!d||!f||t({id:u,node:h,dispose:d,owner:a,onClose:l,setClosing:f})}}}function LR(e){const t=TR();return T(G8.Provider,{value:t,get children(){return[Qe(()=>e.children),(()=>{var n=ER();return X(n,()=>t.active?.node),n})()]}})}function J0(){const e=dt(G8),t=di();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.active},show(n,r){const i=e.active?.owner??t;e.show(n,i,r)},close(){e.close()}}}const K8={"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","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 IR(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 AR={locale:()=>"en",t:(e,t)=>{const n=K8[e]??String(e);return IR(n,t)}},Z8=gt(AR);function MR(e){return T(Z8.Provider,{get value(){return e.value},get children(){return e.children}})}function Iu(){return dt(Z8)}function Gy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ca=Gy();function Y8(e){ca=e}var Ac={exec:()=>null};function vt(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(Kn.caret,"$1"),n=n.replace(i,o),r},getRegex:()=>new RegExp(n,t)};return r}var DR=(()=>{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")},OR=/^(?:[ \t]*(?:\n|$))+/,PR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,RR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Au=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,NR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ky=/(?:[*+-]|\d{1,9}[.)])/,Q8=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,X8=vt(Q8).replace(/bull/g,Ky).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(),$R=vt(Q8).replace(/bull/g,Ky).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(),Zy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,FR=/^[^\n]+/,Yy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,HR=vt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),VR=vt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ky).getRegex(),eh="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",Qy=/|$))/,zR=vt("^ {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",Qy).replace("tag",eh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),J8=vt(Zy).replace("hr",Au).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",eh).getRegex(),jR=vt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",J8).getRegex(),Xy={blockquote:jR,code:PR,def:HR,fences:RR,heading:NR,hr:Au,html:zR,lheading:X8,list:VR,newline:OR,paragraph:J8,table:Ac,text:FR},W4=vt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Au).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",eh).getRegex(),qR={...Xy,lheading:$R,table:W4,paragraph:vt(Zy).replace("hr",Au).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",W4).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",eh).getRegex()},BR={...Xy,html:vt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qy).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:Ac,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:vt(Zy).replace("hr",Au).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",X8).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},UR=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,WR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ek=/^( {2,}|\\)\n(?!\s*$)/,GR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",DR?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rk=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,XR=vt(rk,"u").replace(/punct/g,th).getRegex(),JR=vt(rk,"u").replace(/punct/g,nk).getRegex(),ik="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",eN=vt(ik,"gu").replace(/notPunctSpace/g,tk).replace(/punctSpace/g,Jy).replace(/punct/g,th).getRegex(),tN=vt(ik,"gu").replace(/notPunctSpace/g,YR).replace(/punctSpace/g,ZR).replace(/punct/g,nk).getRegex(),nN=vt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tk).replace(/punctSpace/g,Jy).replace(/punct/g,th).getRegex(),rN=vt(/\\(punct)/,"gu").replace(/punct/g,th).getRegex(),iN=vt(/^<(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(),sN=vt(Qy).replace("(?:-->|$)","-->").getRegex(),oN=vt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",sN).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$f=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,aN=vt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$f).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sk=vt(/^!?\[(label)\]\[(ref)\]/).replace("label",$f).replace("ref",Yy).getRegex(),ok=vt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yy).getRegex(),lN=vt("reflink|nolink(?!\\()","g").replace("reflink",sk).replace("nolink",ok).getRegex(),G4=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ev={_backpedal:Ac,anyPunctuation:rN,autolink:iN,blockSkip:QR,br:ek,code:WR,del:Ac,emStrongLDelim:XR,emStrongRDelimAst:eN,emStrongRDelimUnd:nN,escape:UR,link:aN,nolink:ok,punctuation:KR,reflink:sk,reflinkSearch:lN,tag:oN,text:GR,url:Ac},cN={...ev,link:vt(/^!?\[(label)\]\((.*?)\)/).replace("label",$f).getRegex(),reflink:vt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$f).getRegex()},Mg={...ev,emStrongRDelimAst:tN,emStrongLDelim:JR,url:vt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",G4).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:vt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},K4=e=>dN[e];function Xi(e,t){if(t){if(Kn.escapeTest.test(e))return e.replace(Kn.escapeReplace,K4)}else if(Kn.escapeTestNoEncode.test(e))return e.replace(Kn.escapeReplaceNoEncode,K4);return e}function Z4(e){try{e=encodeURI(e).replace(Kn.percentDecode,"%")}catch{return null}return e}function Y4(e,t){let n=e.replace(Kn.findPipe,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Kn.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 Q4(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 hN(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 Ff=class{options;rules;lexer;constructor(t){this.options=t||ca}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:sc(r,` `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=hN(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=sc(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:sc(n[0],` `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=sc(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),w=this.rules.other.headingBeginRegex(m),E=this.rules.other.htmlBeginRegex(m);for(;t;){let x=t.split(` `,1)[0],k;if(h=x,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),k=h):k=h.replace(this.rules.other.tabCharGlobal," "),v.test(h)||w.test(h)||E.test(h)||g.test(h)||y.test(h))break;if(k.search(this.rules.other.nonSpaceChar)>=m||!h.trim())d+=` `+k.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||w.test(f)||y.test(f))break;d+=` `+h}!p&&!h.trim()&&(p=!0),u+=x+` `,t=t.substring(x.length+1),f=k.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=Y4(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=sc(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{let o=fN(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)),Q4(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 Q4(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}}}},ni=class Dg{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ca,this.options.tokenizer=this.options.tokenizer||new Ff,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:Kn,block:ud.normal,inline:ic.normal};this.options.pedantic?(n.block=ud.pedantic,n.inline=ic.pedantic):this.options.gfm&&(n.block=ud.gfm,this.options.breaks?n.inline=ic.breaks:n.inline=ic.gfm),this.tokenizer.rules=n}static get rules(){return{block:ud,inline:ic}}static lex(t,n){return new Dg(n).lex(t)}static lexInline(t,n){return new Dg(n).inlineTokens(t)}lex(t){t=t.replace(Kn.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}},Hf=class{options;parser;constructor(t){this.options=t||ca}space(t){return""}code({text:t,lang:n,escaped:r}){let i=(n||"").match(Kn.notSpaceStart)?.[0],s=t.replace(Kn.endingNewline,"")+` `;return i?'
'+(r?s:Xi(s,!0))+`
`:"
"+(r?s:Xi(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`${Xi(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=Z4(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=Z4(t);if(s===null)return Xi(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 Hf(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 Ff(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 vc;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];vc.passThroughHooks.has(o)?s[a]=u=>{if(this.defaults.async&&vc.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 ni.lex(t,n??this.defaults)}parser(t,n){return ri.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?ni.lex:ni.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?ri.parse:ri.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?ni.lex:ni.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?ri.parse:ri.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:

    "+Xi(r.message+"",!0)+"
    ";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Uo=new pN;function _t(e,t){return Uo.parse(e,t)}_t.options=_t.setOptions=function(e){return Uo.setOptions(e),_t.defaults=Uo.defaults,Y8(_t.defaults),_t};_t.getDefaults=Gy;_t.defaults=ca;_t.use=function(...e){return Uo.use(...e),_t.defaults=Uo.defaults,Y8(_t.defaults),_t};_t.walkTokens=function(e,t){return Uo.walkTokens(e,t)};_t.parseInline=Uo.parseInline;_t.Parser=ri;_t.parser=ri.parse;_t.Renderer=Hf;_t.TextRenderer=tv;_t.Lexer=ni;_t.lexer=ni.lex;_t.Tokenizer=Ff;_t.Hooks=vc;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;ri.parse;ni.lex;class rr{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 rr(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,rr.range(this,t))}}class me{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":">","<":"<",'"':""","'":"'"},bN=/[&><"']/g;function wN(e){return String(e).replace(bN,t=>vN[t])}var ak=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},kN=function(t){var n=ak(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},xN=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},SN=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"},yt={deflt:mN,escape:wN,hyphenate:yN,getBaseElem:ak,isCharacterBox:kN,protocolFromUrl:SN},uf={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 _N(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 nv=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 uf)if(uf.hasOwnProperty(n)){var r=uf[n];this[n]=t[n]!==void 0?r.processor?r.processor(t[n]):t[n]:_N(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 me("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=yt.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 Os{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 Si[CN[this.id]]}sub(){return Si[EN[this.id]]}fracNum(){return Si[TN[this.id]]}fracDen(){return Si[LN[this.id]]}cramp(){return Si[IN[this.id]]}text(){return Si[AN[this.id]]}isTight(){return this.size>=2}}var rv=0,Vf=1,Qa=2,us=3,Gc=4,Nr=5,ml=6,Zn=7,Si=[new Os(rv,0,!1),new Os(Vf,0,!0),new Os(Qa,1,!1),new Os(us,1,!0),new Os(Gc,2,!1),new Os(Nr,2,!0),new Os(ml,3,!1),new Os(Zn,3,!0)],CN=[Gc,Nr,Gc,Nr,ml,Zn,ml,Zn],EN=[Nr,Nr,Nr,Nr,Zn,Zn,Zn,Zn],TN=[Qa,us,Gc,Nr,ml,Zn,ml,Zn],LN=[us,us,Nr,Nr,Zn,Zn,Zn,Zn],IN=[Vf,Vf,us,us,Nr,Nr,Zn,Zn],AN=[rv,Vf,Qa,us,Qa,us,Qa,us],$e={DISPLAY:Si[rv],TEXT:Si[Qa],SCRIPT:Si[Gc],SCRIPTSCRIPT:Si[ml]},Pg=[{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 MN(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var df=[];Pg.forEach(e=>e.blocks.forEach(t=>df.push(...t)));function lk(e){for(var t=0;t=df[t]&&e<=df[t+1])return!0;return!1}var _a=80,DN=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"},ON=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"},PN=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"},RN=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"},NN=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"},$N=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},FN=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"},HN=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=DN(n,_a);break;case"sqrtSize1":i=ON(n,_a);break;case"sqrtSize2":i=PN(n,_a);break;case"sqrtSize3":i=RN(n,_a);break;case"sqrtSize4":i=NN(n,_a);break;case"sqrtTall":i=FN(n,_a,r)}return i},VN=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""}},X4={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`},zN=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 Mu{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 Ci={"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]}},dd={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]},J4={Å:"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 jN(e,t){Ci[e]=t}function iv(e,t,n){if(!Ci[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=Ci[t][r];if(!i&&e[0]in J4&&(r=J4[e[0]].charCodeAt(0),i=Ci[t][r]),!i&&n==="text"&&lk(r)&&(i=Ci[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Cp={};function qN(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Cp[t]){var n=Cp[t]={cssEmPerMu:dd.quad[t]/18};for(var r in dd)dd.hasOwnProperty(r)&&(n[r]=dd[r][t])}return Cp[t]}var BN=[[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]],ew=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],tw=function(t,n){return n.size<2?t:BN[t-1][n.size-1]};class es{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||es.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=ew[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 es(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:tw(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:ew[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=tw(es.BASESIZE,t);return this.size===n&&this.textSize===es.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!==es.BASESIZE?["sizing","reset-size"+this.size,"size"+es.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=qN(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}es.BASESIZE=6;var Rg={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},UN={ex:!0,em:!0,mu:!0},ck=function(t){return typeof t!="string"&&(t=t.unit),t in Rg||t in UN||t==="ex"},zt=function(t,n){var r;if(t.unit in Rg)r=Rg[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 me("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},we=function(t){return+t.toFixed(4)+"em"},to=function(t){return t.filter(n=>n).join(" ")},uk=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)}},dk=function(t){var n=document.createElement(t);n.className=to(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]/,fk=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+yt.escape(to(this.classes))+'"');var r="";for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=yt.hyphenate(i)+":"+this.style[i]+";");r&&(n+=' style="'+yt.escape(r)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(WN.test(s))throw new me("Invalid attribute name '"+s+"'");n+=" "+s+'="'+yt.escape(this.attributes[s])+'"'}n+=">";for(var o=0;o",n};class Du{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,uk.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return dk.call(this,"span")}toMarkup(){return fk.call(this,"span")}}class sv{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,uk.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 dk.call(this,"a")}toMarkup(){return fk.call(this,"a")}}class GN{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=''+yt.escape(this.alt)+'0&&(n=document.createElement("span"),n.style.marginRight=we(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=to(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+=yt.hyphenate(i)+":"+this.style[i]+";");r&&(t=!0,n+=' style="'+yt.escape(r)+'"');var s=yt.escape(this.text);return t?(n+=">",n+=s,n+="",n):s}}class ms{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 Ng{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 YN={bin:1,close:1,inner:1,open:1,punct:1,rel:1},QN={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Rt={math:{},text:{}};function b(e,t,n,r,i,s){Rt[e][i]={font:t,group:n,replace:r},s&&r&&(Rt[e][r]=Rt[e][i])}var _="math",de="text",R="main",B="ams",Ft="accent-token",Le="bin",Xn="close",Ml="inner",Ne="mathord",sn="op-token",Er="open",nh="punct",W="rel",xs="spacing",Z="textord";b(_,R,W,"≡","\\equiv",!0);b(_,R,W,"≺","\\prec",!0);b(_,R,W,"≻","\\succ",!0);b(_,R,W,"∼","\\sim",!0);b(_,R,W,"⊥","\\perp");b(_,R,W,"⪯","\\preceq",!0);b(_,R,W,"⪰","\\succeq",!0);b(_,R,W,"≃","\\simeq",!0);b(_,R,W,"∣","\\mid",!0);b(_,R,W,"≪","\\ll",!0);b(_,R,W,"≫","\\gg",!0);b(_,R,W,"≍","\\asymp",!0);b(_,R,W,"∥","\\parallel");b(_,R,W,"⋈","\\bowtie",!0);b(_,R,W,"⌣","\\smile",!0);b(_,R,W,"⊑","\\sqsubseteq",!0);b(_,R,W,"⊒","\\sqsupseteq",!0);b(_,R,W,"≐","\\doteq",!0);b(_,R,W,"⌢","\\frown",!0);b(_,R,W,"∋","\\ni",!0);b(_,R,W,"∝","\\propto",!0);b(_,R,W,"⊢","\\vdash",!0);b(_,R,W,"⊣","\\dashv",!0);b(_,R,W,"∋","\\owns");b(_,R,nh,".","\\ldotp");b(_,R,nh,"⋅","\\cdotp");b(_,R,Z,"#","\\#");b(de,R,Z,"#","\\#");b(_,R,Z,"&","\\&");b(de,R,Z,"&","\\&");b(_,R,Z,"ℵ","\\aleph",!0);b(_,R,Z,"∀","\\forall",!0);b(_,R,Z,"ℏ","\\hbar",!0);b(_,R,Z,"∃","\\exists",!0);b(_,R,Z,"∇","\\nabla",!0);b(_,R,Z,"♭","\\flat",!0);b(_,R,Z,"ℓ","\\ell",!0);b(_,R,Z,"♮","\\natural",!0);b(_,R,Z,"♣","\\clubsuit",!0);b(_,R,Z,"℘","\\wp",!0);b(_,R,Z,"♯","\\sharp",!0);b(_,R,Z,"♢","\\diamondsuit",!0);b(_,R,Z,"ℜ","\\Re",!0);b(_,R,Z,"♡","\\heartsuit",!0);b(_,R,Z,"ℑ","\\Im",!0);b(_,R,Z,"♠","\\spadesuit",!0);b(_,R,Z,"§","\\S",!0);b(de,R,Z,"§","\\S");b(_,R,Z,"¶","\\P",!0);b(de,R,Z,"¶","\\P");b(_,R,Z,"†","\\dag");b(de,R,Z,"†","\\dag");b(de,R,Z,"†","\\textdagger");b(_,R,Z,"‡","\\ddag");b(de,R,Z,"‡","\\ddag");b(de,R,Z,"‡","\\textdaggerdbl");b(_,R,Xn,"⎱","\\rmoustache",!0);b(_,R,Er,"⎰","\\lmoustache",!0);b(_,R,Xn,"⟯","\\rgroup",!0);b(_,R,Er,"⟮","\\lgroup",!0);b(_,R,Le,"∓","\\mp",!0);b(_,R,Le,"⊖","\\ominus",!0);b(_,R,Le,"⊎","\\uplus",!0);b(_,R,Le,"⊓","\\sqcap",!0);b(_,R,Le,"∗","\\ast");b(_,R,Le,"⊔","\\sqcup",!0);b(_,R,Le,"◯","\\bigcirc",!0);b(_,R,Le,"∙","\\bullet",!0);b(_,R,Le,"‡","\\ddagger");b(_,R,Le,"≀","\\wr",!0);b(_,R,Le,"⨿","\\amalg");b(_,R,Le,"&","\\And");b(_,R,W,"⟵","\\longleftarrow",!0);b(_,R,W,"⇐","\\Leftarrow",!0);b(_,R,W,"⟸","\\Longleftarrow",!0);b(_,R,W,"⟶","\\longrightarrow",!0);b(_,R,W,"⇒","\\Rightarrow",!0);b(_,R,W,"⟹","\\Longrightarrow",!0);b(_,R,W,"↔","\\leftrightarrow",!0);b(_,R,W,"⟷","\\longleftrightarrow",!0);b(_,R,W,"⇔","\\Leftrightarrow",!0);b(_,R,W,"⟺","\\Longleftrightarrow",!0);b(_,R,W,"↦","\\mapsto",!0);b(_,R,W,"⟼","\\longmapsto",!0);b(_,R,W,"↗","\\nearrow",!0);b(_,R,W,"↩","\\hookleftarrow",!0);b(_,R,W,"↪","\\hookrightarrow",!0);b(_,R,W,"↘","\\searrow",!0);b(_,R,W,"↼","\\leftharpoonup",!0);b(_,R,W,"⇀","\\rightharpoonup",!0);b(_,R,W,"↙","\\swarrow",!0);b(_,R,W,"↽","\\leftharpoondown",!0);b(_,R,W,"⇁","\\rightharpoondown",!0);b(_,R,W,"↖","\\nwarrow",!0);b(_,R,W,"⇌","\\rightleftharpoons",!0);b(_,B,W,"≮","\\nless",!0);b(_,B,W,"","\\@nleqslant");b(_,B,W,"","\\@nleqq");b(_,B,W,"⪇","\\lneq",!0);b(_,B,W,"≨","\\lneqq",!0);b(_,B,W,"","\\@lvertneqq");b(_,B,W,"⋦","\\lnsim",!0);b(_,B,W,"⪉","\\lnapprox",!0);b(_,B,W,"⊀","\\nprec",!0);b(_,B,W,"⋠","\\npreceq",!0);b(_,B,W,"⋨","\\precnsim",!0);b(_,B,W,"⪹","\\precnapprox",!0);b(_,B,W,"≁","\\nsim",!0);b(_,B,W,"","\\@nshortmid");b(_,B,W,"∤","\\nmid",!0);b(_,B,W,"⊬","\\nvdash",!0);b(_,B,W,"⊭","\\nvDash",!0);b(_,B,W,"⋪","\\ntriangleleft");b(_,B,W,"⋬","\\ntrianglelefteq",!0);b(_,B,W,"⊊","\\subsetneq",!0);b(_,B,W,"","\\@varsubsetneq");b(_,B,W,"⫋","\\subsetneqq",!0);b(_,B,W,"","\\@varsubsetneqq");b(_,B,W,"≯","\\ngtr",!0);b(_,B,W,"","\\@ngeqslant");b(_,B,W,"","\\@ngeqq");b(_,B,W,"⪈","\\gneq",!0);b(_,B,W,"≩","\\gneqq",!0);b(_,B,W,"","\\@gvertneqq");b(_,B,W,"⋧","\\gnsim",!0);b(_,B,W,"⪊","\\gnapprox",!0);b(_,B,W,"⊁","\\nsucc",!0);b(_,B,W,"⋡","\\nsucceq",!0);b(_,B,W,"⋩","\\succnsim",!0);b(_,B,W,"⪺","\\succnapprox",!0);b(_,B,W,"≆","\\ncong",!0);b(_,B,W,"","\\@nshortparallel");b(_,B,W,"∦","\\nparallel",!0);b(_,B,W,"⊯","\\nVDash",!0);b(_,B,W,"⋫","\\ntriangleright");b(_,B,W,"⋭","\\ntrianglerighteq",!0);b(_,B,W,"","\\@nsupseteqq");b(_,B,W,"⊋","\\supsetneq",!0);b(_,B,W,"","\\@varsupsetneq");b(_,B,W,"⫌","\\supsetneqq",!0);b(_,B,W,"","\\@varsupsetneqq");b(_,B,W,"⊮","\\nVdash",!0);b(_,B,W,"⪵","\\precneqq",!0);b(_,B,W,"⪶","\\succneqq",!0);b(_,B,W,"","\\@nsubseteqq");b(_,B,Le,"⊴","\\unlhd");b(_,B,Le,"⊵","\\unrhd");b(_,B,W,"↚","\\nleftarrow",!0);b(_,B,W,"↛","\\nrightarrow",!0);b(_,B,W,"⇍","\\nLeftarrow",!0);b(_,B,W,"⇏","\\nRightarrow",!0);b(_,B,W,"↮","\\nleftrightarrow",!0);b(_,B,W,"⇎","\\nLeftrightarrow",!0);b(_,B,W,"△","\\vartriangle");b(_,B,Z,"ℏ","\\hslash");b(_,B,Z,"▽","\\triangledown");b(_,B,Z,"◊","\\lozenge");b(_,B,Z,"Ⓢ","\\circledS");b(_,B,Z,"®","\\circledR");b(de,B,Z,"®","\\circledR");b(_,B,Z,"∡","\\measuredangle",!0);b(_,B,Z,"∄","\\nexists");b(_,B,Z,"℧","\\mho");b(_,B,Z,"Ⅎ","\\Finv",!0);b(_,B,Z,"⅁","\\Game",!0);b(_,B,Z,"‵","\\backprime");b(_,B,Z,"▲","\\blacktriangle");b(_,B,Z,"▼","\\blacktriangledown");b(_,B,Z,"■","\\blacksquare");b(_,B,Z,"⧫","\\blacklozenge");b(_,B,Z,"★","\\bigstar");b(_,B,Z,"∢","\\sphericalangle",!0);b(_,B,Z,"∁","\\complement",!0);b(_,B,Z,"ð","\\eth",!0);b(de,R,Z,"ð","ð");b(_,B,Z,"╱","\\diagup");b(_,B,Z,"╲","\\diagdown");b(_,B,Z,"□","\\square");b(_,B,Z,"□","\\Box");b(_,B,Z,"◊","\\Diamond");b(_,B,Z,"¥","\\yen",!0);b(de,B,Z,"¥","\\yen",!0);b(_,B,Z,"✓","\\checkmark",!0);b(de,B,Z,"✓","\\checkmark");b(_,B,Z,"ℶ","\\beth",!0);b(_,B,Z,"ℸ","\\daleth",!0);b(_,B,Z,"ℷ","\\gimel",!0);b(_,B,Z,"ϝ","\\digamma",!0);b(_,B,Z,"ϰ","\\varkappa");b(_,B,Er,"┌","\\@ulcorner",!0);b(_,B,Xn,"┐","\\@urcorner",!0);b(_,B,Er,"└","\\@llcorner",!0);b(_,B,Xn,"┘","\\@lrcorner",!0);b(_,B,W,"≦","\\leqq",!0);b(_,B,W,"⩽","\\leqslant",!0);b(_,B,W,"⪕","\\eqslantless",!0);b(_,B,W,"≲","\\lesssim",!0);b(_,B,W,"⪅","\\lessapprox",!0);b(_,B,W,"≊","\\approxeq",!0);b(_,B,Le,"⋖","\\lessdot");b(_,B,W,"⋘","\\lll",!0);b(_,B,W,"≶","\\lessgtr",!0);b(_,B,W,"⋚","\\lesseqgtr",!0);b(_,B,W,"⪋","\\lesseqqgtr",!0);b(_,B,W,"≑","\\doteqdot");b(_,B,W,"≓","\\risingdotseq",!0);b(_,B,W,"≒","\\fallingdotseq",!0);b(_,B,W,"∽","\\backsim",!0);b(_,B,W,"⋍","\\backsimeq",!0);b(_,B,W,"⫅","\\subseteqq",!0);b(_,B,W,"⋐","\\Subset",!0);b(_,B,W,"⊏","\\sqsubset",!0);b(_,B,W,"≼","\\preccurlyeq",!0);b(_,B,W,"⋞","\\curlyeqprec",!0);b(_,B,W,"≾","\\precsim",!0);b(_,B,W,"⪷","\\precapprox",!0);b(_,B,W,"⊲","\\vartriangleleft");b(_,B,W,"⊴","\\trianglelefteq");b(_,B,W,"⊨","\\vDash",!0);b(_,B,W,"⊪","\\Vvdash",!0);b(_,B,W,"⌣","\\smallsmile");b(_,B,W,"⌢","\\smallfrown");b(_,B,W,"≏","\\bumpeq",!0);b(_,B,W,"≎","\\Bumpeq",!0);b(_,B,W,"≧","\\geqq",!0);b(_,B,W,"⩾","\\geqslant",!0);b(_,B,W,"⪖","\\eqslantgtr",!0);b(_,B,W,"≳","\\gtrsim",!0);b(_,B,W,"⪆","\\gtrapprox",!0);b(_,B,Le,"⋗","\\gtrdot");b(_,B,W,"⋙","\\ggg",!0);b(_,B,W,"≷","\\gtrless",!0);b(_,B,W,"⋛","\\gtreqless",!0);b(_,B,W,"⪌","\\gtreqqless",!0);b(_,B,W,"≖","\\eqcirc",!0);b(_,B,W,"≗","\\circeq",!0);b(_,B,W,"≜","\\triangleq",!0);b(_,B,W,"∼","\\thicksim");b(_,B,W,"≈","\\thickapprox");b(_,B,W,"⫆","\\supseteqq",!0);b(_,B,W,"⋑","\\Supset",!0);b(_,B,W,"⊐","\\sqsupset",!0);b(_,B,W,"≽","\\succcurlyeq",!0);b(_,B,W,"⋟","\\curlyeqsucc",!0);b(_,B,W,"≿","\\succsim",!0);b(_,B,W,"⪸","\\succapprox",!0);b(_,B,W,"⊳","\\vartriangleright");b(_,B,W,"⊵","\\trianglerighteq");b(_,B,W,"⊩","\\Vdash",!0);b(_,B,W,"∣","\\shortmid");b(_,B,W,"∥","\\shortparallel");b(_,B,W,"≬","\\between",!0);b(_,B,W,"⋔","\\pitchfork",!0);b(_,B,W,"∝","\\varpropto");b(_,B,W,"◀","\\blacktriangleleft");b(_,B,W,"∴","\\therefore",!0);b(_,B,W,"∍","\\backepsilon");b(_,B,W,"▶","\\blacktriangleright");b(_,B,W,"∵","\\because",!0);b(_,B,W,"⋘","\\llless");b(_,B,W,"⋙","\\gggtr");b(_,B,Le,"⊲","\\lhd");b(_,B,Le,"⊳","\\rhd");b(_,B,W,"≂","\\eqsim",!0);b(_,R,W,"⋈","\\Join");b(_,B,W,"≑","\\Doteq",!0);b(_,B,Le,"∔","\\dotplus",!0);b(_,B,Le,"∖","\\smallsetminus");b(_,B,Le,"⋒","\\Cap",!0);b(_,B,Le,"⋓","\\Cup",!0);b(_,B,Le,"⩞","\\doublebarwedge",!0);b(_,B,Le,"⊟","\\boxminus",!0);b(_,B,Le,"⊞","\\boxplus",!0);b(_,B,Le,"⋇","\\divideontimes",!0);b(_,B,Le,"⋉","\\ltimes",!0);b(_,B,Le,"⋊","\\rtimes",!0);b(_,B,Le,"⋋","\\leftthreetimes",!0);b(_,B,Le,"⋌","\\rightthreetimes",!0);b(_,B,Le,"⋏","\\curlywedge",!0);b(_,B,Le,"⋎","\\curlyvee",!0);b(_,B,Le,"⊝","\\circleddash",!0);b(_,B,Le,"⊛","\\circledast",!0);b(_,B,Le,"⋅","\\centerdot");b(_,B,Le,"⊺","\\intercal",!0);b(_,B,Le,"⋒","\\doublecap");b(_,B,Le,"⋓","\\doublecup");b(_,B,Le,"⊠","\\boxtimes",!0);b(_,B,W,"⇢","\\dashrightarrow",!0);b(_,B,W,"⇠","\\dashleftarrow",!0);b(_,B,W,"⇇","\\leftleftarrows",!0);b(_,B,W,"⇆","\\leftrightarrows",!0);b(_,B,W,"⇚","\\Lleftarrow",!0);b(_,B,W,"↞","\\twoheadleftarrow",!0);b(_,B,W,"↢","\\leftarrowtail",!0);b(_,B,W,"↫","\\looparrowleft",!0);b(_,B,W,"⇋","\\leftrightharpoons",!0);b(_,B,W,"↶","\\curvearrowleft",!0);b(_,B,W,"↺","\\circlearrowleft",!0);b(_,B,W,"↰","\\Lsh",!0);b(_,B,W,"⇈","\\upuparrows",!0);b(_,B,W,"↿","\\upharpoonleft",!0);b(_,B,W,"⇃","\\downharpoonleft",!0);b(_,R,W,"⊶","\\origof",!0);b(_,R,W,"⊷","\\imageof",!0);b(_,B,W,"⊸","\\multimap",!0);b(_,B,W,"↭","\\leftrightsquigarrow",!0);b(_,B,W,"⇉","\\rightrightarrows",!0);b(_,B,W,"⇄","\\rightleftarrows",!0);b(_,B,W,"↠","\\twoheadrightarrow",!0);b(_,B,W,"↣","\\rightarrowtail",!0);b(_,B,W,"↬","\\looparrowright",!0);b(_,B,W,"↷","\\curvearrowright",!0);b(_,B,W,"↻","\\circlearrowright",!0);b(_,B,W,"↱","\\Rsh",!0);b(_,B,W,"⇊","\\downdownarrows",!0);b(_,B,W,"↾","\\upharpoonright",!0);b(_,B,W,"⇂","\\downharpoonright",!0);b(_,B,W,"⇝","\\rightsquigarrow",!0);b(_,B,W,"⇝","\\leadsto");b(_,B,W,"⇛","\\Rrightarrow",!0);b(_,B,W,"↾","\\restriction");b(_,R,Z,"‘","`");b(_,R,Z,"$","\\$");b(de,R,Z,"$","\\$");b(de,R,Z,"$","\\textdollar");b(_,R,Z,"%","\\%");b(de,R,Z,"%","\\%");b(_,R,Z,"_","\\_");b(de,R,Z,"_","\\_");b(de,R,Z,"_","\\textunderscore");b(_,R,Z,"∠","\\angle",!0);b(_,R,Z,"∞","\\infty",!0);b(_,R,Z,"′","\\prime");b(_,R,Z,"△","\\triangle");b(_,R,Z,"Γ","\\Gamma",!0);b(_,R,Z,"Δ","\\Delta",!0);b(_,R,Z,"Θ","\\Theta",!0);b(_,R,Z,"Λ","\\Lambda",!0);b(_,R,Z,"Ξ","\\Xi",!0);b(_,R,Z,"Π","\\Pi",!0);b(_,R,Z,"Σ","\\Sigma",!0);b(_,R,Z,"Υ","\\Upsilon",!0);b(_,R,Z,"Φ","\\Phi",!0);b(_,R,Z,"Ψ","\\Psi",!0);b(_,R,Z,"Ω","\\Omega",!0);b(_,R,Z,"A","Α");b(_,R,Z,"B","Β");b(_,R,Z,"E","Ε");b(_,R,Z,"Z","Ζ");b(_,R,Z,"H","Η");b(_,R,Z,"I","Ι");b(_,R,Z,"K","Κ");b(_,R,Z,"M","Μ");b(_,R,Z,"N","Ν");b(_,R,Z,"O","Ο");b(_,R,Z,"P","Ρ");b(_,R,Z,"T","Τ");b(_,R,Z,"X","Χ");b(_,R,Z,"¬","\\neg",!0);b(_,R,Z,"¬","\\lnot");b(_,R,Z,"⊤","\\top");b(_,R,Z,"⊥","\\bot");b(_,R,Z,"∅","\\emptyset");b(_,B,Z,"∅","\\varnothing");b(_,R,Ne,"α","\\alpha",!0);b(_,R,Ne,"β","\\beta",!0);b(_,R,Ne,"γ","\\gamma",!0);b(_,R,Ne,"δ","\\delta",!0);b(_,R,Ne,"ϵ","\\epsilon",!0);b(_,R,Ne,"ζ","\\zeta",!0);b(_,R,Ne,"η","\\eta",!0);b(_,R,Ne,"θ","\\theta",!0);b(_,R,Ne,"ι","\\iota",!0);b(_,R,Ne,"κ","\\kappa",!0);b(_,R,Ne,"λ","\\lambda",!0);b(_,R,Ne,"μ","\\mu",!0);b(_,R,Ne,"ν","\\nu",!0);b(_,R,Ne,"ξ","\\xi",!0);b(_,R,Ne,"ο","\\omicron",!0);b(_,R,Ne,"π","\\pi",!0);b(_,R,Ne,"ρ","\\rho",!0);b(_,R,Ne,"σ","\\sigma",!0);b(_,R,Ne,"τ","\\tau",!0);b(_,R,Ne,"υ","\\upsilon",!0);b(_,R,Ne,"ϕ","\\phi",!0);b(_,R,Ne,"χ","\\chi",!0);b(_,R,Ne,"ψ","\\psi",!0);b(_,R,Ne,"ω","\\omega",!0);b(_,R,Ne,"ε","\\varepsilon",!0);b(_,R,Ne,"ϑ","\\vartheta",!0);b(_,R,Ne,"ϖ","\\varpi",!0);b(_,R,Ne,"ϱ","\\varrho",!0);b(_,R,Ne,"ς","\\varsigma",!0);b(_,R,Ne,"φ","\\varphi",!0);b(_,R,Le,"∗","*",!0);b(_,R,Le,"+","+");b(_,R,Le,"−","-",!0);b(_,R,Le,"⋅","\\cdot",!0);b(_,R,Le,"∘","\\circ",!0);b(_,R,Le,"÷","\\div",!0);b(_,R,Le,"±","\\pm",!0);b(_,R,Le,"×","\\times",!0);b(_,R,Le,"∩","\\cap",!0);b(_,R,Le,"∪","\\cup",!0);b(_,R,Le,"∖","\\setminus",!0);b(_,R,Le,"∧","\\land");b(_,R,Le,"∨","\\lor");b(_,R,Le,"∧","\\wedge",!0);b(_,R,Le,"∨","\\vee",!0);b(_,R,Z,"√","\\surd");b(_,R,Er,"⟨","\\langle",!0);b(_,R,Er,"∣","\\lvert");b(_,R,Er,"∥","\\lVert");b(_,R,Xn,"?","?");b(_,R,Xn,"!","!");b(_,R,Xn,"⟩","\\rangle",!0);b(_,R,Xn,"∣","\\rvert");b(_,R,Xn,"∥","\\rVert");b(_,R,W,"=","=");b(_,R,W,":",":");b(_,R,W,"≈","\\approx",!0);b(_,R,W,"≅","\\cong",!0);b(_,R,W,"≥","\\ge");b(_,R,W,"≥","\\geq",!0);b(_,R,W,"←","\\gets");b(_,R,W,">","\\gt",!0);b(_,R,W,"∈","\\in",!0);b(_,R,W,"","\\@not");b(_,R,W,"⊂","\\subset",!0);b(_,R,W,"⊃","\\supset",!0);b(_,R,W,"⊆","\\subseteq",!0);b(_,R,W,"⊇","\\supseteq",!0);b(_,B,W,"⊈","\\nsubseteq",!0);b(_,B,W,"⊉","\\nsupseteq",!0);b(_,R,W,"⊨","\\models");b(_,R,W,"←","\\leftarrow",!0);b(_,R,W,"≤","\\le");b(_,R,W,"≤","\\leq",!0);b(_,R,W,"<","\\lt",!0);b(_,R,W,"→","\\rightarrow",!0);b(_,R,W,"→","\\to");b(_,B,W,"≱","\\ngeq",!0);b(_,B,W,"≰","\\nleq",!0);b(_,R,xs," ","\\ ");b(_,R,xs," ","\\space");b(_,R,xs," ","\\nobreakspace");b(de,R,xs," ","\\ ");b(de,R,xs," "," ");b(de,R,xs," ","\\space");b(de,R,xs," ","\\nobreakspace");b(_,R,xs,null,"\\nobreak");b(_,R,xs,null,"\\allowbreak");b(_,R,nh,",",",");b(_,R,nh,";",";");b(_,B,Le,"⊼","\\barwedge",!0);b(_,B,Le,"⊻","\\veebar",!0);b(_,R,Le,"⊙","\\odot",!0);b(_,R,Le,"⊕","\\oplus",!0);b(_,R,Le,"⊗","\\otimes",!0);b(_,R,Z,"∂","\\partial",!0);b(_,R,Le,"⊘","\\oslash",!0);b(_,B,Le,"⊚","\\circledcirc",!0);b(_,B,Le,"⊡","\\boxdot",!0);b(_,R,Le,"△","\\bigtriangleup");b(_,R,Le,"▽","\\bigtriangledown");b(_,R,Le,"†","\\dagger");b(_,R,Le,"⋄","\\diamond");b(_,R,Le,"⋆","\\star");b(_,R,Le,"◃","\\triangleleft");b(_,R,Le,"▹","\\triangleright");b(_,R,Er,"{","\\{");b(de,R,Z,"{","\\{");b(de,R,Z,"{","\\textbraceleft");b(_,R,Xn,"}","\\}");b(de,R,Z,"}","\\}");b(de,R,Z,"}","\\textbraceright");b(_,R,Er,"{","\\lbrace");b(_,R,Xn,"}","\\rbrace");b(_,R,Er,"[","\\lbrack",!0);b(de,R,Z,"[","\\lbrack",!0);b(_,R,Xn,"]","\\rbrack",!0);b(de,R,Z,"]","\\rbrack",!0);b(_,R,Er,"(","\\lparen",!0);b(_,R,Xn,")","\\rparen",!0);b(de,R,Z,"<","\\textless",!0);b(de,R,Z,">","\\textgreater",!0);b(_,R,Er,"⌊","\\lfloor",!0);b(_,R,Xn,"⌋","\\rfloor",!0);b(_,R,Er,"⌈","\\lceil",!0);b(_,R,Xn,"⌉","\\rceil",!0);b(_,R,Z,"\\","\\backslash");b(_,R,Z,"∣","|");b(_,R,Z,"∣","\\vert");b(de,R,Z,"|","\\textbar",!0);b(_,R,Z,"∥","\\|");b(_,R,Z,"∥","\\Vert");b(de,R,Z,"∥","\\textbardbl");b(de,R,Z,"~","\\textasciitilde");b(de,R,Z,"\\","\\textbackslash");b(de,R,Z,"^","\\textasciicircum");b(_,R,W,"↑","\\uparrow",!0);b(_,R,W,"⇑","\\Uparrow",!0);b(_,R,W,"↓","\\downarrow",!0);b(_,R,W,"⇓","\\Downarrow",!0);b(_,R,W,"↕","\\updownarrow",!0);b(_,R,W,"⇕","\\Updownarrow",!0);b(_,R,sn,"∐","\\coprod");b(_,R,sn,"⋁","\\bigvee");b(_,R,sn,"⋀","\\bigwedge");b(_,R,sn,"⨄","\\biguplus");b(_,R,sn,"⋂","\\bigcap");b(_,R,sn,"⋃","\\bigcup");b(_,R,sn,"∫","\\int");b(_,R,sn,"∫","\\intop");b(_,R,sn,"∬","\\iint");b(_,R,sn,"∭","\\iiint");b(_,R,sn,"∏","\\prod");b(_,R,sn,"∑","\\sum");b(_,R,sn,"⨂","\\bigotimes");b(_,R,sn,"⨁","\\bigoplus");b(_,R,sn,"⨀","\\bigodot");b(_,R,sn,"∮","\\oint");b(_,R,sn,"∯","\\oiint");b(_,R,sn,"∰","\\oiiint");b(_,R,sn,"⨆","\\bigsqcup");b(_,R,sn,"∫","\\smallint");b(de,R,Ml,"…","\\textellipsis");b(_,R,Ml,"…","\\mathellipsis");b(de,R,Ml,"…","\\ldots",!0);b(_,R,Ml,"…","\\ldots",!0);b(_,R,Ml,"⋯","\\@cdots",!0);b(_,R,Ml,"⋱","\\ddots",!0);b(_,R,Z,"⋮","\\varvdots");b(de,R,Z,"⋮","\\varvdots");b(_,R,Ft,"ˊ","\\acute");b(_,R,Ft,"ˋ","\\grave");b(_,R,Ft,"¨","\\ddot");b(_,R,Ft,"~","\\tilde");b(_,R,Ft,"ˉ","\\bar");b(_,R,Ft,"˘","\\breve");b(_,R,Ft,"ˇ","\\check");b(_,R,Ft,"^","\\hat");b(_,R,Ft,"⃗","\\vec");b(_,R,Ft,"˙","\\dot");b(_,R,Ft,"˚","\\mathring");b(_,R,Ne,"","\\@imath");b(_,R,Ne,"","\\@jmath");b(_,R,Z,"ı","ı");b(_,R,Z,"ȷ","ȷ");b(de,R,Z,"ı","\\i",!0);b(de,R,Z,"ȷ","\\j",!0);b(de,R,Z,"ß","\\ss",!0);b(de,R,Z,"æ","\\ae",!0);b(de,R,Z,"œ","\\oe",!0);b(de,R,Z,"ø","\\o",!0);b(de,R,Z,"Æ","\\AE",!0);b(de,R,Z,"Œ","\\OE",!0);b(de,R,Z,"Ø","\\O",!0);b(de,R,Ft,"ˊ","\\'");b(de,R,Ft,"ˋ","\\`");b(de,R,Ft,"ˆ","\\^");b(de,R,Ft,"˜","\\~");b(de,R,Ft,"ˉ","\\=");b(de,R,Ft,"˘","\\u");b(de,R,Ft,"˙","\\.");b(de,R,Ft,"¸","\\c");b(de,R,Ft,"˚","\\r");b(de,R,Ft,"ˇ","\\v");b(de,R,Ft,"¨",'\\"');b(de,R,Ft,"˝","\\H");b(de,R,Ft,"◯","\\textcircled");var hk={"--":!0,"---":!0,"``":!0,"''":!0};b(de,R,Z,"–","--",!0);b(de,R,Z,"–","\\textendash");b(de,R,Z,"—","---",!0);b(de,R,Z,"—","\\textemdash");b(de,R,Z,"‘","`",!0);b(de,R,Z,"‘","\\textquoteleft");b(de,R,Z,"’","'",!0);b(de,R,Z,"’","\\textquoteright");b(de,R,Z,"“","``",!0);b(de,R,Z,"“","\\textquotedblleft");b(de,R,Z,"”","''",!0);b(de,R,Z,"”","\\textquotedblright");b(_,R,Z,"°","\\degree",!0);b(de,R,Z,"°","\\degree");b(de,R,Z,"°","\\textdegree",!0);b(_,R,Z,"£","\\pounds");b(_,R,Z,"£","\\mathsterling",!0);b(de,R,Z,"£","\\pounds");b(de,R,Z,"£","\\textsterling",!0);b(_,B,Z,"✠","\\maltese");b(de,B,Z,"✠","\\maltese");var rw='0123456789/@."';for(var Ep=0;Ep0)return ti(s,c,i,n,o.concat(u));if(l){var d,f;if(l==="boldsymbol"){var h=e$(s,i,n,o,r);d=h.fontName,f=[h.fontClass]}else a?(d=gk[l].fontName,f=[l]):(d=md(l,n.fontWeight,n.fontShape),f=[l,n.fontWeight,n.fontShape]);if(rh(s,d,i).metrics)return ti(s,d,i,n,o.concat(f));if(hk.hasOwnProperty(s)&&d.slice(0,10)==="Typewriter"){for(var p=[],m=0;m{if(to(e.classes)!==to(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},r$=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},tr=function(t,n,r,i){var s=new Du(t,n,r,i);return ov(s),s},pk=(e,t,n,r)=>new Du(e,t,n,r),i$=function(t,n,r){var i=tr([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=we(i.height),i.maxFontSize=1,i},s$=function(t,n,r,i){var s=new sv(t,n,r,i);return ov(s),s},mk=function(t){var n=new Mu(t);return ov(n),n},o$=function(t,n){return t instanceof Mu?tr([],[t],n):t},a$=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=tr(["mspace"],[],t),r=zt(e,t);return n.style.marginRight=we(r),n},md=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},gk={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"}},yk={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},u$=function(t,n){var[r,i,s]=yk[t],o=new no(r),a=new ms([o],{width:we(i),height:we(s),style:"width:"+we(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=pk(["overlay"],[a],n);return l.height=s,l.style.height=we(s),l.style.width=we(i),l},te={fontMap:gk,makeSymbol:ti,mathsym:JN,makeSpan:tr,makeSvgSpan:pk,makeLineSpan:i$,makeAnchor:s$,makeFragment:mk,wrapFragment:o$,makeVList:l$,makeOrd:t$,makeGlue:c$,staticSvg:u$,svgData:yk,tryCombineChars:r$},Ht={number:3,unit:"mu"},vo={number:4,unit:"mu"},Ui={number:5,unit:"mu"},d$={mord:{mop:Ht,mbin:vo,mrel:Ui,minner:Ht},mop:{mord:Ht,mop:Ht,mrel:Ui,minner:Ht},mbin:{mord:vo,mop:vo,mopen:vo,minner:vo},mrel:{mord:Ui,mop:Ui,mopen:Ui,minner:Ui},mopen:{},mclose:{mop:Ht,mbin:vo,mrel:Ui,minner:Ht},mpunct:{mord:Ht,mop:Ht,mrel:Ui,mopen:Ht,mclose:Ht,mpunct:Ht,minner:Ht},minner:{mord:Ht,mop:Ht,mbin:vo,mrel:Ui,mopen:Ht,mpunct:Ht,minner:Ht}},f$={mord:{mop:Ht},mop:{mord:Ht,mop:Ht},mbin:{},mrel:{},mopen:{},mclose:{mop:Ht},mpunct:{},minner:{mop:Ht}},vk={},jf={},qf={};function Ce(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"&&p$.includes(y)?m.classes[0]="mord":y==="mbin"&&h$.includes(g)&&(p.classes[0]="mord")},{node:d},f,h),lw(s,(p,m)=>{var g=Fg(m),y=Fg(p),v=g&&y?p.hasClass("mtight")?f$[g][y]:d$[g][y]:null;if(v)return te.makeGlue(v,c)},{node:d},f,h),s},lw=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()},bk=function(t){return t instanceof Mu||t instanceof sv||t instanceof Du&&t.hasClass("enclosing")?t:null},y$=function e(t,n){var r=bk(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},Fg=function(t,n){return t?(n&&(t=y$(t,n)),g$[t.classes[0]]||null):null},Kc=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return gs(n.concat(r))},mt=function(t,n,r){if(!t)return gs();if(jf[t.type]){var i=jf[t.type](t,n);if(r&&n.size!==r.size){i=gs(n.sizingClasses(r),[i],n);var s=n.sizeMultiplier/r.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new me("Got group of unknown type: '"+t.type+"'")};function gd(e,t){var n=gs(["base"],e,t),r=gs(["strut"]);return r.style.height=we(n.height+n.depth),n.depth&&(r.style.verticalAlign=we(-n.depth)),n.children.unshift(r),n}function Hg(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=pn(e,t,"root"),i;r.length===2&&r[1].hasClass("tag")&&(i=r.pop());for(var s=[],o=[],a=0;a0&&(s.push(gd(o,t)),o=[]),s.push(r[a]));o.length>0&&s.push(gd(o,t));var c;n?(c=gd(pn(n,t,!0)),c.classes=["tag"],s.push(c)):i&&s.push(i);var u=gs(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),c){var d=c.children[0];d.style.height=we(u.height+u.depth),u.depth&&(d.style.verticalAlign=we(-u.depth))}return u}function wk(e){return new Mu(e)}class yr{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=to(this.classes));for(var r=0;r0&&(t+=' class ="'+yt.escape(to(this.classes))+'"'),t+=">";for(var r=0;r",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Ei{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return yt.escape(this.toText())}toText(){return this.text}}class v${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",we(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var pe={MathNode:yr,TextNode:Ei,SpaceNode:v$,newDocumentFragment:wk},Wr=function(t,n,r){return Rt[n][t]&&Rt[n][t].replace&&t.charCodeAt(0)!==55349&&!(hk.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=Rt[n][t].replace),new pe.TextNode(t)},av=function(t){return t.length===1?t[0]:new pe.MathNode("mrow",t)},lv=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;Rt[i][s]&&Rt[i][s].replace&&(s=Rt[i][s].replace);var o=te.fontMap[r].fontName;return iv(s,o,i)?te.fontMap[r].variant:null};function Ap(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Ei&&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 Ei&&n.text===","}else return!1}var ar=function(t,n,r){if(t.length===1){var i=Dt(t[0],n);return r&&i instanceof yr&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],o,a=0;a=1&&(o.type==="mn"||Ap(o))){var c=l.children[0];c instanceof yr&&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 Ei&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof Ei&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),o=l}return s},ro=function(t,n,r){return av(ar(t,n,r))},Dt=function(t,n){if(!t)return new pe.MathNode("mrow");if(qf[t.type]){var r=qf[t.type](t,n);return r}else throw new me("Got group of unknown type: '"+t.type+"'")};function cw(e,t,n,r,i){var s=ar(e,n),o;s.length===1&&s[0]instanceof yr&&["mrow","mtable"].includes(s[0].type)?o=s[0]:o=new pe.MathNode("mrow",s);var a=new pe.MathNode("annotation",[new pe.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var l=new pe.MathNode("semantics",[o,a]),c=new pe.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 te.makeSpan([u],[c])}var kk=function(t){return new es({style:t.displayMode?$e.DISPLAY:$e.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},xk=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=te.makeSpan(r,[t])}return t},b$=function(t,n,r){var i=kk(r),s;if(r.output==="mathml")return cw(t,n,i,r.displayMode,!0);if(r.output==="html"){var o=Hg(t,i);s=te.makeSpan(["katex"],[o])}else{var a=cw(t,n,i,r.displayMode,!1),l=Hg(t,i);s=te.makeSpan(["katex"],[a,l])}return xk(s,r)},w$=function(t,n,r){var i=kk(r),s=Hg(t,i),o=te.makeSpan(["katex"],[s]);return xk(o,r)},k$={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":"="},x$=function(t){var n=new pe.MathNode("mo",[new pe.TextNode(k$[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},S$={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]},_$=function(t){return t.type==="ordgroup"?t.body.length:1},C$=function(t,n){function r(){var a=4e5,l=t.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(l)){var c=t,u=_$(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 no(f),g=new ms([m],{width:"100%",height:we(h),viewBox:"0 0 "+a+" "+d,preserveAspectRatio:"none"});return{span:te.makeSvgSpan([],[g],n),minWidth:0,height:h}}else{var y=[],v=S$[l],[w,E,x]=v,k=x/1e3,S=w.length,I,A;if(S===1){var D=v[3];I=["hide-tail"],A=[D]}else if(S===2)I=["halfarrow-left","halfarrow-right"],A=["xMinYMin","xMaxYMin"];else if(S===3)I=["brace-left","brace-center","brace-right"],A=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+S+" children.");for(var z=0;z0&&(i.style.minWidth=we(s)),i},E$=function(t,n,r,i,s){var o,a=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(o=te.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 Ng({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new Ng({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new ms(c,{width:"100%",height:we(a)});o=te.makeSvgSpan([],[u],s)}return o.height=a,o.style.height=we(a),o},ys={encloseSpan:E$,mathMLnode:x$,svgSpan:C$};function rt(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 cv(e){var t=ih(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 ih(e){return e&&(e.type==="atom"||QN.hasOwnProperty(e.type))?e:null}var uv=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=rt(e.base,"accent"),n=r.base,e.base=n,i=ZN(mt(e,t)),e.base=r):(r=rt(e,"accent"),n=r.base);var s=mt(n,t.havingCrampedStyle()),o=r.isShifty&&yt.isCharacterBox(n),a=0;if(o){var l=yt.getBaseElem(n),c=mt(l,t.havingCrampedStyle());a=nw(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=ys.svgSpan(r,t),f=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+we(2*a)+")",marginLeft:we(2*a)}:void 0}]},t);else{var h,p;r.label==="\\vec"?(h=te.staticSvg("vec",t),p=te.svgData.vec[1]):(h=te.makeOrd({mode:r.mode,text:r.label},t,"textord"),h=nw(h),h.italic=0,p=h.width,u&&(d+=h.depth)),f=te.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=we(g),r.label==="\\textcircled"&&(f.style.top=".2em"),f=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:f}]},t)}var y=te.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},Sk=(e,t)=>{var n=e.isStretchy?ys.mathMLnode(e.label):new pe.MathNode("mo",[Wr(e.label,e.mode)]),r=new pe.MathNode("mover",[Dt(e.base,t),n]);return r.setAttribute("accent","true"),r},T$=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ce({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=Bf(t[0]),r=!T$.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:uv,mathmlBuilder:Sk});Ce({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:uv,mathmlBuilder:Sk});Ce({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=mt(e.base,t),r=ys.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,s=te.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return te.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=ys.mathMLnode(e.label),r=new pe.MathNode("munder",[Dt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var yd=e=>{var t=new pe.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ce({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=te.wrapFragment(mt(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=te.wrapFragment(mt(e.below,r,t),t),o.classes.push(s+"-arrow-pad"));var a=ys.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=te.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=te.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"),te.makeSpan(["mrel","x-arrow"],[u],t)},mathmlBuilder(e,t){var n=ys.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=yd(Dt(e.body,t));if(e.below){var s=yd(Dt(e.below,t));r=new pe.MathNode("munderover",[n,s,i])}else r=new pe.MathNode("mover",[n,i])}else if(e.below){var o=yd(Dt(e.below,t));r=new pe.MathNode("munder",[n,o])}else r=yd(),r=new pe.MathNode("mover",[n,r]);return r}});var L$=te.makeSpan;function _k(e,t){var n=pn(e.body,t,!0);return L$([e.mclass],n,t)}function Ck(e,t){var n,r=ar(e.body,t);return e.mclass==="minner"?n=new pe.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new pe.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new pe.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}Ce({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:Yt(i),isCharacterBox:yt.isCharacterBox(i)}},htmlBuilder:_k,mathmlBuilder:Ck});var sh=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"};Ce({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:sh(t[0]),body:Yt(t[1]),isCharacterBox:yt.isCharacterBox(t[1])}}});Ce({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=sh(i):o="mrel";var a={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Yt(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:yt.isCharacterBox(l)}},htmlBuilder:_k,mathmlBuilder:Ck});Ce({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:sh(t[0]),body:Yt(t[0])}},htmlBuilder(e,t){var n=pn(e.body,t,!0),r=te.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=ar(e.body,t),r=new pe.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var I$={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},uw=()=>({type:"styling",body:[],mode:"math",style:"display"}),dw=e=>e.type==="textord"&&e.text==="@",A$=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function M$(e,t,n){var r=I$[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 D$(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 me("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=M$(c,u,e),m={type:"styling",body:[p],mode:"math",style:"display"};r.push(m),a=uw()}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([])}}Ce({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=te.wrapFragment(mt(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=we(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new pe.MathNode("mrow",[Dt(e.label,t)]);return n=new pe.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new pe.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Ce({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=te.wrapFragment(mt(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new pe.MathNode("mrow",[Dt(e.fragment,t)])}});Ce({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=rt(t[0],"ordgroup"),i=r.body,s="",o=0;o=1114111)throw new me("\\@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 Ek=(e,t)=>{var n=pn(e.body,t.withColor(e.color),!1);return te.makeFragment(n)},Tk=(e,t)=>{var n=ar(e.body,t.withColor(e.color)),r=new pe.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Ce({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=rt(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Yt(i)}},htmlBuilder:Ek,mathmlBuilder:Tk});Ce({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=rt(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:Ek,mathmlBuilder:Tk});Ce({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&&rt(i,"size").value}},htmlBuilder(e,t){var n=te.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=we(zt(e.size,t)))),n},mathmlBuilder(e,t){var n=new pe.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",we(zt(e.size,t)))),n}});var Vg={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Lk=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new me("Expected a control sequence",e);return t},O$=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Ik=(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)};Ce({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(Vg[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=Vg[r.text]),rt(t.parseFunction(),"internal");throw new me("Invalid token after macro prefix",r)}});Ce({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 me("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 me('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new me('Argument number "'+r.text+'" out of order');s++,a.push([])}else{if(r.text==="EOF")throw new me("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===Vg[n]),{type:"internal",mode:t.mode}}});Ce({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Lk(t.gullet.popToken());t.gullet.consumeSpaces();var i=O$(t);return Ik(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ce({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Lk(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return Ik(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var bc=function(t,n,r){var i=Rt.math[t]&&Rt.math[t].replace,s=iv(i||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},dv=function(t,n,r,i){var s=r.havingBaseStyle(n),o=te.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},Ak=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=we(s),t.height-=s,t.depth+=s},P$=function(t,n,r,i,s,o){var a=te.makeSymbol(t,"Main-Regular",s,i),l=dv(a,n,i,o);return r&&Ak(l,i,n),l},R$=function(t,n,r,i){return te.makeSymbol(t,"Size"+n+"-Regular",r,i)},Mk=function(t,n,r,i,s,o){var a=R$(t,n,s,i),l=dv(te.makeSpan(["delimsizing","size"+n],[a],i),$e.TEXT,i,o);return r&&Ak(l,i,$e.TEXT),l},Mp=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=te.makeSpan(["delimsizinginner",i],[te.makeSpan([],[te.makeSymbol(t,n,r)])]);return{type:"elem",elem:s}},Dp=function(t,n,r){var i=Ci["Size4-Regular"][t.charCodeAt(0)]?Ci["Size4-Regular"][t.charCodeAt(0)][4]:Ci["Size1-Regular"][t.charCodeAt(0)][4],s=new no("inner",VN(t,Math.round(1e3*n))),o=new ms([s],{width:we(i),height:we(n),style:"width:"+we(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),a=te.makeSvgSpan([],[o],r);return a.height=n,a.style.height=we(n),a.style.width=we(i),{type:"elem",elem:a}},zg=.008,vd={type:"kern",size:-1*zg},N$=["|","\\lvert","\\rvert","\\vert"],$$=["\\|","\\lVert","\\rVert","\\Vert"],Dk=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"):N$.includes(t)?(c="∣",d="vert",f=333):$$.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=bc(a,h,s),m=p.height+p.depth,g=bc(c,h,s),y=g.height+g.depth,v=bc(u,h,s),w=v.height+v.depth,E=0,x=1;if(l!==null){var k=bc(l,h,s);E=k.height+k.depth,x=2}var S=m+w+E,I=Math.max(0,Math.ceil((n-S)/(x*y))),A=S+I*x*y,D=i.fontMetrics().axisHeight;r&&(D*=i.sizeMultiplier);var z=A/2-D,H=[];if(d.length>0){var O=A-m-w,L=Math.round(A*1e3),C=zN(d,Math.round(O*1e3)),M=new no(d,C),q=(f/1e3).toFixed(3)+"em",G=(L/1e3).toFixed(3)+"em",j=new ms([M],{width:q,height:G,viewBox:"0 0 "+f+" "+L}),K=te.makeSvgSpan([],[j],i);K.height=L/1e3,K.style.width=q,K.style.height=G,H.push({type:"elem",elem:K})}else{if(H.push(Mp(u,h,s)),H.push(vd),l===null){var Y=A-m-w+2*zg;H.push(Dp(c,Y,i))}else{var J=(A-m-w-E)/2+2*zg;H.push(Dp(c,J,i)),H.push(vd),H.push(Mp(l,h,s)),H.push(vd),H.push(Dp(c,J,i))}H.push(vd),H.push(Mp(a,h,s))}var ee=i.havingBaseStyle($e.TEXT),ue=te.makeVList({positionType:"bottom",positionData:z,children:H},ee);return dv(te.makeSpan(["delimsizing","mult"],[ue],ee),$e.TEXT,i,o)},Op=80,Pp=.08,Rp=function(t,n,r,i,s){var o=HN(t,i,r),a=new no(t,o),l=new ms([a],{width:"400em",height:we(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return te.makeSvgSpan(["hide-tail"],[l],s)},F$=function(t,n){var r=n.havingBaseSizing(),i=Nk("\\surd",t*r.sizeMultiplier,Rk,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+Op,t<1?s=1:t<1.4&&(s=.7),l=(1+o+Pp)/s,c=(1+o)/s,a=Rp("sqrtMain",l,u,o,n),a.style.minWidth="0.853em",d=.833/s):i.type==="large"?(u=(1e3+Op)*Mc[i.size],c=(Mc[i.size]+o)/s,l=(Mc[i.size]+o+Pp)/s,a=Rp("sqrtSize"+i.size,l,u,o,n),a.style.minWidth="1.02em",d=1/s):(l=t+o+Pp,c=t+o,u=Math.floor(1e3*t+o)+Op,a=Rp("sqrtTall",l,u,o,n),a.style.minWidth="0.742em",d=1.056),a.height=c,a.style.height=we(l),{span:a,advanceWidth:d,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*s}},Ok=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],H$=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Pk=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Mc=[0,1.2,1.8,2.4,3],V$=function(t,n,r,i,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Ok.includes(t)||Pk.includes(t))return Mk(t,n,!1,r,i,s);if(H$.includes(t))return Dk(t,Mc[n],!1,r,i,s);throw new me("Illegal delimiter: '"+t+"'")},z$=[{type:"small",style:$e.SCRIPTSCRIPT},{type:"small",style:$e.SCRIPT},{type:"small",style:$e.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],j$=[{type:"small",style:$e.SCRIPTSCRIPT},{type:"small",style:$e.SCRIPT},{type:"small",style:$e.TEXT},{type:"stack"}],Rk=[{type:"small",style:$e.SCRIPTSCRIPT},{type:"small",style:$e.SCRIPT},{type:"small",style:$e.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],q$=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.")},Nk=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]},$k=function(t,n,r,i,s,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var a;Pk.includes(t)?a=z$:Ok.includes(t)?a=Rk:a=j$;var l=Nk(t,n,a,i);return l.type==="small"?P$(t,l.style,r,i,s,o):l.type==="large"?Mk(t,l.size,r,i,s,o):Dk(t,n,r,i,s,o)},B$=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 $k(t,d,!0,i,s,o)},ds={sqrtImage:F$,sizedDelim:V$,sizeToMaxHeight:Mc,customSizedDelim:$k,leftRightDelim:B$},fw={"\\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}},U$=["(","\\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 oh(e,t){var n=ih(e);if(n&&U$.includes(n.text))return n;throw n?new me("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new me("Invalid delimiter type '"+e.type+"'",e)}Ce({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=oh(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:fw[e.funcName].size,mclass:fw[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?te.makeSpan([e.mclass]):ds.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Wr(e.delim,e.mode));var n=new pe.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=we(ds.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function hw(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ce({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 me("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:oh(t[0],e).text,color:n}}});Ce({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=oh(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=rt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{hw(e);for(var n=pn(e.body,t,!0,["mopen","mclose"]),r=0,i=0,s=!1,o=0;o{hw(e);var n=ar(e.body,t);if(e.left!=="."){var r=new pe.MathNode("mo",[Wr(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new pe.MathNode("mo",[Wr(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return av(n)}});Ce({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=oh(t[0],e);if(!e.parser.leftrightDepth)throw new me("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=Kc(t,[]);else{n=ds.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==="|"?Wr("|","text"):Wr(e.delim,e.mode),r=new pe.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var fv=(e,t)=>{var n=te.wrapFragment(mt(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,s,o=0,a=yt.isCharacterBox(e.body);if(r==="sout")s=te.makeSpan(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=zt({number:.6,unit:"pt"},t),c=zt({number:.35,unit:"ex"},t),u=t.havingBaseSizing();i=i/u.sizeMultiplier;var d=n.height+n.depth+l+c;n.style.paddingLeft=we(d/2+l);var f=Math.floor(1e3*d*i),h=$N(f),p=new ms([new no("phase",h)],{width:"400em",height:we(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=te.makeSvgSpan(["hide-tail"],[p],t),s.style.height=we(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=ys.encloseSpan(n,r,m,g,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=we(y)):r==="angl"&&y!==.049&&(s.style.borderTopWidth=we(y),s.style.borderRightWidth=we(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=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:n,shift:0}]},t);else{var w=/cancel|phase/.test(r)?["svg-align"]:[];v=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:w}]},t)}return/cancel/.test(r)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(r)&&!a?te.makeSpan(["mord","cancel-lap"],[v],t):te.makeSpan(["mord"],[v],t)},hv=(e,t)=>{var n=0,r=new pe.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Dt(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};Ce({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=rt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,body:o}},htmlBuilder:fv,mathmlBuilder:hv});Ce({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=rt(t[0],"color-token").color,o=rt(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,borderColor:s,body:a}},htmlBuilder:fv,mathmlBuilder:hv});Ce({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]}}});Ce({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:fv,mathmlBuilder:hv});Ce({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 Fk={};function Hi(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 me("{"+e.envName+"} can be used only in display mode.")};function pv(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function co(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 me("Invalid \\arraystretch: "+h)}e.gullet.beginGroup();var p=[],m=[p],g=[],y=[],v=l!=null?[]:void 0;function w(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function E(){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(w(),y.push(pw(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 k=e.fetch().text;if(k==="&"){if(d&&p.length===d){if(c||a)throw new me("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(k==="\\end"){E(),p.length===1&&x.type==="styling"&&x.body[0].body.length===0&&(m.length>1||!u)&&m.pop(),y.length0&&(w+=.25),c.push({pos:w,isDashed:Bn[Is]})}for(E(o[0]),r=0;r0&&(z+=v,SBn))for(r=0;r=a)){var Ie=void 0;(i>0||t.hskipBeforeAndAfter)&&(Ie=yt.deflt(J.pregap,f),Ie!==0&&(C=te.makeSpan(["arraycolsep"],[]),C.style.width=we(Ie),L.push(C)));var ve=[];for(r=0;r0){for(var Jn=te.makeLineSpan("hline",n,u),Ue=te.makeLineSpan("hdashline",n,u),V=[{type:"elem",elem:l,shift:0}];c.length>0;){var at=c.pop(),bt=at.pos-H;at.isDashed?V.push({type:"elem",elem:Ue,shift:bt}):V.push({type:"elem",elem:Jn,shift:bt})}l=te.makeVList({positionType:"individualShift",children:V},n)}if(q.length===0)return te.makeSpan(["mord"],[l],n);var ln=te.makeVList({positionType:"individualShift",children:q},n);return ln=te.makeSpan(["tag"],[ln],n),te.makeFragment([l,ln])},W$={c:"center ",l:"left ",r:"right "},zi=function(t,n){for(var r=[],i=new pe.MathNode("mtd",[],["mtr-glue"]),s=new pe.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 w=y;w0?"left ":"",f+=I[I.length-1].length>0?"right ":"";for(var A=1;A-1?"alignat":"align",s=t.envName==="split",o=co(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:pv(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};Hi({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=ih(t[0]),r=n?[t[0]]:rt(t[0],"ordgroup").body,i=r.map(function(o){var a=cv(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 me("Unknown column alignment: "+l,o)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return co(e.parser,s,mv(e.envName))},htmlBuilder:Vi,mathmlBuilder:zi});Hi({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 me("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var s=co(e.parser,r,mv(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:Vi,mathmlBuilder:zi});Hi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=co(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Vi,mathmlBuilder:zi});Hi({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=ih(t[0]),r=n?[t[0]]:rt(t[0],"ordgroup").body,i=r.map(function(o){var a=cv(o),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new me("Unknown column alignment: "+l,o)});if(i.length>1)throw new me("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=co(e.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new me("{subarray} can contain only one column");return s},htmlBuilder:Vi,mathmlBuilder:zi});Hi({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=co(e.parser,t,mv(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:Vi,mathmlBuilder:zi});Hi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Vk,htmlBuilder:Vi,mathmlBuilder:zi});Hi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&ah(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:pv(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return co(e.parser,t,"display")},htmlBuilder:Vi,mathmlBuilder:zi});Hi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Vk,htmlBuilder:Vi,mathmlBuilder:zi});Hi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ah(e);var t={autoTag:pv(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return co(e.parser,t,"display")},htmlBuilder:Vi,mathmlBuilder:zi});Hi({type:"array",names:["CD"],props:{numArgs:0},handler(e){return ah(e),D$(e.parser)},htmlBuilder:Vi,mathmlBuilder:zi});N("\\nonumber","\\gdef\\@eqnsw{0}");N("\\notag","\\nonumber");Ce({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new me(e.funcName+" valid only within array environment")}});var mw=Fk;Ce({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 me("Invalid environment name",i);for(var s="",o=0;o{var n=e.font,r=t.withFont(n);return mt(e.body,r)},jk=(e,t)=>{var n=e.font,r=t.withFont(n);return Dt(e.body,r)},gw={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ce({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=Bf(t[0]),s=r;return s in gw&&(s=gw[s]),{type:"font",mode:n.mode,font:s.slice(1),body:i}},htmlBuilder:zk,mathmlBuilder:jk});Ce({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=yt.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:sh(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}});Ce({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:zk,mathmlBuilder:jk});var qk=(e,t)=>{var n=t;return e==="display"?n=n.id>=$e.SCRIPT.id?n.text():$e.DISPLAY:e==="text"&&n.size===$e.DISPLAY.size?n=$e.TEXT:e==="script"?n=$e.SCRIPT:e==="scriptscript"&&(n=$e.SCRIPTSCRIPT),n},gv=(e,t)=>{var n=qk(e.size,t.style),r=n.fracNum(),i=n.fracDen(),s;s=t.havingStyle(r);var o=mt(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 pe.MathNode("mfrac",[Dt(e.numer,t),Dt(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=zt(e.barSize,t);n.setAttribute("linethickness",we(r))}var i=qk(e.size,t.style);if(i.size!==t.style.size){n=new pe.MathNode("mstyle",[n]);var s=i.size===$e.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 pe.MathNode("mo",[new pe.TextNode(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),o.push(a)}if(o.push(n),e.rightDelim!=null){var l=new pe.MathNode("mo",[new pe.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return av(o)}return n};Ce({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:gv,mathmlBuilder:yv});Ce({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}}});Ce({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 yw=["display","text","script","scriptscript"],vw=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Ce({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=Bf(t[0]),o=s.type==="atom"&&s.family==="open"?vw(s.text):null,a=Bf(t[1]),l=a.type==="atom"&&a.family==="close"?vw(a.text):null,c=rt(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=rt(h.body[0],"textord");f=yw[Number(p.text)]}}else h=rt(h,"textord"),f=yw[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:gv,mathmlBuilder:yv});Ce({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:rt(t[0],"size").value,token:i}}});Ce({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=xN(rt(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:gv,mathmlBuilder:yv});var Bk=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?mt(e.sup,t.havingStyle(n.sup()),t):mt(e.sub,t.havingStyle(n.sub()),t),i=rt(e.base,"horizBrace")):i=rt(e,"horizBrace");var s=mt(i.base,t.havingBaseStyle($e.DISPLAY)),o=ys.svgSpan(i,t),a;if(i.isOver?(a=te.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=te.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=te.makeSpan(["mord",i.isOver?"mover":"munder"],[a],t);i.isOver?a=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):a=te.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 te.makeSpan(["mord",i.isOver?"mover":"munder"],[a],t)},G$=(e,t)=>{var n=ys.mathMLnode(e.label);return new pe.MathNode(e.isOver?"mover":"munder",[Dt(e.base,t),n])};Ce({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:Bk,mathmlBuilder:G$});Ce({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=rt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Yt(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=pn(e.body,t,!1);return te.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=ro(e.body,t);return n instanceof yr||(n=new yr("mrow",[n])),n.setAttribute("href",e.href),n}});Ce({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=rt(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=rt(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=pn(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=te.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)=>ro(e.body,t)});Ce({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Yt(t[0]),mathml:Yt(t[1])}},htmlBuilder:(e,t)=>{var n=pn(e.html,t,!1);return te.makeFragment(n)},mathmlBuilder:(e,t)=>ro(e.mathml,t)});var Np=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 me("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!ck(r))throw new me("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};Ce({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=rt(n[0],"raw").string,c=l.split(","),u=0;u{var n=zt(e.height,t),r=0;e.totalheight.number>0&&(r=zt(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=zt(e.width,t));var s={height:we(n+r)};i>0&&(s.width=we(i)),r>0&&(s.verticalAlign=we(-r));var o=new GN(e.src,e.alt,s);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new pe.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=zt(e.height,t),i=0;if(e.totalheight.number>0&&(i=zt(e.totalheight,t)-r,n.setAttribute("valign",we(-i))),n.setAttribute("height",we(r+i)),e.width.number>0){var s=zt(e.width,t);n.setAttribute("width",we(s))}return n.setAttribute("src",e.src),n}});Ce({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=rt(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 te.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=zt(e.dimension,t);return new pe.SpaceNode(n)}});Ce({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=te.makeSpan([],[mt(e.body,t)]),n=te.makeSpan(["inner"],[n],t)):n=te.makeSpan(["inner"],[mt(e.body,t)]);var r=te.makeSpan(["fix"],[]),i=te.makeSpan([e.alignment],[n,r],t),s=te.makeSpan(["strut"]);return s.style.height=we(i.height+i.depth),i.depth&&(s.style.verticalAlign=we(-i.depth)),i.children.unshift(s),i=te.makeSpan(["thinbox"],[i],t),te.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new pe.MathNode("mpadded",[Dt(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}});Ce({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}}});Ce({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new me("Mismatched "+e.funcName)}});var bw=(e,t)=>{switch(t.style.size){case $e.DISPLAY.size:return e.display;case $e.TEXT.size:return e.text;case $e.SCRIPT.size:return e.script;case $e.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ce({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Yt(t[0]),text:Yt(t[1]),script:Yt(t[2]),scriptscript:Yt(t[3])}},htmlBuilder:(e,t)=>{var n=bw(e,t),r=pn(n,t,!1);return te.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=bw(e,t);return ro(n,t)}});var Uk=(e,t,n,r,i,s,o)=>{e=te.makeSpan([],[e]);var a=n&&yt.isCharacterBox(n),l,c;if(t){var u=mt(t,r.havingStyle(i.sup()),r);c={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=mt(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=te.makeVList({positionType:"bottom",positionData:h,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:we(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:we(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var p=e.height-o;f=te.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:we(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},r)}else if(c){var m=e.depth+o;f=te.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:we(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var g=[f];if(l&&s!==0&&!a){var y=te.makeSpan(["mspace"],[],r);y.style.marginRight=we(s),g.unshift(y)}return te.makeSpan(["mop","op-limits"],g,r)},Wk=["\\smallint"],Dl=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=rt(e.base,"op"),i=!0):s=rt(e,"op");var o=t.style,a=!1;o.size===$e.DISPLAY.size&&s.symbol&&!Wk.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=te.makeSymbol(s.name,c,"math",t,["mop","op-symbol",a?"large-op":"small-op"]),u.length>0){var d=l.italic,f=te.staticSvg(u+"Size"+(a?"2":"1"),t);l=te.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=pn(s.body,t,!0);h.length===1&&h[0]instanceof Ur?(l=h[0],l.classes[0]="mop"):l=te.makeSpan(["mop"],h,t)}else{for(var p=[],m=1;m{var n;if(e.symbol)n=new yr("mo",[Wr(e.name,e.mode)]),Wk.includes(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new yr("mo",ar(e.body,t));else{n=new yr("mi",[new Ei(e.name.slice(1))]);var r=new yr("mo",[Wr("⁡","text")]);e.parentIsSupSub?n=new yr("mrow",[n,r]):n=wk([n,r])}return n},K$={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ce({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=K$[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Dl,mathmlBuilder:Ou});Ce({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:Yt(r)}},htmlBuilder:Dl,mathmlBuilder:Ou});var Z$={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ce({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:Dl,mathmlBuilder:Ou});Ce({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:Dl,mathmlBuilder:Ou});Ce({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=Z$[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Dl,mathmlBuilder:Ou});var Gk=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=rt(e.base,"operatorname"),i=!0):s=rt(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=pn(a,t.withFont("mathrm"),!0),c=0;c{for(var n=ar(e.body,t.withFont("mathrm")),r=!0,i=0;iu.toText()).join("");n=[new pe.TextNode(a)]}var l=new pe.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new pe.MathNode("mo",[Wr("⁡","text")]);return e.parentIsSupSub?new pe.MathNode("mrow",[l,c]):pe.newDocumentFragment([l,c])};Ce({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:Yt(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Gk,mathmlBuilder:Y$});N("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");ua({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?te.makeFragment(pn(e.body,t,!1)):te.makeSpan(["mord"],pn(e.body,t,!0),t)},mathmlBuilder(e,t){return ro(e.body,t,!0)}});Ce({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=mt(e.body,t.havingCrampedStyle()),r=te.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return te.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new pe.MathNode("mo",[new pe.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new pe.MathNode("mover",[Dt(e.body,t),n]);return r.setAttribute("accent","true"),r}});Ce({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:Yt(r)}},htmlBuilder:(e,t)=>{var n=pn(e.body,t.withPhantom(),!1);return te.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=ar(e.body,t);return new pe.MathNode("mphantom",n)}});Ce({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=te.makeSpan([],[mt(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=ar(Yt(e.body),t),r=new pe.MathNode("mphantom",n),i=new pe.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});Ce({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=te.makeSpan(["inner"],[mt(e.body,t.withPhantom())]),r=te.makeSpan(["fix"],[]);return te.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=ar(Yt(e.body),t),r=new pe.MathNode("mphantom",n),i=new pe.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}});Ce({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=rt(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=mt(e.body,t),r=zt(e.dy,t);return te.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new pe.MathNode("mpadded",[Dt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});Ce({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Ce({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=rt(t[0],"size"),o=rt(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&rt(i,"size").value,width:s.value,height:o.value}},htmlBuilder(e,t){var n=te.makeSpan(["mord","rule"],[],t),r=zt(e.width,t),i=zt(e.height,t),s=e.shift?zt(e.shift,t):0;return n.style.borderRightWidth=we(r),n.style.borderTopWidth=we(i),n.style.bottom=we(s),n.width=r,n.height=i+s,n.depth=-s,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=zt(e.width,t),r=zt(e.height,t),i=e.shift?zt(e.shift,t):0,s=t.color&&t.getColor()||"black",o=new pe.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",we(n)),o.setAttribute("height",we(r));var a=new pe.MathNode("mpadded",[o]);return i>=0?a.setAttribute("height",we(i)):(a.setAttribute("height",we(i)),a.setAttribute("depth",we(-i))),a.setAttribute("voffset",we(i)),a}});function Kk(e,t,n){for(var r=pn(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,s=0;s{var n=t.havingSize(e.size);return Kk(e.body,n,t)};Ce({type:"sizing",names:ww,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:ww.indexOf(r)+1,body:s}},htmlBuilder:Q$,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=ar(e.body,n),i=new pe.MathNode("mstyle",r);return i.setAttribute("mathsize",we(n.sizeMultiplier)),i}});Ce({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]&&rt(n[0],"ordgroup");if(o)for(var a="",l=0;l{var n=te.makeSpan([],[mt(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 pe.MathNode("mpadded",[Dt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Ce({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=mt(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=te.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,s=i;t.style.id<$e.TEXT.id&&(s=t.fontMetrics().xHeight);var o=i+s/4,a=n.height+n.depth+o+i,{span:l,ruleWidth:c,advanceWidth:u}=ds.sqrtImage(a,t),d=l.height-c;d>n.height+n.depth+o&&(o=(o+d-n.height-n.depth)/2);var f=l.height-n.height-o-c;n.style.paddingLeft=we(u);var h=te.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($e.SCRIPTSCRIPT),m=mt(e.index,p,t),g=.6*(h.height-h.depth),y=te.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:m}]},t),v=te.makeSpan(["root"],[y]);return te.makeSpan(["mord","sqrt"],[v,h],t)}else return te.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new pe.MathNode("mroot",[Dt(n,t),Dt(r,t)]):new pe.MathNode("msqrt",[Dt(n,t)])}});var kw={display:$e.DISPLAY,text:$e.TEXT,script:$e.SCRIPT,scriptscript:$e.SCRIPTSCRIPT};Ce({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=kw[e.style],r=t.havingStyle(n).withFont("");return Kk(e.body,r,t)},mathmlBuilder(e,t){var n=kw[e.style],r=t.havingStyle(n),i=ar(e.body,r),s=new pe.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 X$=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===$e.DISPLAY.size||r.alwaysHandleSupSub);return i?Dl:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===$e.DISPLAY.size||r.limits);return s?Gk:null}else{if(r.type==="accent")return yt.isCharacterBox(r.base)?uv:null;if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?Bk:null}else return null}else return null};ua({type:"supsub",htmlBuilder(e,t){var n=X$(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:s}=e,o=mt(r,t),a,l,c=t.fontMetrics(),u=0,d=0,f=r&&yt.isCharacterBox(r);if(i){var h=t.havingStyle(t.style.sup());a=mt(i,h,t),f||(u=o.height-h.fontMetrics().supDrop*h.sizeMultiplier/t.sizeMultiplier)}if(s){var p=t.havingStyle(t.style.sub());l=mt(s,p,t),f||(d=o.depth+p.fontMetrics().subDrop*p.sizeMultiplier/t.sizeMultiplier)}var m;t.style===$e.DISPLAY?m=c.sup1:t.style.cramped?m=c.sup3:m=c.sup2;var g=t.sizeMultiplier,y=we(.5/c.ptPerEm/g),v=null;if(l){var w=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof Ur||w)&&(v=we(-o.italic))}var E;if(a&&l){u=Math.max(u,m,a.depth+.25*c.xHeight),d=Math.max(d,c.sub2);var x=c.defaultRuleThickness,k=4*x;if(u-a.depth-(l.height-d)0&&(u+=S,d-=S)}var I=[{type:"elem",elem:l,shift:d,marginRight:y,marginLeft:v},{type:"elem",elem:a,shift:-u,marginRight:y}];E=te.makeVList({positionType:"individualShift",children:I},t)}else if(l){d=Math.max(d,c.sub1,l.height-.8*c.xHeight);var A=[{type:"elem",elem:l,marginLeft:v,marginRight:y}];E=te.makeVList({positionType:"shift",positionData:d,children:A},t)}else if(a)u=Math.max(u,m,a.depth+.25*c.xHeight),E=te.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 D=Fg(o,"right")||"mord";return te.makeSpan([D],[o,te.makeSpan(["msupsub"],[E])],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=[Dt(e.base,t)];e.sub&&s.push(Dt(e.sub,t)),e.sup&&s.push(Dt(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===$e.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===$e.DISPLAY||c.limits)?o="munderover":o="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===$e.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===$e.DISPLAY)?o="munder":o="msub"}else{var a=e.base;a&&a.type==="op"&&a.limits&&(t.style===$e.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||t.style===$e.DISPLAY)?o="mover":o="msup"}return new pe.MathNode(o,s)}});ua({type:"atom",htmlBuilder(e,t){return te.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new pe.MathNode("mo",[Wr(e.text,e.mode)]);if(e.family==="bin"){var r=lv(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 Zk={mi:"italic",mn:"normal",mtext:"normal"};ua({type:"mathord",htmlBuilder(e,t){return te.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new pe.MathNode("mi",[Wr(e.text,e.mode,t)]),r=lv(e,t)||"italic";return r!==Zk[n.type]&&n.setAttribute("mathvariant",r),n}});ua({type:"textord",htmlBuilder(e,t){return te.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=Wr(e.text,e.mode,t),r=lv(e,t)||"normal",i;return e.mode==="text"?i=new pe.MathNode("mtext",[n]):/[0-9]/.test(e.text)?i=new pe.MathNode("mn",[n]):e.text==="\\prime"?i=new pe.MathNode("mo",[n]):i=new pe.MathNode("mi",[n]),r!==Zk[i.type]&&i.setAttribute("mathvariant",r),i}});var $p={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Fp={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ua({type:"spacing",htmlBuilder(e,t){if(Fp.hasOwnProperty(e.text)){var n=Fp[e.text].className||"";if(e.mode==="text"){var r=te.makeOrd(e,t,"textord");return r.classes.push(n),r}else return te.makeSpan(["mspace",n],[te.mathsym(e.text,e.mode,t)],t)}else{if($p.hasOwnProperty(e.text))return te.makeSpan(["mspace",$p[e.text]],[],t);throw new me('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(Fp.hasOwnProperty(e.text))n=new pe.MathNode("mtext",[new pe.TextNode(" ")]);else{if($p.hasOwnProperty(e.text))return new pe.MathNode("mspace");throw new me('Unknown type of space "'+e.text+'"')}return n}});var xw=()=>{var e=new pe.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};ua({type:"tag",mathmlBuilder(e,t){var n=new pe.MathNode("mtable",[new pe.MathNode("mtr",[xw(),new pe.MathNode("mtd",[ro(e.body,t)]),xw(),new pe.MathNode("mtd",[ro(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Sw={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},_w={"\\textbf":"textbf","\\textmd":"textmd"},J$={"\\textit":"textit","\\textup":"textup"},Cw=(e,t)=>{var n=e.font;if(n){if(Sw[n])return t.withTextFontFamily(Sw[n]);if(_w[n])return t.withTextFontWeight(_w[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(J$[n])};Ce({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:Yt(i),font:r}},htmlBuilder(e,t){var n=Cw(e,t),r=pn(e.body,n,!0);return te.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=Cw(e,t);return ro(e.body,n)}});Ce({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=mt(e.body,t),r=te.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=te.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 te.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new pe.MathNode("mo",[new pe.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new pe.MathNode("munder",[Dt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});Ce({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=mt(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return te.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){return new pe.MathNode("mpadded",[Dt(e.body,t)],["vcenter"])}});Ce({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new me("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Ew(e),r=[],i=t.havingStyle(t.style.text()),s=0;se.body.replace(/ /g,e.star?"␣":" "),Us=vk,Yk=`[ \r ]`,eF="\\\\[a-zA-Z@]+",tF="\\\\[^\uD800-\uDFFF]",nF="("+eF+")"+Yk+"*",rF=`\\\\( |[ \r ]+ ?)[ \r ]*`,jg="[̀-ͯ]",iF=new RegExp(jg+"+$"),sF="("+Yk+"+)|"+(rF+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(jg+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(jg+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+nF)+("|"+tF+")");class Tw{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(sF,"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 rr(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new me("Unexpected character: '"+t[n]+"'",new xr(t[n],new rr(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 rr(this,n,this.tokenRegex.lastIndex))}}class oF{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 me("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 aF=Hk;N("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});N("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});N("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});N("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});N("\\@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}});N("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");N("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Lw={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};N("\\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 me("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=Lw[t.text],r==null||r>=n)throw new me("Invalid base-"+n+" digit "+t.text);for(var i;(i=Lw[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new me("\\newcommand's first argument must be a macro name");var s=i[0].text,o=e.isDefined(s);if(o&&!t)throw new me("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!n)throw new me("\\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 me("Invalid number of arguments: "+l);a=parseInt(l),i=e.consumeArg().tokens}return o&&r||e.macros.set(s,{tokens:i,numArgs:a}),""};N("\\newcommand",e=>vv(e,!1,!0,!1));N("\\renewcommand",e=>vv(e,!0,!1,!1));N("\\providecommand",e=>vv(e,!0,!0,!0));N("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});N("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});N("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Us[n],Rt.math[n],Rt.text[n]),""});N("\\bgroup","{");N("\\egroup","}");N("~","\\nobreakspace");N("\\lq","`");N("\\rq","'");N("\\aa","\\r a");N("\\AA","\\r A");N("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");N("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");N("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");N("ℬ","\\mathscr{B}");N("ℰ","\\mathscr{E}");N("ℱ","\\mathscr{F}");N("ℋ","\\mathscr{H}");N("ℐ","\\mathscr{I}");N("ℒ","\\mathscr{L}");N("ℳ","\\mathscr{M}");N("ℛ","\\mathscr{R}");N("ℭ","\\mathfrak{C}");N("ℌ","\\mathfrak{H}");N("ℨ","\\mathfrak{Z}");N("\\Bbbk","\\Bbb{k}");N("·","\\cdotp");N("\\llap","\\mathllap{\\textrm{#1}}");N("\\rlap","\\mathrlap{\\textrm{#1}}");N("\\clap","\\mathclap{\\textrm{#1}}");N("\\mathstrut","\\vphantom{(}");N("\\underbar","\\underline{\\text{#1}}");N("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');N("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");N("\\ne","\\neq");N("≠","\\neq");N("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");N("∉","\\notin");N("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");N("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");N("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");N("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");N("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");N("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");N("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");N("⟂","\\perp");N("‼","\\mathclose{!\\mkern-0.8mu!}");N("∌","\\notni");N("⌜","\\ulcorner");N("⌝","\\urcorner");N("⌞","\\llcorner");N("⌟","\\lrcorner");N("©","\\copyright");N("®","\\textregistered");N("️","\\textregistered");N("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');N("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');N("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');N("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');N("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");N("⋮","\\vdots");N("\\varGamma","\\mathit{\\Gamma}");N("\\varDelta","\\mathit{\\Delta}");N("\\varTheta","\\mathit{\\Theta}");N("\\varLambda","\\mathit{\\Lambda}");N("\\varXi","\\mathit{\\Xi}");N("\\varPi","\\mathit{\\Pi}");N("\\varSigma","\\mathit{\\Sigma}");N("\\varUpsilon","\\mathit{\\Upsilon}");N("\\varPhi","\\mathit{\\Phi}");N("\\varPsi","\\mathit{\\Psi}");N("\\varOmega","\\mathit{\\Omega}");N("\\substack","\\begin{subarray}{c}#1\\end{subarray}");N("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");N("\\boxed","\\fbox{$\\displaystyle{#1}$}");N("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");N("\\implies","\\DOTSB\\;\\Longrightarrow\\;");N("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");N("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");N("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Iw={",":"\\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"};N("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Iw?t=Iw[n]:(n.slice(0,4)==="\\not"||n in Rt.math&&["bin","rel"].includes(Rt.math[n].group))&&(t="\\dotsb"),t});var bv={")":!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};N("\\dotso",function(e){var t=e.future().text;return t in bv?"\\ldots\\,":"\\ldots"});N("\\dotsc",function(e){var t=e.future().text;return t in bv&&t!==","?"\\ldots\\,":"\\ldots"});N("\\cdots",function(e){var t=e.future().text;return t in bv?"\\@cdots\\,":"\\@cdots"});N("\\dotsb","\\cdots");N("\\dotsm","\\cdots");N("\\dotsi","\\!\\cdots");N("\\dotsx","\\ldots\\,");N("\\DOTSI","\\relax");N("\\DOTSB","\\relax");N("\\DOTSX","\\relax");N("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");N("\\,","\\tmspace+{3mu}{.1667em}");N("\\thinspace","\\,");N("\\>","\\mskip{4mu}");N("\\:","\\tmspace+{4mu}{.2222em}");N("\\medspace","\\:");N("\\;","\\tmspace+{5mu}{.2777em}");N("\\thickspace","\\;");N("\\!","\\tmspace-{3mu}{.1667em}");N("\\negthinspace","\\!");N("\\negmedspace","\\tmspace-{4mu}{.2222em}");N("\\negthickspace","\\tmspace-{5mu}{.277em}");N("\\enspace","\\kern.5em ");N("\\enskip","\\hskip.5em\\relax");N("\\quad","\\hskip1em\\relax");N("\\qquad","\\hskip2em\\relax");N("\\tag","\\@ifstar\\tag@literal\\tag@paren");N("\\tag@paren","\\tag@literal{({#1})}");N("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new me("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});N("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");N("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");N("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");N("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");N("\\newline","\\\\\\relax");N("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Qk=we(Ci["Main-Regular"][84][1]-.7*Ci["Main-Regular"][65][1]);N("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Qk+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");N("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Qk+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");N("\\hspace","\\@ifstar\\@hspacer\\@hspace");N("\\@hspace","\\hskip #1\\relax");N("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");N("\\ordinarycolon",":");N("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");N("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');N("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');N("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');N("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');N("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');N("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');N("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');N("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');N("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');N("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');N("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');N("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');N("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');N("∷","\\dblcolon");N("∹","\\eqcolon");N("≔","\\coloneqq");N("≕","\\eqqcolon");N("⩴","\\Coloneqq");N("\\ratio","\\vcentcolon");N("\\coloncolon","\\dblcolon");N("\\colonequals","\\coloneqq");N("\\coloncolonequals","\\Coloneqq");N("\\equalscolon","\\eqqcolon");N("\\equalscoloncolon","\\Eqqcolon");N("\\colonminus","\\coloneq");N("\\coloncolonminus","\\Coloneq");N("\\minuscolon","\\eqcolon");N("\\minuscoloncolon","\\Eqcolon");N("\\coloncolonapprox","\\Colonapprox");N("\\coloncolonsim","\\Colonsim");N("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");N("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");N("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");N("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");N("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");N("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");N("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");N("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");N("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");N("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");N("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");N("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");N("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");N("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");N("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");N("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");N("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");N("\\nleqq","\\html@mathml{\\@nleqq}{≰}");N("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");N("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");N("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");N("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");N("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");N("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");N("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");N("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");N("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");N("\\imath","\\html@mathml{\\@imath}{ı}");N("\\jmath","\\html@mathml{\\@jmath}{ȷ}");N("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");N("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");N("⟦","\\llbracket");N("⟧","\\rrbracket");N("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");N("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");N("⦃","\\lBrace");N("⦄","\\rBrace");N("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");N("⦵","\\minuso");N("\\darr","\\downarrow");N("\\dArr","\\Downarrow");N("\\Darr","\\Downarrow");N("\\lang","\\langle");N("\\rang","\\rangle");N("\\uarr","\\uparrow");N("\\uArr","\\Uparrow");N("\\Uarr","\\Uparrow");N("\\N","\\mathbb{N}");N("\\R","\\mathbb{R}");N("\\Z","\\mathbb{Z}");N("\\alef","\\aleph");N("\\alefsym","\\aleph");N("\\Alpha","\\mathrm{A}");N("\\Beta","\\mathrm{B}");N("\\bull","\\bullet");N("\\Chi","\\mathrm{X}");N("\\clubs","\\clubsuit");N("\\cnums","\\mathbb{C}");N("\\Complex","\\mathbb{C}");N("\\Dagger","\\ddagger");N("\\diamonds","\\diamondsuit");N("\\empty","\\emptyset");N("\\Epsilon","\\mathrm{E}");N("\\Eta","\\mathrm{H}");N("\\exist","\\exists");N("\\harr","\\leftrightarrow");N("\\hArr","\\Leftrightarrow");N("\\Harr","\\Leftrightarrow");N("\\hearts","\\heartsuit");N("\\image","\\Im");N("\\infin","\\infty");N("\\Iota","\\mathrm{I}");N("\\isin","\\in");N("\\Kappa","\\mathrm{K}");N("\\larr","\\leftarrow");N("\\lArr","\\Leftarrow");N("\\Larr","\\Leftarrow");N("\\lrarr","\\leftrightarrow");N("\\lrArr","\\Leftrightarrow");N("\\Lrarr","\\Leftrightarrow");N("\\Mu","\\mathrm{M}");N("\\natnums","\\mathbb{N}");N("\\Nu","\\mathrm{N}");N("\\Omicron","\\mathrm{O}");N("\\plusmn","\\pm");N("\\rarr","\\rightarrow");N("\\rArr","\\Rightarrow");N("\\Rarr","\\Rightarrow");N("\\real","\\Re");N("\\reals","\\mathbb{R}");N("\\Reals","\\mathbb{R}");N("\\Rho","\\mathrm{P}");N("\\sdot","\\cdot");N("\\sect","\\S");N("\\spades","\\spadesuit");N("\\sub","\\subset");N("\\sube","\\subseteq");N("\\supe","\\supseteq");N("\\Tau","\\mathrm{T}");N("\\thetasym","\\vartheta");N("\\weierp","\\wp");N("\\Zeta","\\mathrm{Z}");N("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");N("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");N("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");N("\\bra","\\mathinner{\\langle{#1}|}");N("\\ket","\\mathinner{|{#1}\\rangle}");N("\\braket","\\mathinner{\\langle{#1}\\rangle}");N("\\Bra","\\left\\langle#1\\right|");N("\\Ket","\\left|#1\\right\\rangle");var Xk=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}};N("\\bra@ket",Xk(!1));N("\\bra@set",Xk(!0));N("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");N("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");N("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");N("\\angln","{\\angl n}");N("\\blue","\\textcolor{##6495ed}{#1}");N("\\orange","\\textcolor{##ffa500}{#1}");N("\\pink","\\textcolor{##ff00af}{#1}");N("\\red","\\textcolor{##df0030}{#1}");N("\\green","\\textcolor{##28ae7b}{#1}");N("\\gray","\\textcolor{gray}{#1}");N("\\purple","\\textcolor{##9d38bd}{#1}");N("\\blueA","\\textcolor{##ccfaff}{#1}");N("\\blueB","\\textcolor{##80f6ff}{#1}");N("\\blueC","\\textcolor{##63d9ea}{#1}");N("\\blueD","\\textcolor{##11accd}{#1}");N("\\blueE","\\textcolor{##0c7f99}{#1}");N("\\tealA","\\textcolor{##94fff5}{#1}");N("\\tealB","\\textcolor{##26edd5}{#1}");N("\\tealC","\\textcolor{##01d1c1}{#1}");N("\\tealD","\\textcolor{##01a995}{#1}");N("\\tealE","\\textcolor{##208170}{#1}");N("\\greenA","\\textcolor{##b6ffb0}{#1}");N("\\greenB","\\textcolor{##8af281}{#1}");N("\\greenC","\\textcolor{##74cf70}{#1}");N("\\greenD","\\textcolor{##1fab54}{#1}");N("\\greenE","\\textcolor{##0d923f}{#1}");N("\\goldA","\\textcolor{##ffd0a9}{#1}");N("\\goldB","\\textcolor{##ffbb71}{#1}");N("\\goldC","\\textcolor{##ff9c39}{#1}");N("\\goldD","\\textcolor{##e07d10}{#1}");N("\\goldE","\\textcolor{##a75a05}{#1}");N("\\redA","\\textcolor{##fca9a9}{#1}");N("\\redB","\\textcolor{##ff8482}{#1}");N("\\redC","\\textcolor{##f9685d}{#1}");N("\\redD","\\textcolor{##e84d39}{#1}");N("\\redE","\\textcolor{##bc2612}{#1}");N("\\maroonA","\\textcolor{##ffbde0}{#1}");N("\\maroonB","\\textcolor{##ff92c6}{#1}");N("\\maroonC","\\textcolor{##ed5fa6}{#1}");N("\\maroonD","\\textcolor{##ca337c}{#1}");N("\\maroonE","\\textcolor{##9e034e}{#1}");N("\\purpleA","\\textcolor{##ddd7ff}{#1}");N("\\purpleB","\\textcolor{##c6b9fc}{#1}");N("\\purpleC","\\textcolor{##aa87ff}{#1}");N("\\purpleD","\\textcolor{##7854ab}{#1}");N("\\purpleE","\\textcolor{##543b78}{#1}");N("\\mintA","\\textcolor{##f5f9e8}{#1}");N("\\mintB","\\textcolor{##edf2df}{#1}");N("\\mintC","\\textcolor{##e0e5cc}{#1}");N("\\grayA","\\textcolor{##f6f7f7}{#1}");N("\\grayB","\\textcolor{##f0f1f2}{#1}");N("\\grayC","\\textcolor{##e3e5e6}{#1}");N("\\grayD","\\textcolor{##d6d8da}{#1}");N("\\grayE","\\textcolor{##babec2}{#1}");N("\\grayF","\\textcolor{##888d93}{#1}");N("\\grayG","\\textcolor{##626569}{#1}");N("\\grayH","\\textcolor{##3b3e40}{#1}");N("\\grayI","\\textcolor{##21242c}{#1}");N("\\kaBlue","\\textcolor{##314453}{#1}");N("\\kaGreen","\\textcolor{##71B307}{#1}");var Jk={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class lF{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 oF(aF,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Tw(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("",rr.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 me("Extra }",s)}else if(s.text==="EOF")throw new me("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 me("The length of delimiters doesn't match the number of args!");for(var r=n[0],i=0;ithis.settings.maxExpand)throw new me("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 me("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 me("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 me("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 Tw(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)||Us.hasOwnProperty(t)||Rt.math.hasOwnProperty(t)||Rt.text.hasOwnProperty(t)||Jk.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Us.hasOwnProperty(t)&&!Us[t].primitive}}var Aw=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,bd=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Hp={"́":{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"}},Mw={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class lh{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 lF(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 me("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(lh.endOfExpression.indexOf(i.text)!==-1||n&&i.text===n||t&&Us[i.text]&&Us[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=Rt[this.mode][n].group,l=rr.range(t),c;if(YN.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&&(lk(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:rr.range(t),text:n};else return null;if(this.consume(),s)for(var d=0;dqg.renderToString(n.text,{...e,displayMode:n.displayMode})+(t?` `:"")}function vF(e,t){const n=e&&e.nonStandard,r=n?mF:pF;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 bF(e,t){return{name:"blockKatex",level:"block",tokenizer(n,r){const i=n.match(gF);if(i)return{type:"blockKatex",raw:i[0],text:i[2].trim(),displayMode:i[1].length===2}},renderer:t}}function wF(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} `})}}}let nn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function kF(e){return xv(e)}function xv(e){return Array.isArray(e)?xF(e):e instanceof RegExp?e:typeof e=="object"?SF(e):e}function xF(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function rx(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?rx(e.substring(0,e.length-1)):e.substr(~t+1)}var Vp=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,wd=class{static hasCaptures(e){return e===null?!1:(Vp.lastIndex=0,Vp.test(e))}static replaceCaptures(e,t,n){return e.replace(Vp,(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 ix(e,t){return et?1:0}function sx(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=>_F(e.parent,i.parentScopes));return r?new lx(r.fontStyle,r.foreground,r.background):null}},zp=class ff{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new ff(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&&!CF(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function CF(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var lx=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function EF(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 TF(m,g,i,l,c,u)}}return n}var TF=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}},Hn=(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))(Hn||{});function LF(e,t){e.sort((l,c)=>{let u=ix(l.scope,c.scope);return u!==0||(u=sx(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 IF(t),o=new lx(n,s.getId(r),s.getId(i)),a=new MF(new Bg(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)}},MF=class Ug{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(Ug._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 Ug(this._mainRule.clone(),Bg.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=Ar.getLanguageId(t),c=Ar.getTokenType(t),u=Ar.containsBalancedBrackets(t)?1:0,d=Ar.getFontStyle(t),f=Ar.getForeground(t),h=Ar.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 Wf(e,t){const n=[],r=DF(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(Pw(i)){const l=[];do l.push(i),i=r.next();while(Pw(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 Pw(e){return!!e&&!!e.match(/[\w\.:]+/)}function DF(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 ux(e){typeof e.dispose=="function"&&e.dispose()}var Zc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},OF=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},PF=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))}},RF=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Zc(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new PF;for(const n of e)NF(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Zc){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 NF(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 Zc?hf({baseGrammar:s,selfGrammar:i},r):Wg(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 Zc(a))}function Wg(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Gf([r],t,n)}}function hf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Gf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Gf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Gf(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?nx({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Gf(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const o=dx(s);switch(o.kind){case 0:hf({...t,selfGrammar:t.baseGrammar},n);break;case 1:hf(t,n);break;case 2:Wg(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?Wg(o.ruleName,l,n):hf(l,n)}else o.kind===4?n.add(new OF(o.scopeName,o.ruleName)):n.add(new Zc(o.scopeName));break}}}var $F=class{kind=0},FF=class{kind=1},HF=class{constructor(e){this.ruleName=e}kind=2},VF=class{constructor(e){this.scopeName=e}kind=3},zF=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function dx(e){if(e==="$base")return new $F;if(e==="$self")return new FF;const t=e.indexOf("#");if(t===-1)return new VF(e);if(t===0)return new HF(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new zF(n,r)}}var jF=/\\(\d+)/,Rw=/\\(\d+)/g,qF=-1,fx=-2;var Pu=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=wd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=wd.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${rx(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:wd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:wd.replaceCaptures(this._contentName,e,t)}},BF=class extends Pu{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!")}},UF=class extends Pu{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Yc(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),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 Qc,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Nw=class extends Pu{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 Qc,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Gg=class extends Pu{_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 Yc(i,this.id),this.beginCaptures=s,this._end=new Yc(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 Qc;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}},Kf=class extends Pu{_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 Yc(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new Yc(o,fx),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 Qc;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 Qc,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},hx=class Rn{static createCaptureRule(t,n,r,i,s){return t.registerRule(o=>new BF(n,o,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new UF(t.$vscodeTextmateLocation,t.id,t.name,t.match,Rn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=nx({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new Nw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Rn._compilePatterns(s,n,r))}return t.while?new Kf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Rn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Rn._compileCaptures(t.whileCaptures||t.captures,n,r),Rn._compilePatterns(t.patterns,n,r)):new Gg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Rn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Rn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Rn._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=Rn.getCompiledRuleId(t[o],n,r)),i[a]=Rn.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 Rw.lastIndex=0,this.source.replace(Rw,(i,s)=>ox(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 $w(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 $w(e,r,this._items.map(i=>i.ruleId))}},$w=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 jp(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Kg.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/},GF=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])=>ox(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])}},Fw=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function mx(e,t,n,r,i,s,o,a){const l=t.content.length;let c=!1,u=-1;if(o){const h=KF(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 Fw(i,!0);f()}return new Fw(i,!1);function f(){const h=ZF(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===qF){const y=i.getRule(e);s.produce(i,p[0].start),i=i.withContentNameScopesList(i.nameScopesList),wc(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,w=y.getName(t.content,p),E=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(m,r,u,p[0].end===l,null,E,E),y instanceof Gg){const x=y;wc(e,t,n,i,s,x.beginCaptures,p),s.produce(i,p[0].end),u=p[0].end;const k=x.getContentName(t.content,p),S=E.pushAttributed(k,e);if(i=i.withContentNameScopesList(S),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 Kf){const x=y;wc(e,t,n,i,s,x.beginCaptures,p),s.produce(i,p[0].end),u=p[0].end;const k=x.getContentName(t.content,p),S=E.pushAttributed(k,e);if(i=i.withContentNameScopesList(S),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(wc(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 KF(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 Kf&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:c,findOptions:u}=XF(l.rule,e,l.stack.endRule,n,r===o),d=c.findNextMatchSync(t,r,u);if(d){if(d.ruleId!==fx){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(l.stack,d.captureIndices[0].start),wc(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 ZF(e,t,n,r,i,s){const o=YF(e,t,n,r,i,s),a=e.getInjections();if(a.length===0)return o;const l=QF(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=w,l=v.captureIndices,c=v.ruleId,u=p.priority,a===i))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function gx(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function XF(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function wc(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),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,g,v),E=e.createOnigString(a.substring(0,h.end));mx(e,E,n&&h.start===0,h.start,w,i,!1,0),ux(E);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 JF(g,h.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var JF=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eH(e,t,n,r,i,s,o,a){return new nH(e,t,n,r,i,s,o,a)}function Hw(e,t,n,r,i){const s=Wf(t,Zf),o=hx.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 Zf(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var nH=class{constructor(e,t,n,r,i,s,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new WF(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Vw(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const c=Wf(l,Zf);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)Hw(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&&Hw(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]=Vw(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=hx.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Zg.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=gl.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=Dc.createRootAndLookUpScopeName(f,d,this):h=Dc.createRoot("unknown",d),t=new Zg(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 iH(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=mx(this,s,i,0,t,a,!0,r);return ux(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Vw(e,t){return e=kF(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 Dc=class wi{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=zp.push(i,s.scopeNames),r=new wi(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new wi(null,new zp(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new zp(null,t),o=r.themeProvider.themeMatch(s),a=wi.mergeAttributes(n,i,o);return new wi(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return wi.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),gl.set(t,n.languageId,n.tokenType,null,i,s,o)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return wi._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=wi._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=wi.mergeAttributes(t.tokenAttributes,i,o);return new wi(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}},Zg=class Eo{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 Eo(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Eo._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Dc.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(){Eo._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,o,a){return new Eo(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 Eo(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=Dc.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Eo(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Dc.fromExtension(r,n.contentNameScopesList))}},rH=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Wf(n,Zf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Wf(n,Zf).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}},iH=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=gl.set(r,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=gl.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)}},Yg=Zg.NULL;const aH=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ru{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ru.prototype.normal={};Ru.prototype.property={};Ru.prototype.space=void 0;function yx(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ru(n,r,t)}function Qg(e){return e.toLowerCase()}let lr=class{constructor(t,n){this.attribute=n,this.property=t}};lr.prototype.attribute="";lr.prototype.booleanish=!1;lr.prototype.boolean=!1;lr.prototype.commaOrSpaceSeparated=!1;lr.prototype.commaSeparated=!1;lr.prototype.defined=!1;lr.prototype.mustUseProperty=!1;lr.prototype.number=!1;lr.prototype.overloadedBoolean=!1;lr.prototype.property="";lr.prototype.spaceSeparated=!1;lr.prototype.space=void 0;let lH=0;const nt=da(),Jt=da(),Xg=da(),ge=da(),Ot=da(),Xa=da(),pr=da();function da(){return 2**++lH}const Jg=Object.freeze(Object.defineProperty({__proto__:null,boolean:nt,booleanish:Jt,commaOrSpaceSeparated:pr,commaSeparated:Xa,number:ge,overloadedBoolean:Xg,spaceSeparated:Ot},Symbol.toStringTag,{value:"Module"})),qp=Object.keys(Jg);class Sv extends lr{constructor(t,n,r,i){let s=-1;if(super(t,n),zw(this,"space",i),typeof r=="number")for(;++s4&&n.slice(0,4)==="data"&&fH.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(jw,mH);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!jw.test(s)){let o=s.replace(dH,pH);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Sv}return new i(r,t)}function pH(e){return"-"+e.toLowerCase()}function mH(e){return e.charAt(1).toUpperCase()}const gH=yx([vx,cH,kx,xx,Sx],"html"),_x=yx([vx,uH,kx,xx,Sx],"svg"),qw={}.hasOwnProperty;function yH(e,t){const n=t||{};function r(i,...s){let o=r.invalid;const a=r.handlers;if(i&&qw.call(i,e)){const l=String(i[e]);o=qw.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 vH=/["&'<>`]/g,bH=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wH=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,kH=/[|\\{}()[\]^$+*?.]/g,Bw=new WeakMap;function xH(e,t){if(e=e.replace(t.subset?SH(t.subset):vH,r),t.subset||t.escapeOnly)return e;return e.replace(bH,n).replace(wH,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 SH(e){let t=Bw.get(e);return t||(t=_H(e),Bw.set(e,t)),t}function _H(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:"€"},AH=["cent","copy","divide","gt","lt","not","para","times"],Cx={}.hasOwnProperty,e1={};let kd;for(kd in Bp)Cx.call(Bp,kd)&&(e1[Bp[kd]]=kd);const MH=/[^\dA-Za-z]/;function DH(e,t,n,r){const i=String.fromCharCode(e);if(Cx.call(e1,i)){const s=e1[i],o="&"+s;return n&&IH.includes(s)&&!AH.includes(s)&&(!r||t&&t!==61&&MH.test(String.fromCharCode(t)))?o:o+";"}return""}function OH(e,t,n){let r=EH(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=DH(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=LH(e,t,n.omitOptionalSemicolons);s.length|^->||--!>|"],NH=["<",">"];function $H(e,t,n,r){return r.settings.bogusComments?"":"";function i(s){return Ja(s,Object.assign({},r.settings.characterReferences,{subset:NH}))}}function FH(e,t,n,r){return""}function Uw(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 HH(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function VH(e){return e.join(" ").trim()}const zH=/[ \t\n\f\r]/g;function _v(e){return typeof e=="object"?e.type==="text"?Ww(e.value):!1:Ww(e)}function Ww(e){return e.replace(zH,"")===""}const mn=Tx(1),Ex=Tx(-1),jH=[];function Tx(e){return t;function t(n,r,i){const s=n?n.children:jH;let o=(r||0)+e,a=s[o];if(!i)for(;a&&_v(a);)o+=e,a=s[o];return a}}const qH={}.hasOwnProperty;function Lx(e){return t;function t(n,r,i){return qH.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const Cv=Lx({body:UH,caption:Up,colgroup:Up,dd:ZH,dt:KH,head:Up,html:BH,li:GH,optgroup:YH,option:QH,p:WH,rp:Gw,rt:Gw,tbody:JH,td:Kw,tfoot:eV,th:Kw,thead:XH,tr:tV});function Up(e,t,n){const r=mn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&_v(r.value.charAt(0)))}function BH(e,t,n){const r=mn(n,t);return!r||r.type!=="comment"}function UH(e,t,n){const r=mn(n,t);return!r||r.type!=="comment"}function WH(e,t,n){const r=mn(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 GH(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function KH(e,t,n){const r=mn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ZH(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Gw(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function YH(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function QH(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function XH(e,t,n){const r=mn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function JH(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function eV(e,t,n){return!mn(n,t)}function tV(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Kw(e,t,n){const r=mn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const nV=Lx({body:sV,colgroup:oV,head:iV,html:rV,tbody:aV});function rV(e){const t=mn(e,-1);return!t||t.type!=="comment"}function iV(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 sV(e){const t=mn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&_v(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function oV(e,t,n){const r=Ex(n,t),i=mn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Cv(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function aV(e,t,n){const r=Ex(n,t),i=mn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Cv(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const xd={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 lV(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=_x);const c=cV(r,e.properties),u=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,u&&(o=!1),(c||!s||!nV(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||!Cv(e,t,n))&&a.push(""),a.join("")}function cV(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=uV(e,i,t[i]);s&&n.push(s)}}for(;++rUw(n,e.alternative)&&(o=e.alternative),a=o+Ja(n,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?xd.single:xd.double)[i][s],attribute:!0}))+o),l+(a&&"="+a))}const dV=["<","&"];function Ix(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Ja(e.value,Object.assign({},r.settings.characterReferences,{subset:dV}))}function fV(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Ix(e,t,n,r)}function hV(e,t,n,r){return r.all(e)}const pV=yH("type",{invalid:mV,unknown:gV,handlers:{comment:$H,doctype:FH,element:lV,raw:fV,root:hV,text:Ix}});function mV(e){throw new Error("Expected node, not `"+e+"`")}function gV(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const yV={},vV={},bV=[];function Mi(e,t){const n=t||yV,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:wV,all:kV,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||aH,characterReferences:n.characterReferences||vV,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?_x:gH,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function wV(e,t,n){return pV(e,t,n,this)}function kV(e){const t=[],n=e&&e.children||bV;let r=-1;for(;++rt.default||t)}function Ev(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Mx(e){return e==="ansi"||Ev(e)}function Tv(e){return e==="none"}function Dx(e){return Tv(e)}function Ox(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function ch(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let s=0;si);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=i,o=0;for(const a of t){if(sn&&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?CV(i,s):i})):e}function TV(e,t,n,r,i="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(u=>Qf(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&&_V.includes(f))if(r===Lv&&o.length>1){const p=t.findIndex(v=>v==="light"),m=t.findIndex(v=>v==="dark");if(p===-1||m===-1)throw new nn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=o[p][f]||"inherit",y=o[m][f]||"inherit";l[f]=`light-dark(${g}, ${y})`,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 Qf(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Hn.Italic&&(t["font-style"]="italic"),e.fontStyle&Hn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Hn.Underline&&n.push("underline"),e.fontStyle&Hn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function t1(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Px=new WeakMap;function uh(e,t){Px.set(e,t)}function Xc(e){return Px.get(e)}class Pl{_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 Pl(Object.fromEntries(xV(n).map(r=>[r,Yg])),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 LV(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function LV(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 IV(e,t){if(!(e instanceof Pl))throw new nn("Invalid grammar state");return e.getInternalStack(t)}function AV(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new nn(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...i.indexToPos(o),offset:o}}else{const a=i.lines[o.line];if(a===void 0)throw new nn(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${i.lines.length}`);let l=o.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new nn(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:l,offset:i.posToIndex(o.line,l)}}};const i=SV(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:r(o.start),end:r(o.end)}));MV(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const i=t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return EV(n,i)},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=Array.from(n.children).filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==r.converter.lines.length)throw new nn(`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 w=0;wm);return u.tagName=d.tagName||"span",u.properties={...u.properties,...h,class:u.properties.class},d.properties?.class&&Ox(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 MV(e){for(let t=0;tn.end.offset)throw new nn(`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 RV(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)Wp[r]&&t.push({type:"setDecoration",value:Wp[r]});else if(r<=29){const i=Wp[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:Do[r-30]}});else if(r===38){const i=Zw(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:Do[r-40]}});else if(r===48){const i=Zw(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:Do[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Do[r-100+8]}})}return t}function NV(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const o=PV(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=RV(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 c=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`,u=e.colors?.[c];return[l,u||HV[l]]})),o=FV(s),a=NV();return i.map(l=>a.parse(l[0]).map(c=>{let u,d;c.decorations.has("reverse")?(u=c.background?o.value(c.background):e.bg,d=c.foreground?o.value(c.foreground):e.fg):(u=c.foreground?o.value(c.foreground):e.fg,d=c.background?o.value(c.background):void 0),u=Gs(u,r),d=Gs(d,r),c.decorations.has("dim")&&(u=zV(u));let f=Hn.None;return c.decorations.has("bold")&&(f|=Hn.Bold),c.decorations.has("italic")&&(f|=Hn.Italic),c.decorations.has("underline")&&(f|=Hn.Underline),c.decorations.has("strikethrough")&&(f|=Hn.Strikethrough),{content:c.value,offset:l[1],color:u,bgColor:d,fontStyle:f}}))}function zV(e){const t=e.match(/#([0-9a-f]{3,8})/i);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],l=Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${s}${s}${o}${o}${l}`}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(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Iv(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(Ev(i)||Tv(r))return ch(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:o}=e.setTheme(r);if(i==="ansi")return VV(s,t,n);const a=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new nn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new nn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return qV(t,a,s,o,n)}function jV(...e){if(e.length===2)return Xc(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(Ev(i)||Tv(s))throw new nn("Plain language does not have grammar state");if(i==="ansi")throw new nn("ANSI language does not have grammar state");const{theme:o,colorMap:a}=t.setTheme(s),l=t.getLanguage(i);return new Pl(Av(n,l,o,a,r).stateStack,l.name,o.name)}function qV(e,t,n,r,i){const s=Av(e,t,n,r,i),o=new Pl(s.stateStack,t.name,n.name);return uh(s.tokens,o),s.tokens}function Av(e,t,n,r,i){const s=Yf(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=ch(e);let c=i.grammarState?IV(i.grammarState,n.name)??Yg:i.grammarContextCode!=null?Av(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Yg,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 w=t.tokenizeLine2(p,c,a),E=w.tokens.length/2;for(let x=0;xM.trim());break;case"object":C=L.scope;break;default:continue}H.push({settings:L,selectors:C.map(M=>M.split(/ /))})}z.explanation=[];let O=0;for(;k+O({scopeName:t}))}function UV(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)Yw(e[r],n[i])&&(r-=1),i-=1;return r===-1}function GV(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const o of i)if(WV(o,t,n)){r.push(s);break}return r}function Nx(e,t,n){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=r.map(l=>{const c=Iv(e,t,{...n,theme:l.theme}),u=Xc(c),d=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:c,state:u,theme:d}}),s=KV(...i.map(l=>l.tokens)),o=s[0].map((l,c)=>l.map((u,d)=>{const f={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=u.explanation),s.forEach((h,p)=>{const{content:m,explanation:g,offset:y,...v}=h[c][d];f.variants[r[p].color]=v}),f})),a=i[0].state?new Pl(Object.fromEntries(i.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;return a&&uh(o,a),o}function KV(...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;cy[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 nn("`themes` option must not be empty");const h=Nx(e,t,n);if(l=Xc(h),c&&Lv!==c&&!f.find(y=>y.color===c))throw new nn(`\`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=>TV(v,m,u,c,d))),l&&uh(s,l);const g=f.map(y=>Yf(y.theme,n));i=Qw(f,p,g,u,c,"fg",d),r=Qw(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=Yf(n.theme,n);s=Iv(e,t,n);const u=e.getTheme(n.theme);r=Gs(u.bg,c),i=Gs(u.fg,c),o=u.name,l=Xc(s)}else throw new nn("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:a,grammarState:l}}function Qw(e,t,n,r,i,s,o){return e.map((a,l)=>{const c=Gs(t[l][s],n[l])||"inherit",u=`${r+a.color}${s==="bg"?"-bg":""}:${c}`;if(l===0&&i){if(i===Lv&&e.length>1){const d=e.findIndex(m=>m.color==="light"),f=e.findIndex(m=>m.color==="dark");if(d===-1||f===-1)throw new nn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=Gs(t[d][s],n[d])||"inherit",p=Gs(t[f][s],n[f])||"inherit";return`light-dark(${h}, ${p});${u}`}return c}return o==="css-vars"?u:null}).filter(a=>!!a).join(";")}function e0(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>e0(e,i,s),codeToTokens:(i,s)=>Jf(e,i,s)}){let i=t;for(const p of Xf(n))i=p.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:c,grammarState:u}=Jf(e,i,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?s=YV(s):d==="never"&&(s=QV(s)),f&&(s=XV(s));const h={...r,get source(){return i}};for(const p of Xf(n))s=p.tokens?.call(h,s)||s;return ZV(s,{...n,fg:o,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},h,u)}function ZV(e,t,n,r=Xc(e)){const i=Xf(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:[]},d={type:"element",tagName:"code",properties:{},children:s};const f=[],h={...n,structure:a,addClassToHast:Ox,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 w of m){let E={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]};const x=t1(w.htmlStyle||Qf(w));x&&(E.properties.style=x);for(const k of i)E=k?.span?.call(h,E,g+1,v,y,w)||E;a==="inline"?o.children.push(E):a==="classic"&&y.children.push(E),v+=w.content.length}if(a==="classic"){for(const w of i)y=w?.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 w of o.children)w.type==="element"&&w.tagName==="br"?(m.push(g),g={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(w.type==="element"||w.type==="text")&&g.children.push(w);m.push(g);let v={type:"element",tagName:"code",properties:{},children:m};for(const w of i)v=w?.code?.call(h,v)||v;o.children=[];for(let w=0;w0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const E=v.children[w];E.type==="element"&&o.children.push(...E.children)}}let p=o;for(const m of i)p=m?.root?.call(h,p)||p;return r&&uh(p,r),p}function YV(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((s,o)=>{const l=!(s.fontStyle&&(s.fontStyle&Hn.Underline||s.fontStyle&Hn.Strikethrough));l&&s.content.match(/^\s+$/)&&t[o+1]?(i===void 0&&(i=s.offset),r+=s.content):r?(l?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 QV(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);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 XV(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],s=t1(i.htmlStyle||Qf(i)),o=t1(r.htmlStyle||Qf(r)),a=i.fontStyle&&(i.fontStyle&Hn.Underline||i.fontStyle&Hn.Strikethrough),l=r.fontStyle&&(r.fontStyle&Hn.Underline||r.fontStyle&Hn.Strikethrough);!a&&!l&&s===o?i.content+=r.content:n.push({...r})}return n})}const JV=Mi;function ez(e,t,n){const r={meta:{},options:n,codeToHast:(s,o)=>e0(e,s,o),codeToTokens:(s,o)=>Jf(e,s,o)};let i=JV(e0(e,t,n,r));for(const s of Xf(n))i=s.postprocess?.call(r,i,n)||i;return i}const Xw={light:"#333333",dark:"#bbbbbb"},Jw={light:"#fffffe",dark:"#1e1e1e"},e6="__shiki_resolved";function dh(e){if(e?.[e6])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const a=t.settings?t.settings.find(l=>!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"?Xw.light:Xw.dark),n||(n=t.type==="light"?Jw.light:Jw.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,e6,{enumerable:!1,writable:!1,value:!0}),t}async function $x(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Mx(t)).map(async t=>await Ax(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Fx(e){return(await Promise.all(e.map(async n=>Dx(n)?null:dh(await Ax(n))))).filter(n=>!!n)}let tz=3;function nz(e,t=3){t>tz||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Ga=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Hx(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 Ga(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class rz extends oH{constructor(t,n,r,i={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=i,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=dh(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Uf.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=Hx(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,s])=>!s);if(r.length){const i=n.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(l=>r.map(([c])=>c).includes(l)):!1).filter(s=>!r.includes(s));throw new Ga(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${i.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[i,s]of n)this._resolver.addLanguage(s);for(const[i,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}}class iz{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let oc=0;function sz(e){oc+=1,e.warnings!==!1&&oc>=10&&oc%10===0&&console.warn(`[Shiki] ${oc} 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 Ga("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(dh),i=new iz(e.engine,n),s=new rz(i,r,n,e.langAlias);let o;function a(w){return Hx(w,e.langAlias)}function l(w){y();const E=s.getGrammar(typeof w=="string"?w:w.name);if(!E)throw new Ga(`Language \`${w}\` not found, you may need to load it first`);return E}function c(w){if(w==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const E=s.getTheme(w);if(!E)throw new Ga(`Theme \`${w}\` not found, you may need to load it first`);return E}function u(w){y();const E=c(w);o!==w&&(s.setTheme(E),o=w);const x=s.getColorMap();return{theme:E,colorMap:x}}function d(){return y(),s.getLoadedThemes()}function f(){return y(),s.getLoadedLanguages()}function h(...w){y(),s.loadLanguages(w.flat(1))}async function p(...w){return h(await $x(w))}function m(...w){y();for(const E of w.flat(1))s.loadTheme(E)}async function g(...w){return y(),m(await Fx(w))}function y(){if(t)throw new Ga("Shiki instance has been disposed")}function v(){t||(t=!0,s.dispose(),oc-=1)}return{setTheme:u,getTheme:c,getLanguage:l,getLoadedThemes:d,getLoadedLanguages:f,resolveLangAlias:a,loadLanguage:p,loadLanguageSync:h,loadTheme:g,loadThemeSync:m,dispose:v,[Symbol.dispose]:v}}async function oz(e){e.engine||nz("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Fx(e.themes||[]),$x(e.langs||[]),e.engine]);return sz({...e,themes:t,langs:n,engine:r})}async function az(e){const t=await oz(e);return{getLastGrammarState:(...n)=>jV(t,...n),codeToTokensBase:(n,r)=>Iv(t,n,r),codeToTokensWithThemes:(n,r)=>Nx(t,n,r),codeToTokens:(n,r)=>Jf(t,n,r),codeToHast:(n,r)=>e0(t,n,r),codeToHtml:(n,r)=>ez(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function lz(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,Mx(d))return[];const f=t[d];if(!f)throw new nn(`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(Dx(d))return"none";if(typeof d=="string"){const f=n[d];if(!f)throw new nn(`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 az({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}const Vx=[{id:"abap",name:"ABAP",import:(()=>P(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>P(()=>import("./actionscript-3-CfeIJUat.js"),[]))},{id:"ada",name:"Ada",import:(()=>P(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>P(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>P(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>P(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>P(()=>import("./apex-DDbsPZ6N.js"),[]))},{id:"apl",name:"APL",import:(()=>P(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>P(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>P(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>P(()=>import("./asciidoc-Dv7Oe6Be.js"),[]))},{id:"asm",name:"Assembly",import:(()=>P(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>P(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>P(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>P(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>P(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>P(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>P(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>P(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>P(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"blade",name:"Blade",import:(()=>P(()=>import("./blade-DVc8C-J4.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>P(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>P(()=>import("./c-BIGW1oBm.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>P(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>P(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>P(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>P(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>P(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>P(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>P(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>P(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>P(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>P(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>P(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>P(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>P(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>P(()=>import("./csharp-K5feNrxe.js"),[]))},{id:"css",name:"CSS",import:(()=>P(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>P(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>P(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>P(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>P(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>P(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>P(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>P(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>P(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>P(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>P(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>P(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>P(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>P(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>P(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>P(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>P(()=>import("./erb-BOJIQeun.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:(()=>P(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>P(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>P(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>P(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>P(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>P(()=>import("./fortran-free-form-D22FLkUw.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>P(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",import:(()=>P(()=>import("./gdresource-B7Tvp0Sc.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",import:(()=>P(()=>import("./gdscript-DTMYz4Jt.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>P(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>P(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>P(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>P(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>P(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>P(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>P(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>P(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>P(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gnuplot",name:"Gnuplot",import:(()=>P(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>P(()=>import("./go-Dn2_MT6a.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>P(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>P(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>P(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>P(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>P(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>P(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>P(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>P(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>P(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>P(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>P(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>P(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>P(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>P(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>P(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>P(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>P(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>P(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>P(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>P(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>P(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>P(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>P(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>P(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>P(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>P(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>P(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>P(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>P(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>P(()=>import("./julia-C8NyazO9.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"kdl",name:"KDL",import:(()=>P(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>P(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>P(()=>import("./kusto-BvAqAH-y.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>P(()=>import("./latex-BdAV_C_H.js"),__vite__mapDeps([63,64,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>P(()=>import("./lean-Bc6EcWN3.js"),[]))},{id:"less",name:"Less",import:(()=>P(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>P(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([65,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>P(()=>import("./llvm-BtvRca6l.js"),[]))},{id:"log",name:"Log file",import:(()=>P(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>P(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>P(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>P(()=>import("./luau-CXu1NL6O.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>P(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>P(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>P(()=>import("./marko-CPi9NSCl.js"),__vite__mapDeps([66,3,67,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>P(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>P(()=>import("./mdc-DUICxH0z.js"),__vite__mapDeps([68,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>P(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>P(()=>import("./mermaid-DKYwYmdq.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>P(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>P(()=>import("./mojo-1DNp92w6.js"),[]))},{id:"move",name:"Move",import:(()=>P(()=>import("./move-Bu9oaDYs.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>P(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>P(()=>import("./nextflow-BrzmwbiE.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>P(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([69,37,26])))},{id:"nim",name:"Nim",import:(()=>P(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([70,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>P(()=>import("./nix-c8nO5XWb.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>P(()=>import("./nushell-C-sUppwS.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>P(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>P(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>P(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>P(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>P(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>P(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([71,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>P(()=>import("./php-CDn_0X-4.js"),__vite__mapDeps([72,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>P(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>P(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>P(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>P(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>P(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>P(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>P(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>P(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>P(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>P(()=>import("./proto-DyJlTyXw.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>P(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([73,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>P(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>P(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>P(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>P(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([74,2])))},{id:"qmldir",name:"QML Directory",import:(()=>P(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>P(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>P(()=>import("./r-DiinP2Uv.js"),[]))},{id:"racket",name:"Racket",import:(()=>P(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>P(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>P(()=>import("./razor-CE9lU5zL.js"),__vite__mapDeps([75,1,2,3,76])))},{id:"reg",name:"Windows Registry Script",import:(()=>P(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>P(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>P(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>P(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>P(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>P(()=>import("./rst-B0xPkSld.js"),__vite__mapDeps([77,15,1,2,3,23,24,25,26,16,20,28,38,78,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>P(()=>import("./ruby-BvKwtOVI.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:(()=>P(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>P(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([79,16])))},{id:"sass",name:"Sass",import:(()=>P(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>P(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>P(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>P(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>P(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>P(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([80,81])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>P(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>P(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([82,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>P(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>P(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>P(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([83,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>P(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([84,85])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>P(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>P(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>P(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>P(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([86,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>P(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"svelte",name:"Svelte",import:(()=>P(()=>import("./svelte-3Dk4HxPD.js"),__vite__mapDeps([87,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>P(()=>import("./swift-Dg5xB15N.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>P(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>P(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>P(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>P(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>P(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>P(()=>import("./templ-W15q3VgB.js"),__vite__mapDeps([88,89,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>P(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>P(()=>import("./tex-CxkMU7Pf.js"),__vite__mapDeps([64,62])))},{id:"toml",name:"TOML",import:(()=>P(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>P(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([90,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>P(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>P(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>P(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>P(()=>import("./twig-CO9l9SDP.js"),__vite__mapDeps([91,3,2,5,72,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:(()=>P(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>P(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>P(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>P(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>P(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>P(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>P(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>P(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>P(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>P(()=>import("./vue-DnHKYNfI.js"),__vite__mapDeps([92,3,2,11,9,15,1])))},{id:"vue-html",name:"Vue HTML",import:(()=>P(()=>import("./vue-html-CChd_i61.js"),__vite__mapDeps([93,92,3,2,11,9,15,1])))},{id:"vue-vine",name:"Vue Vine",import:(()=>P(()=>import("./vue-vine-8moa0y9V.js"),__vite__mapDeps([94,3,5,67,95,12,92,2,11,9,15,1])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>P(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>P(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>P(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>P(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>P(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>P(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>P(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>P(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>P(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([96,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>P(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>P(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>P(()=>import("./zig-VOosw3JB.js"),[]))}],cz=Object.fromEntries(Vx.map(e=>[e.id,e.import])),uz=Object.fromEntries(Vx.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Jc={...cz,...uz},dz=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>P(()=>import("./andromeeda-C-Jbm3Hp.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>P(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>P(()=>import("./ayu-dark-Cv9koXgw.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>P(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>P(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>P(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>P(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>P(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>P(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>P(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>P(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>P(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>P(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>P(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>P(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>P(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>P(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>P(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>P(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>P(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>P(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>P(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>P(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>P(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>P(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>P(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>P(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>P(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>P(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>P(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>P(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>P(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>P(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>P(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>P(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>P(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>P(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>P(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>P(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>P(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>P(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>P(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>P(()=>import("./one-light-PoHY5YXO.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>P(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>P(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>P(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>P(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>P(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>P(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>P(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>P(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>P(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>P(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>P(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>P(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>P(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>P(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>P(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>P(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>P(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],zx=Object.fromEntries(dz.map(e=>[e.id,e.import]));class Mv extends Error{constructor(t){super(t),this.name="ShikiError"}}function fz(){return 2147483648}function hz(){return typeof performance<"u"?performance.now():Date.now()}const pz=(e,t)=>e+(t-e%t)%t;async function mz(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=fz();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,pz(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|k&1023)}}return v}function u(h,p){return h?c(r.HEAPU8,h,p):""}const d={emscripten_get_now:hz,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 gz=Object.defineProperty,yz=(e,t,n)=>t in e?gz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,un=(e,t,n)=>yz(e,typeof t!="symbol"?t+"":t,n);let vn=null;function vz(e){throw new Mv(e.UTF8ToString(e.getLastOnigError()))}class fh{constructor(t){un(this,"utf16Length"),un(this,"utf8Length"),un(this,"utf16Value"),un(this,"utf8Value"),un(this,"utf16OffsetToUtf8"),un(this,"utf8OffsetToUtf16");const n=t.length,r=fh._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 hh=class ki{constructor(t){if(un(this,"id",++ki.LAST_ID),un(this,"_onigBinding"),un(this,"content"),un(this,"utf16Length"),un(this,"utf8Length"),un(this,"utf16OffsetToUtf8"),un(this,"utf8OffsetToUtf16"),un(this,"ptr"),!vn)throw new Mv("Must invoke loadWasm first.");this._onigBinding=vn,this.content=t;const n=new fh(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!ki._sharedPtrInUse?(ki._sharedPtr||(ki._sharedPtr=vn.omalloc(1e4)),ki._sharedPtrInUse=!0,vn.HEAPU8.set(n.utf8Value,ki._sharedPtr),this.ptr=ki._sharedPtr):this.ptr=n.createString(vn)}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===ki._sharedPtr?ki._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};un(hh,"LAST_ID",0);un(hh,"_sharedPtr",0);un(hh,"_sharedPtrInUse",!1);let jx=hh;class bz{constructor(t){if(un(this,"_onigBinding"),un(this,"_ptr"),!vn)throw new Mv("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)),wz(r)?r=await r.instantiator(n):kz(r)?r=await r.default(n):(xz(r)&&(r=r.data),Sz(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Ez(r)(n):r=await Tz(r)(n):_z(r)?r=await Gp(r)(n):r instanceof WebAssembly.Module?r=await Gp(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Gp(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Sd=t(),Sd}function Gp(e){return t=>WebAssembly.instantiate(e,t)}function Ez(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Tz(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function qx(e){return e&&await Cz(e),{createScanner(t){return new bz(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new jx(t)}}}const Lz=lz({langs:Jc,themes:zx,engine:()=>qx(P(()=>import("./wasm-CG6Dc4jp.js"),[]))});function Rl(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Iz(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Dv=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),xn=String.raw;function Nl(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Bx=xn`\[\^?`,Ux=`c.? | C(?:-.?)?|${xn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${xn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${xn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${xn`o\{[^\}]*\}?`}|${xn`\d{1,3}`}`,Ov=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,_d=new RegExp(xn` \\ (?: ${Ux} | [gk]<[^>]*>? | [gk]'[^']*'? | . ) | \( (?: \? (?: [:=!>({] | <[=!] | <[^>]*> | '[^']*' | ~\|? | #(?:[^)\\]|\\.?)* | [^:)]*[:)] )? | \*[^\)]*\)? )? | (?:${Ov.source})+ | ${Bx} | . `.replace(/\s+/g,""),"gsu"),Kp=new RegExp(xn` \\ (?: ${Ux} | . ) | \[:(?:\^?\p{Alpha}+|\^):\] | ${Bx} | && | . `.replace(/\s+/g,""),"gsu");function Az(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=Zz(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(_d.lastIndex=0;a=_d.exec(e);){const d=Mz(s,e,a[0],_d.lastIndex);d.tokens?o.push(...d.tokens):d.token&&o.push(d.token),d.lastIndex!==void 0&&(_d.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"?Qz(d,u):d).flat(),flags:r}}function Mz(e,t,n,r){const[i,s]=n;if(n==="["||n==="[^"){const o=Dz(t,n,r);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:t6(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:jz(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Gx(n)}}if(s==="K")return{token:Kx("keep",n)};if(s==="N"||s==="R")return{token:Oo("newline",n,{negate:s==="N"})};if(s==="O")return{token:Oo("any",n)};if(s==="X")return{token:Oo("text_segment",n)};const o=Wx(n,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(i==="("){if(s==="*")return{token:Wz(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:Uz(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Va("group",n)};if(n==="(?>")return{token:Va("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Va("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Va("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:Hz(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:Oo("dot",n)};if(n==="^"||n==="$"){const o=e.singleline?{"^":xn`\A`,$:xn`\Z`}[n]:n;return{token:t6(o,n)}}return n==="|"?{token:Pz(n)}:Ov.test(n)?{tokens:Xz(n)}:{token:ss(Rl(n),n)}}function Dz(e,t,n){const r=[n6(t[1]==="^",t)];let i=1,s;for(Kp.lastIndex=n;s=Kp.exec(e);){const o=s[0];if(o[0]==="["&&o[1]!==":")i++,r.push(n6(o[1]==="^",o));else if(o==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(ss(93,o));else if(i--,r.push(Rz(o)),!i)break}else{const a=Oz(o);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:Kp.lastIndex||e.length}}function Oz(e){if(e[0]==="\\")return Wx(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?\^?)(?[a-z]+):\]/.exec(e);if(!t||!Dv.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Oo("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?Nz(e):e==="&&"?$z(e):ss(Rl(e),e)}function Wx(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Bz(e);if("dDhHsSwW".includes(n))return Gz(e);if(e.startsWith(xn`\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 Kz(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 ss(Rl(o),a)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return ss(Yz(e),e);if(r6.has(n))return ss(r6.get(n),e);if(/\d/.test(n))return Fz(t,e);if(e==="\\")throw new Error(xn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ss(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Pz(e){return{type:"Alternator",raw:e}}function t6(e,t){return{type:"Assertion",kind:e,raw:t}}function Gx(e){return{type:"Backreference",raw:e}}function ss(e,t){return{type:"Character",value:e,raw:t}}function Rz(e){return{type:"CharacterClassClose",raw:e}}function Nz(e){return{type:"CharacterClassHyphen",raw:e}}function $z(e){return{type:"CharacterClassIntersector",raw:e}}function n6(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Oo(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function Kx(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Nl(n.flags),raw:t}}function Fz(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Hz(e){return{type:"GroupClose",raw:e}}function Va(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Vz(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function zz(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function jz(e){return{type:"Subroutine",raw:e}}const qz=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),r6=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Bz(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 ss(Rl(t.toUpperCase())-64,e)}function Uz(e,t){let{on:n,off:r}=/^\(\?(?[imx]*)(?:-(?[-imx]*))?/.exec(e).groups;r??="";const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),s=s6(n),o=s6(r),a={};if(s&&(a.enable=s),o&&(a.disable=o),e.endsWith(")"))return t.replaceCurrentModX(i),Kx("flags",e,{flags:a});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Va("group",e,{...(s||o)&&{flags:a}});throw new Error(`Unexpected flag modifier "${e}"`)}function Wz(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=qz.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 Vz(c,r??null,i?.split(",")??null,e)}function i6(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 zz(t,n,r,e)}function Gz(e){const t=e[1].toLowerCase();return Oo({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Kz(e){const{p:t,neg:n,value:r}=/^\\(?

    [pP])\{(?\^?)(?[^}]+)/.exec(e).groups;return Oo("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function s6(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 Zz(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 Qz(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[Gx(n)];const s=[],o=i.match(/^[0-7]+|\d/g);for(let a=0;a127)throw new Error(xn`Octal encoded byte above 177 unsupported "${n}"`)}else c=Rl(l);s.push(ss(c,(a===0?"\\":"")+l))}return s}function Xz(e){const t=[],n=new RegExp(Ov,"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(i6(i.slice(0,-1)));continue}}}t.push(i6(i))}return t}function Zx(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 Jz(e){return ej.has(e.type)}const ej=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Yx(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Az(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 Wo();case"Assertion":return tj(p);case"Backreference":return nj(p,s);case"Character":return ph(p.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return rj(p,s,h);case"CharacterClassOpen":return ij(p,s,h);case"CharacterSet":return sj(p,s);case"Directive":return dj(p.kind,{flags:p.flags});case"GroupOpen":return oj(p,s,h);case"NamedCallout":return hj(p.kind,p.tag,p.arguments);case"Quantifier":return aj(p,s);case"Subroutine":return lj(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=mj(fj(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(xn`Subroutine uses a duplicate group name "\g<${f}>"`);u.get(f)[0].isSubroutined=!0}else throw new Error(xn`Subroutine uses a group name that's not defined "\g<${f}>"`);return o}function tj({kind:e}){return n1(Nl({"^":"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===xn`\B`||e===xn`\Y`})}function nj({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,r1(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 r1(r)}return i(+r)}function rj(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(),uj(o,l);throw new Error("Invalid character class range")}return ph(Rl("-"))}function ij({negate:e},t,n){const{tokens:r,walk:i}=t,s=r[t.nextIndex],o=[pf()];let a=l6(s);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")o.push(pf()),t.nextIndex++;else{const c=o.at(-1);c.body.push(i(c,n))}a=l6(r[t.nextIndex],s)}const l=pf({negate:e});return o.length===1?l.body=o[0].body:(l.kind="intersection",l.body=o.map(c=>c.body.length===1?c.body[0]:c)),t.nextIndex++,l}function sj({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o}=r;if(e==="property"){const a=mh(n);if(Dv.has(a)&&!o?.has(a))e="posix",n=a;else return za(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o})}return e==="posix"?pj(n,{negate:t}):i1(e,{negate:t})}function oj(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:o,walk:a}=t,l=gj(e),c=l.type==="AbsenceFunction",u=a6(l),d=u&&l.negate;if(l.type==="CapturingGroup"&&(i.push(l),l.name&&Iz(s,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=c6(r[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")l.body.push(Wo()),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(o6(p)||p.type==="CapturingGroup")throw new Error(m)}else if(o6(p)||a6(p)&&p.negate)throw new Error(m)}}f=c6(r[t.nextIndex])}return t.nextIndex++,l}function aj({kind:e,min:t,max:n},r){const i=r.parent,s=i.body.at(-1);if(!s||!Jz(s))throw new Error("Quantifier requires a repeatable token");const o=Xx(e,t,n,s);return i.body.pop(),o}function lj({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=Jx(i);return r.push(o),o}function cj(e,t){return{type:"AbsenceFunction",kind:e,body:Nu(t?.body)}}function Wo(e){return{type:"Alternative",body:e9(e?.body)}}function n1(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function r1(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function Qx(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!yj(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:Nu(t?.body)}}function ph(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 pf(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:e9(e?.body)}}function uj(e,t){if(t.valuen)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function mj(e,t){return{type:"Regex",body:Nu(t?.body),flags:e}}function Jx(e){return{type:"Subroutine",ref:e}}function za(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(mh(e));if(!r){if(n.normalizeUnknownPropertyNames)r=vj(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(xn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function gj({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return cj("repeater");case"atomic":return ii({atomic:!0});case"capturing":return Qx(i,{name:n});case"group":return ii({flags:e});case"lookahead":case"lookbehind":return Io({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Nu(e){if(e===void 0)e=[Wo()];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 e9(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 o6(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function a6(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function yj(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function vj(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 mh(e){return e.replace(/[- _]+/g,"").toLowerCase()}function l6(e,t){return Nl(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function c6(e){return Nl(e,"Unclosed group")}function Oc(e,t,n=null){function r(s,o){for(let a=0;aA-Za-z\-]|<[=!]|\(DEFINE\))`;function wj(e,t){for(let n=0;n=t&&e[n]++}function kj(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const $r=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Pv(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===$r.DEFAULT==!o)){n instanceof Function?a+=n(l,{context:o?$r.CHAR_CLASS:$r.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 t9(e,t,n,r){Pv(e,t,n,r)}function xj(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===$r.DEFAULT==!s))return o;a==="["?s++:a==="]"&&s&&s--,i.lastIndex==o.index&&i.lastIndex++}return null}function Ed(e,t,n){return!!xj(e,t,0,n)}function Sj(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 u6=new RegExp(String.raw`(?${bj})|(?\((?:\?<[^>]+>)?)|\\?.`,"gsu");function _j(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(u6.lastIndex=Number.isNaN(u)?0:u+s.length;m=u6.exec(e);){const{0:g,index:y,groups:{capturingStart:v,noncapturingStart:w}}=m;if(g==="[")f++;else if(f)g==="]"&&f--;else if(g===i&&!p)u=y,p=!0;else if(p&&w)h++;else if(v)p?h++:(l++,o.push(l+c));else if(g===")"&&p){if(!h){c++;const E=l+c;if(e=`${e.slice(0,u)}${s}${e.slice(u+i.length,y)}))<$$${E}>)${e.slice(y+1)}`,d=!0,a.push(E),wj(n,E),r.size){const x=new Map;r.forEach((k,S)=>{x.set(S>=E?S+1:S,k.map(I=>I>=E?I+1:I))}),r=x}break}h--}}}while(d);return n.push(...a),e=Pv(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}`},$r.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const n9=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Zp=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\) ))? | (?${n9})(?[?+]?)(?[?*+\{]?) | \\?. `.replace(/\s+/g,""),"gsu");function Cj(e){if(!new RegExp(`${n9}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",s=0,o;for(Zp.lastIndex=0;o=Zp.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=kj(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}Zp.lastIndex+=f}else a[0]==="("?t.push(l):a===")"&&(n=t.length?t.pop():null);i=a}return{pattern:e}}const Pr=String.raw,Ej=Pr`\\g<(?[^>&]+)&R=(?[^>]+)>`,s1=Pr`\(\?R=(?[^\)]+)\)|${Ej}`,gh=Pr`\(\?<(?![=!])(?[^>]+)>`,r9=Pr`${gh}|(?\()(?!\?)`,bo=new RegExp(Pr`${gh}|${s1}|\(\?|\\?.`,"gsu"),Yp="Cannot use multiple overlapping recursions";function Tj(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=t?.captureTransfers??new Map;if(!new RegExp(s1,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&Ed(e,Pr`\(\?\(DEFINE\)`,$r.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],o=Ed(e,Pr`\\[1-9]`,$r.DEFAULT),a=new Map,l=[];let c=!1,u=0,d=0,f;for(bo.lastIndex=0;f=bo.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(d6(m),c)throw new Error(Yp);if(o)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const v=e.slice(0,f.index),w=e.slice(bo.lastIndex);if(Ed(w,s1,$r.DEFAULT))throw new Error(Yp);const E=+m-1;e=f6(v,w,E,!1,n,s,d),i=p6(i,v,E,s.length,0,d);break}else if(g){d6(y);let v=!1;for(const H of l)if(H.name===g||H.num===+g){if(v=!0,H.hasRecursedWithin)throw new Error(Yp);break}if(!v)throw new Error(Pr`Recursive \g cannot be used outside the referenced group "${r==="external"?g:Pr`\g<${g}&R=${y}>`}"`);const w=a.get(g),E=Sj(e,w);if(o&&Ed(E,Pr`${gh}|\((?!\?)`,$r.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const x=e.slice(w,f.index),k=E.slice(x.length+h.length),S=s.length,I=+y-1,A=f6(x,k,I,!0,n,s,d);i=p6(i,x,I,s.length-S,S,d);const D=e.slice(0,w),z=e.slice(w+E.length);e=`${D}${A}${z}`,bo.lastIndex+=A.length-h.length-x.length-k.length,l.forEach(H=>H.hasRecursedWithin=!0),c=!0}else if(p)d++,a.set(String(d),bo.lastIndex),a.set(p,bo.lastIndex),l.push({num:d,name:p});else if(h[0]==="("){const v=h==="(";v&&(d++,a.set(String(d),bo.lastIndex)),l.push(v?{num:d}:{})}else h===")"&&l.pop()}return n.push(...s),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function d6(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 f6(e,t,n,r,i,s,o){const a=new Set;r&&t9(e+t,gh,({groups:{captureName:c}})=>{a.add(c)},$r.DEFAULT);const l=[n,r?a:null,i,s,o];return`${e}${h6(`(?:${e}`,"forward",...l)}(?:)${h6(`${t})`,"backward",...l)}${t}`}function h6(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),Lj(i,y),p?f:`(?<${h}${g}>`}return Pr`\k<${m}${g}>`},$r.DEFAULT)}return c}function Lj(e,t){for(let n=0;n=t&&e[n]++}function p6(e,t,n,r,i,s){if(e.size&&r){let o=0;t9(t,r9,()=>o++,$r.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 dn=String.fromCodePoint,Je=String.raw,li={},yh=globalThis.RegExp;li.flagGroups=(()=>{try{new yh("(?i:)")}catch{return!1}return!0})();li.unicodeSets=(()=>{try{new yh("[[]]","v")}catch{return!1}return!0})();li.bugFlagVLiteralHyphenIsRange=li.unicodeSets?(()=>{try{new yh(Je`[\d\-a]`,"v")}catch{return!0}return!1})():!1;li.bugNestedClassIgnoresNegation=li.unicodeSets&&new yh("[[^a]]","v").test("a");function t0(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function eu(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function o1(e,t){return m6[e]>=m6[t]}function Ij(e,t){if(e==null)throw new Error(t??"Value expected");return e}var m6={ES2025:2025,ES2024:2024,ES2018:2018},Aj={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function i9(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Aj[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=li.flagGroups?"ES2025":li.unicodeSets?"ES2024":"ES2018"),t}var Mj="[ -\r ]",Dj=new Set([dn(304),dn(305)]),Wi=Je`[\p{L}\p{M}\p{N}\p{Pc}]`;function s9(e){if(Dj.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Rj.get(n),s=Oj.get(n),o=Pj.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 Rv=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=>[mh(e),e])),Oj=new Map([["s",dn(383)],[dn(383),"s"]]),Pj=new Map([[dn(223),dn(7838)],[dn(107),dn(8490)],[dn(229),dn(8491)],[dn(969),dn(8486)]]),Rj=new Map([Fs(453),Fs(456),Fs(459),Fs(498),...Qp(8072,8079),...Qp(8088,8095),...Qp(8104,8111),Fs(8124),Fs(8140),Fs(8188)]),Nj=new Map([["alnum",Je`[\p{Alpha}\p{Nd}]`],["alpha",Je`\p{Alpha}`],["ascii",Je`\p{ASCII}`],["blank",Je`[\p{Zs}\t]`],["cntrl",Je`\p{Cc}`],["digit",Je`\p{Nd}`],["graph",Je`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Je`\p{Lower}`],["print",Je`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Je`[\p{P}\p{S}]`],["space",Je`\p{space}`],["upper",Je`\p{Upper}`],["word",Je`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Je`\p{AHex}`]]);function $j(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Fs(e){const t=dn(e);return[t.toLowerCase(),t]}function Qp(e,t){return $j(e,t).map(n=>Fs(n))}var o9=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Fj(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};a9(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:o1(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};Oc(e,Hj,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};Oc(e,Vj,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Oc(e,zj,o),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var Hj={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const s=ii();s.body[0].body.push(Io({negate:!0,body:r}),za("Any"));const o=ii();o.body[0].body.push(Xx("greedy",0,1/0,s)),n(Kt(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?Je`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(l==="hex")n(Hs(za("AHex",{negate:c}),t));else if(l==="newline")n(Kt(Gi(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-${dn(d.codePointAt(0)-1)}${dn(d.codePointAt(2)+1)}-􏿿`),n(Kt(Gi(`[${d}]`),t))}else n(Kt(em(Gi(Nj.get(u)),c),t));else if(l==="property")Rv.has(mh(u))||(e.key="sc");else if(l==="space")n(Hs(za("space",{negate:c}),t));else if(l==="word")n(Kt(em(Gi(Wi),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=ii({flags:l});c.body[0].body=o(),i(Kt(c,t),{traverse:!0})}else if(a==="keep"){const c=n.body[0],d=n.body.length===1&&Zx(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(Je`Uses "\K" in a way that's unsupported`);const f=Io({behind:!0});f.body[0].body=s(),i(Kt(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(Kt(Io({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=ii();t.body[0].body.push(e.body),e.body=Kt(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=d9(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(Je`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Jp(n)&&(n=Xp(n,t),e.ref=n)}},Vj={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=Hs(g6(e.number),t);l.set(d,a.get(e.number)),n(d);return}a.set(e.number,e),o.set(e.number,[]),e.name&&eu(o,e.name,[]);const u=o.get(e.name??e.number);for(let d=0;df.type==="Group"&&!!f.flags)),d=u?t0(r.globalFlags,u):r.globalFlags;jj(d,r.currentFlags)||(c=ii({flags:Uj(d)}),c.body[0].body.push(l))}n(Kt(c,t),{traverse:!a})}},zj={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=>qj(o,e));if(!s.length)n(Kt(Io({negate:!0}),t));else if(s.length>1){const o=ii({atomic:!0,body:s.reverse().map(a=>Wo({body:[r1(a.number)]}))});n(Kt(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 Uj({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 u9(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function d9(e){const t=e.find(n=>n.kind==="search_start"||Kj(n,{negate:!1})||!Wj(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=d9(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function f9(e,t){const n=u9(e)??[];for(const r of n)if(r===t||f9(r,t))return!0;return!1}function Wj({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Gj(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Kj(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Zx(e.body[0],{type:"Assertion",kind:"search_start"})}function Jp(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Gi(e,t){const r=Yx(e,{...t,unicodePropertyMap:Rv}).body;return r.length>1||r[0].body.length>1?ii({body:r}):r[0].body[0]}function em(e,t){return e.negate=t,e}function Hs(e,t){return e.parent=t,e}function Kt(e,t){return a9(e),e.parent=t,e}function Zj(e,t){const n=i9(t),r=o1(n.target,"ES2024"),i=o1(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];Oc(e,Yj,{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,Ij(Qj[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&&eu(f._captureTransfers,h.transferTo,[]).push(p)}),f}var Yj={"*":{enter({node:e},t){if(v6(e)){const n=t.getCurrentModI();t.pushModI(e.flags?t0({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){v6(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Nv(dn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),h9(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&o9.has(e.value)&&t.setHasCasedChar()}},Qj={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?Je`\B`:Je`\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=dn(e),r=Ea(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Nv(n)){const i=s9(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");li.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(b6)&&(o=[ph(45),...o.filter(c=>!b6(c))]);const a=()=>`[${i?"^":""}${o.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||li.bugNestedClassIgnoresNegation)&&!i){const u=o.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(u.length){const d=ii(),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=Wo({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"&&!(li.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=Ea(n,i),o=Ea(r,i),a=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const l=h9(e);nq(l).forEach(u=>{a.add(Array.isArray(u)?`${Ea(u[0],i)}-${Ea(u[1],i)}`:Ea(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?".":"[^]":Je`[^\n]`;if(e==="digit")return t?Je`\D`:Je`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&o9.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Je`\P`:Je`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Je`\W`:Je`\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=t0(o,n));const a=t.map(s).join("|"),l=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?a:`(?${rq(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)+iq(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})`:Je`\g<${t}&R=${r}>`}},Xj=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Jj=new Set(["-","\\","]","^","["]),eq=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),y6=new Map([[9,Je`\t`],[10,Je`\n`],[11,Je`\v`],[12,Je`\f`],[13,Je`\r`],[8232,Je`\u2028`],[8233,Je`\u2029`],[65279,Je`\uFEFF`]]),tq=/^\p{Cased}$/u;function Nv(e){return tq.test(e)}function h9(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=dn(o);if(!Nv(a))continue;const l=s9(a).filter(c=>{const u=c.codePointAt(0);return ui});if(l.length&&(s.push(...l),n))break}return s}function Ea(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(y6.has(e))return y6.get(e);if(e<32||e>126&&e<160||e>262143||t&&sq(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?eq:Jj:Xj,s=dn(e);return(i.has(s)?"\\":"")+s}function nq(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 iq({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 v6({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function sq(e){return e>47&&e<58}function b6({type:e,value:t}){return e==="Character"&&t===45}var oq=class a1 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 a1&&(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=lq(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 a1(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&&(aq(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 lq(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)eu(n,s,{}).transferTo=r;return n}function cq(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 uq(e,t){const n=dq(e,t);return n.options?new oq(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function dq(e,t){const n=i9(t),r=Yx(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Rv}),i=Fj(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=Zj(i,n),o=Tj(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),a=Cj(o.pattern),l=_j(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}const w6=4294967295;class fq{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:s}=n;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(o=>{if(typeof o!="string")return o;const a=i?.get(o);if(a){if(a instanceof RegExp)return a;if(r)return null;throw a}try{const l=s(o);return i?.set(o,l),l}catch(l){if(i?.set(o,l),r)return null;throw l}})}regexps;findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,s=[];function o(a,l,c=0){return{index:a,captureIndices:l.indices.map(u=>u==null?{start:w6,end:w6,length:0}:{start:u[0]+c,end:u[1]+c,length:u[1]-u[0]})}}for(let a=0;al[1].index));for(const[l,c,u]of s)if(c.index===a)return o(l,c,u)}return null}}function hq(e,t){return uq(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function pq(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>hq(n,{target:t.target}),{createScanner(n){return new fq(n,t)},createString(n){return{content:n}}}}const n0="diffs-container",mq=/(?=^From [a-f0-9]+ .+$)/m,mf=/(?=^diff --git)/gm,k6=/(?=^---\s+\S)/gm,gq=/(?=^@@ )/gm,yq=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,gf=/(?<=\n)/,vq=/^(---|\+\+\+)\s+([^\t\r\n]+)/,bq=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,wq=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,kq=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,$v="header-prefix",Fv="header-metadata",jn={dark:"pierre-dark",light:"pierre-light"},Hv="data-unsafe-css",el=1,Vv={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},xq=Object.freeze({fromStart:0,fromEnd:0}),r0={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},p9={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function x6(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function vs(e){return{type:"text",value:e}}function st({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function i0({name:e,width:t=16,height:n=16,properties:r}){return st({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...r},children:[st({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function Sq(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 Ka(e){return st({tagName:"div",properties:{"data-gutter":""},children:e})}function m9(e,t,n){return st({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n},children:t!=null?[st({tagName:"span",properties:{"data-line-number-content":""},children:[vs(`${t}`)]})]:void 0})}function Dr(e,t,n){return st({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 _q(){return st({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[i0({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function Cq(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var g9=class{hoveredLine;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.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.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e){const t=!(e===this.selectedRange||x6(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:r}=this.options;t==null&&n==null&&r==null||this.options.onGutterUtilityClick!=null&&C6(e.composedPath())||(Ki(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:r,enableGutterUtility:i=!1}=this.options;t==="disabled"&&!i&&n==null&&r==null||(Ki(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(Ki(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null){Ki(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no .hoveredLine");return}this.gutterUtilityContainer?.remove(),this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,r=t.composedPath();Ki(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:r});const i=this.resolvePointerTarget(r);Ki(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",i);const{onLineClick:s,onLineNumberClick:o,onLineEnter:a,onLineLeave:l,onHunkExpand:c}=this.options;switch(e){case"move":if(ac(i)&&this.hoveredLine?.lineElement===i.lineElement)break;this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),l?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),ac(i)&&(this.setHoveredLine(this.toEventBaseProps(i)),this.gutterUtilityContainer!=null&&i.numberElement.appendChild(this.gutterUtilityContainer),a?.({...this.hoveredLine,event:t}));break;case"click":{if(i==null)break;if(Tq(i)&&c!=null){c(i.hunkIndex,i.direction,t.shiftKey);break}if(!ac(i))break;const u=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...u,event:t}):s?.({...u,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:r,onLineNumberClick:i,onLineEnter:s,onLineLeave:o,onHunkExpand:a,enableGutterUtility:l=!1,enableLineSelection:c=!1,onGutterUtilityClick:u}=this.options,d=u!=null,f=n!=="disabled"||r!=null||i!=null||a!=null||s!=null||o!=null||l||c||d;f&&!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,Ki(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const m=[];return(t==="both"||t==="click")&&(r!=null&&m.push("onLineClick"),i!=null&&m.push("onLineNumberClick"),a!=null&&m.push("expandable hunk separators")),m})()),Ki(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Ki(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!f&&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 h=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",p=this.pointerSession.mode==="gutterSelecting";(!c&&h||!d&&p)&&(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();C6(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,t):this.startLineSelectionFromPointerDown(e,t)};startLineSelectionFromPointerDown(e,t){const{enableLineSelection:n=!1}=this.options;if(!n)return;const r=this.getSelectionPointerInfo(t,!0);if(r==null)return;const{pre:i}=this;if(i==null)return;e.preventDefault();const{lineNumber:s,eventSide:o,lineIndex:a}=r;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const c=l.start<=l.end?a>=l.start:a<=l.end;this.selectionAnchor={lineNumber:c?this.selectedRange.start:this.selectedRange.end,side:c?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(s,o,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===s&&this.selectedRange?.end===s){const l={lineNumber:s,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:s,side:o},this.updateSelection(s,o,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e,t){const{enableLineSelection:n=!1,onGutterUtilityClick:r}=this.options;if(r==null)return;const i=this.getSelectionPointFromPath(t);i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:i,current:i},n&&(this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.selectedRange)),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const n=this.getSelectionPointFromPath(e.composedPath());if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const n=this.getSelectionPointerInfo(e.composedPath(),!1);if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;const n=this.getSelectionPointerInfo(e.composedPath(),!1);if(n==null||this.selectionAnchor==null)return;const r={lineNumber:n.lineNumber,side:n.eventSide};if(Cq(this.pointerSession.pending,r))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.selectedRange),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;const r=this.getSelectionPointFromPath(e.composedPath());r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){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",""))}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=Mi(_q());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)}}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"})}getSelectionPointerInfo(e,t){const n=this.resolvePointerTarget(e);if(ac(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}getSelectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(ac(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}updateSelection(e,t,n=!0){const{selectedRange:r}=this;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)}x6(r??void 0,i??void 0)||(this.selectedRange=i,n&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(e,t){if(this.pre==null)return;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||p{switch(n){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return r.hasAttribute("data-deletions")?"deletions":"additions"}})();return{kind:"line",lineType:n,lineElement:i,lineNumber:l,numberColumn:t,numberElement:o,side:u,splitLineIndex:c}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(r=>Number.parseInt(r,10)).filter(r=>!Number.isNaN(r));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function s0({enableGutterUtility:e,enableHoverUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:s,onLineLeave:o,onLineNumberClick:a,renderGutterUtility:l,renderHoverUtility:c,__debugPointerEvents:u,enableLineSelection:d,onLineSelected:f,onLineSelectionStart:h,onLineSelectionChange:p,onLineSelectionEnd:m},g,y){return{enableGutterUtility:Eq({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:l,renderHoverUtility:c,onGutterUtilityClick:r}),usesCustomGutterUtility:l!=null||c!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:g,onLineClick:i,onLineEnter:s,onLineLeave:o,onLineNumberClick:a,__debugPointerEvents:u,enableLineSelection:d,onLineSelected:f,onLineSelectionStart:h,onLineSelectionChange:p,onLineSelectionEnd:m,getLineIndex:y}}function Eq({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:n,renderHoverUtility:r,onGutterUtilityClick:i}){if(e!==void 0&&t!==void 0)throw new Error("Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.");if(n!=null&&r!=null)throw new Error("Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.");if(i!=null&&(n!=null||r!=null))throw new Error("Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.");return e??t??!1}function ac(e){return e!=null&&"kind"in e&&e.kind==="line"}function Tq(e){return"type"in e&&e.type==="line-info"}function S6(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function _6(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 C6(e){for(const t of e)if(t instanceof HTMLElement&&t.hasAttribute("data-utility-button"))return!0;return!1}function Ki(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 y9=class{observedNodes=new Map;timeoutID;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.timeoutID!=null&&clearTimeout(this.timeoutID)}resizeObserver;setup(e,t){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const n=e.querySelectorAll("code"),r=new Map(this.observedNodes);this.observedNodes.clear();for(const i of n){let s=r.get(i);if(s!=null){this.observedNodes.set(i,s),r.delete(i);continue}let o=i.querySelector("[data-gutter]");o instanceof HTMLElement||(o=null),s={type:"code",codeElement:i,numberElement:o,codeWidth:"auto",numberWidth:0},this.observedNodes.set(i,s),this.resizeObserver.observe(i),o!=null&&(this.observedNodes.set(o,s),this.resizeObserver.observe(o))}if(n.length>1&&!t){const i=e.querySelectorAll('[data-line-annotation*=","]'),s=new Map;for(const o of i){if(!(o instanceof HTMLElement))continue;const{lineAnnotation:a=""}=o.dataset;if(!/^\d+,\d+$/.test(a)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:a,element:o});continue}let l=s.get(a);l==null&&(l=[],s.set(a,l)),l.push(o)}for(const[o,a]of s){if(a.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",o,a);continue}const[l,c]=a,u=l.firstElementChild,d=c.firstElementChild;if(!(l instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(d instanceof HTMLElement))continue;let f=r.get(u);if(f!=null){this.observedNodes.set(u,f),this.observedNodes.set(d,f),r.delete(u),r.delete(d);continue}f={type:"annotations",column1:{container:l,child:u,childHeight:u.getBoundingClientRect().height},column2:{container:c,child:d,childHeight:d.getBoundingClientRect().height},currentHeight:"auto"};const h=Math.max(f.column1.childHeight,f.column2.childHeight);this.applyNewHeight(f,h),this.observedNodes.set(u,f),this.observedNodes.set(d,f),this.resizeObserver.observe(u),this.resizeObserver.observe(d)}}for(const i of r.keys())i.isConnected&&(i.style.removeProperty("--diffs-column-content-width"),i.style.removeProperty("--diffs-column-number-width"),i.style.removeProperty("--diffs-column-width"),i.parentElement instanceof HTMLElement&&i.parentElement.style.removeProperty("--diffs-annotation-min-height")),this.resizeObserver.unobserve(i);r.clear()}handleResizeObserver=e=>{for(const t of e){const{target:n,borderBoxSize:r}=t;if(!(n instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",t);continue}const i=this.observedNodes.get(n);if(i==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",t);continue}const s=r[0];if(i.type==="annotations"){const o=(()=>{if(n===i.column1.child)return i.column1;if(n===i.column2.child)return i.column2})();if(o==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:i,target:n});continue}o.childHeight=s.blockSize;const a=Math.max(i.column1.childHeight,i.column2.childHeight);this.applyNewHeight(i,a)}else i.type==="code"&&(this.queuedUpdates.set(n,[i,s]),this.queueColumnUpdate())}};queueColumnUpdate(){this.timeoutID!=null&&clearTimeout(this.timeoutID),this.timeoutID=setTimeout(this.handleColumnChange,1e3/30)}handleColumnChange=()=>{this.timeoutID=void 0;for(const[e,[t,n]]of this.queuedUpdates)if(e===t.codeElement){const r=Math.max(Math.floor(n.inlineSize),0);if(r!==t.codeWidth){t.codeWidth=r;const i=Math.max(t.codeWidth-t.numberWidth,0);t.codeElement.style.setProperty("--diffs-column-content-width",`${i===0?"auto":`${i}px`}`),t.codeElement.style.setProperty("--diffs-column-width",`${t.codeWidth===0?"auto":`${t.codeWidth}px`}`)}}else if(e===t.numberElement){const r=Math.max(Math.ceil(n.inlineSize),0);if(r!==t.numberWidth&&(t.numberWidth=r,t.codeElement.style.setProperty("--diffs-column-number-width",`${t.numberWidth===0?"auto":`${t.numberWidth}px`}`),t.codeWidth!=="auto")){const i=Math.max(t.codeWidth-t.numberWidth,0);t.codeElement.style.setProperty("--diffs-column-content-width",`${i===0?"auto":`${i}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`),e.column2.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`))}};const Go=new Map,tm=new Map,Lq=new Map,l1=new Set;function o0(e){for(const t of Array.isArray(e)?e:[e])if(!l1.has(t))return!1;return!0}function E6(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(l1.has(n.name))continue;let r=Go.get(n.name);r==null&&(r=n,Go.set(n.name,r)),l1.add(r.name),t.loadLanguageSync(r.data)}}function v9(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function b9(e){if(v9())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=tm.get(e);if(t!=null)return t;try{let n=Lq.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Jc,e)&&(n=Jc[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 Go.has(e)||Go.set(e,s),s});return tm.set(e,r),await r}finally{tm.delete(e)}}function w9(e){return Go.get(e)??b9(e)}const fs=new Map,nm=new Map,c1=new Map,u1=new Set;function d1(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let r;if(typeof n=="string"){if(r=fs.get(n),r==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else r=n,n=n.name,fs.has(n)||fs.set(n,r);u1.has(n)||(u1.add(n),t.loadThemeSync(r))}}async function k9(e){if(v9())throw new Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=nm.get(e);if(t!=null)return t;try{const n=c1.get(e)??zx[e];if(n==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const r=n().then(s=>Iq(e,"default"in s?s.default:s));nm.set(e,r);const i=await r;if(i.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${i.name}`);return fs.set(i.name,i),i}finally{nm.delete(e)}}function Iq(e,t){const n=fs.get(e);return n??(t=dh(t),fs.set(e,t),t)}function x9(e){return fs.get(e)??k9(e)}function zv(e,t){if(c1.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}c1.set(e,t)}let _i;async function yl({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){_i??=Lz({themes:[],langs:["text"],engine:n==="shiki-wasm"?qx(P(()=>import("./wasm-CG6Dc4jp.js"),[])):pq()});const r=Aq(_i)?await _i:_i;_i=r;const i=[];for(const o of t){if(o==="text"||o==="ansi")continue;const a=w9(o);"then"in a?i.push(a):E6(a,r)}const s=[];for(const o of e){const a=x9(o);"then"in a?s.push(a):d1(a,_i)}return(i.length>0||s.length>0)&&await Promise.all([Promise.all(i).then(o=>{E6(o,r)}),Promise.all(s).then(o=>{d1(o,r)})]),r}function S9(){if(_i!=null&&!("then"in _i))return _i}function Aq(e=_i){return e!=null&&"then"in e}zv("pierre-dark",async()=>{const e=await P(()=>import("./pierre-dark-ClCaJvdG.js"),[]);return{...e.default??e,name:"pierre-dark"}});zv("pierre-light",async()=>{const e=await P(()=>import("./pierre-light-zjGsWSiE.js"),[]);return{...e.default??e,name:"pierre-light"}});function tu(e=jn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Pc(e){for(const t of tu(e))if(!u1.has(t))return!1;return!0}function f1(e){for(const t of e)if(!fs.has(t))return!1;return!0}function vh(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 jv(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function yf(e){return st({tagName:"div",children:[st({tagName:"div",children:e.annotations?.map(t=>st({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function Mq(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 _9({fileOrDiff:e,themeStyles:t,themeType:n}){const r="type"in e?e:void 0,i={"data-diffs-header":"","data-change-type":r?.type,"data-theme-type":n!=="system"?n:void 0,style:t};return st({tagName:"div",children:[Dq({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:r?.type??"file"}),Oq(r)],properties:i})}function Dq({name:e,prevName:t,iconType:n}){const r=[st({tagName:"slot",properties:{name:$v}}),i0({name:Mq(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(st({tagName:"div",children:[vs(t)],properties:{"data-prev-name":""}})),r.push(i0({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),r.push(st({tagName:"div",children:[vs(e)],properties:{"data-title":""}})),st({tagName:"div",children:r,properties:{"data-header-content":""}})}function Oq(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(st({tagName:"span",children:[vs(`-${r}`)],properties:{"data-deletions-count":""}})),(n>0||r===0)&&t.push(st({tagName:"span",children:[vs(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(st({tagName:"slot",properties:{name:Fv}})),st({tagName:"div",children:t,properties:{"data-metadata":""}})}function C9(e){return st({tagName:"pre",properties:Pq(e)})}function Pq({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,themeType:s,themeStyles:o,totalLines:a,type:l}){const c={"data-diff":l==="diff"?"":void 0,"data-file":l==="file"?"":void 0,"data-diff-type":l==="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,"data-theme-type":s!=="system"?s:void 0,style:o,tabIndex:0};return c.style+=`--diffs-min-number-column-width-default:${`${a}`.length}ch;`,c}const Ta=new Map,lc={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function zr(e){if(Ta.has(e))return Ta.get(e)??"text";if(lc[e]!=null)return lc[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Ta.has(t[1]))return Ta.get(t[1])??"text";if(lc[t[1]]!=null)return lc[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Ta.has(n)?Ta.get(n)??"text":lc[n]??"text"}function E9(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:tu(t),preferredHighlighter:n}}function Ko(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function Zo(e){return e.replace(/\n$|\r\n$/,"")}function Rq(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(vs(` `)),e}function Nq(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+$q(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 $q(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 T9(e=!1){const t={lineInfo:[]},n=[{line(r){return delete r.properties.class,r},pre(r){const i=Sq(r),s=[];if(i!=null){let o=1;for(const a of i.children)a.type==="element"&&(s.push(Rq(a,o,t)),o++);i.children=s}return r}}];return e&&n.push(Fq,T6),{state:t,transformers:n,toClass:T6}}const T6=Nq({classPrefix:"hl-"}),Fq={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 mr(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function L9({theme:e=jn,highlighter:t,prefix:n}){let r="";if(typeof e=="string"){const i=t.getTheme(e);r+=`color:${i.fg};`,r+=`background-color:${i.bg};`,r+=`${mr("global")}fg:${i.fg};`,r+=`${mr("global")}bg:${i.bg};`,r+=rm(i,n)}else{let i=t.getTheme(e.dark);r+=`${mr("global")}dark:${i.fg};`,r+=`${mr("global")}dark-bg:${i.bg};`,r+=rm(i,"dark"),i=t.getTheme(e.light),r+=`${mr("global")}light:${i.fg};`,r+=`${mr("global")}light-bg:${i.bg};`,r+=rm(i,"light")}return r}function rm(e,t){t=t!=null?`${t}-`:"";let n="";const r=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];r!=null&&(n+=`${mr("global")}${t}addition-color:${r};`);const i=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];i!=null&&(n+=`${mr("global")}${t}deletion-color:${i};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(n+=`${mr("global")}${t}modified-color:${s};`),n}function h1(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}function a0({lines:e,startingLine:t=0,totalLines:n=1/0,callback:r}){const i=Math.min(t+n,e.length),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||o<1/0,{state:c,transformers:u}=T9(),d=i?"text":e.lang??zr(e.name),f=(()=>{if(typeof n=="string")return t.getTheme(n).type})(),h=L9({theme:n,highlighter:t});c.lineInfo=y=>({type:"context",lineIndex:y-1+s,lineNumber:y+s});const p=typeof n=="string"?{lang:d,theme:n,transformers:u,defaultColor:!1,cssVariablePrefix:mr("token"),tokenizeMaxLineLength:r}:{lang:d,themes:n,transformers:u,defaultColor:!1,cssVariablePrefix:mr("token"),tokenizeMaxLineLength:r},m=h1(t.codeToHast(l?Vq(a??p1(e.contents),s,o):Zo(e.contents),p)),g=l?new Array(s):m;return l&&g.push(...m),{code:g,themeStyles:h,baseThemeType:f}}function Vq(e,t,n){let r="";return a0({lines:e,startingLine:t,totalLines:n,callback({content:i}){r+=i}}),r}function A9(e,t){return st({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}let zq=-1;var jq=class{__id=`file-renderer:${++zq}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:jn},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Pc(e.theme??jn)?S9():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??"system")!==e&&this.mergeOptions({themeType: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.renderCache=void 0,this.highlighter=void 0,this.workerManager=void 0,this.onRenderUpdate=void 0,this.lineCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e);let n=this.workerManager?.getFileResultCache(e);n!=null&&!im(t,n.options)&&(n=void 0),this.renderCache??={file:e,options:t,highlighted:!0,result:n?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null?this.workerManager.highlightFileAST(this,e):this.asyncHighlight(e).then(({result:r,options:i})=>{this.onHighlightSuccess(e,r,i)})}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:r=jn,tokenizeMaxLineLength:i=1e3}=this.options;return{theme:r,tokenizeMaxLineLength:i}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceRender:!0}:e!==n.file||!im(t,n.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,p1(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:p1(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=r0){if(e==null)return;const n=this.workerManager?.getFileResultCache(e);n!=null&&this.renderCache==null&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...n});const{options:r,forceRender:i}=this.getRenderOptions(e);if(this.renderCache??={file:e,highlighted:!1,options:r,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&!vh(this.renderCache.renderRange,t))&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,this.getOrCreateLineCache(e)),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??zr(e.name);const s=this.highlighter!=null&&Pc(r.theme),o=this.highlighter!=null&&o0(this.computedLang);if(this.highlighter!=null&&s&&(i||!this.renderCache.highlighted&&o||this.renderCache.result==null)){const{result:a,options:l}=this.renderFileWithHighlighter(e,this.highlighter,!o);this.renderCache={file:e,options:l,highlighted:o,result:a,renderRange:void 0}}(!s||!o)&&this.asyncHighlight(e).then(({result:a,options:l})=>{this.onHighlightSuccess(e,a,l)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=r0){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){this.computedLang=e.lang??zr(e.name);const t=this.highlighter!=null&&f1(tu(this.options.theme)),n=this.highlighter!=null&&o0(this.computedLang);return(this.highlighter==null||!t||!n)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter)}renderFileWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e);return{result:I9(e,t,r,{forcePlainText:n}),options:r}}processFileResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){const{disableFileHeader:s=!1}=this.options,o=[],a=Ka(),l=this.getOrCreateLineCache(e);let c=0;return a0({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(m9("context",d,`${u}`)),o.push(f),c++;const h=this.lineAnnotations[d];h!=null&&(a.children.push(Dr("context","annotation",1)),o.push(yf({hunkIndex:0,lineIndex:d,annotations:h.map(p=>Ko(p))})),c++)}}}),a.properties.style=`grid-row: span ${c}`,{gutterAST:a.children??[],contentAST:o,preAST:this.createPreElement(l.length,r,i),headerAST:s?void 0:this.renderHeader(e,r,i),totalLines:l.length,rowCount:c,themeStyles:r,baseThemeType:i,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e,t,n){const{themeType:r="system"}=this.options;return _9({fileOrDiff:e,themeStyles:t,themeType:n??r})}renderFullHTML(e){return Mi(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(st({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=Ka();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,A9(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return Mi(t?st({tagName:"code",children:e,properties:{"data-code":""}}):e)}async initializeHighlighter(){return this.highlighter=await yl(E9(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n){if(this.renderCache==null)return;const r=this.renderCache.file!==e||!this.renderCache.highlighted||!im(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:!0,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}createPreElement(e,t,n){const{disableLineNumbers:r=!1,overflow:i="scroll",themeType:s="system"}=this.options;return C9({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:r,overflow:i,themeStyles:t,themeType:n??s,split:!1,totalLines:e})}};function im(e,t){return jv(e.theme,t.theme)&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}const M9=``;function l0(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function qq(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function D9(e,t){return e==null||t==null?e===t: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.themeStyles===t.themeStyles&&e.themeType===t.themeType&&e.totalLines===t.totalLines}function O9(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function P9(){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}function R9(){const e=document.createElement("style");return e.setAttribute(Hv,""),e}var Bq=`@layer base, theme, unsafe; @layer base { :host { --diffs-bg: #fff; --diffs-fg: #000; --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(black, white); --diffs-gap-fallback: 8px; /* // Available CSS Color Overrides --diffs-bg-buffer-override --diffs-bg-hover-override --diffs-bg-context-override --diffs-bg-separator-override --diffs-fg-number-override --diffs-fg-number-addition-override --diffs-fg-number-deletion-override --diffs-deletion-color-override --diffs-addition-color-override --diffs-modified-color-override --diffs-bg-deletion-override --diffs-bg-deletion-number-override --diffs-bg-deletion-hover-override --diffs-bg-deletion-emphasis-override --diffs-bg-addition-override --diffs-bg-addition-number-override --diffs-bg-addition-hover-override --diffs-bg-addition-emphasis-override // Line Selection Color Overrides (for enableLineSelection) --diffs-selection-color-override --diffs-bg-selection-override --diffs-bg-selection-number-override --diffs-bg-selection-background-override --diffs-bg-selection-number-background-override // Available CSS Layout Overrides --diffs-gap-inline --diffs-gap-block --diffs-gap-style --diffs-tab-size */ color-scheme: light dark; display: block; 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); } /* NOTE(mdo): Some semantic HTML elements (e.g. \`pre\`, \`code\`) have default * user-agent styles. These must be overridden to use our custom styles. */ pre, code, [data-error-wrapper] { isolation: isolate; margin: 0; padding: 0; display: block; outline: none; font-family: var(--diffs-font-family, var(--diffs-font-fallback)); } pre, code { background-color: var(--diffs-bg); } code { contain: content; } *, *::before, *::after { box-sizing: border-box; } [data-icon-sprite] { display: none; } /* NOTE(mdo): Headers and separators are within pre/code, so we need to reset * their font-family explicitly. */ [data-diffs-header], [data-separator] { font-family: var( --diffs-header-font-family, var(--diffs-header-font-fallback) ); } [data-file-info] { padding: 10px; font-weight: 700; color: var(--fg); /* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor * and vscode use an older build of chrome that appears to have a bug with * color-mix and 'in oklch', so use 'in lab' instead */ background-color: color-mix(in lab, var(--bg) 98%, var(--fg)); border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg)); } [data-diffs-header], [data-diff], [data-file], [data-error-wrapper], [data-virtualizer-buffer] { --diffs-bg: light-dark(var(--diffs-light-bg), var(--diffs-dark-bg)); /* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor * and vscode use an older build of chrome that appears to have a bug with * color-mix and 'in oklch', so use 'in lab' instead */ --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-hover: var( --diffs-bg-hover-override, light-dark( color-mix(in lab, var(--diffs-bg) 97%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 91%, 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-number: var( --diffs-bg-context-number-override, light-dark( color-mix(in lab, var(--diffs-bg-context) 80%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 60%, 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), var(--diffs-dark)); --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-deletion-base: var( --diffs-deletion-color-override, light-dark( var( --diffs-light-deletion-color, var(--diffs-deletion-color, rgb(255, 0, 0)) ), var( --diffs-dark-deletion-color, var(--diffs-deletion-color, rgb(255, 0, 0)) ) ) ); --diffs-addition-base: var( --diffs-addition-color-override, light-dark( var( --diffs-light-addition-color, var(--diffs-addition-color, rgb(0, 255, 0)) ), var( --diffs-dark-addition-color, var(--diffs-addition-color, rgb(0, 255, 0)) ) ) ); --diffs-modified-base: var( --diffs-modified-color-override, light-dark( var( --diffs-light-modified-color, var(--diffs-modified-color, rgb(0, 0, 255)) ), var( --diffs-dark-modified-color, var(--diffs-modified-color, rgb(0, 0, 255)) ) ) ); /* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor * and vscode use an older build of chrome that appears to have a bug with * color-mix and 'in oklch', so use 'in lab' instead */ --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-number: var( --diffs-bg-deletion-number-override, light-dark( color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-deletion-base)) ) ); --diffs-bg-deletion-hover: var( --diffs-bg-deletion-hover-override, light-dark( color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 75%, 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 / 0.15), rgb(from var(--diffs-deletion-base) r g b / 0.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-number: var( --diffs-bg-addition-number-override, light-dark( color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-addition-base)) ) ); --diffs-bg-addition-hover: var( --diffs-bg-addition-hover-override, light-dark( color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 70%, 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 / 0.15), rgb(from var(--diffs-addition-base) r g b / 0.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)) ); --diffs-bg-selection: var( --diffs-bg-selection-override, light-dark( color-mix(in lab, var(--diffs-bg) 82%, var(--diffs-selection-base)), color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base)) ) ); --diffs-bg-selection-number: var( --diffs-bg-selection-number-override, light-dark( color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base)), color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-selection-base)) ) ); background-color: var(--diffs-bg); color: var(--diffs-fg); } [data-diff], [data-file] { /* This feels a bit crazy to me... so I need to think about it a bit more... */ --diffs-grid-number-column-width: minmax(min-content, max-content); --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr; &[data-dehydrated] { --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr); } &[data-theme-type='light'], & { [data-line] span { color: light-dark( var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)) ); font-weight: var(--diffs-token-light-font-weight, inherit); font-style: var(--diffs-token-light-font-style, inherit); -webkit-text-decoration: var(--diffs-token-light-text-decoration, inherit); text-decoration: var(--diffs-token-light-text-decoration, inherit); } } &[data-theme-type='dark'] [data-line] span { font-weight: var(--diffs-token-dark-font-weight, inherit); font-style: var(--diffs-token-dark-font-style, inherit); -webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit); text-decoration: var(--diffs-token-dark-text-decoration, inherit); } &:hover [data-code]::-webkit-scrollbar-thumb { background-color: var(--diffs-bg-context); } } [data-line] span { background-color: light-dark( var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit) ); } [data-line], [data-gutter-buffer], [data-line-annotation], [data-no-newline] { color: var(--diffs-fg); background-color: var(--diffs-line-bg, var(--diffs-bg)); } [data-no-newline] { -webkit-user-select: none; user-select: none; span { opacity: 0.6; } } @media (prefers-color-scheme: dark) { [data-diffs-header], [data-error-wrapper], [data-diff], [data-file] { color-scheme: dark; } [data-content] [data-line] span { font-weight: var(--diffs-token-dark-font-weight, inherit); font-style: var(--diffs-token-dark-font-style, inherit); -webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit); text-decoration: var(--diffs-token-dark-text-decoration, inherit); } } [data-diffs-header], [data-diff], [data-file] { &[data-theme-type='light'] { color-scheme: light; } &[data-theme-type='dark'] { color-scheme: dark; } } [data-diff-type='split'][data-overflow='scroll'] { display: grid; grid-template-columns: 1fr 1fr; [data-additions] { border-left: 1px solid var(--diffs-bg); } [data-deletions] { border-right: 1px solid var(--diffs-bg); } } [data-code] { display: grid; grid-auto-flow: dense; grid-template-columns: var(--diffs-code-grid); overflow: scroll clip; overscroll-behavior-x: none; tab-size: var(--diffs-tab-size, 2); align-self: flex-start; padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback)); padding-bottom: max( 0px, calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) - 6px) ); } [data-container-size] { container-type: inline-size; } [data-code]::-webkit-scrollbar { width: 0; height: 6px; } [data-code]::-webkit-scrollbar-track { background: transparent; } [data-code]::-webkit-scrollbar-thumb { background-color: transparent; border: 1px solid transparent; background-clip: content-box; border-radius: 3px; } [data-code]::-webkit-scrollbar-corner { background-color: transparent; } /* * If we apply these rules globally it will mean that webkit will opt into the * standards compliant version of custom css scrollbars, which we do not want * because the custom stuff will look better */ @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)); } } [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] { [data-code], &[data-overflow='wrap'] { padding-top: 0; } } [data-gutter] { display: grid; grid-template-rows: subgrid; grid-template-columns: subgrid; grid-column: 1; z-index: 3; position: relative; background-color: var(--diffs-bg); [data-gutter-buffer], [data-column-number] { border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg)); } } [data-content] { display: grid; grid-template-rows: subgrid; grid-template-columns: subgrid; grid-column: 2; min-width: 0; } [data-diff-type='split'][data-overflow='wrap'] { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(2, var(--diffs-code-grid)); padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback)); [data-deletions] { display: contents; [data-gutter] { grid-column: 1; } [data-content] { grid-column: 2; border-right: 1px solid var(--diffs-bg); } } [data-additions] { display: contents; [data-gutter] { grid-column: 3; border-left: 1px solid var(--diffs-bg); } [data-content] { grid-column: 4; } } } [data-overflow='scroll'] [data-gutter] { position: sticky; left: 0; } [data-line-annotation][data-selected-line] { background-color: unset; &::before { content: ''; /* FIXME(amadeus): This needs to be audited ... */ position: sticky; top: 0; left: 0; display: block; border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg)); background-color: var(--diffs-bg-selection-number); } [data-annotation-content] { background-color: var(--diffs-bg-selection); } } [data-interactive-lines] [data-line] { cursor: pointer; } [data-content-buffer], [data-gutter-buffer] { position: relative; -webkit-user-select: none; user-select: none; min-height: 1lh; } [data-gutter-buffer='annotation'] { min-height: 0; } [data-gutter-buffer='buffer'] { background-size: 8px 8px; background-position: 0 0; background-origin: border-box; background-color: var(--diffs-bg); /* This is incredibley expensive... */ background-image: repeating-linear-gradient( -45deg, transparent, transparent calc(3px * 1.414), rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(3px * 1.414), rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(4px * 1.414) ); } [data-content-buffer] { grid-column: 1; /* We multiply by 1.414 (√2) to better approximate the diagonal repeat distance */ background-size: 8px 8px; background-position: 5px 0; background-origin: border-box; background-color: var(--diffs-bg); /* This is incredibley expensive... */ background-image: repeating-linear-gradient( -45deg, transparent, transparent calc(3px * 1.414), var(--diffs-bg-buffer) calc(3px * 1.414), var(--diffs-bg-buffer) calc(4px * 1.414) ); } [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; position: absolute; inset-inline: 0; display: flex; align-items: center; background-color: var(--diffs-bg); height: 100%; } [data-content] [data-separator-wrapper] { display: none; } [data-separator='metadata'] [data-separator-wrapper] { inset-inline: 100% auto; padding-inline: 1ch; height: 100%; background-color: var(--diffs-bg-separator); color: var(--diffs-fg-number); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: min-content; } [data-separator='line-info'] { margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback)); } [data-separator='line-info-basic'], [data-separator='metadata'] { margin-block: 0; } [data-separator='line-info'][data-separator-first] { margin-top: 0; } [data-separator='line-info'][data-separator-last] { margin-bottom: 0; } [data-expand-index] [data-separator-wrapper] { display: grid; grid-template-columns: 32px auto; } [data-expand-index] [data-separator-wrapper][data-separator-multi-button] { grid-template-columns: 32px 32px auto; } [data-expand-button], [data-separator-content] { display: flex; flex: 0 0 auto; align-items: center; background-color: var(--diffs-bg-separator); } [data-expand-button] { justify-content: center; flex-shrink: 0; cursor: pointer; min-width: 32px; align-self: stretch; color: var(--diffs-fg-number); border-right: 2px solid var(--diffs-bg); &:hover { color: var(--diffs-fg); } } [data-expand-down] [data-icon] { transform: scaleY(-1); } [data-separator-content] { flex: 1 1 auto; padding: 0 1ch; height: 100%; color: var(--diffs-fg-number); overflow: hidden; justify-content: flex-start; } [data-separator='line-info'], [data-separator='line-info-basic'] { [data-separator-content] { height: 100%; -webkit-user-select: none; user-select: none; overflow: clip; } } @supports (width: 1cqi) { [data-unified] { [data-separator='line-info'] [data-separator-wrapper] { padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback)); width: 100cqi; [data-separator-content] { border-radius: 6px; } } [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-separator='line-info'] [data-separator-content] { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } [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); [data-separator-wrapper] { display: none; } } [data-gutter] [data-separator='line-info'] [data-separator-wrapper] { display: block; height: 100%; background-color: var(--diffs-bg-separator); border-top-right-radius: 6px; border-bottom-right-radius: 6px; [data-separator-content], [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); display: block; height: 100%; margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback)); border-top-right-radius: 6px; border-bottom-right-radius: 6px; [data-separator-content], [data-expand-button] { display: none; } } [data-separator='line-info'] [data-separator-wrapper] { [data-expand-both], [data-expand-down], [data-expand-up] { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } } @media (pointer: fine) { [data-separator='line-info'] [data-separator-wrapper] { &[data-separator-multi-button] { [data-expand-up] { border-top-left-radius: 6px; border-bottom-left-radius: unset; } [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; [data-separator-content] { grid-column: unset; grid-row: unset; } } @supports (width: 1cqi) { [data-separator='line-info'] [data-separator-wrapper] { [data-expand-both], [data-expand-down], [data-expand-up] { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } &[data-separator-multi-button] { [data-expand-up] { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } [data-expand-down] { border-bottom-left-radius: unset; border-top-left-radius: unset; } } } } } @media (pointer: fine) { [data-separator-wrapper][data-separator-multi-button] { display: grid; grid-template-rows: 50% 50%; [data-separator-content] { grid-column: 2; grid-row: 1 / -1; min-width: min-content; } [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; } [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); } [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], [data-gutter-buffer='annotation'] { --diffs-line-bg: var(--diffs-bg-context); } [data-line-annotation] { min-height: var(--diffs-annotation-min-height, 0); z-index: 2; } [data-separator='custom'] { display: grid; grid-template-columns: subgrid; } [data-line], [data-column-number], [data-no-newline] { position: relative; padding-inline: 1ch; } [data-indicators='classic'] [data-line] { padding-inline-start: 2ch; } [data-indicators='classic'] { [data-line-type='change-addition'], [data-line-type='change-deletion'] { &[data-no-newline], &[data-line] { &::before { display: inline-block; width: 1ch; height: 1lh; position: absolute; top: 0; left: 0; -webkit-user-select: none; user-select: none; } } } [data-line-type='change-addition'] { &[data-line], &[data-no-newline] { &::before { content: '+'; color: var(--diffs-addition-base); } } } [data-line-type='change-deletion'] { &[data-line], &[data-no-newline] { &::before { content: '-'; color: var(--diffs-deletion-base); } } } } [data-indicators='bars'] { [data-line-type='change-deletion'], [data-line-type='change-addition'] { &[data-column-number] { &::before { content: ''; display: block; width: 4px; height: 100%; position: absolute; top: 0; left: 0; -webkit-user-select: none; user-select: none; contain: strict; } } } [data-line-type='change-deletion'] { &[data-column-number] { &::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-line-type='change-addition'] { &[data-column-number] { &::before { background-color: var(--diffs-addition-base); } } } } [data-overflow='wrap'] { [data-line], [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; background-color: var(--diffs-bg); color: var(--diffs-fg-number); padding-left: 2ch; } [data-line-number-content] { display: inline-block; min-width: var( --diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch) ); } [data-disable-line-numbers] { [data-column-number] { min-width: 4px; padding: 0; } [data-line-number-content] { display: none; } [data-gutter-utility-slot] { right: unset; left: 0; justify-content: flex-start; } &[data-indicators='bars'] [data-gutter-utility-slot] { /* Using 5px here because theres a 1px separator after the bar */ left: 5px; } } [data-file][data-disable-line-numbers] { [data-gutter-buffer], [data-column-number] { min-width: 0; border-right: 0; } } [data-interactive-line-numbers] [data-column-number] { cursor: pointer; } [data-diff-span] { border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; } [data-line-type='change-addition'] { &[data-column-number] { color: var( --diffs-fg-number-addition-override, var(--diffs-addition-base) ); } > [data-diff-span] { background-color: var(--diffs-bg-addition-emphasis); } } [data-line-type='change-deletion'] { &[data-column-number] { color: var( --diffs-fg-number-deletion-override, var(--diffs-deletion-base) ); } [data-diff-span] { background-color: var(--diffs-bg-deletion-emphasis); } } [data-background] [data-line-type='change-addition'] { --diffs-line-bg: var(--diffs-bg-addition); &[data-column-number] { background-color: var(--diffs-bg-addition-number); } } [data-background] [data-line-type='change-deletion'] { --diffs-line-bg: var(--diffs-bg-deletion); &[data-column-number] { background-color: var(--diffs-bg-deletion-number); } } @media (pointer: fine) { [data-column-number], [data-line] { &[data-hovered] { background-color: var(--diffs-bg-hover); } } [data-background] { [data-column-number], [data-line] { &[data-hovered] { &[data-line-type='change-deletion'] { background-color: var(--diffs-bg-deletion-hover); } &[data-line-type='change-addition'] { background-color: var(--diffs-bg-addition-hover); } } } } } [data-diffs-header] { position: relative; display: flex; flex-direction: row; 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) ); padding-inline: 16px; top: 0; z-index: 2; } [data-header-content] { display: flex; flex-direction: row; align-items: center; gap: var(--diffs-gap-inline, var(--diffs-gap-fallback)); min-width: 0; white-space: nowrap; } [data-header-content] [data-prev-name], [data-header-content] [data-title] { direction: rtl; overflow: hidden; text-overflow: ellipsis; min-width: 0; white-space: nowrap; } [data-prev-name] { opacity: 0.7; } [data-rename-icon] { fill: currentColor; flex-shrink: 0; flex-grow: 0; } [data-diffs-header] [data-metadata] { display: flex; align-items: center; gap: 1ch; white-space: nowrap; } [data-diffs-header] [data-additions-count] { font-family: var(--diffs-font-family, var(--diffs-font-fallback)); color: var(--diffs-addition-base); } [data-diffs-header] [data-deletions-count] { font-family: var(--diffs-font-family, var(--diffs-font-fallback)); color: var(--diffs-deletion-base); } [data-annotation-content] { position: relative; display: flow-root; align-self: flex-start; z-index: 2; min-width: 0; isolation: isolate; } /* Sticky positioning has a composite costs, so we should _only_ pay it if we * need to */ [data-overflow='scroll'] [data-annotation-content] { position: sticky; width: var(--diffs-column-content-width, auto); left: var(--diffs-column-number-width, 0); } /* Undo some of the stuff that the 'pre' tag does */ [data-annotation-slot] { text-wrap-mode: wrap; word-break: normal; white-space-collapse: collapse; } [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: 0.6; } /* Line selection highlighting */ [data-selected-line] { &[data-gutter-buffer='annotation'], &[data-column-number] { color: var(--diffs-selection-number-fg); background-color: var(--diffs-bg-selection-number); } &[data-line] { background-color: var(--diffs-bg-selection); } } [data-line-type='change-addition'], [data-line-type='change-deletion'] { &[data-selected-line] { &[data-line], &[data-line][data-hovered] { background-color: light-dark( color-mix( in lab, var(--diffs-line-bg, var(--diffs-bg)) 82%, var(--diffs-selection-base) ), color-mix( in lab, var(--diffs-line-bg, var(--diffs-bg)) 75%, var(--diffs-selection-base) ) ); } &[data-column-number], &[data-column-number][data-hovered] { color: var(--diffs-selection-number-fg); background-color: light-dark( color-mix( in lab, var(--diffs-line-bg, var(--diffs-bg)) 75%, var(--diffs-selection-base) ), color-mix( in lab, var(--diffs-line-bg, var(--diffs-bg)) 60%, var(--diffs-selection-base) ) ); } } } [data-gutter-utility-slot] { position: absolute; top: 0; bottom: 0; right: 0; display: flex; justify-content: flex-end; } [data-unmodified-lines] { display: block; overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; } [data-error-wrapper] { overflow: auto; padding: var(--diffs-gap-block, var(--diffs-gap-fallback)) var(--diffs-gap-inline, var(--diffs-gap-fallback)); max-height: 400px; scrollbar-width: none; [data-error-message] { font-weight: bold; font-size: 18px; color: var(--diffs-deletion-base); } [data-error-stack] { color: var(--diffs-fg-number); } } [data-placeholder] { contain: strict; } [data-utility-button] { display: flex; align-items: center; justify-content: center; border: none; appearance: none; width: 1lh; height: 1lh; margin-right: calc((1lh - 1ch) * -1); padding: 0; cursor: pointer; font-size: var(--diffs-font-size, 13px); line-height: var(--diffs-line-height, 20px); border-radius: 4px; background-color: var(--diffs-modified-base); color: var(--diffs-bg); fill: currentColor; position: relative; z-index: 4; } } `;const Uq="@layer base, theme, unsafe;";function N9(e){return`${Uq} @layer unsafe { ${e} }`}function vf({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 $9(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function F9(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:s,split:o,themeStyles:a,themeType:l,totalLines:c}){switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),l==="system"?e.removeAttribute("data-theme-type"):e.setAttribute("data-theme-type",l),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=a,e.style.setProperty("--diffs-min-number-column-width-default",`${`${c}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get(n0)==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(Bq)),r.adoptedStyleSheets=[e]}}customElements.define(n0,t)}const H9=!0,Wq=[];let Gq=-1;var V9=class{static LoadedCustomComponent=H9;__id=`file:${++Gq}`;fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;unsafeCSSStyle;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;appliedPreAttributes;lastRowCount;headerElement;headerPrefix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];file;renderRange;constructor(t={theme:jn},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.fileRenderer=new jq(t,this.handleHighlightRender,this.workerManager),this.resizeManager=new y9,this.interactionManager=new g9("file",s0(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){this.file!=null&&this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}setOptions(t){t!=null&&(this.options=t,this.interactionManager.setOptions(s0(t)))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){if((this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.fileRenderer.setThemeType(t),this.headerElement!=null&&(t==="system"?delete this.headerElement.dataset.themeType:this.headerElement.dataset.themeType=t),this.pre!=null))switch(t){case"system":delete this.pre.dataset.themeType;break;case"light":case"dark":this.pre.dataset.themeType=t;break}}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t){this.interactionManager.setSelection(t)}cleanUp(){this.fileRenderer.cleanUp(),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.workerManager=void 0,this.renderRange=void 0,this.file=void 0,this.isContainerManaged||this.fileContainer?.parentNode?.removeChild(this.fileContainer),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,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.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.unsafeCSSStyle=void 0,this.placeHolder=void 0}hydrate(t){const{fileContainer:n,prerenderedHTML:r}=t;$9(n,r);for(const i of Array.from(n.shadowRoot?.children??[])){if(i instanceof SVGElement){this.spriteSVG=i;continue}if(i instanceof HTMLElement){if(i instanceof HTMLPreElement){this.pre=i,this.appliedPreAttributes=void 0;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute(Hv)){this.unsafeCSSStyle=i;continue}if("diffsHeader"in i.dataset){this.headerElement=i,this.lastRenderedHeaderHTML=void 0;continue}}}if(this.pre==null)this.render(t);else{const{file:i,lineAnnotations:s}=t,{overflow:o="scroll"}=this.options;this.fileContainer=n,delete this.pre.dataset.dehydrated,this.lineAnnotations=s??this.lineAnnotations,this.file=i,this.fileRenderer.hydrate(i),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,o==="wrap")}}getOrCreateLineCache(t=this.file){return t!=null?this.fileRenderer.getOrCreateLineCache(t):Wq}render({file:t,fileContainer:n,forceRender:r=!1,containerWrapper:i,lineAnnotations:s,renderRange:o}){const{collapsed:a=!1}=this.options,l=a?void 0:o,c=this.renderRange,u=s!=null&&(s.length>0||this.lineAnnotations.length>0)?s!==this.lineAnnotations:!1,d=!l0(this.file,t);if(!a&&!r&&vh(l,this.renderRange)&&!d&&!u)return!1;this.renderRange=l,this.file=t,this.fileRenderer.setOptions(this.options),s!=null&&this.setLineAnnotations(s),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:f=!1,disableFileHeader:h=!1,overflow:p="scroll"}=this.options;if(h&&(this.headerElement!=null&&(this.headerElement.parentNode?.removeChild(this.headerElement),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.headerPrefix!=null&&(this.headerPrefix.parentNode?.removeChild(this.headerPrefix),this.headerPrefix=void 0),this.headerMetadata!=null&&(this.headerMetadata.parentNode?.removeChild(this.headerMetadata),this.headerMetadata=void 0)),n=this.getOrCreateFileContainerNode(n,i),a){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const m=this.fileRenderer.renderFile(t,p9);m?.headerAST!=null&&this.applyHeaderToDOM(m.headerAST,n),this.injectUnsafeCSS()}catch(m){if(f)throw m;console.error(m),m instanceof Error&&this.applyErrorToDOM(m,n)}return!0}try{const m=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(r,u,d)||!this.applyPartialRender(c,l)){const g=this.fileRenderer.renderFile(t,l);if(g==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;g.headerAST!=null&&this.applyHeaderToDOM(g.headerAST,n),this.applyFullRender(g,m)}this.applyBuffers(m,l),this.injectUnsafeCSS(),this.interactionManager.setup(m),this.resizeManager.setup(m,p==="wrap"),this.renderAnnotations(),this.renderGutterUtility()}catch(m){if(f)throw m;console.error(m),m instanceof Error&&this.applyErrorToDOM(m,n)}return!0}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.parentNode?.removeChild(t);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.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}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.pre?.remove(),this.spriteSVG?.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.pre=void 0,this.spriteSVG=void 0,this.unsafeCSSStyle=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:r}of this.annotationCache.values())r.parentNode?.removeChild(r);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}-${Ko(i)}`;let o=this.annotationCache.get(s);if(o==null||!qq(i,o.annotation)){o?.element.parentElement?.removeChild(o.element);const a=n(i);if(a==null)continue;o={element:O9(Ko(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.parentNode?.removeChild(i)}renderGutterUtility(){const t=this.options.renderGutterUtility??this.options.renderHoverUtility;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?.parentNode?.removeChild(this.gutterUtilityContent),this.gutterUtilityContent=void 0;return}const r=P9();r.appendChild(n),this.fileContainer.appendChild(r),this.gutterUtilityContent=r}injectUnsafeCSS(){if(this.fileContainer?.shadowRoot==null)return;const{unsafeCSS:t}=this.options;if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.parentNode?.removeChild(this.unsafeCSSStyle),this.unsafeCSSStyle=void 0);return}this.unsafeCSSStyle==null&&(this.unsafeCSSStyle=R9(),this.fileContainer.shadowRoot.appendChild(this.unsafeCSSStyle)),this.unsafeCSSStyle.innerText=N9(t)}applyFullRender(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,t),this.code=vf({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){const{disableVirtualizationBuffers:r=!1}=this.options;if(r||n==null){this.bufferBefore!=null&&(this.bufferBefore.parentNode?.removeChild(this.bufferBefore),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.parentNode?.removeChild(this.bufferAfter),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.parentNode?.removeChild(this.bufferBefore),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.parentNode?.removeChild(this.bufferAfter),this.bufferAfter=void 0)}applyHeaderToDOM(t,n){const{file:r}=this;if(r==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const i=Mi(t);if(i!==this.lastRenderedHeaderHTML){const c=document.createElement("div");c.innerHTML=i;const u=c.firstElementChild;if(!(u instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(u,this.headerElement):n.shadowRoot?.prepend(u),this.headerElement=u,this.lastRenderedHeaderHTML=i}if(this.isContainerManaged)return;const{renderHeaderPrefix:s,renderCustomMetadata:o}=this.options;this.headerPrefix!=null&&this.headerPrefix.parentNode?.removeChild(this.headerPrefix),this.headerMetadata!=null&&this.headerMetadata.parentNode?.removeChild(this.headerMetadata);const a=s?.(r)??void 0,l=o?.(r)??void 0;a!=null&&(this.headerPrefix=document.createElement("div"),this.headerPrefix.slot=$v,a instanceof Element?this.headerPrefix.appendChild(a):this.headerPrefix.innerText=`${a}`,n.appendChild(this.headerPrefix)),l!=null&&(this.headerMetadata=document.createElement("div"),this.headerMetadata.slot=Fv,l instanceof Element?this.headerMetadata.appendChild(l):this.headerMetadata.innerText=`${l}`,n.appendChild(this.headerMetadata))}getOrCreateFileContainerNode(t,n){const r=this.fileContainer;if(this.fileContainer=t??this.fileContainer??document.createElement(n0),r!=null&&r!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),this.spriteSVG==null){const i=document.createElement("div");i.innerHTML=M9;const s=i.firstChild;s instanceof SVGElement&&(this.spriteSVG=s,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}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}applyPreNodeAttributes(t,{totalLines:n,themeStyles:r,baseThemeType:i}){const{overflow:s="scroll",themeType:o="system",disableLineNumbers:a=!1}=this.options,l={type:"file",split:!1,themeStyles:r,overflow:s,disableLineNumbers:a,themeType:i??o,diffIndicators:"none",disableBackground:!0,totalLines:n};D9(l,this.appliedPreAttributes)||(F9(t,l),this.appliedPreAttributes=l)}applyErrorToDOM(t,n){this.cleanupErrorWrapper();const r=this.getOrCreatePreNode(n);r.innerHTML="",r.parentNode?.removeChild(r),this.pre=void 0,this.appliedPreAttributes=void 0;const i=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",i.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=t.message,this.errorWrapper.appendChild(s);const o=document.createElement("pre");o.dataset.errorStack="",o.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(o)}cleanupErrorWrapper(){this.errorWrapper?.parentNode?.removeChild(this.errorWrapper),this.errorWrapper=void 0}},Kq=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 Td(e){return st({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Ld(e){return st({tagName:"div",children:[st({tagName:"span",children:[vs("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function sm(e){return st({tagName:"div",children:[i0({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{"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 La({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:s,isLastHunk:o}){const a=[];if(e==="metadata"&&t!=null&&a.push(st({tagName:"div",children:[vs(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const l=[];n!=null&&(r?(s||l.push(sm("up")),o||l.push(sm("down"))):l.push(sm(!s&&!o?"both":s?"down":"up"))),l.push(st({tagName:"div",children:[st({tagName:"span",children:[vs(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),a.push(st({tagName:"div",children:l,properties:{"data-separator-wrapper":"","data-separator-multi-button":l.length>2?"":void 0}}))}return e==="custom"&&i!=null&&a.push(st({tagName:"slot",properties:{name:i}})),st({tagName:"div",children:a,properties:{"data-separator":a.length===0?"simple":e,"data-expand-index":n,"data-separator-first":s?"":void 0,"data-separator-last":o?"":void 0}})}function Zq(e,t){return`hunk-separator-${e}-${t}`}function Yq(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function Qq(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let qv=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 w;const E=h[v-1],x=h[v+1];E&&(h[v-1]=void 0);let k=!1;if(x){const I=x.oldPos-v;k=x&&0<=I&&I=l&&p+1>=a)return o(this.buildValues(w.lastComponent,n,t))||!0;h[v]=w,w.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 Xq extends qv{}const Jq=new Xq;function eB(e,t,n){return Jq.diff(e,t,n)}const L6="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 tB extends qv{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${L6}]+|[^\\S\\n\\r]+|[^${L6}]`,"ug");return t.match(n)||[]}}const nB=new tB;function rB(e,t,n){return nB.diff(e,t,n)}class iB extends qv{constructor(){super(...arguments),this.tokenize=oB}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 sB=new iB;function I6(e,t,n){return sB.diff(e,t,n)}function oB(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;I6(n,r,Object.assign(Object.assign({},a),{callback:d=>{const f=c(d);u(f)}}))}else return c(I6(n,r,a));function c(u){if(!u)return;u.push({value:"",lines:[]});function d(v){return v.map(function(w){return" "+w})}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 E)m.push((w.added?"+":"-")+x);w.added?y+=E.length:g+=E.length}else{if(h)if(E.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=>z9(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;rr+` `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function A6({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 Id({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 c0({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:s=el,callback:o}){const a={finalHunk:e.hunks.at(-1),viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!a.isWindowedHighlight)return!1;const l=a.unifiedCount>=n+r,c=a.splitCount>=n+r;return t==="unified"?l:(t==="split"||l)&&c},shouldSkip(l,c){if(!a.isWindowedHighlight)return!1;const u=a.unifiedCount+l=n-l&&a.unifiedCount=n-l&&a.splitCount0?0:t==="unified"?k===c.unifiedLineStart+c.unifiedLineCount-1?d.collapsedLines:0:S===c.splitLineStart+c.splitLineCount-1?d.collapsedLines:0},p=function(){if(u.collapsedLines===0)return 0;const k=u.collapsedLines;return u.collapsedLines=0,k};if(a.shouldBreak())break;const u=M6(e.isPartial,c.collapsedBefore,i,l,s),d=(()=>{if(c!==a.finalHunk||!dB(e))return;const k=e.additionLines.length-(c.additionLineIndex+c.additionCount),S=e.deletionLines.length-(c.deletionLineIndex+c.deletionCount);if(k!==S)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${k}, deletions=${S}) for ${e.name}`);const I=Math.min(k,S);return M6(e.isPartial,I,i,e.hunks.length,s)})(),f=u.fromStart+u.fromEnd;if(a.shouldSkip(f,f))a.incrementCounts(f,f),p();else{let k=c.unifiedLineStart-u.rangeSize,S=c.splitLineStart-u.rangeSize,I=c.deletionLineIndex-u.rangeSize,A=c.additionLineIndex-u.rangeSize,D=c.deletionStart-u.rangeSize,z=c.additionStart-u.rangeSize,H=0;for(;H=t;return{fromStart:c?t:o,fromEnd:c?0:a,rangeSize:t,collapsedLines:Math.max(t-l,0)}}function dB(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount=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 hB({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=(()=>{const v=n.theme??jn;if(typeof v=="string")return t.getTheme(v).type})(),u=L9({theme:n.theme,highlighter:t}),d=r&&!l&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,f={deletionLines:[],additionLines:[]},h=!r&&!e.isPartial,p=r?o:void 0,m=new Map;function g(v){const w=h?0:v,E=m.get(w)??gB();return m.set(w,E),E}function y(v,w,E,x){if(l){let k=E.at(-1);(k==null||k.targetIndex+k.count!==w)&&(k={targetIndex:w,originalOffset:x.length,count:0},E.push(k)),k.count++}x.push(v)}c0({diff:e,diffStyle:"both",startingLine:i,totalLines:s,expandedHunks:l?p:!0,collapsedContextThreshold:a,callback:({hunkIndex:v,additionLine:w,deletionLine:E,type:x})=>{const k=g(v),S=w!=null?w.splitLineIndex:E.splitLineIndex;x==="change"&&w!=null&&E!=null&&mB({additionLine:e.additionLines[w.lineIndex],deletionLine:e.deletionLines[E.lineIndex],deletionLineIndex:k.deletionContent.length,additionLineIndex:k.additionContent.length,deletionDecorations:k.deletionDecorations,additionDecorations:k.additionDecorations,lineDiffType:d}),E!=null&&(y(e.deletionLines[E.lineIndex],E.lineIndex,k.deletionSegments,k.deletionContent),k.deletionInfo.push({type:x==="change"?"change-deletion":x,lineNumber:E.lineNumber,altLineNumber:x==="change"?void 0:w.lineNumber??void 0,lineIndex:`${E.unifiedLineIndex},${S}`})),w!=null&&(y(e.additionLines[w.lineIndex],w.lineIndex,k.additionSegments,k.additionContent),k.additionInfo.push({type:x==="change"?"change-addition":x,lineNumber:w.lineNumber,altLineNumber:x==="change"?void 0:E.lineNumber??void 0,lineIndex:`${w.unifiedLineIndex},${S}`}))}});for(const v of m.values()){if(v.deletionContent.length===0&&v.additionContent.length===0)continue;const w={name:e.prevName??e.name,contents:v.deletionContent.value},E={name:e.name,contents:v.additionContent.value},{deletionLines:x,additionLines:k}=yB({deletionFile:w,deletionInfo:v.deletionInfo,deletionDecorations:v.deletionDecorations,additionFile:E,additionInfo:v.additionInfo,additionDecorations:v.additionDecorations,highlighter:t,options:n,languageOverride:r?"text":e.lang});if(h){f.deletionLines=x,f.additionLines=k;continue}if(v.deletionSegments.length>0)for(const S of v.deletionSegments)for(let I=0;I0)for(const S of v.additionSegments)for(let I=0;I{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),r=n[t.lineNumber]??[];n[t.lineNumber]=r,r.push(t)}}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=el,expansionLineCount:c=100,hunkSeparators:u="line-info",lineDiffType:d="word-alt",maxLineDiffLength:f=1e3,overflow:h="scroll",theme:p=jn,themeType:m="system",tokenizeMaxLineLength:g=1e3,useCSSClasses:y=!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,theme:this.workerManager?.getDiffRenderOptions().theme??p,themeType:m,tokenizeMaxLineLength:g,useCSSClasses:y}}async initializeHighlighter(){return this.highlighter=await yl(E9(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e);let n=this.workerManager?.getDiffResultCache(e);n!=null&&!om(t,n.options)&&(n=void 0),this.renderCache??={diff:e,highlighted:!0,options:t,result:n?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null?this.workerManager.highlightDiffAST(this,this.diff):this.asyncHighlight(e).then(({result:r,options:i})=>{this.onHighlightSuccess(e,r,i)})}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:r,tokenizeMaxLineLength:i,lineDiffType:s}=this.getOptionsWithDefaults();return{theme:r,tokenizeMaxLineLength:i,lineDiffType:s}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceRender:!0}:e!==n.diff||!om(t,n.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff,t=r0){if(e==null)return;const{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),i=this.workerManager?.getDiffResultCache(e);i!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...i});const{options:s,forceRender:o}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:s,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&!vh(this.renderCache.renderRange,t))&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,Qq(t)||n?!0:this.expandedHunks,r),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||o)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??zr(e.name);const a=this.highlighter!=null&&Pc(s.theme),l=this.highlighter!=null&&o0(this.computedLang);if(this.highlighter!=null&&a&&(o||!this.renderCache.highlighted&&l||this.renderCache.result==null)){const{result:c,options:u}=this.renderDiffWithHighlighter(e,this.highlighter,!l);this.renderCache={diff:e,options:u,highlighted:l,result:c,renderRange:void 0}}(!a||!l)&&this.asyncHighlight(e).then(({result:c,options:u})=>{this.onHighlightSuccess(e,c,u)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=r0){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n,r){const{diffIndicators:i,disableBackground:s,disableLineNumbers:o,overflow:a,themeType:l}=this.getOptionsWithDefaults();return C9({type:"diff",diffIndicators:i,disableBackground:s,disableLineNumbers:o,overflow:a,themeStyles:n,split:e,themeType:r??l,totalLines:t})}async asyncHighlight(e){this.computedLang=e.lang??zr(e.name);const t=this.highlighter!=null&&Pc(this.options.theme??jn),n=this.highlighter!=null&&o0(this.computedLang);return(this.highlighter==null||!t||!n)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:j9(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n){if(this.renderCache==null)return;const r=this.renderCache.diff!==e||!this.renderCache.highlighted||!om(this.renderCache.options,n);this.renderCache={diff:e,options:n,highlighted:!0,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){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:Ka(),deletionsGutterAST:Ka(),additionsGutterAST:Ka(),expansionLineCount:l,hunkData:m,incrementRowCount(C=1){v.rowCount+=C},pushToGutter(C,M){switch(C){case"unified":v.unifiedGutterAST.children.push(M);break;case"deletions":v.deletionsGutterAST.children.push(M);break;case"additions":v.additionsGutterAST.children.push(M);break}}},w=wB(e);let E=0,x;function k(C,M,q,G){v.pushToGutter(C,m9(M,q,G))}function S(){if(s!=="unified"){if(E<=0||x==null){E=0,x=void 0;return}x==="additions"?(v.pushToGutter("additions",Dr(void 0,"buffer",E)),f?.push(Td(E))):(v.pushToGutter("deletions",Dr(void 0,"buffer",E)),h?.push(Td(E))),E=0,x=void 0}}function I(C){S(),s==="unified"?am("unified",C,v):(am("deletions",C,v),am("additions",C,v))}c0({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:a?!0:this.expandedHunks,collapsedContextThreshold:c,callback:({hunkIndex:C,hunk:M,collapsedBefore:q,collapsedAfter:G,additionLine:j,deletionLine:K,type:Y})=>{const J=K!=null?K.splitLineIndex:j.splitLineIndex,ee=j!=null?j.unifiedLineIndex:K.unifiedLineIndex;s==="split"&&Y!=="change"&&S(),q>0&&I({hunkIndex:C,collapsedLines:q,rangeSize:Math.max(M?.collapsedBefore??0,0),hunkSpecs:M?.hunkSpecs,isFirstHunk:C===0,isLastHunk:!1,isExpandable:!e.isPartial});const ue=s==="unified"?ee:J;if(s==="unified"){const Ie=K!=null?y[K.lineIndex]:void 0,ve=j!=null?g[j.lineIndex]:void 0;if(Ie==null&&ve==null){const et="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(et,{file:e.name}),new Error(et)}k("unified",Y==="change"?j!=null?"change-addition":"change-deletion":Y,j!=null?j.lineNumber:K.lineNumber,`${ee},${J}`),O6({diffStyle:"unified",type:Y,deletionLine:Ie,additionLine:ve,unifiedSpan:this.getAnnotations("unified",K?.lineNumber,j?.lineNumber,C,ue),context:v})}else{const Ie=K!=null?y[K.lineIndex]:void 0,ve=j!=null?g[j.lineIndex]:void 0;if(Ie==null&&ve==null){const En="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(En,{file:e.name}),new Error(En)}const et=(()=>{if(Y==="change"){if(ve==null)return"additions";if(Ie==null)return"deletions"}})();if(et!=null){if(x!=null&&x!==et)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");x=et,E++}const ot=this.getAnnotations("split",K?.lineNumber,j?.lineNumber,C,ue);ot!=null&&E>0&&S(),K!=null&&k("deletions",Y==="change"?"change-deletion":Y,K.lineNumber,`${K.unifiedLineIndex},${J}`),j!=null&&k("additions",Y==="change"?"change-addition":Y,j.lineNumber,`${j.unifiedLineIndex},${J}`),O6({diffStyle:"split",type:Y,additionLine:ve,deletionLine:Ie,...ot,context:v})}const be=K?.noEOFCR??!1,Fe=j?.noEOFCR??!1;if(Fe||be){if(be){const Ie=Y==="context"||Y==="context-expanded"?Y:"change-deletion";s==="unified"?(v.unifiedContentAST.push(Ld(Ie)),v.pushToGutter("unified",Dr(Ie,"metadata",1))):(v.deletionsContentAST.push(Ld(Ie)),v.pushToGutter("deletions",Dr(Ie,"metadata",1)),Fe||(v.pushToGutter("additions",Dr(void 0,"buffer",1)),v.additionsContentAST.push(Td(1))))}if(Fe){const Ie=Y==="context"||Y==="context-expanded"?Y:"change-addition";s==="unified"?(v.unifiedContentAST.push(Ld(Ie)),v.pushToGutter("unified",Dr(Ie,"metadata",1))):(v.additionsContentAST.push(Ld(Ie)),v.pushToGutter("additions",Dr(Ie,"metadata",1)),be||(v.pushToGutter("deletions",Dr(void 0,"buffer",1)),v.deletionsContentAST.push(Td(1))))}v.incrementRowCount(1)}G>0&&u!=="simple"&&I({hunkIndex:Y==="context-expanded"?C:C+1,collapsedLines:G,rangeSize:w,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),v.incrementRowCount(1)}}),s==="split"&&S();const A=Math.max(Yq(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),D=t.bufferBefore>0||t.bufferAfter>0,z=!d&&e.type!=="deleted",H=!d&&e.type!=="new",O=v.rowCount>0||D;f=z&&O?f:void 0,h=H&&O?h:void 0,p=d&&O?p:void 0;const L=this.createPreElement(h!=null&&f!=null,A,r,i);return{unifiedGutterAST:d&&O?v.unifiedGutterAST.children:void 0,unifiedContentAST:p,deletionsGutterAST:H&&O?v.deletionsGutterAST.children:void 0,deletionsContentAST:h,additionsGutterAST:z&&O?v.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:m,preNode:L,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff,r,i),totalLines:A,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=Ka(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,A9(r,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",r=this.renderCodeAST("unified",e);if(r!=null)return t.push(st({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(st({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(st({tagName:"code",children:s,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Mi(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?Mi(e):Mi(st({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(Ko(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(Ko(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,t,n){const{themeType:r}=this.getOptionsWithDefaults();return _9({fileOrDiff:e,themeStyles:t,themeType:n??r})}};function om(e,t){return jv(e.theme,t.theme)&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType}function D6(e){return`${e} unmodified line${e>1?"s":""}`}function O6({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:s,additionSpan:o,context:a}){let l=!1;if(e==="unified"){if(r!=null?a.unifiedContentAST.push(r):n!=null&&a.unifiedContentAST.push(n),i!=null){const c=t==="change"?n!=null?"change-deletion":"change-addition":t;a.unifiedContentAST.push(yf(i)),a.pushToGutter("unified",Dr(c,"annotation",1)),l=!0}}else if(e==="split"){if(n!=null&&a.deletionsContentAST.push(n),r!=null&&a.additionsContentAST.push(r),s!=null){const c=t==="change"?n!=null?"change-deletion":"context":t;a.deletionsContentAST.push(yf(s)),a.pushToGutter("deletions",Dr(c,"annotation",1)),l=!0}if(o!=null){const c=t==="change"?r!=null?"change-addition":"context":t;a.additionsContentAST.push(yf(o)),a.pushToGutter("additions",Dr(c,"annotation",1)),l=!0}}l&&a.incrementRowCount(1)}function am(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,La({type:"metadata",content:i,isFirstHunk:s,isLastHunk:o})),c.push(La({type:"metadata",content:i,isFirstHunk:s,isLastHunk:o})),e!=="additions"&&l.incrementRowCount(1));return}if(l.hunkSeparators==="simple"){t>0&&(l.pushToGutter(e,La({type:"simple",isFirstHunk:s,isLastHunk:!1})),c.push(La({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&l.incrementRowCount(1));return}const u=Zq(e,t),d=r>l.expansionLineCount,f=a?t:void 0;l.pushToGutter(e,La({type:l.hunkSeparators,content:D6(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:s,isLastHunk:o})),c.push(La({type:l.hunkSeparators,content:D6(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 wB(e){const t=e.hunks.at(-1);if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const n=e.additionLines.length-(t.additionLineIndex+t.additionCount),r=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(n!==r)throw new Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${n}, deletions=${r}) for ${e.name}`);return Math.min(n,r)}function kB(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function xB(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 SB(e){const t=e[0];if(t!=="+"&&t!=="-"&&t!==" "&&t!=="\\"){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}const n=e.substring(1);return{line:n===""?` `:n,type:t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}}function _B(e,t,n=!1){const r=mf.test(e),i=e.split(r?mf:k6);let s;const o=[];for(const a of i){if(r&&!mf.test(a)){if(s==null)s=a;else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",a)}continue}else if(!r&&!k6.test(a)){if(s==null)s=a;else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",a)}continue}const l=q9(a,{cacheKey:void 0,isGitDiff:r,throwOnError:n});l!=null&&o.push(l)}return{patchMetadata:s,files:o}}function q9(e,{cacheKey:t,isGitDiff:n=mf.test(e),oldFile:r,newFile:i,throwOnError:s=!1}={}){let o=0;const a=e.split(gq);let l;const c=r==null||i==null;let u=0,d=0;for(const f of a){const h=f.split(gf),p=h.shift();if(p==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",f);continue}const m=p.match(yq);let g=0,y=0;if(m==null||l==null){if(l!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",f);continue}l={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:c,additionLines:!c&&r!=null&&i!=null?i.contents.split(gf):[],deletionLines:!c&&r!=null&&i!=null?r.contents.split(gf):[],cacheKey:t},l.additionLines.length===1&&i?.contents===""&&(l.additionLines.length=0),l.deletionLines.length===1&&r?.contents===""&&(l.deletionLines.length=0),h.unshift(p);for(const S of h){const I=S.match(n?bq:vq);if(S.startsWith("diff --git")){const[,,A,,D]=S.trim().match(wq)??[];l.name=D.trim(),A!==D&&(l.prevName=A.trim())}else if(I!=null){const[,A,D]=I;A==="---"&&D!=="/dev/null"?(l.prevName=D.trim(),l.name=D.trim()):A==="+++"&&D!=="/dev/null"&&(l.name=D.trim())}else if(n){if(S.startsWith("new mode ")&&(l.mode=S.replace("new mode","").trim()),S.startsWith("old mode ")&&(l.prevMode=S.replace("old mode","").trim()),S.startsWith("new file mode")&&(l.type="new",l.mode=S.replace("new file mode","").trim()),S.startsWith("deleted file mode")&&(l.type="deleted",l.mode=S.replace("deleted file mode","").trim()),S.startsWith("similarity index")&&(S.startsWith("similarity index 100%")?l.type="rename-pure":l.type="rename-changed"),S.startsWith("index ")){const[,A,D,z]=S.trim().match(kq)??[];A!=null&&(l.prevObjectId=A),D!=null&&(l.newObjectId=D),z!=null&&(l.mode=z)}S.startsWith("rename from ")&&(l.prevName=S.replace("rename from ","")),S.startsWith("rename to ")&&(l.name=S.replace("rename to ","").trim())}}continue}let v,w;for(;h.length>0&&(h[h.length-1]===` `||h[h.length-1]==="\r"||h[h.length-1]===`\r `||h[h.length-1]==="");)h.pop();const E=parseInt(m[3]),x=parseInt(m[1]);u=c?u:x-1,d=c?d:E-1;const k={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(m[4]??"1"),additionStart:E,additionLines:g,deletionCount:parseInt(m[2]??"1"),deletionStart:x,deletionLines:y,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:m[5],hunkSpecs:p,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(k.additionCount)||isNaN(k.deletionCount)||isNaN(k.additionStart)||isNaN(k.deletionStart)){if(s)throw Error("parsePatchContent: invalid hunk metadata");console.error("parsePatchContent: invalid hunk metadata",k);continue}for(const S of h){const I=SB(S);if(I==null){console.error("processFile: invalid rawLine:",S);continue}const{type:A,line:D}=I;if(A==="addition")(v==null||v.type!=="change")&&(v=lm("change",u,d),k.hunkContent.push(v)),d++,c&&l.additionLines.push(D),v.additions++,g++,w="addition";else if(A==="deletion")(v==null||v.type!=="change")&&(v=lm("change",u,d),k.hunkContent.push(v)),u++,c&&l.deletionLines.push(D),v.deletions++,y++,w="deletion";else if(A==="context")(v==null||v.type!=="context")&&(v=lm("context",u,d),k.hunkContent.push(v)),d++,u++,c&&(l.deletionLines.push(D),l.additionLines.push(D)),v.lines++,w="context";else if(A==="metadata"&&v!=null){if(v.type==="context"?(k.noEOFCRAdditions=!0,k.noEOFCRDeletions=!0):w==="deletion"?k.noEOFCRDeletions=!0:w==="addition"&&(k.noEOFCRAdditions=!0),c&&(w==="addition"||w==="context")){const z=l.additionLines.length-1;z>=0&&(l.additionLines[z]=Zo(l.additionLines[z]))}if(c&&(w==="deletion"||w==="context")){const z=l.deletionLines.length-1;z>=0&&(l.deletionLines[z]=Zo(l.deletionLines[z]))}}}k.additionLines=g,k.deletionLines=y,k.collapsedBefore=Math.max(k.additionStart-1-o,0),l.hunks.push(k),o=k.additionStart+k.additionCount-1;for(const S of k.hunkContent)S.type==="context"?(k.splitLineCount+=S.lines,k.unifiedLineCount+=S.lines):(k.splitLineCount+=Math.max(S.additions,S.deletions),k.unifiedLineCount+=S.deletions+S.additions);k.splitLineStart=l.splitLineCount+k.collapsedBefore,k.unifiedLineStart=l.unifiedLineCount+k.collapsedBefore,l.splitLineCount+=k.collapsedBefore+k.splitLineCount,l.unifiedLineCount+=k.collapsedBefore+k.unifiedLineCount}if(l!=null){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":i!=null&&i.contents===""?l.type="deleted":r!=null&&r.contents===""&&(l.type="new")),l.type!=="rename-pure"&&l.type!=="rename-changed"&&(l.prevName=void 0),l}}function Due(e,t,n=!1){const r=[];for(const i of e.split(mq))try{r.push(_B(i,t!=null?`${t}-${r.length}`:void 0,n))}catch(s){if(n)throw s;console.error(s)}return r}function lm(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}function m1(e,t,n,r=!1){const i=q9(cB(e.name,t.name,e.contents,t.contents,e.header,t.header),{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 i}let CB=-1;var B9=class{static LoadedCustomComponent=H9;__id=`file-diff:${++CB}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;unsafeCSSStyle;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(e={theme:jn},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=new bB({...e,hunkSeparators:typeof e.hunkSeparators=="function"?"custom":e.hunkSeparators},this.handleHighlightRender,this.workerManager),this.resizeManager=new y9,this.scrollSyncManager=new Kq,this.interactionManager=new g9("diff",s0(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()};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){this.interactionManager.setSelection(e)}cleanUp(e=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.parentNode?.removeChild(this.fileContainer),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML="",this.pre=void 0),this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=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{overflow:t="scroll",diffStyle:n="split"}=this.options,{fileContainer:r,prerenderedHTML:i}=e;$9(r,i);for(const s of r.shadowRoot?.children??[]){if(s instanceof SVGElement){this.spriteSVG=s;continue}if(s instanceof HTMLElement){if(s instanceof HTMLPreElement){this.pre=s;for(const o of s.children)!(o instanceof HTMLElement)||o.tagName.toLowerCase()!=="code"||("deletions"in o.dataset&&(this.codeDeletions=o),"additions"in o.dataset&&(this.codeAdditions=o),"unified"in o.dataset&&(this.codeUnified=o));continue}if("diffsHeader"in s.dataset){this.headerElement=s;continue}if(s instanceof HTMLStyleElement&&s.hasAttribute(Hv)){this.unsafeCSSStyle=s;continue}}}if(this.pre!=null&&this.syncCodeNodesFromPre(this.pre),this.pre==null)this.render(e);else{const{lineAnnotations:s,oldFile:o,newFile:a,fileDiff:l}=e;this.fileContainer=r,delete this.pre.dataset.dehydrated,this.lineAnnotations=s??this.lineAnnotations,this.additionFile=a,this.deletionFile=o,this.fileDiff=l??(o!=null&&a!=null?m1(o,a):void 0),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t==="wrap"),t==="scroll"&&n==="split"&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions)}}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({oldFile:this.deletionFile,newFile:this.additionFile,fileDiff:this.fileDiff,forceRender:!0,renderRange:this.renderRange})}handleExpandHunk=(e,t,n=!1)=>{if(n){this.expandHunkFully(e);return}this.expandHunk(e,t)};expandHunk(e,t){this.hunksRenderer.expandHunk(e,t),this.rerender()}expandHunkFully(e){this.hunksRenderer.expandHunkFully(e),this.rerender()}render({oldFile:e,newFile:t,fileDiff:n,forceRender:r=!1,lineAnnotations:i,fileContainer:s,containerWrapper:o,renderRange:a}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:l=!1}=this.options,c=l?void 0:a,u=e!=null&&t!=null&&(!l0(e,this.deletionFile)||!l0(t,this.additionFile));let d=n!=null&&n!==this.fileDiff;const f=i!=null&&(i.length>0||this.lineAnnotations.length>0)?i!==this.lineAnnotations:!1;if(!l&&vh(c,this.renderRange)&&!r&&!f&&(n!=null&&n===this.fileDiff||n==null&&!u))return!1;const{renderRange:h}=this;if(this.renderRange=c,this.deletionFile=e,this.additionFile=t,n!=null?this.fileDiff=n:e!=null&&t!=null&&u&&(d=!0,this.fileDiff=m1(e,t)),i!=null&&this.setLineAnnotations(i),this.fileDiff==null)return!1;this.hunksRenderer.setOptions({...this.options,hunkSeparators:typeof this.options.hunkSeparators=="function"?"custom":this.options.hunkSeparators}),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{diffStyle:p="split",disableErrorHandling:m=!1,disableFileHeader:g=!1,overflow:y="scroll"}=this.options;if(g&&(this.headerElement!=null&&(this.headerElement.parentNode?.removeChild(this.headerElement),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.headerPrefix!=null&&(this.headerPrefix.parentNode?.removeChild(this.headerPrefix),this.headerPrefix=void 0),this.headerMetadata!=null&&(this.headerMetadata.parentNode?.removeChild(this.headerMetadata),this.headerMetadata=void 0)),s=this.getOrCreateFileContainer(s,o),l){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const v=this.hunksRenderer.renderDiff(this.fileDiff,p9);v?.headerElement!=null&&this.applyHeaderToDOM(v.headerElement,s),this.renderSeparators([]),this.injectUnsafeCSS()}catch(v){if(m)throw v;console.error(v),v instanceof Error&&this.applyErrorToDOM(v,s)}return!0}try{const v=this.getOrCreatePreNode(s);if(!(this.canPartiallyRender(r,f,u||d)&&this.applyPartialRender({previousRenderRange:h,renderRange:c}))){const w=this.hunksRenderer.renderDiff(this.fileDiff,c);if(w==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;w.headerElement!=null&&this.applyHeaderToDOM(w.headerElement,s),w.additionsContentAST!=null||w.deletionsContentAST!=null||w.unifiedContentAST!=null?this.applyHunksToDOM(v,w):this.pre!=null&&(this.pre.parentNode?.removeChild(this.pre),this.pre=void 0),this.renderSeparators(w.hunkData)}this.applyBuffers(v,c),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(v),this.resizeManager.setup(v,y==="wrap"),y==="scroll"&&p==="split"?this.scrollSyncManager.setup(v,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(v){if(m)throw v;console.error(v),v instanceof Error&&this.applyErrorToDOM(v,s)}return!0}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.parentNode?.removeChild(e);this.separatorCache.clear();for(const{element:e}of this.annotationCache.values())e.parentNode?.removeChild(e);this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(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}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.pre=void 0,this.spriteSVG=void 0,this.unsafeCSSStyle=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}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.parentNode?.removeChild(r);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||!xB(r,s.hunkData)){s?.element.parentNode?.removeChild(s.element);const o=document.createElement("div");o.style.display="contents",o.slot=r.slotName,o.appendChild(t(r,this)),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.parentNode?.removeChild(i)}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:n}of this.annotationCache.values())n.parentNode?.removeChild(n);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}-${Ko(r)}`;let s=this.annotationCache.get(i);if(s==null||!kB(r,s.annotation)){s?.element.parentElement?.removeChild(s.element);const o=t(r);if(o==null)continue;s={element:O9(Ko(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.parentNode?.removeChild(r)}renderGutterUtility(){const e=this.options.renderGutterUtility??this.options.renderHoverUtility;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?.parentNode?.removeChild(this.gutterUtilityContent),this.gutterUtilityContent=void 0;return}const n=P9();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){const n=this.fileContainer;if(this.fileContainer=e??this.fileContainer??document.createElement(n0),n!=null&&n!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=M9;const i=r.firstChild;i instanceof SVGElement&&(this.spriteSVG=i,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}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&&("unified"in t.dataset?this.codeUnified=t:"deletions"in t.dataset?this.codeDeletions=t:"additions"in t.dataset&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const n=Mi(e);if(n!==this.lastRenderedHeaderHTML){const a=document.createElement("div");a.innerHTML=n;const l=a.firstElementChild;if(!(l instanceof HTMLElement))return;this.headerElement!=null?t.shadowRoot?.replaceChild(l,this.headerElement):t.shadowRoot?.prepend(l),this.headerElement=l,this.lastRenderedHeaderHTML=n}if(this.isContainerManaged)return;const{renderHeaderPrefix:r,renderHeaderMetadata:i}=this.options;this.headerPrefix!=null&&this.headerPrefix.parentNode?.removeChild(this.headerPrefix),this.headerMetadata!=null&&this.headerMetadata.parentNode?.removeChild(this.headerMetadata);const s=r?.({deletionFile:this.deletionFile,additionFile:this.additionFile,fileDiff:this.fileDiff})??void 0,o=i?.({deletionFile:this.deletionFile,additionFile:this.additionFile,fileDiff:this.fileDiff})??void 0;s!=null&&(this.headerPrefix=document.createElement("div"),this.headerPrefix.slot=$v,s instanceof Element?this.headerPrefix.appendChild(s):this.headerPrefix.innerText=`${s}`,t.appendChild(this.headerPrefix)),o!=null&&(this.headerMetadata=document.createElement("div"),this.headerMetadata.slot=Fv,o instanceof Element?this.headerMetadata.appendChild(o):this.headerMetadata.innerText=`${o}`,t.appendChild(this.headerMetadata))}injectUnsafeCSS(){if(this.fileContainer?.shadowRoot==null)return;const{unsafeCSS:e}=this.options;e==null||e===""||(this.unsafeCSSStyle==null&&(this.unsafeCSSStyle=R9(),this.fileContainer.shadowRoot.appendChild(this.unsafeCSSStyle)),this.unsafeCSSStyle.innerText=N9(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=vf({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=vf({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=vf({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(!(S<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:k,totalLines:S,bufferBefore:0,bufferAfter:0})},w=v(c,Math.max(f-c,0));if(w==null&&ch)return!1;const x=(k,S)=>{if(k!=null){if(o==="unified"&&!Array.isArray(a))this.insertPartialHTML(o,a,k,S);else if(o==="split"&&Array.isArray(a))this.insertPartialHTML(o,a,k,S);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");y+=k.rowCount}};return this.cleanupErrorWrapper(),x(w,"afterbegin"),x(E,"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=P6(t[0]),i=P6(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}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){const{disableVirtualizationBuffers:n=!1}=this.options;if(n||t==null){this.bufferBefore!=null&&(this.bufferBefore.parentNode?.removeChild(this.bufferBefore),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.parentNode?.removeChild(this.bufferAfter),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.parentNode?.removeChild(this.bufferBefore),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.parentNode?.removeChild(this.bufferAfter),this.bufferAfter=void 0)}applyPreNodeAttributes(e,{themeStyles:t,baseThemeType:n,additionsContentAST:r,deletionsContentAST:i,totalLines:s}){const{diffIndicators:o="bars",disableBackground:a=!1,disableLineNumbers:l=!1,overflow:c="scroll",themeType:u="system",diffStyle:d="split"}=this.options,f={type:"diff",diffIndicators:o,disableBackground:a,disableLineNumbers:l,overflow:c,split:d==="unified"?!1:r!=null&&i!=null,themeStyles:t,themeType:n??u,totalLines:s};D9(f,this.appliedPreAttributes)||(F9(e,f),this.appliedPreAttributes=f)}applyErrorToDOM(e,t){this.cleanupErrorWrapper();const n=this.getOrCreatePreNode(t);n.innerHTML="",n.parentNode?.removeChild(n),this.pre=void 0,this.appliedPreAttributes=void 0;const r=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",r.appendChild(this.errorWrapper);const i=document.createElement("div");i.dataset.errorMessage="",i.innerText=e.message,this.errorWrapper.appendChild(i);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.parentNode?.removeChild(this.errorWrapper),this.errorWrapper=void 0}};function P6(e){if(!(e==null||e.type!=="element"))return e.children??[]}const bf=new Set;let wf=new Set,g1=null,y1=!1;function Yr(e){if(y1){bf.add(e);return}wf.add(e),g1??=requestAnimationFrame(U9)}function U9(e){y1=!0;for(const t of wf)try{t(e)}catch(n){console.error(n)}wf.clear(),bf.size>0?(wf=new Set(bf),bf.clear(),g1=requestAnimationFrame(U9)):g1=null,y1=!1}let EB=-1;var TB=class extends V9{__id=`virtualized-file:${++EB}`;top;height=0;heightCache=new Map;isVisible=!1;constructor(e,t,n=Vv,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=n}getLineHeight(e,t=!1){const n=this.heightCache.get(e);if(n!=null)return n;const r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(e==null)return;const t=this.options.overflow,n=this.options.collapsed;super.setOptions(e),(t!==this.options.overflow||n!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){if(this.fileContainer==null||this.file==null){this.height=0;return}const{overflow:e="scroll"}=this.options;if(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),e==="scroll"&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;let t=!1;if(this.code==null)return;const n=this.code.children[1];if(n instanceof HTMLElement){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&&(t=!0,o===this.metrics.lineHeight*(a?2:1)?this.heightCache.delete(s):this.heightCache.set(s,o))}(t||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render({file:this.file}));cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),super.cleanUp()}computeApproximateSize(){const e=this.height===0;if(this.height=0,this.file==null)return;const{disableFileHeader:t=!1,collapsed:n=!1,overflow:r="scroll"}=this.options,{diffHeaderHeight:i,fileGap:s,lineHeight:o}=this.metrics,a=this.getOrCreateLineCache(this.file);if(t?this.height+=s:this.height+=i,!n&&(r==="scroll"&&this.lineAnnotations.length===0?this.height+=this.getOrCreateLineCache(this.file).length*o:a0({lines:a,callback:({lineIndex:l})=>{this.height+=this.getLineHeight(l,!1)}}),a.length>0&&(this.height+=s),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){const l=this.fileContainer.getBoundingClientRect();l.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:this.file.name,elementHeight:l.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}}setVisibility(e){this.fileContainer!=null&&(e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}render({fileContainer:e,file:t,...n}){const r=this.fileContainer==null;if(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(r?(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height)):this.top??=this.virtualizer.getOffsetInScrollContainer(e),!this.isVisible)return this.renderPlaceholder(this.height);const i=this.virtualizer.getWindowSpecs(),s=this.computeRenderRangeFromWindow(this.file,this.top,i);return super.render({file:this.file,fileContainer:e,renderRange:s,...n})}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:i=!1,overflow:s="scroll"}=this.options,{diffHeaderHeight:o,fileGap:a,hunkLineCount:l,lineHeight:c}=this.metrics,u=this.getOrCreateLineCache(e),d=u.length,f=this.height,h=i?a:o;if(tr)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-h-a};if(d<=l)return{startingLine:0,totalLines:l,bufferBefore:0,bufferAfter:0};const p=Math.ceil(Math.max(r-n,0)/c),m=Math.ceil(p/l)*l+l*2,g=m/l,y=(n+r)/2;if(s==="scroll"&&this.lineAnnotations.length===0){const q=Math.floor((y-(t+h))/c),G=Math.floor(q/l)-Math.floor(g/2),j=Math.ceil(d/l),K=Math.max(0,Math.min(G,j))*l,Y=G<0?m+G*l:m,J=K*c,ee=Math.min(Y,d-K);return{startingLine:K,totalLines:Y,bufferBefore:J,bufferAfter:Math.max(0,(d-K-ee)*c)}}const v=g,w=[];let E=t+h,x=0,k,S,I;if(a0({lines:u,callback:({lineIndex:q})=>{const G=x%l===0;if(G&&(w.push(E-(t+h)),I!=null)){if(I<=0)return!0;I--}const j=this.getLineHeight(q,!1),K=Math.floor(x/l);return E>n-j&&Ey&&(S??=K),I==null&&E>=r&&G&&(I=v),x++,E+=j,!1}}),k==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-h-a};const A=w.length;S??=k;const D=Math.round(S-g/2),z=Math.max(0,A-g),H=Math.max(0,Math.min(D,z)),O=H*l,L=D<0?m+D*l:m,C=w[H]??0,M=H+L/l;return{startingLine:O,totalLines:L,bufferBefore:C,bufferAfter:Mthis.fileContainer==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),super.cleanUp()}expandHunk(e,t){this.hunksRenderer.expandHunk(e,t),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)}expandHunkFully(e){this.hunksRenderer.expandHunkFully(e),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)}setVisibility(e){this.fileContainer!=null&&(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){const e=this.height===0;if(this.height=0,this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:i=el,hunkSeparators:s="line-info"}=this.options,{diffHeaderHeight:o,fileGap:a,hunkSeparatorHeight:l}=this.metrics,c=this.getDiffStyle(),u=s!=="simple"&&s!=="metadata"&&s!=="line-info-basic"?a:0;if(t?s!=="simple"&&s!=="metadata"&&(this.height+=a):this.height+=o,!r&&(c0({diff:this.fileDiff,diffStyle:c,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({hunkIndex:d,collapsedBefore:f,collapsedAfter:h,deletionLine:p,additionLine:m})=>{const g=m!=null?m.splitLineIndex:p.splitLineIndex,y=m!=null?m.unifiedLineIndex:p.unifiedLineIndex,v=(m?.noEOFCR??!1)||(p?.noEOFCR??!1);f>0&&(d>0&&(this.height+=u),this.height+=l+u),this.height+=this.getLineHeight(c==="split"?g:y,v),h>0&&s!=="simple"&&(this.height+=u+l)}}),this.fileDiff.hunks.length>0&&(this.height+=a),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){const d=this.fileContainer.getBoundingClientRect();d.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:d.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,...i}={}){const s=this.fileContainer==null;if(this.fileDiff??=r??(t!=null&&n!=null?m1(t,n):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(s?(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height)):this.top??=this.virtualizer.getOffsetInScrollContainer(e),!this.isVisible)return this.renderPlaceholder(this.height);const o=this.virtualizer.getWindowSpecs(),a=this.computeRenderRangeFromWindow(this.fileDiff,this.top,o);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:a,oldFile:t,newFile:n,...i})}getDiffStyle(){return this.options.diffStyle??"split"}getExpandedRegion(e,t,n){if(n<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(n,0),renderAll:!1};const{expandUnchanged:r=!1,collapsedContextThreshold:i=el}=this.options;if(r||n<=i)return{fromStart:n,fromEnd:0,collapsedLines:0,renderAll:!0};const s=this.hunksRenderer.getExpandedHunk(t),o=Math.min(Math.max(s.fromStart,0),n),a=Math.min(Math.max(s.fromEnd,0),n),l=o+a,c=l>=n;return{fromStart:o,fromEnd:a,collapsedLines:Math.max(n-l,0),renderAll:c}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const i of e.hunks)n+=t==="split"?i.splitLineCount:i.unifiedLineCount;return n}for(const[i,s]of e.hunks.entries()){const o=t==="split"?s.splitLineCount:s.unifiedLineCount;n+=o;const a=Math.max(s.collapsedBefore,0),{fromStart:l,fromEnd:c,renderAll:u}=this.getExpandedRegion(e.isPartial,i,a);a>0&&(n+=u?a:l+c)}const r=e.hunks.at(-1);if(r!=null&&DB(e)){const i=e.additionLines.length-(r.additionLineIndex+r.additionCount),s=e.deletionLines.length-(r.deletionLineIndex+r.deletionCount);if(r!=null&&i!==s)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${i}, deletions=${s}) for ${e.name}`);const o=Math.min(i,s);if(r!=null&&o>0){const{fromStart:a,renderAll:l}=this.getExpandedRegion(e.isPartial,e.hunks.length,o);n+=l?o:a}}return n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:i=!1,expandUnchanged:s=!1,collapsedContextThreshold:o=el,hunkSeparators:a="line-info"}=this.options,{diffHeaderHeight:l,fileGap:c,hunkLineCount:u,hunkSeparatorHeight:d,lineHeight:f}=this.metrics,h=this.getDiffStyle(),p=this.height,m=this.getExpandedLineCount(e,h),g=i?c:l;if(tr)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-g-c};if(m<=u||e.hunks.length===0)return{startingLine:0,totalLines:u,bufferBefore:0,bufferAfter:0};const y=Math.ceil(Math.max(r-n,0)/f),v=Math.ceil(y/u)*u+u,w=v/u,E=w,x=[],k=(n+r)/2,S=a==="simple"||a==="metadata"||a==="line-info-basic"?0:c;let I=t+g,A=0,D,z,H;if(c0({diff:e,diffStyle:h,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:Y,collapsedBefore:J,collapsedAfter:ee,deletionLine:ue,additionLine:be})=>{const Fe=be!=null?be.splitLineIndex:ue.splitLineIndex,Ie=be!=null?be.unifiedLineIndex:ue.unifiedLineIndex,ve=(be?.noEOFCR??!1)||(ue?.noEOFCR??!1);let et=J>0?d+S+(Y>0?S:0):0;Y===0&&a==="simple"&&(et=0),I+=et;const ot=A%u===0;if(ot&&(x.push(I-(t+g+et)),H!=null)){if(H<=0)return!0;H--}const En=this.getLineHeight(h==="split"?Fe:Ie,ve),Jn=Math.floor(A/u);return I>n-En&&Ik&&(z=Jn),H==null&&I>=r&&ot&&(H=E),A++,I+=En,ee>0&&a!=="simple"&&(I+=d+S),!1}}),D==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-g-c};const O=x.length;z??=D;const L=Math.round(z-w/2),C=Math.max(0,O-w),M=Math.max(0,Math.min(L,C)),q=M*u,G=L<0?v+L*u:v,j=x[M]??0,K=M+G/u;return{startingLine:q,totalLines:G,bufferBefore:j,bufferAfter:K=t||i){const u=Math.max(e-r,0),d=Math.min(e+a,t)-r;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-r,0)),{top:l,bottom:Math.ceil(Math.max(Math.min(c,t)-r,l))}}const W9=1e3,RB=W9*4,NB=[0,1e-6,.99999,1],$B={overscrollSize:W9,intersectionObserverMargin:RB,resizeDebugging:!1};let Ad=0,FB=-1;var G9=class xi{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++FB}`;config;type="basic";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={...$B,...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:NB,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{xi.__STOP?(xi.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:xi.__lastScrollPosition}),Yr(this.computeRenderRangeAndEmit)):(xi.__lastScrollPosition=this.getScrollTop(),xi.__STOP=!0)};for(const[r,i]of this.connectQueue.entries())this.connect(r,i);this.connectQueue.clear(),this.markDOMDirty(),Yr(this.computeRenderRangeAndEmit)}}instanceChanged(t){this.instancesChanged.add(t),this.markDOMDirty(),Yr(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=R6({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),fitPerfectly:!1,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-Ad,newSize:i}),Ad=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-Ad,newSize:i}),Ad=i))}n&&Yr(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()+cc(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(),Yr(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(),Yr(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{xi.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,Yr(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{xi.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,Yr(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{xi.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,Yr(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(xi.__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;if(this.instancesChanged.size===0){const i=R6({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),fitPerfectly:!1,overscrollSize:this.config.overscrollSize});if(PB(this.windowSpecs,i)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.instancesChanged.size===0)return;this.windowSpecs=i}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const n=this.getScrollAnchor(this.height),r=new Set;for(const i of t?this.observers.values():this.visibleInstances.values())i.onRender(t)&&r.add(i);for(const i of this.instancesChanged)r.has(i)||i.onRender(t)&&r.add(i);this.scrollFix(n),this.instancesChanged.size>0&&this.markDOMDirty();for(const i of r)i.reconcileHeights();(this.instancesChanged.size>0||t)&&Yr(this.computeRenderRangeAndEmit),r.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=cc(c,n);if(u!==i){const d=u-i;this.applyScrollFix(d)}return}}const l=cc(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=cc(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);if(i==null)throw new Error("Virtualizer.handleIntersectionChange: no instance for target");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&&Yr(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 cc(e,t){const n=e.getBoundingClientRect(),r=t?.getBoundingClientRect().top??0;return n.top-r}function N6(e){const t=[];for(const n of e){const r=Go.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 $6(e){for(const t of Array.isArray(e)?e:[e])if(!Go.has(t))return!1;return!0}async function F6(e){const t=[],n=[];for(const r of e){if(r==="text"||r==="ansi")continue;const i=w9(r)??b9(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 H6(e){const t=[];for(const n of e){const r=fs.get(n);if(r==null)throw new Error(`getAllResolvedThemes: ${n} is unresolved, you must resolve all necessary themes before calling this function`);t.push(r)}return t}async function V6(e){const t=[],n=[];for(const r of e){const i=x9(r)??k9(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)i!=null&&t.push(i)}),t}zv("OpenCode",()=>Promise.resolve({name:"OpenCode",colors:{"editor.background":"var(--color-background-stronger)","editor.foreground":"var(--text-base)","gitDecoration.addedResourceForeground":"var(--syntax-diff-add)","gitDecoration.deletedResourceForeground":"var(--syntax-diff-delete)"},tokenColors:[{scope:["comment","punctuation.definition.comment","string.comment"],settings:{foreground:"var(--syntax-comment)"}},{scope:["entity.other.attribute-name"],settings:{foreground:"var(--syntax-property)"}},{scope:["constant","entity.name.constant","variable.other.constant","variable.language","entity"],settings:{foreground:"var(--syntax-constant)"}},{scope:["entity.name","meta.export.default","meta.definition.variable"],settings:{foreground:"var(--syntax-type)"}},{scope:["meta.object.member"],settings:{foreground:"var(--syntax-primitive)"}},{scope:["variable.parameter.function","meta.jsx.children","meta.block","meta.tag.attributes","entity.name.constant","meta.embedded.expression","meta.template.expression","string.other.begin.yaml","string.other.end.yaml"],settings:{foreground:"var(--syntax-punctuation)"}},{scope:["entity.name.function","support.type.primitive"],settings:{foreground:"var(--syntax-primitive)"}},{scope:["support.class.component"],settings:{foreground:"var(--syntax-type)"}},{scope:"keyword",settings:{foreground:"var(--syntax-keyword)"}},{scope:["keyword.operator","storage.type.function.arrow","punctuation.separator.key-value.css","entity.name.tag.yaml","punctuation.separator.key-value.mapping.yaml"],settings:{foreground:"var(--syntax-operator)"}},{scope:["storage","storage.type"],settings:{foreground:"var(--syntax-keyword)"}},{scope:["storage.modifier.package","storage.modifier.import","storage.type.java"],settings:{foreground:"var(--syntax-primitive)"}},{scope:["string","punctuation.definition.string","string punctuation.section.embedded source","entity.name.tag"],settings:{foreground:"var(--syntax-string)"}},{scope:"support",settings:{foreground:"var(--syntax-primitive)"}},{scope:["support.type.object.module","variable.other.object","support.type.property-name.css"],settings:{foreground:"var(--syntax-object)"}},{scope:"meta.property-name",settings:{foreground:"var(--syntax-property)"}},{scope:"variable",settings:{foreground:"var(--syntax-variable)"}},{scope:"variable.other",settings:{foreground:"var(--syntax-variable)"}},{scope:["invalid.broken","invalid.illegal","invalid.unimplemented","invalid.deprecated","message.error","markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted","brackethighlighter.unmatched","token.error-token"],settings:{foreground:"var(--syntax-critical)"}},{scope:"carriage-return",settings:{foreground:"var(--syntax-keyword)"}},{scope:"string source",settings:{foreground:"var(--syntax-variable)"}},{scope:"string variable",settings:{foreground:"var(--syntax-constant)"}},{scope:["source.regexp","string.regexp","string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition","string.regexp constant.character.escape"],settings:{foreground:"var(--syntax-regexp)"}},{scope:"support.constant",settings:{foreground:"var(--syntax-primitive)"}},{scope:"support.variable",settings:{foreground:"var(--syntax-variable)"}},{scope:"meta.module-reference",settings:{foreground:"var(--syntax-info)"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"var(--syntax-punctuation)"}},{scope:["markup.heading","markup.heading entity.name"],settings:{fontStyle:"bold",foreground:"var(--syntax-info)"}},{scope:"markup.quote",settings:{foreground:"var(--syntax-info)"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"var(--text-strong)"}},{scope:["markup.raw","markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted","markup.changed","punctuation.definition.changed","markup.ignored","markup.untracked"],settings:{foreground:"var(--text-base)"}},{scope:"meta.diff.range",settings:{fontStyle:"bold",foreground:"var(--syntax-unknown)"}},{scope:"meta.diff.header",settings:{foreground:"var(--syntax-unknown)"}},{scope:"meta.separator",settings:{fontStyle:"bold",foreground:"var(--syntax-unknown)"}},{scope:"meta.output",settings:{foreground:"var(--syntax-unknown)"}},{scope:"meta.export.default",settings:{foreground:"var(--syntax-unknown)"}},{scope:["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],settings:{foreground:"var(--syntax-unknown)"}},{scope:["constant.other.reference.link","string.other.link"],settings:{fontStyle:"underline",foreground:"var(--syntax-unknown)"}},{scope:"token.info-token",settings:{foreground:"var(--syntax-info)"}},{scope:"token.warn-token",settings:{foreground:"var(--syntax-warning)"}},{scope:"token.debug-token",settings:{foreground:"var(--syntax-info)"}}],semanticTokenColors:{comment:"var(--syntax-comment)",string:"var(--syntax-string)",number:"var(--syntax-constant)",regexp:"var(--syntax-regexp)",keyword:"var(--syntax-keyword)",variable:"var(--syntax-variable)",parameter:"var(--syntax-variable)",property:"var(--syntax-property)",function:"var(--syntax-primitive)",method:"var(--syntax-primitive)",type:"var(--syntax-type)",class:"var(--syntax-type)",namespace:"var(--syntax-type)",enumMember:"var(--syntax-primitive)","variable.constant":"var(--syntax-constant)","variable.defaultLibrary":"var(--syntax-unknown)"}}));function HB(e){let t=e;const n=/\$\$([\s\S]*?)\$\$/g;t=t.replace(n,(i,s)=>{try{return qg.renderToString(s,{displayMode:!0,throwOnError:!1})}catch{return`$$${s}$$`}});const r=/(?{try{return qg.renderToString(s,{displayMode:!1,throwOnError:!1})}catch{return`$${s}$`}}),t}function VB(e){const t=/(<(?:pre|code|kbd)[^>]*>[\s\S]*?<\/(?:pre|code|kbd)>)/gi;return e.split(t).map((r,i)=>i%2===1?r:HB(r)).join("")}async function zB(e){const t=/

    ([\s\S]*?)<\/code><\/pre>/g,n=[...e.matchAll(t)];if(n.length===0)return e;const r=await yl({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 Jc||(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:Oue,provider:jB}=Gt({name:"Marked",init:e=>{const t=_t.use({renderer:{link({href:n,title:r,text:i}){const s=r?` title="${r}"`:"";return`${i}`}}},yF({throwOnError:!1,nonStandard:!0}),wF({async highlight(n,r){const i=await yl({themes:["OpenCode"],langs:[],preferredHighlighter:"shiki-wasm"});return r in Jc||(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=VB(i);return zB(s)}}}return t}});function ct(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 qB(e){const t=atob(e.replace(/-/g,"+").replace(/_/g,"/")),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function u0(e){if(!e)return;let t=2166136261;for(let n=0;n>>0).toString(36)}function z6(e,t=5e5){if(!e)return;if(e.length<=t)return u0(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 u0(e.slice(o,o+n))??""}).join(":");return`${e.length}:${i}`}const K9=`
    [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 cm=!1;function Pue(){if(cm||typeof document>"u")return;const e="opencode-line-comment-styles";if(document.getElementById(e)){cm=!0;return}const t=document.createElement("style");t.id=e,t.textContent=K9,document.head.appendChild(t),cm=!0}const BB=`
    [data-diff],
    [data-file] {
      --diffs-bg: light-dark(var(--diffs-light-bg), var(--diffs-dark-bg));
      --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-hover: var(--diffs-bg-hover-override, light-dark( color-mix(in lab, var(--diffs-bg) 97%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-mixer))));
      --diffs-bg-context: var(--diffs-bg-context-override, light-dark( color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
      --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark( color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
      --diffs-fg: light-dark(var(--diffs-light), var(--diffs-dark));
      --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-deletion-base: var(--syntax-diff-delete);
      --diffs-addition-base: var(--syntax-diff-add);
      --diffs-modified-base: var(--syntax-diff-unknown);
      --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark( color-mix(in lab, var(--diffs-bg) 98%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-deletion-base))));
      --diffs-bg-deletion-number: var(--diffs-bg-deletion-number-override, light-dark( color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-deletion-base))));
      --diffs-bg-deletion-hover: var(--diffs-bg-deletion-hover-override, light-dark( color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 75%, 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 / 0.7), rgb(from var(--diffs-deletion-base) r g b / 0.1)));
      --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark( color-mix(in lab, var(--diffs-bg) 98%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-addition-base))));
      --diffs-bg-addition-number: var(--diffs-bg-addition-number-override, light-dark( color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-addition-base))));
      --diffs-bg-addition-hover: var(--diffs-bg-addition-hover-override, light-dark( color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 70%, 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 / 0.07), rgb(from var(--diffs-addition-base) r g b / 0.1)));
      --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;
      }
    }
    
    ${K9}
    
    `;function Z9(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:BB}}const UB={"--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 Y9(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 v1(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 d0(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(Y9(o)===s||parseInt(o.dataset.altLine??"",10)===n)return v1(t,o)}function j6(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=d0(e,r,t.start,t.side),s=d0(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 Q9(e){const t=e.dataset.lineAnnotation?.split(",")[1];if(!t)return;const n=parseInt(t,10);if(!Number.isNaN(n))return n}function X9(e){const t=Array.from(e.querySelectorAll("[data-comment-selected]"));for(const n of t)n instanceof HTMLElement&&n.removeAttribute("data-comment-selected")}function WB(e,t){X9(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=d0(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:d0(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=v1(r,d);f===void 0||fu||d.setAttribute("data-comment-selected","")}for(const d of s){const f=Q9(d);f===void 0||fu||d.setAttribute("data-comment-selected","")}}}function GB(e,t){X9(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=Q9(o);a===void 0||as||o.setAttribute("data-comment-selected","")}}}function KB(e,t){const n=new ResizeObserver(e);return ae(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function ZB(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=KB(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);ie(o=>{const a=bP(Eg(ce(e)));return SP(a,o,i,s),a},[])}const f0=Symbol("store-raw"),tl=Symbol("store-node"),ts=Symbol("store-has"),J9=Symbol("store-self");function eS(e){let t=e[ui];if(!t&&(Object.defineProperty(e,ui,{value:t=new Proxy(e,XB)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,s=n.length;ie[ui][t]),n}function tS(e){sg()&&nu(h0(e,tl),J9)()}function QB(e){return tS(e),Reflect.ownKeys(e)}const XB={get(e,t,n){if(t===f0)return e;if(t===ui)return n;if(t===If)return tS(e),n;const r=h0(e,tl),i=r[t];let s=i?i():e[t];if(t===tl||t===ts||t==="__proto__")return s;if(!i){const o=Object.getOwnPropertyDescriptor(e,t);sg()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(o&&o.get)&&(s=nu(r,t,s)())}return Ni(s)?eS(s):s},has(e,t){return t===f0||t===ui||t===If||t===tl||t===ts||t==="__proto__"?!0:(sg()&&nu(h0(e,ts),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:QB,getOwnPropertyDescriptor:YB};function nr(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[ts]&&e[ts][t]&&i!==void 0&&e[ts][t].$()):(e[t]=n,e[ts]&&e[ts][t]&&i===void 0&&e[ts][t].$());let o=h0(e,tl),a;if((a=nu(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){kc(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=vr(s),r===void 0||Ni(i)&&Ni(s)&&!Array.isArray(s)?nS(i,s):nr(e,r,s))}function ze(...[e,t]){const n=vr(e||{}),r=Array.isArray(n),i=eS(n);function s(...o){Ge(()=>{r&&o.length===1?JB(n,o[0]):kc(n,o)})}return[i,s]}const b1=Symbol("store-root");function ja(e,t,n,r,i){const s=t[n];if(e===s)return;const o=Array.isArray(e);if(n!==b1&&(!Ni(e)||!Ni(s)||o!==Array.isArray(s)||i&&e[i]!==s[i])){nr(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++)nr(s,u,e[u]);for(;ue.length&&nr(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&&nr(s,"length",e.length);return}const a=Object.keys(e);for(let c=0,u=a.length;c{if(!Ni(s)||!Ni(i))return i;const o=ja(i,{[b1]:s},b1,n,r);return o===void 0?s:o}}const p0=new WeakMap,rS={get(e,t){if(t===f0)return e;const n=e[t];let r;return Ni(n)?p0.get(n)||(p0.set(n,r=new Proxy(n,rS)),r):n},set(e,t,n){return nr(e,t,vr(n)),!0},deleteProperty(e,t){return nr(e,t,void 0,!0),!0}};function Re(e){return t=>{if(Ni(t)){let n;(n=p0.get(t))||p0.set(t,n=new Proxy(t,rS)),e(n)}return t}}const m0=new Set;let Vs,Mr,q6=!1;function eU(e){return e instanceof HTMLElement?e.closest("[data-prevent-autofocus]")||e.isContentEditable?!0:/^(INPUT|TEXTAREA|SELECT|BUTTON)$/.test(e.tagName):!1}function B6(e){if(e instanceof Node)for(const t of m0){const n=t.element();if(n&&n.isConnected&&n.contains(e))return t}}function tU(){q6||typeof window>"u"||(q6=!0,window.addEventListener("keydown",e=>{if(e.defaultPrevented||eU(e.target)||!(e.metaKey||e.ctrlKey))return;const n=e.key.toLowerCase();if(n==="g"){const s=Mr;if(!s||!s.isOpen())return;e.preventDefault(),e.stopPropagation(),s.next(e.shiftKey?-1:1);return}if(n!=="f")return;const r=Mr;if(r&&r.isOpen()){e.preventDefault(),e.stopPropagation(),r.open();return}const i=B6(document.activeElement)??B6(e.target)??Vs??Array.from(m0)[0];i&&(e.preventDefault(),e.stopPropagation(),i.open())},{capture:!0}))}function Ia(){const e=globalThis.CSS?.highlights;e&&(e.delete("opencode-find"),e.delete("opencode-find-current"))}function U6(){const e=globalThis;return typeof e.Highlight=="function"&&e.CSS?.highlights!=null}function W6(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(n.overflowY==="auto"||n.overflowY==="scroll")return t;t=t.parentElement}}function nU(e){let t,n,r="overlay",i=[];const[s,o]=ye([]),[a,l]=ze({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 O=e.overlay();O&&(n!==void 0&&(cancelAnimationFrame(n),n=void 0),O.innerHTML="")},g=()=>{if(r!=="overlay"){m();return}const O=e.wrapper(),L=e.overlay();if(!O||!L||(m(),i.length===0))return;const C=O.getBoundingClientRect(),M=d(),q=document.createDocumentFragment();for(let G=0;G{n=void 0,g()}))}const v=()=>{if(r!=="overlay")return;const O=e.getRoot(),L=O?Array.from(O.querySelectorAll("[data-code]")).filter(M=>M instanceof HTMLElement):[],C=s();L.length===C.length&&L.every((M,q)=>M===C[q])||(p(),o(L))},w=()=>{Ia(),m(),p(),i=[],l("count",0),l("index",0)},E=()=>{if(typeof window>"u")return;const O=e.wrapper();if(!O)return;const L=W6(O)??O,C=L.getBoundingClientRect(),M=parseFloat(getComputedStyle(L).getPropertyValue("--session-title-height")),q=Number.isNaN(M)?0:M;l("pos",{top:Math.round(C.top)+q-4,right:Math.round(window.innerWidth-C.right)+8})},x=(O,L)=>{const C=L.toLowerCase(),M=[],q=Array.from(O.querySelectorAll("[data-content] [data-line], [data-column-content]")).filter(G=>G instanceof HTMLElement);for(const G of q){const j=G.textContent;if(!j)continue;const K=j.toLowerCase();let Y=K.indexOf(C);if(Y===-1)continue;const J=[],ee=[],ue=document.createTreeWalker(G,NodeFilter.SHOW_TEXT);let be=ue.nextNode(),Fe=0;for(;be;)be instanceof Text&&(Fe+=be.data.length,J.push(be),ee.push(Fe)),be=ue.nextNode();if(J.length===0)continue;const Ie=ve=>{let et=0,ot=ee.length-1;for(;et>1;ee[Jn]>=ve?ot=Jn:et=Jn+1}const En=et===0?0:ee[et-1];return{node:J[et],offset:ve-En}};for(;Y!==-1;){const ve=Ie(Y),et=Ie(Y+L.length),ot=document.createRange();ot.setStart(ve.node,ve.offset),ot.setEnd(et.node,et.offset),M.push(ot),Y=K.indexOf(C,Y+L.length)}}return M},k=O=>{const L=O.startContainer;(L instanceof Element?L:L.parentElement)?.scrollIntoView({block:"center",inline:"center"})},S=(O,L)=>{const C=globalThis.CSS?.highlights,M=globalThis.Highlight;if(!C||typeof M!="function")return!1;C.delete("opencode-find"),C.delete("opencode-find-current");const q=O[L];q&&C.set("opencode-find-current",new M(q));const G=O.filter((j,K)=>K!==L);return G.length>0&&C.set("opencode-find",new M(...G)),!0},I=O=>{if(!c())return;const L=u().trim();if(!L){w();return}const C=e.getRoot();if(!C)return;r=U6()?"highlights":"overlay";const M=x(C,L),q=M.length,G=O?.reset?0:d(),j=q?Math.min(G,q-1):0;i=M,l("count",q),l("index",j);const K=M[j];if(r==="highlights"){m(),p(),S(M,j)||(r="overlay",Ia(),v(),y()),O?.scroll&&K&&k(K);return}Ia(),v(),O?.scroll&&K&&k(K),y()},A=()=>{l("open",!1),l("query",""),w(),Mr===H&&(Mr=void 0)},D=()=>{Mr&&Mr!==H&&Mr.close(),Mr=H,Vs=H,c()||l("open",!0),requestAnimationFrame(()=>{I({scroll:!0}),t?.focus(),t?.select()})},z=O=>{if(!c())return;const L=f();if(L<=0)return;const C=(d()+O+L)%L;l("index",C);const M=i[C];if(M){if(r==="highlights"){if(!S(i,C)){r="overlay",I({reset:!0,scroll:!0});return}k(M);return}Ia(),v(),k(M),y()}},H={element:e.wrapper,isOpen:()=>c(),next:z,open:D,close:A};return ie(()=>{for(const O of s())Wt(O,"scroll",y,{passive:!0})}),Pt(()=>{r=U6()?"highlights":"overlay",tU(),m0.add(H),Vs||(Vs=H),ae(()=>{m0.delete(H),Mr===H&&(Mr=void 0,Ia()),Vs===H&&(Vs=void 0)})}),ie(()=>{if(!c())return;const O=()=>E();requestAnimationFrame(O),Wt(window,"resize",O,{passive:!0});const L=e.wrapper();if(!L)return;const C=W6(L)??L;ZB(C,O)}),ae(()=>{p(),m(),Mr===H&&(Mr=void 0,Ia())}),{open:c,query:u,count:f,index:d,pos:h,setInput:O=>{t=O},setQuery:O=>{l("query",O),l("index",0),I({reset:!0,scroll:!0})},focus:D,close:A,next:z,refresh:O=>I(O),onPointerDown:()=>{Vs=H,e.wrapper()?.focus({preventScroll:!0})},onFocus:()=>{Vs=H},onInputKeyDown:O=>{if(O.key==="Escape"){O.preventDefault(),A();return}O.key==="Enter"&&(O.preventDefault(),z(O.shiftKey?-1:1))}}}function rU(){return{token:0}}function Rc(e){e.observer?.disconnect(),e.observer=void 0}function iS(e){if(!e)return;const t=e.querySelector("diffs-container");if(t instanceof HTMLElement)return t}function iU(e){return iS(e)?.shadowRoot??void 0}function w1(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 sU(e){if(typeof document>"u")return()=>{};if(w1(e()),typeof MutationObserver>"u")return()=>{};const t=document.documentElement,n=new MutationObserver(()=>w1(e()));return n.observe(t,{attributes:!0,attributeFilter:["data-color-scheme"]}),()=>n.disconnect()}function oU(e){Rc(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"||(Rc(e.state),e.state.observer=new MutationObserver(()=>{t===e.state.token&&e.isReady(o)&&(Rc(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 Rue(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 Nue(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 $ue(e){const t={start:e.start,end:e.end};return e.side&&(t.side=e.side),e.endSide&&(t.endSide=e.endSide),t}function Fue(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 aU(e){return e?e.start===e.end&&(e.endSide==null||e.endSide===e.side):!1}function lU(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 sS(e,t){!e||!t||requestAnimationFrame(()=>{const n=e.getSelection?.()??window.getSelection();if(n)try{n.removeAllRanges(),n.addRange(t)}catch{}})}function cU(){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&&!aU(s);return r=!1,o},reset(){r=!1,i()}}}function bh(e){if(e)return e instanceof HTMLElement?e:e.parentElement??void 0}function uU(e){const t=bh(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 G6(e){const t=bh(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 dU(e){const t=bh(e);if(!t)return;const n=t.closest("[data-code]");if(n instanceof HTMLElement)return n.hasAttribute("data-deletions")?"deletions":"additions"}function oS(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?lU(n).cloneRange():void 0}}const Md=new WeakMap,fU={lineHeight:24,hunkSeparatorHeight:24,fileGap:0};function hU(e){return e==="auto"||e==="scroll"||e==="overlay"}function K6(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(hU(n.overflowY))return t;t=t.parentElement}}function pU(e){if(typeof document>"u")return;const t=e.closest("[data-component='session-review']");if(t instanceof HTMLElement){const r=K6(e)??t,i=t.querySelector("[data-slot='session-review-container']");return{key:t,root:r,content:i instanceof HTMLElement?i:void 0}}const n=K6(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 mU(e){const t=pU(e);if(!t)return;let n=Md.get(t.key);if(!n){const i=new G9;i.setup(t.root,t.content),n={virtualizer:i,refs:0},Md.set(t.key,n)}n.refs+=1;let r=!1;return{virtualizer:n.virtualizer,release(){if(r)return;r=!0;const i=Md.get(t.key);i&&(i.refs-=1,!(i.refs>0)&&(i.virtualizer.cleanUp(),Md.delete(t.key)))}}}function gU(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xc={exports:{}},yU=xc.exports,Z6;function vU(){return Z6||(Z6=1,(function(e,t){(function(n,r){r(t)})(yU,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}}})})(xc,xc.exports)),xc.exports}var bU=vU();const Y6=gU(bU),um=Symbol("IGNORE_RESPONSE");var wU=class{highlighter;preferredHighlighter;renderOptions;initialized=!1;workers=[];taskQueue=new Map;pendingTasks=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;instanceRequestMap=new Map;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;constructor(e,{langs:t,theme:n=jn,lineDiffType:r="word-alt",tokenizeMaxLineLength:i=1e3,preferredHighlighter:s="shiki-js"}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,lineDiffType:r,tokenizeMaxLineLength:i},this.fileCache=new Y6.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new Y6.LRUMap(e.totalASTLRUCacheSize??100),this.initialize(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=jn,lineDiffType:t="word-alt",tokenizeMaxLineLength:n=1e3}){const r={theme:e,lineDiffType:t,tokenizeMaxLineLength:n};this.isInitialized()||await this.initialize();const i=jv(r.theme,this.renderOptions.theme);if(i&&r.lineDiffType===this.renderOptions.lineDiffType&&r.tokenizeMaxLineLength===this.renderOptions.tokenizeMaxLineLength)return;const s=tu(e);let o=[];if(i||(f1(s)?o=H6(s):o=await V6(s)),this.highlighter!=null)d1(o,this.highlighter),await this.setRenderOptionsOnWorkers(r,o);else{const[a]=await Promise.all([yl({themes:s,langs:["text"],preferredHighlighter:this.preferredHighlighter}),this.setRenderOptionsOnWorkers(r,o)]);this.highlighter=a}this.renderOptions=r,this.diffCache.clear(),this.fileCache.clear();for(const a of this.themeSubscribers)a.rerender()}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t}=this.renderOptions;return{theme:t,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.pendingTasks.set(o,a),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)};cleanUpPendingTasks(e){this.taskQueue.delete(e);const t=this.instanceRequestMap.get(e);t!=null&&(this.pendingTasks.delete(t),this.instanceRequestMap.delete(e)),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1)this.initialized=new Promise((t,n)=>{(async()=>{try{const r=tu(this.renderOptions.theme);let i=[];f1(r)?i=H6(r):i=await V6(r);let s=[];$6(e)?s=N6(e):s=await F6(e);const[o]=await Promise.all([yl({themes:r,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,s)]);if(this.initialized===!1)throw this.terminateWorkers(),new Error("WorkerPoolManager: workers failed to initialize");this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),t()}catch(r){this.initialized=!1,this.workersFailed=!0,this.queueBroadcastStateChanges(),n(r)}})()}),this.queueBroadcastStateChanges();else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const n=[];this.workers.length>0&&this.terminateWorkers();for(let r=0;r<(this.options.poolSize??8);r++){const i=this.options.workerFactory(),s={worker:i,request_id:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:o})=>o)])};i.addEventListener("message",o=>{this.handleWorkerMessage(s,o.data)}),i.addEventListener("error",o=>console.error("Worker error:",o,s)),this.workers.push(s),n.push(new Promise((o,a)=>{const l=this.generateRequestId(),c={type:"initialize",id:l,request:{type:"initialize",id:l,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t},resolve(){s.initialized=!0,o()},reject:a,requestStart:Date.now()};this.pendingTasks.set(l,c),this.executeTask(s,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.taskQueue.size===0)){for(const[e,t]of this.taskQueue){if(this.instanceRequestMap.has(e))continue;const n=Q6(t),r=this.getAvailableWorker(n);if(r==null)break;this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){if((t.lang??zr(t.name))!=="text"){for(const n of[this.taskQueue,this.pendingTasks.values()])for(const r of n)if("instance"in r&&r.instance===e&&r.request.type==="file"&&l0(t,r.request.file))return;this.submitTask(e,{type:"file",file:t})}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.initialize();return}return I9(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){if((t.lang??zr(t.name))!=="text"){for(const n of[this.taskQueue,this.pendingTasks.values()])for(const r of n)if("instance"in r&&r.instance===e&&r.request.type==="diff"&&r.request.diff===t)return;this.submitTask(e,{type:"diff",diff:t})}}getPlainDiffAST(e,t,n,r,i){return this.highlighter!=null?j9(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i}):void 0}terminate(){this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.instanceRequestMap.clear(),this.taskQueue.clear(),this.pendingTasks.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}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.request_id!=null).length,queuedTasks:this.taskQueue.size,pendingTasks:this.pendingTasks.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.initialize();const n=this.generateRequestId(),r=Date.now(),i=(()=>{switch(t.type){case"file":return{type:"file",id:n,request:{...t,id:n},instance:e,requestStart:r};case"diff":return{type:"diff",id:n,request:{...t,id:n},instance:e,requestStart:r}}})();this.taskQueue.set(e,i),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{const r=n.filter(i=>!e.langs.has(i));r.length>0&&($6(r)?t.request.resolvedLanguages=N6(r):t.request.resolvedLanguages=await F6(r)),this.executeTask(e,t)}catch{this.cleanWorkerAndTask(e,t)}}handleWorkerMessage(e,t){const n=this.pendingTasks.get(t.id);try{if(n==null)throw um;if(t.type==="error"){const r=new Error(t.error);throw t.stack&&(r.stack=t.stack),"reject"in n?n.reject(r):n.instance.onHighlightError(r),r}else{if("instance"in n&&this.instanceRequestMap.get(n.instance)!==t.id)throw um;switch(t.requestType){case"initialize":if(n.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");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,{instance:s,request:o}=n;o.file.cacheKey!=null&&this.fileCache.set(o.file.cacheKey,{result:r,options:i}),s.onHighlightSuccess(o.file,r,i);break}case"diff":{if(n.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:i}=t,{instance:s,request:o}=n;o.diff.cacheKey!=null&&this.diffCache.set(o.diff.cacheKey,{result:r,options:i}),s.onHighlightSuccess(o.diff,r,i);break}}}}catch(r){r!==um&&console.error(r,n,t)}this.cleanWorkerAndTask(e,n),this.queueBroadcastStateChanges(),this.taskQueue.size>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.request_id=e.id,"instance"in e&&(this.taskQueue.delete(e.instance),this.instanceRequestMap.set(e.instance,e.id)),this.pendingTasks.set(e.id,e)}cleanWorkerAndTask(e,t){e.request_id=void 0,t!=null&&("instance"in t&&this.instanceRequestMap.delete(t.instance),this.pendingTasks.delete(t.id))}executeTask(e,t){this.assignWorkerToTask(t,e);for(const n of Q6(t))e.langs.add(n);try{e.worker.postMessage(t.request)}catch(n){this.cleanWorkerAndTask(e,t),console.error("Failed to post message to worker:",n),"instance"in t?t.instance.onHighlightError(n):"reject"in t&&t.reject(n)}this.queueBroadcastStateChanges()}getAvailableWorker(e){let t;for(const n of this.workers){if(n.request_id!=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}generateRequestId(){return`req_${++this.nextRequestId}`}};function Q6(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??zr(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??zr(e.request.diff.name)),t.add(e.request.diff.lang??zr(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}const kU="/assets/worker-BDowWIry.js";function xU(){return new Worker(kU,{type:"module"})}function X6(e){const t=new wU({workerFactory:xU,poolSize:2},{theme:"OpenCode",lineDiffType:e,preferredHighlighter:"shiki-wasm"});return t.initialize(),t}let dm,fm;function k1(e){if(!(typeof window>"u"))return e==="split"?(fm||(fm=X6("word-alt")),fm):(dm||(dm=X6("none")),dm)}const SU=new Set(["png","jpg","jpeg","gif","webp","avif","bmp","ico","tif","tiff","heic"]),_U=new Set(["mp3","wav","ogg","m4a","aac","flac","opus"]);function wh(e){if(!(!e||typeof e!="object"))return e}function Bv(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 CU(e){if(!e)return"";const t=e.lastIndexOf(".");return t===-1?"":e.slice(t+1).toLowerCase()}function EU(e){const t=CU(e);if(t==="svg")return"svg";if(SU.has(t))return"image";if(_U.has(t))return"audio"}function TU(e){return wh(e)?.type==="binary"}function LU(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 hm(e,t){if(!e)return;if(typeof e=="string")return LU(e,t);const n=wh(e);if(!n||typeof n.content!="string")return;const r=Bv(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 IU(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 AU(e){const t=wh(e);if(!(!t||typeof t.content!="string"||Bv(typeof t.mimeType=="string"?t.mimeType:void 0)!=="image/svg+xml"))return t.encoding==="base64"?IU(t.content):t.content}function pm(e){if(typeof e=="string")return e.length>0;const t=wh(e);return t?typeof t.content=="string"&&t.content.length>0:!1}var MU=fe('
    '),Dd=fe('
    '),DU=fe('
    '),OU=fe('