@datalayer/agent-runtimes 1.6.90 → 1.6.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,8 +8,8 @@ import{lP as Mt,lQ as Br,lR as Fr,lS as qn,lT as Xn,lU as Qn,lV as tr,lW as Jn,l
8
8
  \f\r &>`.split(""),`\0
9
9
  \f\r "&'<=>\``.split("")],[`\0
10
10
  \f\r "&'<=>\``.split(""),`\0
11
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},Lo=new Set(["desc","foreignObject","title"]);function ko(t,e,r,n){const{schema:i}=n,o=i.space==="svg"?!1:n.settings.omitOptionalTags;let s=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase());const l=[];i.space==="html"&&t.tagName==="svg"&&(n.schema=Br);const a=To(n,t.properties);n.schema.space==="svg"&&Lo.has(t.tagName)&&(n.schema=Fr);const c=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);if(n.schema=i,c&&(s=!1),a||!o||!Ao(t,e,r)){if(l.push("<",t.tagName,a?" "+a:""),s&&(i.space==="svg"||n.settings.closeSelfClosing)){const p=a.charAt(a.length-1);(!n.settings.tightSelfClosing||p==="/"||p&&p!=='"'&&p!=="'")&&l.push(" "),l.push("/")}l.push(">")}return l.push(c),!s&&(!o||!Ft(t,e,r))&&l.push("</"+t.tagName+">"),l.join("")}function To(t,e){const r=[];let n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=Po(t,i,e[i]);o&&r.push(o)}}for(;++n<r.length;){const o=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&o!=='"'&&o!=="'"&&(r[n]+=" ")}return r.join("")}function Po(t,e,r){const n=qn(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const s=me(n.attribute,Object.assign({},t.settings.characterReferences,{subset:Oe.name[i][o]}));if(r===!0||(r=Array.isArray(r)?(n.commaSeparated?Xn:Qn)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r))return s;let l;if(t.settings.preferUnquoted&&(l=me(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Oe.unquoted[i][o]}))),l!==r){let{quote:a}=t;t.settings.quoteSmart&&tr(r,a)>tr(r,t.alternative)&&(a=t.alternative),l=a+me(r,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?Oe.single:Oe.double)[i][o],attribute:!0}))+a}return s+(l&&"="+l)}const Oo=["<","&"];function ln(t,e,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:me(t.value,Object.assign({},n.settings.characterReferences,{subset:Oo}))}function xo(t,e,r,n){return n.settings.allowDangerousHtml?t.value:ln(t,e,r,n)}function No(t,e,r,n){return n.all(t)}const Do=Jn("type",{invalid:$o,unknown:Vo,handlers:{comment:oo,doctype:so,element:ko,raw:xo,root:No,text:ln}});function $o(t){throw new Error("Expected node, not `"+t+"`")}function Vo(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Mo={},Go={},Bo=[];function Fo(t,e){const r=e||Mo,n=r.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");const i=n==='"'?"'":'"';return{one:jo,all:Uo,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||Kn,characterReferences:r.characterReferences||Go,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?Br:Fr,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function jo(t,e,r){return Do(t,e,r,this)}function Uo(t){const e=[],r=t&&t.children||Bo;let n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}function He(t,e){const r=typeof t=="string"?{}:{...t.colorReplacements},n=typeof t=="string"?t:t.name;for(const[i,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?r[i]=o:i===n&&Object.assign(r,o);return r}function K(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Wo(t){return Array.isArray(t)?t:[t]}async function cn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function jt(t){return!t||["plaintext","txt","text","plain"].includes(t)}function un(t){return t==="ansi"||jt(t)}function Ut(t){return t==="none"}function pn(t){return Ut(t)}function mn(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const r=Array.isArray(e)?e:e.split(/\s+/g);for(const n of r)n&&!t.properties.class.includes(n)&&t.properties.class.push(n);return t}function Ke(t,e=!1){if(t.length===0)return[["",0]];const r=t.split(/(\r?\n)/g);let n=0;const i=[];for(let o=0;o<r.length;o+=2){const s=e?r[o]+(r[o+1]||""):r[o];i.push([s,n]),n+=r[o].length,n+=r[o+1]?.length||0}return i}function Ho(t){const e=Ke(t,!0).map(([i])=>i);function r(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let o=i,s=0;for(const l of e){if(o<l.length)break;o-=l.length,s++}return{line:s,character:o}}function n(i,o){let s=0;for(let l=0;l<i;l++)s+=e[l].length;return s+=o,s}return{lines:e,indexToPos:r,posToIndex:n}}const Wt="light-dark()",zo=["color","background-color"];function qo(t,e){let r=0;const n=[];for(const i of e)i>r&&n.push({...t,content:t.content.slice(r,i),offset:t.offset+r}),r=i;return r<t.content.length&&n.push({...t,content:t.content.slice(r),offset:t.offset+r}),n}function Xo(t,e){const r=Array.from(e instanceof Set?e:new Set(e)).sort((n,i)=>n-i);return r.length?t.map(n=>n.flatMap(i=>{const o=r.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,l)=>s-l);return o.length?qo(i,o):i})):t}function Qo(t,e,r,n,i="css-vars"){const o={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(p=>ze(t.variants[p])),l=new Set(s.flatMap(p=>Object.keys(p))),a={},c=(p,m)=>{const d=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return r+e[p]+(m==="color"?"":d)};return s.forEach((p,m)=>{for(const d of l){const h=p[d]||"inherit";if(m===0&&n&&zo.includes(d))if(n===Wt&&s.length>1){const f=e.findIndex(b=>b==="light"),y=e.findIndex(b=>b==="dark");if(f===-1||y===-1)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const E=s[f][d]||"inherit",g=s[y][d]||"inherit";a[d]=`light-dark(${E}, ${g})`,i==="css-vars"&&(a[c(m,d)]=h)}else a[d]=h;else i==="css-vars"&&(a[c(m,d)]=h)}}),o.htmlStyle=a,o}function ze(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&x.Italic&&(e["font-style"]="italic"),t.fontStyle&x.Bold&&(e["font-weight"]="bold");const r=[];t.fontStyle&x.Underline&&r.push("underline"),t.fontStyle&x.Strikethrough&&r.push("line-through"),r.length&&(e["text-decoration"]=r.join(" "))}return e}function Pt(t){return typeof t=="string"?t:Object.entries(t).map(([e,r])=>`${e}:${r}`).join(";")}const dn=new WeakMap;function Ze(t,e){dn.set(t,e)}function Ie(t){return dn.get(t)}class he{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,r){return new he(Object.fromEntries(Wo(r).map(n=>[n,kt])),e)}constructor(...e){if(e.length===2){const[r,n]=e;this.lang=n,this._stacks=r}else{const[r,n,i]=e;this.lang=n,this._stacks={[i]:r}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Jo(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Jo(t){const e=[],r=new Set;function n(i){if(r.has(i))return;r.add(i);const o=i?.nameScopesList?.scopeName;o&&e.push(o),i.parent&&n(i.parent)}return n(t),e}function Ko(t,e){if(!(t instanceof he))throw new I("Invalid grammar state");return t.getInternalStack(e)}function Zo(){const t=new WeakMap;function e(r){if(!t.has(r.meta)){let n=function(s){if(typeof s=="number"){if(s<0||s>r.source.length)throw new I(`Invalid decoration offset: ${s}. Code length: ${r.source.length}`);return{...i.indexToPos(s),offset:s}}else{const l=i.lines[s.line];if(l===void 0)throw new I(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.lines.length}`);let a=s.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new I(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${l.length}`);return{...s,character:a,offset:i.posToIndex(s.line,a)}}};const i=Ho(r.source),o=(r.options.decorations||[]).map(s=>({...s,start:n(s.start),end:n(s.end)}));Yo(o),t.set(r.meta,{decorations:o,converter:i,source:r.source})}return t.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(!this.options.decorations?.length)return;const i=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return Xo(r,i)},code(r){if(!this.options.decorations?.length)return;const n=e(this),i=Array.from(r.children).filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==n.converter.lines.length)throw new I(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function o(p,m,d,h){const f=i[p];let y="",E=-1,g=-1;if(m===0&&(E=0),d===0&&(g=0),d===Number.POSITIVE_INFINITY&&(g=f.children.length),E===-1||g===-1)for(let _=0;_<f.children.length;_++)y+=hn(f.children[_]),E===-1&&y.length===m&&(E=_+1),g===-1&&y.length===d&&(g=_+1);if(E===-1)throw new I(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(g===-1)throw new I(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const b=f.children.slice(E,g);if(!h.alwaysWrap&&b.length===f.children.length)l(f,h,"line");else if(!h.alwaysWrap&&b.length===1&&b[0].type==="element")l(b[0],h,"token");else{const _={type:"element",tagName:"span",properties:{},children:b};l(_,h,"wrapper"),f.children.splice(E,b.length,_)}}function s(p,m){i[p]=l(i[p],m,"line")}function l(p,m,d){const h=m.properties||{},f=m.transform||(y=>y);return p.tagName=m.tagName||"span",p.properties={...p.properties,...h,class:p.properties.class},m.properties?.class&&mn(p,m.properties.class),p=f(p,d)||p,p}const a=[],c=n.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of c){const{start:m,end:d}=p;if(m.line===d.line)o(m.line,m.character,d.character,p);else if(m.line<d.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let h=m.line+1;h<d.line;h++)a.unshift(()=>s(h,p));o(d.line,0,d.character,p)}}a.forEach(p=>p())}}}function Yo(t){for(let e=0;e<t.length;e++){const r=t[e];if(r.start.offset>r.end.offset)throw new I(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=e+1;n<t.length;n++){const i=t[n],o=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,s=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,l=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,a=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(o||s||l||a){if(o&&s||l&&a||l&&r.start.offset===r.end.offset||s&&i.start.offset===i.end.offset)continue;throw new I(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function hn(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(hn).join(""):""}const es=[Zo()];function qe(t){const e=ts(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...es]}function ts(t){const e=[],r=[],n=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:e,post:r,normal:n}}var te=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],mt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function rs(t,e){const r=t.indexOf("\x1B",e);if(r!==-1&&t[r+1]==="["){const n=t.indexOf("m",r);if(n!==-1)return{sequence:t.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:t.length}}function dr(t){const e=t.shift();if(e==="2"){const r=t.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(e==="5"){const r=t.shift();if(r)return{type:"table",index:Number(r)}}}function ns(t){const e=[];for(;t.length>0;){const r=t.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)e.push({type:"resetAll"});else if(n<=9)mt[n]&&e.push({type:"setDecoration",value:mt[n]});else if(n<=29){const i=mt[n-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)e.push({type:"setForegroundColor",value:{type:"named",name:te[n-30]}});else if(n===38){const i=dr(t);i&&e.push({type:"setForegroundColor",value:i})}else if(n===39)e.push({type:"resetForegroundColor"});else if(n<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:te[n-40]}});else if(n===48){const i=dr(t);i&&e.push({type:"setBackgroundColor",value:i})}else n===49?e.push({type:"resetBackgroundColor"}):n===53?e.push({type:"setDecoration",value:"overline"}):n===55?e.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?e.push({type:"setForegroundColor",value:{type:"named",name:te[n-90+8]}}):n>=100&&n<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:te[n-100+8]}})}return e}function is(){let t=null,e=null,r=new Set;return{parse(n){const i=[];let o=0;do{const s=rs(n,o),l=s.sequence?n.substring(o,s.startPosition):n.substring(o);if(l.length>0&&i.push({value:l,foreground:t,background:e,decorations:new Set(r)}),s.sequence){const a=ns(s.sequence);for(const c of a)c.type==="resetAll"?(t=null,e=null,r.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&r.delete(c.value);for(const c of a)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&r.add(c.value)}o=s.position}while(o<n.length);return i}}}var os={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function ss(t=os){function e(l){return t[l]}function r(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let c=0;c<te.length;c++)n.push(e(te[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)n.push(r([l[c],l[p],l[m]]));let a=8;for(let c=0;c<24;c++,a+=10)n.push(r([a,a,a]));return n}function o(l){return i()[l]}function s(l){switch(l.type){case"named":return e(l.name);case"rgb":return r(l.rgb);case"table":return o(l.index)}}return{value:s}}const as={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function ls(t,e,r){const n=He(t,r),i=Ke(e),o=Object.fromEntries(te.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,p=t.colors?.[c];return[a,p||as[a]]})),s=ss(o),l=is();return i.map(a=>l.parse(a[0]).map(c=>{let p,m;c.decorations.has("reverse")?(p=c.background?s.value(c.background):t.bg,m=c.foreground?s.value(c.foreground):t.fg):(p=c.foreground?s.value(c.foreground):t.fg,m=c.background?s.value(c.background):void 0),p=K(p,n),m=K(m,n),c.decorations.has("dim")&&(p=cs(p));let d=x.None;return c.decorations.has("bold")&&(d|=x.Bold),c.decorations.has("italic")&&(d|=x.Italic),c.decorations.has("underline")&&(d|=x.Underline),c.decorations.has("strikethrough")&&(d|=x.Strikethrough),{content:c.value,offset:a[1],color:p,bgColor:m,fontStyle:d}}))}function cs(t){const e=t.match(/#([0-9a-f]{3,8})/i);if(e){const n=e[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],o=n[1],s=n[2],l=n[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${o}${o}${s}${s}${a}`}else if(n.length===3){const i=n[0],o=n[1],s=n[2];return`#${i}${i}${o}${o}${s}${s}80`}}}const r=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:t}function Ht(t,e,r={}){const{theme:n=t.getLoadedThemes()[0]}=r,i=t.resolveLangAlias(r.lang||"text");if(jt(i)||Ut(n))return Ke(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:s}=t.setTheme(n);if(i==="ansi")return ls(o,e,r);const l=t.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==l.name)throw new I(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${l.name}"`);if(!r.grammarState.themes.includes(o.name))throw new I(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return ps(e,l,o,s,r)}function us(...t){if(t.length===2)return Ie(t[1]);const[e,r,n={}]=t,{lang:i="text",theme:o=e.getLoadedThemes()[0]}=n;if(jt(i)||Ut(o))throw new I("Plain language does not have grammar state");if(i==="ansi")throw new I("ANSI language does not have grammar state");const{theme:s,colorMap:l}=e.setTheme(o),a=e.getLanguage(i);return new he(zt(r,a,s,l,n).stateStack,a.name,s.name)}function ps(t,e,r,n,i){const o=zt(t,e,r,n,i),s=new he(o.stateStack,e.name,r.name);return Ze(o.tokens,s),o.tokens}function zt(t,e,r,n,i){const o=He(r,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=i,a=Ke(t);let c=i.grammarState?Ko(i.grammarState,r.name)??kt:i.grammarContextCode!=null?zt(i.grammarContextCode,e,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:kt,p=[];const m=[];for(let d=0,h=a.length;d<h;d++){const[f,y]=a[d];if(f===""){p=[],m.push([]);continue}if(s>0&&f.length>=s){p=[],m.push([{content:f,offset:y,color:"",fontStyle:0}]);continue}let E,g,b;i.includeExplanation&&(E=e.tokenizeLine(f,c,l),g=E.tokens,b=0);const _=e.tokenizeLine2(f,c,l),w=_.tokens.length/2;for(let v=0;v<w;v++){const k=_.tokens[2*v],N=v+1<w?_.tokens[2*v+2]:f.length;if(k===N)continue;const U=_.tokens[2*v+1],ke=K(n[de.getForeground(U)],o),ot=de.getFontStyle(U),_e={content:f.substring(k,N),offset:y+k,color:ke,fontStyle:ot};if(i.includeExplanation){const X=[];if(i.includeExplanation!=="scopeName")for(const W of r.settings){let ie;switch(typeof W.scope){case"string":ie=W.scope.split(/,/).map(st=>st.trim());break;case"object":ie=W.scope;break;default:continue}X.push({settings:W,selectors:ie.map(st=>st.split(/ /))})}_e.explanation=[];let er=0;for(;k+er<N;){const W=g[b],ie=f.substring(W.startIndex,W.endIndex);er+=ie.length,_e.explanation.push({content:ie,scopes:i.includeExplanation==="scopeName"?ms(W.scopes):ds(X,W.scopes)}),b+=1}}p.push(_e)}m.push(p),p=[],c=_.ruleStack}return{tokens:m,stateStack:c}}function ms(t){return t.map(e=>({scopeName:e}))}function ds(t,e){const r=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];r[n]={scopeName:o,themeMatches:fs(t,o,e.slice(0,n))}}return r}function hr(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function hs(t,e,r){if(!hr(t[t.length-1],e))return!1;let n=t.length-2,i=r.length-1;for(;n>=0&&i>=0;)hr(t[n],r[i])&&(n-=1),i-=1;return n===-1}function fs(t,e,r){const n=[];for(const{selectors:i,settings:o}of t)for(const s of i)if(hs(s,e,r)){n.push(o);break}return n}function fn(t,e,r){const n=Object.entries(r.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),i=n.map(a=>{const c=Ht(t,e,{...r,theme:a.theme}),p=Ie(c),m=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:p,theme:m}}),o=gs(...i.map(a=>a.tokens)),s=o[0].map((a,c)=>a.map((p,m)=>{const d={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in r&&r.includeExplanation&&(d.explanation=p.explanation),o.forEach((h,f)=>{const{content:y,explanation:E,offset:g,...b}=h[c][m];d.variants[n[f].color]=b}),d})),l=i[0].state?new he(Object.fromEntries(i.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),i[0].state.lang):void 0;return l&&Ze(s,l),s}function gs(...t){const e=t.map(()=>[]),r=t.length;for(let n=0;n<t[0].length;n++){const i=t.map(a=>a[n]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const s=i.map(()=>0),l=i.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<r;c++){const p=l[c];p.content.length===a?(o[c].push(p),s[c]+=1,l[c]=i[c][s[c]]):(o[c].push({...p,content:p.content.slice(0,a)}),l[c]={...p,content:p.content.slice(a),offset:p.offset+a})}}}return e}function Xe(t,e,r){let n,i,o,s,l,a;if("themes"in r){const{defaultColor:c="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=r,d=Object.entries(r.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,b)=>g.color===c?-1:b.color===c?1:0);if(d.length===0)throw new I("`themes` option must not be empty");const h=fn(t,e,r);if(a=Ie(h),c&&Wt!==c&&!d.find(g=>g.color===c))throw new I(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=d.map(g=>t.getTheme(g.theme)),y=d.map(g=>g.color);o=h.map(g=>g.map(b=>Qo(b,y,p,c,m))),a&&Ze(o,a);const E=d.map(g=>He(g.theme,r));i=fr(d,f,E,p,c,"fg",m),n=fr(d,f,E,p,c,"bg",m),s=`shiki-themes ${f.map(g=>g.name).join(" ")}`,l=c?void 0:[i,n].join(";")}else if("theme"in r){const c=He(r.theme,r);o=Ht(t,e,r);const p=t.getTheme(r.theme);n=K(p.bg,c),i=K(p.fg,c),s=p.name,a=Ie(o)}else throw new I("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:n,themeName:s,rootStyle:l,grammarState:a}}function fr(t,e,r,n,i,o,s){return t.map((l,a)=>{const c=K(e[a][o],r[a])||"inherit",p=`${n+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&i){if(i===Wt&&t.length>1){const m=t.findIndex(y=>y.color==="light"),d=t.findIndex(y=>y.color==="dark");if(m===-1||d===-1)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=K(e[m][o],r[m])||"inherit",f=K(e[d][o],r[d])||"inherit";return`light-dark(${h}, ${f});${p}`}return c}return s==="css-vars"?p:null}).filter(l=>!!l).join(";")}function Qe(t,e,r,n={meta:{},options:r,codeToHast:(i,o)=>Qe(t,i,o),codeToTokens:(i,o)=>Xe(t,i,o)}){let i=e;for(const f of qe(r))i=f.preprocess?.call(n,i,r)||i;let{tokens:o,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:p}=Xe(t,i,r);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:d=!1}=r;m===!0?o=ys(o):m==="never"&&(o=Es(o)),d&&(o=bs(o));const h={...n,get source(){return i}};for(const f of qe(r))o=f.tokens?.call(h,o)||o;return _s(o,{...r,fg:s,bg:l,themeName:a,rootStyle:r.rootStyle===!1?!1:r.rootStyle??c},h,p)}function _s(t,e,r,n=Ie(t)){const i=qe(e),o=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[y,E]of Object.entries(e.meta||{}))y.startsWith("_")||(c[y]=E);let p={type:"element",tagName:"pre",properties:c,children:[],data:e.data},m={type:"element",tagName:"code",properties:{},children:o};const d=[],h={...r,structure:l,addClassToHast:mn,get source(){return r.source},get tokens(){return t},get options(){return e},get root(){return s},get pre(){return p},get code(){return m},get lines(){return d}};if(t.forEach((y,E)=>{E&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
12
- `}));let g={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(const _ of y){let w={type:"element",tagName:"span",properties:{..._.htmlAttrs},children:[{type:"text",value:_.content}]};const v=Pt(_.htmlStyle||ze(_));v&&(w.properties.style=v);for(const k of i)w=k?.span?.call(h,w,E+1,b,g,_)||w;l==="inline"?s.children.push(w):l==="classic"&&g.children.push(w),b+=_.content.length}if(l==="classic"){for(const _ of i)g=_?.line?.call(h,g,E+1)||g;d.push(g),o.push(g)}else l==="inline"&&d.push(g)}),l==="classic"){for(const y of i)m=y?.code?.call(h,m)||m;p.children.push(m);for(const y of i)p=y?.pre?.call(h,p)||p;s.children.push(p)}else if(l==="inline"){const y=[];let E={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of s.children)_.type==="element"&&_.tagName==="br"?(y.push(E),E={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&E.children.push(_);y.push(E);let b={type:"element",tagName:"code",properties:{},children:y};for(const _ of i)b=_?.code?.call(h,b)||b;s.children=[];for(let _=0;_<b.children.length;_++){_>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const w=b.children[_];w.type==="element"&&s.children.push(...w.children)}}let f=s;for(const y of i)f=y?.root?.call(h,f)||f;return n&&Ze(f,n),f}function ys(t){return t.map(e=>{const r=[];let n="",i;return e.forEach((o,s)=>{const a=!(o.fontStyle&&(o.fontStyle&x.Underline||o.fontStyle&x.Strikethrough));a&&o.content.match(/^\s+$/)&&e[s+1]?(i===void 0&&(i=o.offset),n+=o.content):n?(a?r.push({...o,offset:i,content:n+o.content}):r.push({content:n,offset:i},o),i=void 0,n=""):r.push(o)}),r})}function Es(t){return t.map(e=>e.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,i,o,s]=n;if(!i&&!s)return r;const l=[{...r,offset:r.offset+i.length,content:o}];return i&&l.unshift({content:i,offset:r.offset}),s&&l.push({content:s,offset:r.offset+i.length+o.length}),l}))}function bs(t){return t.map(e=>{const r=[];for(const n of e){if(r.length===0){r.push({...n});continue}const i=r[r.length-1],o=Pt(i.htmlStyle||ze(i)),s=Pt(n.htmlStyle||ze(n)),l=i.fontStyle&&(i.fontStyle&x.Underline||i.fontStyle&x.Strikethrough),a=n.fontStyle&&(n.fontStyle&x.Underline||n.fontStyle&x.Strikethrough);!l&&!a&&o===s?i.content+=n.content:r.push({...n})}return r})}const ws=Fo;function As(t,e,r){const n={meta:{},options:r,codeToHast:(o,s)=>Qe(t,o,s),codeToTokens:(o,s)=>Xe(t,o,s)};let i=ws(Qe(t,e,r,n));for(const o of qe(r))i=o.postprocess?.call(n,i,r)||i;return i}const gr={light:"#333333",dark:"#bbbbbb"},_r={light:"#fffffe",dark:"#1e1e1e"},yr="__shiki_resolved";function qt(t){if(t?.[yr])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:r,fg:n}=e;if(!r||!n){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(n=l.settings.foreground),l?.settings?.background&&(r=l.settings.background),!n&&e?.colors?.["editor.foreground"]&&(n=e.colors["editor.foreground"]),!r&&e?.colors?.["editor.background"]&&(r=e.colors["editor.background"]),n||(n=e.type==="light"?gr.light:gr.dark),r||(r=e.type==="light"?_r.light:_r.dark),e.fg=n,e.bg=r}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const o=new Map;function s(l){if(o.has(l))return o.get(l);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const p={...l,settings:{...l.settings}};if(a){const m=s(l.settings.foreground);e.colorReplacements[m]=l.settings.foreground,p.settings.foreground=m}if(c){const m=s(l.settings.background);e.colorReplacements[m]=l.settings.background,p.settings.background=m}return p});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=s(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,yr,{enumerable:!1,writable:!1,value:!0}),e}async function gn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!un(e)).map(async e=>await cn(e).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function _n(t){return(await Promise.all(t.map(async r=>pn(r)?null:qt(await cn(r))))).filter(r=>!!r)}let vs=3;function Cs(t,e=3){e>vs||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let pe=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function yn(t,e){if(!e)return t;if(e[t]){const r=new Set([t]);for(;e[t];){if(t=e[t],r.has(t))throw new pe(`Circular alias \`${Array.from(r).join(" -> ")} -> ${t}\``);r.add(t)}}return t}class Is extends Gi{constructor(e,r,n,i={}){super(e),this._resolver=e,this._themes=r,this._langs=n,this._alias=i,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const r=qt(e);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let r=this._textmateThemeCache.get(e);r||(r=Be.createFromRawTheme(e),this._textmateThemeCache.set(e,r)),this._syncRegistry.setTheme(r)}getGrammar(e){return e=yn(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const r=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,r.size)for(const o of r)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const r=Array.from(this._langGraph.entries()),n=r.filter(([i,o])=>!o);if(n.length){const i=r.filter(([o,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(a=>n.map(([c])=>c).includes(a)):!1).filter(o=>!n.includes(o));throw new pe(`Missing languages ${n.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of r)this._resolver.addLanguage(o);for(const[i,o]of r)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const r=e.embeddedLanguages??e.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}}class Rs{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,r){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(r=>{this._langs.set(r,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(e.scopeName)})}getInjections(e){const r=e.split(".");let n=[];for(let i=1;i<=r.length;i++){const o=r.slice(0,i).join(".");n=[...n,...this._injections.get(o)||[]]}return n}}let ye=0;function Ss(t){ye+=1,t.warnings!==!1&&ye>=10&&ye%10===0&&console.warn(`[Shiki] ${ye} 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 e=!1;if(!t.engine)throw new pe("`engine` option is required for synchronous mode");const r=(t.langs||[]).flat(1),n=(t.themes||[]).flat(1).map(qt),i=new Rs(t.engine,r),o=new Is(i,n,r,t.langAlias);let s;function l(_){return yn(_,t.langAlias)}function a(_){g();const w=o.getGrammar(typeof _=="string"?_:_.name);if(!w)throw new pe(`Language \`${_}\` not found, you may need to load it first`);return w}function c(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const w=o.getTheme(_);if(!w)throw new pe(`Theme \`${_}\` not found, you may need to load it first`);return w}function p(_){g();const w=c(_);s!==_&&(o.setTheme(w),s=_);const v=o.getColorMap();return{theme:w,colorMap:v}}function m(){return g(),o.getLoadedThemes()}function d(){return g(),o.getLoadedLanguages()}function h(..._){g(),o.loadLanguages(_.flat(1))}async function f(..._){return h(await gn(_))}function y(..._){g();for(const w of _.flat(1))o.loadTheme(w)}async function E(..._){return g(),y(await _n(_))}function g(){if(e)throw new pe("Shiki instance has been disposed")}function b(){e||(e=!0,o.dispose(),ye-=1)}return{setTheme:p,getTheme:c,getLanguage:a,getLoadedThemes:m,getLoadedLanguages:d,resolveLangAlias:l,loadLanguage:f,loadLanguageSync:h,loadTheme:E,loadThemeSync:y,dispose:b,[Symbol.dispose]:b}}async function Ls(t){t.engine||Cs("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,r,n]=await Promise.all([_n(t.themes||[]),gn(t.langs||[]),t.engine]);return Ss({...t,themes:e,langs:r,engine:n})}async function ks(t){const e=await Ls(t);return{getLastGrammarState:(...r)=>us(e,...r),codeToTokensBase:(r,n)=>Ht(e,r,n),codeToTokensWithThemes:(r,n)=>fn(e,r,n),codeToTokens:(r,n)=>Xe(e,r,n),codeToHast:(r,n)=>Qe(e,r,n),codeToHtml:(r,n)=>As(e,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Ts(t){const e=t.langs,r=t.themes,n=t.engine;async function i(o){function s(m){if(typeof m=="string"){if(m=o.langAlias?.[m]||m,un(m))return[];const d=e[m];if(!d)throw new I(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return d}return m}function l(m){if(pn(m))return"none";if(typeof m=="string"){const d=r[m];if(!d)throw new I(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return d}return m}const a=(o.themes??[]).map(m=>l(m)),c=(o.langs??[]).map(m=>s(m)),p=await ks({engine:o.engine??n(),...o,themes:a,langs:c});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(s))},loadTheme(...m){return p.loadTheme(...m.map(l))},getBundledLanguages(){return e},getBundledThemes(){return r}}}return i}const En=[{id:"abap",name:"ABAP",import:(()=>u(()=>import("./abap-BdImnpbu.js"),[],import.meta.url))},{id:"actionscript-3",name:"ActionScript",import:(()=>u(()=>import("./actionscript-3-CoDkCxhg.js"),[],import.meta.url))},{id:"ada",name:"Ada",import:(()=>u(()=>import("./ada-bCR0ucgS.js"),[],import.meta.url))},{id:"angular-html",name:"Angular HTML",import:(()=>u(()=>import("./angular-html-CU67Zn6k.js").then(t=>t.f),[],import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>u(()=>import("./angular-ts-BwZT4LLn.js"),[],import.meta.url))},{id:"apache",name:"Apache Conf",import:(()=>u(()=>import("./apache-Pmp26Uib.js"),[],import.meta.url))},{id:"apex",name:"Apex",import:(()=>u(()=>import("./apex-D8_7TLub.js"),[],import.meta.url))},{id:"apl",name:"APL",import:(()=>u(()=>import("./apl-dKokRX4l.js"),[],import.meta.url))},{id:"applescript",name:"AppleScript",import:(()=>u(()=>import("./applescript-Co6uUVPk.js"),[],import.meta.url))},{id:"ara",name:"Ara",import:(()=>u(()=>import("./ara-BRHolxvo.js"),[],import.meta.url))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>u(()=>import("./asciidoc-Ve4PFQV2.js"),[],import.meta.url))},{id:"asm",name:"Assembly",import:(()=>u(()=>import("./asm-D_Q5rh1f.js"),[],import.meta.url))},{id:"astro",name:"Astro",import:(()=>u(()=>import("./astro-CbQHKStN.js"),[],import.meta.url))},{id:"awk",name:"AWK",import:(()=>u(()=>import("./awk-DMzUqQB5.js"),[],import.meta.url))},{id:"ballerina",name:"Ballerina",import:(()=>u(()=>import("./ballerina-BFfxhgS-.js"),[],import.meta.url))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>u(()=>import("./bat-BkioyH1T.js"),[],import.meta.url))},{id:"beancount",name:"Beancount",import:(()=>u(()=>import("./beancount-k_qm7-4y.js"),[],import.meta.url))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>u(()=>import("./berry-uYugtg8r.js"),[],import.meta.url))},{id:"bibtex",name:"BibTeX",import:(()=>u(()=>import("./bibtex-CHM0blh-.js"),[],import.meta.url))},{id:"bicep",name:"Bicep",import:(()=>u(()=>import("./bicep-Bmn6On1c.js"),[],import.meta.url))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>u(()=>import("./bird2-DPOp833l.js"),[],import.meta.url))},{id:"blade",name:"Blade",import:(()=>u(()=>import("./blade-D4QpJJKB.js"),[],import.meta.url))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>u(()=>import("./bsl-BO_Y6i37.js"),[],import.meta.url))},{id:"c",name:"C",import:(()=>u(()=>import("./c-BIGW1oBm.js"),[],import.meta.url))},{id:"c3",name:"C3",import:(()=>u(()=>import("./c3-eo99z4R2.js"),[],import.meta.url))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>u(()=>import("./cadence-Bv_4Rxtq.js"),[],import.meta.url))},{id:"cairo",name:"Cairo",import:(()=>u(()=>import("./cairo-KRGpt6FW.js"),[],import.meta.url))},{id:"clarity",name:"Clarity",import:(()=>u(()=>import("./clarity-D53aC0YG.js"),[],import.meta.url))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>u(()=>import("./clojure-P80f7IUj.js"),[],import.meta.url))},{id:"cmake",name:"CMake",import:(()=>u(()=>import("./cmake-D1j8_8rp.js"),[],import.meta.url))},{id:"cobol",name:"COBOL",import:(()=>u(()=>import("./cobol-nwyudZeR.js"),[],import.meta.url))},{id:"codeowners",name:"CODEOWNERS",import:(()=>u(()=>import("./codeowners-Bp6g37R7.js"),[],import.meta.url))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>u(()=>import("./codeql-DsOJ9woJ.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>u(()=>import("./coffee-Ch7k5sss.js"),[],import.meta.url))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>u(()=>import("./common-lisp-Cg-RD9OK.js"),[],import.meta.url))},{id:"coq",name:"Coq",import:(()=>u(()=>import("./coq-DkFqJrB1.js"),[],import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>u(()=>import("./cpp-CofmeUqb.js"),[],import.meta.url))},{id:"crystal",name:"Crystal",import:(()=>u(()=>import("./crystal-tKQVLTB8.js"),[],import.meta.url))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>u(()=>import("./csharp-COcwbKMJ.js"),[],import.meta.url))},{id:"css",name:"CSS",import:(()=>u(()=>import("./css-DPfMkruS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>u(()=>import("./csv-fuZLfV_i.js"),[],import.meta.url))},{id:"cue",name:"CUE",import:(()=>u(()=>import("./cue-D82EKSYY.js"),[],import.meta.url))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>u(()=>import("./cypher-COkxafJQ.js"),[],import.meta.url))},{id:"d",name:"D",import:(()=>u(()=>import("./d-85-TOEBH.js"),[],import.meta.url))},{id:"dart",name:"Dart",import:(()=>u(()=>import("./dart-CF10PKvl.js"),[],import.meta.url))},{id:"dax",name:"DAX",import:(()=>u(()=>import("./dax-CEL-wOlO.js"),[],import.meta.url))},{id:"desktop",name:"Desktop",import:(()=>u(()=>import("./desktop-BmXAJ9_W.js"),[],import.meta.url))},{id:"diff",name:"Diff",import:(()=>u(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>u(()=>import("./docker-BcOcwvcX.js"),[],import.meta.url))},{id:"dotenv",name:"dotEnv",import:(()=>u(()=>import("./dotenv-Da5cRb03.js"),[],import.meta.url))},{id:"dream-maker",name:"Dream Maker",import:(()=>u(()=>import("./dream-maker-BtqSS_iP.js"),[],import.meta.url))},{id:"edge",name:"Edge",import:(()=>u(()=>import("./edge-BkV0erSs.js"),[],import.meta.url))},{id:"elixir",name:"Elixir",import:(()=>u(()=>import("./elixir-CDX3lj18.js"),[],import.meta.url))},{id:"elm",name:"Elm",import:(()=>u(()=>import("./elm-DbKCFpqz.js"),[],import.meta.url))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>u(()=>import("./emacs-lisp-C9XAeP06.js"),[],import.meta.url))},{id:"erb",name:"ERB",import:(()=>u(()=>import("./erb-B12qg9BL.js"),[],import.meta.url))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>u(()=>import("./erlang-DsQrWhSR.js"),[],import.meta.url))},{id:"fennel",name:"Fennel",import:(()=>u(()=>import("./fennel-BYunw83y.js"),[],import.meta.url))},{id:"fish",name:"Fish",import:(()=>u(()=>import("./fish-BvzEVeQv.js"),[],import.meta.url))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>u(()=>import("./fluent-C4IJs8-o.js"),[],import.meta.url))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>u(()=>import("./fortran-fixed-form-CkoXwp7k.js"),[],import.meta.url))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>u(()=>import("./fortran-free-form-BxgE0vQu.js"),[],import.meta.url))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>u(()=>import("./fsharp-CXgrBDvD.js"),[],import.meta.url))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>u(()=>import("./gdresource-BOOCDP_w.js"),[],import.meta.url))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>u(()=>import("./gdscript-C5YyOfLZ.js"),[],import.meta.url))},{id:"gdshader",name:"GDShader",import:(()=>u(()=>import("./gdshader-DkwncUOv.js"),[],import.meta.url))},{id:"genie",name:"Genie",import:(()=>u(()=>import("./genie-D0YGMca9.js"),[],import.meta.url))},{id:"gherkin",name:"Gherkin",import:(()=>u(()=>import("./gherkin-DyxjwDmM.js"),[],import.meta.url))},{id:"git-commit",name:"Git Commit Message",import:(()=>u(()=>import("./git-commit-F4YmCXRG.js"),[],import.meta.url))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>u(()=>import("./git-rebase-r7XF79zn.js"),[],import.meta.url))},{id:"gleam",name:"Gleam",import:(()=>u(()=>import("./gleam-BspZqrRM.js"),[],import.meta.url))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>u(()=>import("./glimmer-js-Rg0-pVw9.js"),[],import.meta.url))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>u(()=>import("./glimmer-ts-U6CK756n.js"),[],import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>u(()=>import("./glsl-DplSGwfg.js"),[],import.meta.url))},{id:"gn",name:"GN",import:(()=>u(()=>import("./gn-n2N0HUVH.js"),[],import.meta.url))},{id:"gnuplot",name:"Gnuplot",import:(()=>u(()=>import("./gnuplot-DdkO51Og.js"),[],import.meta.url))},{id:"go",name:"Go",import:(()=>u(()=>import("./go-CxLEBnE3.js"),[],import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>u(()=>import("./graphql-ChdNCCLP.js"),[],import.meta.url))},{id:"groovy",name:"Groovy",import:(()=>u(()=>import("./groovy-gcz8RCvz.js"),[],import.meta.url))},{id:"hack",name:"Hack",import:(()=>u(()=>import("./hack-CaT9iCJl.js"),[],import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>u(()=>import("./haml-B8DHNrY2.js"),[],import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>u(()=>import("./handlebars-BL8al0AC.js"),[],import.meta.url))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>u(()=>import("./haskell-Df6bDoY_.js"),[],import.meta.url))},{id:"haxe",name:"Haxe",import:(()=>u(()=>import("./haxe-CzTSHFRz.js"),[],import.meta.url))},{id:"hcl",name:"HashiCorp HCL",import:(()=>u(()=>import("./hcl-BWvSN4gD.js"),[],import.meta.url))},{id:"hjson",name:"Hjson",import:(()=>u(()=>import("./hjson-D5-asLiD.js"),[],import.meta.url))},{id:"hlsl",name:"HLSL",import:(()=>u(()=>import("./hlsl-D3lLCCz7.js"),[],import.meta.url))},{id:"html",name:"HTML",import:(()=>u(()=>import("./html-GMplVEZG.js"),[],import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>u(()=>import("./html-derivative-BFtXZ54Q.js"),[],import.meta.url))},{id:"http",name:"HTTP",import:(()=>u(()=>import("./http-jrhK8wxY.js"),[],import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>u(()=>import("./hurl-irOxFIW8.js"),[],import.meta.url))},{id:"hxml",name:"HXML",import:(()=>u(()=>import("./hxml-Bvhsp5Yf.js"),[],import.meta.url))},{id:"hy",name:"Hy",import:(()=>u(()=>import("./hy-DFXneXwc.js"),[],import.meta.url))},{id:"imba",name:"Imba",import:(()=>u(()=>import("./imba-DGztddWO.js"),[],import.meta.url))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>u(()=>import("./ini-BEwlwnbL.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>u(()=>import("./java-CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>u(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>u(()=>import("./jinja-4LBKfQ-Z.js"),[],import.meta.url))},{id:"jison",name:"Jison",import:(()=>u(()=>import("./jison-wvAkD_A8.js"),[],import.meta.url))},{id:"json",name:"JSON",import:(()=>u(()=>import("./json-Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>u(()=>import("./json5-C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>u(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>u(()=>import("./jsonl-DcaNXYhu.js"),[],import.meta.url))},{id:"jsonnet",name:"Jsonnet",import:(()=>u(()=>import("./jsonnet-DFQXde-d.js"),[],import.meta.url))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>u(()=>import("./jssm-C2t-YnRu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>u(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>u(()=>import("./julia-CxzCAyBv.js"),[],import.meta.url))},{id:"just",name:"Just",import:(()=>u(()=>import("./just-Cw27pwNe.js"),[],import.meta.url))},{id:"kdl",name:"KDL",import:(()=>u(()=>import("./kdl-DV7GczEv.js"),[],import.meta.url))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>u(()=>import("./kotlin-BdnUsdx6.js"),[],import.meta.url))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>u(()=>import("./kusto-DZf3V79B.js"),[],import.meta.url))},{id:"latex",name:"LaTeX",import:(()=>u(()=>import("./latex-CWtU0Tv5.js"),[],import.meta.url))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>u(()=>import("./lean-BZvkOJ9d.js"),[],import.meta.url))},{id:"less",name:"Less",import:(()=>u(()=>import("./less-B1dDrJ26.js"),[],import.meta.url))},{id:"liquid",name:"Liquid",import:(()=>u(()=>import("./liquid-DYVedYrR.js"),[],import.meta.url))},{id:"llvm",name:"LLVM IR",import:(()=>u(()=>import("./llvm-DjAJT7YJ.js"),[],import.meta.url))},{id:"log",name:"Log file",import:(()=>u(()=>import("./log-2UxHyX5q.js"),[],import.meta.url))},{id:"logo",name:"Logo",import:(()=>u(()=>import("./logo-BtOb2qkB.js"),[],import.meta.url))},{id:"lua",name:"Lua",import:(()=>u(()=>import("./lua-BaeVxFsk.js"),[],import.meta.url))},{id:"luau",name:"Luau",import:(()=>u(()=>import("./luau-C-HG3fhB.js"),[],import.meta.url))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>u(()=>import("./make-CHLpvVh8.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>u(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>u(()=>import("./marko-CnJfTvn9.js"),[],import.meta.url))},{id:"matlab",name:"MATLAB",import:(()=>u(()=>import("./matlab-D7o27uSR.js"),[],import.meta.url))},{id:"mdc",name:"MDC",import:(()=>u(()=>import("./mdc-BMNejdWA.js"),[],import.meta.url))},{id:"mdx",name:"MDX",import:(()=>u(()=>import("./mdx-Cmh6b_Ma.js"),[],import.meta.url))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>u(()=>import("./mermaid-mWjccvbQ.js"),[],import.meta.url))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>u(()=>import("./mipsasm-CKIfxQSi.js"),[],import.meta.url))},{id:"mojo",name:"Mojo",import:(()=>u(()=>import("./mojo-rZm6bMo-.js"),[],import.meta.url))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>u(()=>import("./moonbit-_H4v1dQx.js"),[],import.meta.url))},{id:"move",name:"Move",import:(()=>u(()=>import("./move-IF9eRakj.js"),[],import.meta.url))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>u(()=>import("./narrat-DRg8JJMk.js"),[],import.meta.url))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>u(()=>import("./nextflow-Zz6hmt5N.js"),[],import.meta.url))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>u(()=>import("./nextflow-groovy-BeH2EWoN.js"),[],import.meta.url))},{id:"nginx",name:"Nginx",import:(()=>u(()=>import("./nginx-BpAMiNFr.js"),[],import.meta.url))},{id:"nim",name:"Nim",import:(()=>u(()=>import("./nim-CVrawwO9.js"),[],import.meta.url))},{id:"nix",name:"Nix",import:(()=>u(()=>import("./nix-CwoSXNpI.js"),[],import.meta.url))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>u(()=>import("./nushell-Cz2AlsmD.js"),[],import.meta.url))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>u(()=>import("./objective-c-DXmwc3jG.js"),[],import.meta.url))},{id:"objective-cpp",name:"Objective-C++",import:(()=>u(()=>import("./objective-cpp-CLxacb5B.js"),[],import.meta.url))},{id:"ocaml",name:"OCaml",import:(()=>u(()=>import("./ocaml-C0hk2d4L.js"),[],import.meta.url))},{id:"odin",name:"Odin",import:(()=>u(()=>import("./odin-BBf5iR-q.js"),[],import.meta.url))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>u(()=>import("./openscad-C4EeE6gA.js"),[],import.meta.url))},{id:"pascal",name:"Pascal",import:(()=>u(()=>import("./pascal-D93ZcfNL.js"),[],import.meta.url))},{id:"perl",name:"Perl",import:(()=>u(()=>import("./perl-C0TMdlhV.js"),[],import.meta.url))},{id:"php",name:"PHP",import:(()=>u(()=>import("./php-Dhbhpdrm.js"),[],import.meta.url))},{id:"pkl",name:"Pkl",import:(()=>u(()=>import("./pkl-u5AG7uiY.js"),[],import.meta.url))},{id:"plsql",name:"PL/SQL",import:(()=>u(()=>import("./plsql-ChMvpjG-.js"),[],import.meta.url))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>u(()=>import("./po-BTJTHyun.js"),[],import.meta.url))},{id:"polar",name:"Polar",import:(()=>u(()=>import("./polar-C0HS_06l.js"),[],import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>u(()=>import("./postcss-CXtECtnM.js"),[],import.meta.url))},{id:"powerquery",name:"PowerQuery",import:(()=>u(()=>import("./powerquery-CEu0bR-o.js"),[],import.meta.url))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>u(()=>import("./powershell-Dpen1YoG.js"),[],import.meta.url))},{id:"prisma",name:"Prisma",import:(()=>u(()=>import("./prisma-Dd19v3D-.js"),[],import.meta.url))},{id:"prolog",name:"Prolog",import:(()=>u(()=>import("./prolog-CbFg5uaA.js"),[],import.meta.url))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>u(()=>import("./proto-C7zT0LnQ.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>u(()=>import("./pug-CGlum2m_.js"),[],import.meta.url))},{id:"puppet",name:"Puppet",import:(()=>u(()=>import("./puppet-BMWR74SV.js"),[],import.meta.url))},{id:"purescript",name:"PureScript",import:(()=>u(()=>import("./purescript-CklMAg4u.js"),[],import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>u(()=>import("./python-B6aJPvgy.js"),[],import.meta.url))},{id:"qml",name:"QML",import:(()=>u(()=>import("./qml-3beO22l8.js"),[],import.meta.url))},{id:"qmldir",name:"QML Directory",import:(()=>u(()=>import("./qmldir-C8lEn-DE.js"),[],import.meta.url))},{id:"qss",name:"Qt Style Sheets",import:(()=>u(()=>import("./qss-IeuSbFQv.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>u(()=>import("./r-Dspwwk_N.js"),[],import.meta.url))},{id:"racket",name:"Racket",import:(()=>u(()=>import("./racket-BqYA7rlc.js"),[],import.meta.url))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>u(()=>import("./raku-DXvB9xmW.js"),[],import.meta.url))},{id:"razor",name:"ASP.NET Razor",import:(()=>u(()=>import("./razor-Uh8Bk_45.js"),[],import.meta.url))},{id:"reg",name:"Windows Registry Script",import:(()=>u(()=>import("./reg-C-SQnVFl.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>u(()=>import("./regexp-CDVJQ6XC.js"),[],import.meta.url))},{id:"rel",name:"Rel",import:(()=>u(()=>import("./rel-C3B-1QV4.js"),[],import.meta.url))},{id:"riscv",name:"RISC-V",import:(()=>u(()=>import("./riscv-BM1_JUlF.js"),[],import.meta.url))},{id:"ron",name:"RON",import:(()=>u(()=>import("./ron-D8l8udqQ.js"),[],import.meta.url))},{id:"rosmsg",name:"ROS Interface",import:(()=>u(()=>import("./rosmsg-BJDFO7_C.js"),[],import.meta.url))},{id:"rst",name:"reStructuredText",import:(()=>u(()=>import("./rst-BrH8l1NY.js"),[],import.meta.url))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>u(()=>import("./ruby-Dw2BHqvy.js"),[],import.meta.url))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>u(()=>import("./rust-B1yitclQ.js"),[],import.meta.url))},{id:"sas",name:"SAS",import:(()=>u(()=>import("./sas-cz2c8ADy.js"),[],import.meta.url))},{id:"sass",name:"Sass",import:(()=>u(()=>import("./sass-Cj5Yp3dK.js"),[],import.meta.url))},{id:"scala",name:"Scala",import:(()=>u(()=>import("./scala-C151Ov-r.js"),[],import.meta.url))},{id:"scheme",name:"Scheme",import:(()=>u(()=>import("./scheme-C98Dy4si.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>u(()=>import("./scss-OYdSNvt2.js"),[],import.meta.url))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>u(()=>import("./sdbl-DVxCFoDh.js"),[],import.meta.url))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>u(()=>import("./shaderlab-Dg9Lc6iA.js"),[],import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>u(()=>import("./shellscript-Yzrsuije.js"),[],import.meta.url))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>u(()=>import("./shellsession-BADoaaVG.js"),[],import.meta.url))},{id:"smalltalk",name:"Smalltalk",import:(()=>u(()=>import("./smalltalk-BERRCDM3.js"),[],import.meta.url))},{id:"solidity",name:"Solidity",import:(()=>u(()=>import("./solidity-rGO070M0.js"),[],import.meta.url))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>u(()=>import("./soy-Brmx7dQM.js"),[],import.meta.url))},{id:"sparql",name:"SPARQL",import:(()=>u(()=>import("./sparql-rVzFXLq3.js"),[],import.meta.url))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>u(()=>import("./splunk-BtCnVYZw.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>u(()=>import("./sql-BLtJtn59.js"),[],import.meta.url))},{id:"ssh-config",name:"SSH Config",import:(()=>u(()=>import("./ssh-config-_ykCGR6B.js"),[],import.meta.url))},{id:"stata",name:"Stata",import:(()=>u(()=>import("./stata-BH5u7GGu.js"),[],import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>u(()=>import("./stylus-BEDo0Tqx.js"),[],import.meta.url))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>u(()=>import("./surrealql-Bq5Q-fJD.js"),[],import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>u(()=>import("./svelte-C_ipcX3V.js"),[],import.meta.url))},{id:"swift",name:"Swift",import:(()=>u(()=>import("./swift-D82vCrfD.js"),[],import.meta.url))},{id:"system-verilog",name:"SystemVerilog",import:(()=>u(()=>import("./system-verilog-CnnmHF94.js"),[],import.meta.url))},{id:"systemd",name:"Systemd Units",import:(()=>u(()=>import("./systemd-4A_iFExJ.js"),[],import.meta.url))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>u(()=>import("./talonscript-CkByrt1z.js"),[],import.meta.url))},{id:"tasl",name:"Tasl",import:(()=>u(()=>import("./tasl-QIJgUcNo.js"),[],import.meta.url))},{id:"tcl",name:"Tcl",import:(()=>u(()=>import("./tcl-dwOrl1Do.js"),[],import.meta.url))},{id:"templ",name:"Templ",import:(()=>u(()=>import("./templ-P3uqSqPl.js"),[],import.meta.url))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>u(()=>import("./terraform-BETggiCN.js"),[],import.meta.url))},{id:"tex",name:"TeX",import:(()=>u(()=>import("./tex-idrVyKtj.js"),[],import.meta.url))},{id:"toml",name:"TOML",import:(()=>u(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>u(()=>import("./ts-tags-zn1MmPIZ.js"),[],import.meta.url))},{id:"tsv",name:"TSV",import:(()=>u(()=>import("./tsv-B_m7g4N7.js"),[],import.meta.url))},{id:"tsx",name:"TSX",import:(()=>u(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url))},{id:"turtle",name:"Turtle",import:(()=>u(()=>import("./turtle-BsS91CYL.js"),[],import.meta.url))},{id:"twig",name:"Twig",import:(()=>u(()=>import("./twig-DNn4PbVi.js"),[],import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>u(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>u(()=>import("./typespec-BGHnOYBU.js"),[],import.meta.url))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>u(()=>import("./typst-DHCkPAjA.js"),[],import.meta.url))},{id:"v",name:"V",import:(()=>u(()=>import("./v-BcVCzyr7.js"),[],import.meta.url))},{id:"vala",name:"Vala",import:(()=>u(()=>import("./vala-CsfeWuGM.js"),[],import.meta.url))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>u(()=>import("./vb-D17OF-Vu.js"),[],import.meta.url))},{id:"verilog",name:"Verilog",import:(()=>u(()=>import("./verilog-BQ8w6xss.js"),[],import.meta.url))},{id:"vhdl",name:"VHDL",import:(()=>u(()=>import("./vhdl-CeAyd5Ju.js"),[],import.meta.url))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>u(()=>import("./viml-CJc9bBzg.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>u(()=>import("./vue-DN_0RTcg.js"),[],import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>u(()=>import("./vue-html-AaS7Mt5G.js"),[],import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>u(()=>import("./vue-vine-CQOfvN7w.js"),[],import.meta.url))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>u(()=>import("./vyper-CDx5xZoG.js"),[],import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>u(()=>import("./wasm-MzD3tlZU.js"),[],import.meta.url))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>u(()=>import("./wenyan-BV7otONQ.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>u(()=>import("./wgsl-Dx-B1_4e.js"),[],import.meta.url))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>u(()=>import("./wikitext-BhOHFoWU.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>u(()=>import("./wit-5i3qLPDT.js"),[],import.meta.url))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>u(()=>import("./wolfram-lXgVvXCa.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>u(()=>import("./xml-sdJ4AIDG.js"),[],import.meta.url))},{id:"xsl",name:"XSL",import:(()=>u(()=>import("./xsl-CtQFsRM5.js"),[],import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>u(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url))},{id:"zenscript",name:"ZenScript",import:(()=>u(()=>import("./zenscript-DVFEvuxE.js"),[],import.meta.url))},{id:"zig",name:"Zig",import:(()=>u(()=>import("./zig-VOosw3JB.js"),[],import.meta.url))}],Ps=Object.fromEntries(En.map(t=>[t.id,t.import])),Os=Object.fromEntries(En.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),bn={...Ps,...Os},xs=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>u(()=>import("./andromeeda-C4gqWexZ.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>u(()=>import("./aurora-x-D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>u(()=>import("./ayu-dark-DYE7WIF3.js"),[],import.meta.url))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>u(()=>import("./ayu-light-BA47KaF1.js"),[],import.meta.url))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>u(()=>import("./ayu-mirage-32ctXXKs.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>u(()=>import("./catppuccin-frappe-DFWUc33u.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>u(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>u(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>u(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>u(()=>import("./dark-plus-C3mMm8J8.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>u(()=>import("./dracula-BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>u(()=>import("./dracula-soft-BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>u(()=>import("./everforest-dark-BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>u(()=>import("./everforest-light-C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>u(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>u(()=>import("./github-dark-default-Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>u(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>u(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>u(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>u(()=>import("./github-light-default-D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>u(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>u(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>u(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>u(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[],import.meta.url))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>u(()=>import("./horizon-BUw7H-hv.js"),[],import.meta.url))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>u(()=>import("./horizon-bright-Cn-bp-IR.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>u(()=>import("./houston-DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>u(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>u(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>u(()=>import("./kanagawa-wave-DWedfzmr.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>u(()=>import("./laserwave-DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>u(()=>import("./light-plus-B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>u(()=>import("./material-theme-D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>u(()=>import("./material-theme-darker-BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>u(()=>import("./material-theme-lighter-B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>u(()=>import("./material-theme-ocean-CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>u(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>u(()=>import("./min-dark-CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>u(()=>import("./min-light-CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>u(()=>import("./monokai-D4h5O-jR.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>u(()=>import("./night-owl-C39BiMTA.js"),[],import.meta.url))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>u(()=>import("./night-owl-light-CMTm3GFP.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>u(()=>import("./nord-Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>u(()=>import("./one-dark-pro-DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>u(()=>import("./one-light-C3Wv6jpd.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>u(()=>import("./plastic-3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>u(()=>import("./poimandres-CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>u(()=>import("./red-bN70gL4F.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>u(()=>import("./rose-pine-qdsjHGoJ.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>u(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>u(()=>import("./rose-pine-moon-D4_iv3hh.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>u(()=>import("./slack-dark-BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>u(()=>import("./slack-ochin-DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>u(()=>import("./snazzy-light-Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>u(()=>import("./solarized-dark-DXbdFlpD.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>u(()=>import("./solarized-light-L9t79GZl.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>u(()=>import("./synthwave-84-CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>u(()=>import("./tokyo-night-hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>u(()=>import("./vesper-DU1UobuO.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>u(()=>import("./vitesse-black-Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>u(()=>import("./vitesse-dark-D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>u(()=>import("./vitesse-light-CVO1_9PV.js"),[],import.meta.url))}],Ns=Object.fromEntries(xs.map(t=>[t.id,t.import]));class Xt extends Error{constructor(e){super(e),this.name="ShikiError"}}function Ds(){return 2147483648}function $s(){return typeof performance<"u"?performance.now():Date.now()}const Vs=(t,e)=>t+(e-t%e)%e;async function Ms(t){let e,r;const n={};function i(h){r=h,n.HEAPU8=new Uint8Array(h),n.HEAPU32=new Uint32Array(h)}function o(h,f,y){n.HEAPU8.copyWithin(h,f,f+y)}function s(h){try{return e.grow(h-r.byteLength+65535>>>16),i(e.buffer),1}catch{}}function l(h){const f=n.HEAPU8.length;h=h>>>0;const y=Ds();if(h>y)return!1;for(let E=1;E<=4;E*=2){let g=f*(1+.2/E);g=Math.min(g,h+100663296);const b=Math.min(y,Vs(Math.max(h,g),65536));if(s(b))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(h,f,y=1024){const E=f+y;let g=f;for(;h[g]&&!(g>=E);)++g;if(g-f>16&&h.buffer&&a)return a.decode(h.subarray(f,g));let b="";for(;f<g;){let _=h[f++];if(!(_&128)){b+=String.fromCharCode(_);continue}const w=h[f++]&63;if((_&224)===192){b+=String.fromCharCode((_&31)<<6|w);continue}const v=h[f++]&63;if((_&240)===224?_=(_&15)<<12|w<<6|v:_=(_&7)<<18|w<<12|v<<6|h[f++]&63,_<65536)b+=String.fromCharCode(_);else{const k=_-65536;b+=String.fromCharCode(55296|k>>10,56320|k&1023)}}return b}function p(h,f){return h?c(n.HEAPU8,h,f):""}const m={emscripten_get_now:$s,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function d(){const f=await t({env:m,wasi_snapshot_preview1:m});e=f.memory,i(e.buffer),Object.assign(n,f),n.UTF8ToString=p}return await d(),n}var Gs=Object.defineProperty,Bs=(t,e,r)=>e in t?Gs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R=(t,e,r)=>Bs(t,typeof e!="symbol"?e+"":e,r);let T=null;function Fs(t){throw new Xt(t.UTF8ToString(t.getLastOnigError()))}class Ye{constructor(e){R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16Value"),R(this,"utf8Value"),R(this,"utf16OffsetToUtf8"),R(this,"utf8OffsetToUtf16");const r=e.length,n=Ye._utf8ByteLength(e),i=n!==r,o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const l=new Uint8Array(n);let a=0;for(let c=0;c<r;c++){const p=e.charCodeAt(c);let m=p,d=!1;if(p>=55296&&p<=56319&&c+1<r){const h=e.charCodeAt(c+1);h>=56320&&h<=57343&&(m=(p-55296<<10)+65536|h-56320,d=!0)}i&&(o[c]=a,d&&(o[c+1]=a),m<=127?s[a+0]=c:m<=2047?(s[a+0]=c,s[a+1]=c):m<=65535?(s[a+0]=c,s[a+1]=c,s[a+2]=c):(s[a+0]=c,s[a+1]=c,s[a+2]=c,s[a+3]=c)),m<=127?l[a++]=m:m<=2047?(l[a++]=192|(m&1984)>>>6,l[a++]=128|(m&63)>>>0):m<=65535?(l[a++]=224|(m&61440)>>>12,l[a++]=128|(m&4032)>>>6,l[a++]=128|(m&63)>>>0):(l[a++]=240|(m&1835008)>>>18,l[a++]=128|(m&258048)>>>12,l[a++]=128|(m&4032)>>>6,l[a++]=128|(m&63)>>>0),d&&c++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let r=0;for(let n=0,i=e.length;n<i;n++){const o=e.charCodeAt(n);let s=o,l=!1;if(o>=55296&&o<=56319&&n+1<i){const a=e.charCodeAt(n+1);a>=56320&&a<=57343&&(s=(o-55296<<10)+65536|a-56320,l=!0)}s<=127?r+=1:s<=2047?r+=2:s<=65535?r+=3:r+=4,l&&n++}return r}createString(e){const r=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,r),r}}const et=class j{constructor(e){if(R(this,"id",++j.LAST_ID),R(this,"_onigBinding"),R(this,"content"),R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16OffsetToUtf8"),R(this,"utf8OffsetToUtf16"),R(this,"ptr"),!T)throw new Xt("Must invoke loadWasm first.");this._onigBinding=T,this.content=e;const r=new Ye(e);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!j._sharedPtrInUse?(j._sharedPtr||(j._sharedPtr=T.omalloc(1e4)),j._sharedPtrInUse=!0,T.HEAPU8.set(r.utf8Value,j._sharedPtr),this.ptr=j._sharedPtr):this.ptr=r.createString(T)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===j._sharedPtr?j._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};R(et,"LAST_ID",0);R(et,"_sharedPtr",0);R(et,"_sharedPtrInUse",!1);let wn=et;class js{constructor(e){if(R(this,"_onigBinding"),R(this,"_ptr"),!T)throw new Xt("Must invoke loadWasm first.");const r=[],n=[];for(let l=0,a=e.length;l<a;l++){const c=new Ye(e[l]);r[l]=c.createString(T),n[l]=c.utf8Length}const i=T.omalloc(4*e.length);T.HEAPU32.set(r,i/4);const o=T.omalloc(4*e.length);T.HEAPU32.set(n,o/4);const s=T.createOnigScanner(i,o,e.length);for(let l=0,a=e.length;l<a;l++)T.ofree(r[l]);T.ofree(o),T.ofree(i),s===0&&Fs(T),this._onigBinding=T,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof e=="string"){e=new wn(e);const o=this._findNextMatchSync(e,r,!1,i);return e.dispose(),o}return this._findNextMatchSync(e,r,!1,i)}_findNextMatchSync(e,r,n,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(r),i);if(s===0)return null;const l=o.HEAPU32;let a=s/4;const c=l[a++],p=l[a++],m=[];for(let d=0;d<p;d++){const h=e.convertUtf8OffsetToUtf16(l[a++]),f=e.convertUtf8OffsetToUtf16(l[a++]);m[d]={start:h,end:f,length:f-h}}return{index:c,captureIndices:m}}}function Us(t){return typeof t.instantiator=="function"}function Ws(t){return typeof t.default=="function"}function Hs(t){return typeof t.data<"u"}function zs(t){return typeof Response<"u"&&t instanceof Response}function qs(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let xe;function Xs(t){if(xe)return xe;async function e(){T=await Ms(async r=>{let n=t;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),Us(n)?n=await n.instantiator(r):Ws(n)?n=await n.default(r):(Hs(n)&&(n=n.data),zs(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await Qs(n)(r):n=await Js(n)(r):qs(n)?n=await dt(n)(r):n instanceof WebAssembly.Module?n=await dt(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await dt(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return xe=e(),xe}function dt(t){return e=>WebAssembly.instantiate(t,e)}function Qs(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Js(t){return async e=>{const r=await t.arrayBuffer();return WebAssembly.instantiate(r,e)}}async function Ks(t){return t&&await Xs(t),{createScanner(e){return new js(e.map(r=>typeof r=="string"?r:r.source))},createString(e){return new wn(e)}}}const Zs=Ts({langs:bn,themes:Ns,engine:()=>Ks(u(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))});function fe(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function Ys(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}const Qt=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),P=String.raw;function ge(t,e){if(t==null)throw new Error(e??"Value expected");return t}const An=P`\[\^?`,vn=`c.? | C(?:-.?)?|${P`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${P`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${P`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${P`o\{[^\}]*\}?`}|${P`\d{1,3}`}`,Jt=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ne=new RegExp(P`
11
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},Lo=new Set(["desc","foreignObject","title"]);function ko(t,e,r,n){const{schema:i}=n,o=i.space==="svg"?!1:n.settings.omitOptionalTags;let s=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase());const l=[];i.space==="html"&&t.tagName==="svg"&&(n.schema=Br);const a=To(n,t.properties);n.schema.space==="svg"&&Lo.has(t.tagName)&&(n.schema=Fr);const c=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);if(n.schema=i,c&&(s=!1),a||!o||!Ao(t,e,r)){if(l.push("<",t.tagName,a?" "+a:""),s&&(i.space==="svg"||n.settings.closeSelfClosing)){const p=a.charAt(a.length-1);(!n.settings.tightSelfClosing||p==="/"||p&&p!=='"'&&p!=="'")&&l.push(" "),l.push("/")}l.push(">")}return l.push(c),!s&&(!o||!Ft(t,e,r))&&l.push("</"+t.tagName+">"),l.join("")}function To(t,e){const r=[];let n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=Po(t,i,e[i]);o&&r.push(o)}}for(;++n<r.length;){const o=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&o!=='"'&&o!=="'"&&(r[n]+=" ")}return r.join("")}function Po(t,e,r){const n=qn(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const s=me(n.attribute,Object.assign({},t.settings.characterReferences,{subset:Oe.name[i][o]}));if(r===!0||(r=Array.isArray(r)?(n.commaSeparated?Xn:Qn)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r))return s;let l;if(t.settings.preferUnquoted&&(l=me(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Oe.unquoted[i][o]}))),l!==r){let{quote:a}=t;t.settings.quoteSmart&&tr(r,a)>tr(r,t.alternative)&&(a=t.alternative),l=a+me(r,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?Oe.single:Oe.double)[i][o],attribute:!0}))+a}return s+(l&&"="+l)}const Oo=["<","&"],xo=new Set(["iframe","noembed","noframes","plaintext","script","style","xmp"]);function ln(t,e,r,n){return r&&r.type==="element"&&n.schema.space==="html"&&xo.has(r.tagName)?t.value:me(t.value,Object.assign({},n.settings.characterReferences,{subset:Oo}))}function No(t,e,r,n){return n.settings.allowDangerousHtml?t.value:ln(t,e,r,n)}function Do(t,e,r,n){return n.all(t)}const $o=Jn("type",{invalid:Vo,unknown:Mo,handlers:{comment:oo,doctype:so,element:ko,raw:No,root:Do,text:ln}});function Vo(t){throw new Error("Expected node, not `"+t+"`")}function Mo(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Go={},Bo={},Fo=[];function jo(t,e){const r=e||Go,n=r.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");const i=n==='"'?"'":'"';return{one:Uo,all:Wo,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||Kn,characterReferences:r.characterReferences||Bo,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?Br:Fr,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Uo(t,e,r){return $o(t,e,r,this)}function Wo(t){const e=[],r=t&&t.children||Fo;let n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}function He(t,e){const r=typeof t=="string"?{}:{...t.colorReplacements},n=typeof t=="string"?t:t.name;for(const[i,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?r[i]=o:i===n&&Object.assign(r,o);return r}function K(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Ho(t){return Array.isArray(t)?t:[t]}async function cn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function jt(t){return!t||["plaintext","txt","text","plain"].includes(t)}function un(t){return t==="ansi"||jt(t)}function Ut(t){return t==="none"}function pn(t){return Ut(t)}function mn(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const r=Array.isArray(e)?e:e.split(/\s+/g);for(const n of r)n&&!t.properties.class.includes(n)&&t.properties.class.push(n);return t}function Ke(t,e=!1){if(t.length===0)return[["",0]];const r=t.split(/(\r?\n)/g);let n=0;const i=[];for(let o=0;o<r.length;o+=2){const s=e?r[o]+(r[o+1]||""):r[o];i.push([s,n]),n+=r[o].length,n+=r[o+1]?.length||0}return i}function zo(t){const e=Ke(t,!0).map(([i])=>i);function r(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let o=i,s=0;for(const l of e){if(o<l.length)break;o-=l.length,s++}return{line:s,character:o}}function n(i,o){let s=0;for(let l=0;l<i;l++)s+=e[l].length;return s+=o,s}return{lines:e,indexToPos:r,posToIndex:n}}const Wt="light-dark()",qo=["color","background-color"];function Xo(t,e){let r=0;const n=[];for(const i of e)i>r&&n.push({...t,content:t.content.slice(r,i),offset:t.offset+r}),r=i;return r<t.content.length&&n.push({...t,content:t.content.slice(r),offset:t.offset+r}),n}function Qo(t,e){const r=Array.from(e instanceof Set?e:new Set(e)).sort((n,i)=>n-i);return r.length?t.map(n=>n.flatMap(i=>{const o=r.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,l)=>s-l);return o.length?Xo(i,o):i})):t}function Jo(t,e,r,n,i="css-vars"){const o={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(p=>ze(t.variants[p])),l=new Set(s.flatMap(p=>Object.keys(p))),a={},c=(p,m)=>{const d=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return r+e[p]+(m==="color"?"":d)};return s.forEach((p,m)=>{for(const d of l){const h=p[d]||"inherit";if(m===0&&n&&qo.includes(d))if(n===Wt&&s.length>1){const f=e.findIndex(b=>b==="light"),y=e.findIndex(b=>b==="dark");if(f===-1||y===-1)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const E=s[f][d]||"inherit",g=s[y][d]||"inherit";a[d]=`light-dark(${E}, ${g})`,i==="css-vars"&&(a[c(m,d)]=h)}else a[d]=h;else i==="css-vars"&&(a[c(m,d)]=h)}}),o.htmlStyle=a,o}function ze(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&x.Italic&&(e["font-style"]="italic"),t.fontStyle&x.Bold&&(e["font-weight"]="bold");const r=[];t.fontStyle&x.Underline&&r.push("underline"),t.fontStyle&x.Strikethrough&&r.push("line-through"),r.length&&(e["text-decoration"]=r.join(" "))}return e}function Pt(t){return typeof t=="string"?t:Object.entries(t).map(([e,r])=>`${e}:${r}`).join(";")}const dn=new WeakMap;function Ze(t,e){dn.set(t,e)}function Ie(t){return dn.get(t)}class he{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,r){return new he(Object.fromEntries(Ho(r).map(n=>[n,kt])),e)}constructor(...e){if(e.length===2){const[r,n]=e;this.lang=n,this._stacks=r}else{const[r,n,i]=e;this.lang=n,this._stacks={[i]:r}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Ko(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Ko(t){const e=[],r=new Set;function n(i){if(r.has(i))return;r.add(i);const o=i?.nameScopesList?.scopeName;o&&e.push(o),i.parent&&n(i.parent)}return n(t),e}function Zo(t,e){if(!(t instanceof he))throw new I("Invalid grammar state");return t.getInternalStack(e)}function Yo(){const t=new WeakMap;function e(r){if(!t.has(r.meta)){let n=function(s){if(typeof s=="number"){if(s<0||s>r.source.length)throw new I(`Invalid decoration offset: ${s}. Code length: ${r.source.length}`);return{...i.indexToPos(s),offset:s}}else{const l=i.lines[s.line];if(l===void 0)throw new I(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.lines.length}`);let a=s.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new I(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${l.length}`);return{...s,character:a,offset:i.posToIndex(s.line,a)}}};const i=zo(r.source),o=(r.options.decorations||[]).map(s=>({...s,start:n(s.start),end:n(s.end)}));es(o),t.set(r.meta,{decorations:o,converter:i,source:r.source})}return t.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(!this.options.decorations?.length)return;const i=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return Qo(r,i)},code(r){if(!this.options.decorations?.length)return;const n=e(this),i=Array.from(r.children).filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==n.converter.lines.length)throw new I(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function o(p,m,d,h){const f=i[p];let y="",E=-1,g=-1;if(m===0&&(E=0),d===0&&(g=0),d===Number.POSITIVE_INFINITY&&(g=f.children.length),E===-1||g===-1)for(let _=0;_<f.children.length;_++)y+=hn(f.children[_]),E===-1&&y.length===m&&(E=_+1),g===-1&&y.length===d&&(g=_+1);if(E===-1)throw new I(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(g===-1)throw new I(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const b=f.children.slice(E,g);if(!h.alwaysWrap&&b.length===f.children.length)l(f,h,"line");else if(!h.alwaysWrap&&b.length===1&&b[0].type==="element")l(b[0],h,"token");else{const _={type:"element",tagName:"span",properties:{},children:b};l(_,h,"wrapper"),f.children.splice(E,b.length,_)}}function s(p,m){i[p]=l(i[p],m,"line")}function l(p,m,d){const h=m.properties||{},f=m.transform||(y=>y);return p.tagName=m.tagName||"span",p.properties={...p.properties,...h,class:p.properties.class},m.properties?.class&&mn(p,m.properties.class),p=f(p,d)||p,p}const a=[],c=n.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of c){const{start:m,end:d}=p;if(m.line===d.line)o(m.line,m.character,d.character,p);else if(m.line<d.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let h=m.line+1;h<d.line;h++)a.unshift(()=>s(h,p));o(d.line,0,d.character,p)}}a.forEach(p=>p())}}}function es(t){for(let e=0;e<t.length;e++){const r=t[e];if(r.start.offset>r.end.offset)throw new I(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=e+1;n<t.length;n++){const i=t[n],o=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,s=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,l=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,a=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(o||s||l||a){if(o&&s||l&&a||l&&r.start.offset===r.end.offset||s&&i.start.offset===i.end.offset)continue;throw new I(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function hn(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(hn).join(""):""}const ts=[Yo()];function qe(t){const e=rs(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...ts]}function rs(t){const e=[],r=[],n=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:e,post:r,normal:n}}var te=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],mt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function ns(t,e){const r=t.indexOf("\x1B",e);if(r!==-1&&t[r+1]==="["){const n=t.indexOf("m",r);if(n!==-1)return{sequence:t.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:t.length}}function dr(t){const e=t.shift();if(e==="2"){const r=t.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(e==="5"){const r=t.shift();if(r)return{type:"table",index:Number(r)}}}function is(t){const e=[];for(;t.length>0;){const r=t.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)e.push({type:"resetAll"});else if(n<=9)mt[n]&&e.push({type:"setDecoration",value:mt[n]});else if(n<=29){const i=mt[n-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)e.push({type:"setForegroundColor",value:{type:"named",name:te[n-30]}});else if(n===38){const i=dr(t);i&&e.push({type:"setForegroundColor",value:i})}else if(n===39)e.push({type:"resetForegroundColor"});else if(n<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:te[n-40]}});else if(n===48){const i=dr(t);i&&e.push({type:"setBackgroundColor",value:i})}else n===49?e.push({type:"resetBackgroundColor"}):n===53?e.push({type:"setDecoration",value:"overline"}):n===55?e.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?e.push({type:"setForegroundColor",value:{type:"named",name:te[n-90+8]}}):n>=100&&n<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:te[n-100+8]}})}return e}function os(){let t=null,e=null,r=new Set;return{parse(n){const i=[];let o=0;do{const s=ns(n,o),l=s.sequence?n.substring(o,s.startPosition):n.substring(o);if(l.length>0&&i.push({value:l,foreground:t,background:e,decorations:new Set(r)}),s.sequence){const a=is(s.sequence);for(const c of a)c.type==="resetAll"?(t=null,e=null,r.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&r.delete(c.value);for(const c of a)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&r.add(c.value)}o=s.position}while(o<n.length);return i}}}var ss={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function as(t=ss){function e(l){return t[l]}function r(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let c=0;c<te.length;c++)n.push(e(te[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)n.push(r([l[c],l[p],l[m]]));let a=8;for(let c=0;c<24;c++,a+=10)n.push(r([a,a,a]));return n}function o(l){return i()[l]}function s(l){switch(l.type){case"named":return e(l.name);case"rgb":return r(l.rgb);case"table":return o(l.index)}}return{value:s}}const ls={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function cs(t,e,r){const n=He(t,r),i=Ke(e),o=Object.fromEntries(te.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,p=t.colors?.[c];return[a,p||ls[a]]})),s=as(o),l=os();return i.map(a=>l.parse(a[0]).map(c=>{let p,m;c.decorations.has("reverse")?(p=c.background?s.value(c.background):t.bg,m=c.foreground?s.value(c.foreground):t.fg):(p=c.foreground?s.value(c.foreground):t.fg,m=c.background?s.value(c.background):void 0),p=K(p,n),m=K(m,n),c.decorations.has("dim")&&(p=us(p));let d=x.None;return c.decorations.has("bold")&&(d|=x.Bold),c.decorations.has("italic")&&(d|=x.Italic),c.decorations.has("underline")&&(d|=x.Underline),c.decorations.has("strikethrough")&&(d|=x.Strikethrough),{content:c.value,offset:a[1],color:p,bgColor:m,fontStyle:d}}))}function us(t){const e=t.match(/#([0-9a-f]{3,8})/i);if(e){const n=e[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],o=n[1],s=n[2],l=n[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${o}${o}${s}${s}${a}`}else if(n.length===3){const i=n[0],o=n[1],s=n[2];return`#${i}${i}${o}${o}${s}${s}80`}}}const r=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:t}function Ht(t,e,r={}){const{theme:n=t.getLoadedThemes()[0]}=r,i=t.resolveLangAlias(r.lang||"text");if(jt(i)||Ut(n))return Ke(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:s}=t.setTheme(n);if(i==="ansi")return cs(o,e,r);const l=t.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==l.name)throw new I(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${l.name}"`);if(!r.grammarState.themes.includes(o.name))throw new I(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return ms(e,l,o,s,r)}function ps(...t){if(t.length===2)return Ie(t[1]);const[e,r,n={}]=t,{lang:i="text",theme:o=e.getLoadedThemes()[0]}=n;if(jt(i)||Ut(o))throw new I("Plain language does not have grammar state");if(i==="ansi")throw new I("ANSI language does not have grammar state");const{theme:s,colorMap:l}=e.setTheme(o),a=e.getLanguage(i);return new he(zt(r,a,s,l,n).stateStack,a.name,s.name)}function ms(t,e,r,n,i){const o=zt(t,e,r,n,i),s=new he(o.stateStack,e.name,r.name);return Ze(o.tokens,s),o.tokens}function zt(t,e,r,n,i){const o=He(r,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=i,a=Ke(t);let c=i.grammarState?Zo(i.grammarState,r.name)??kt:i.grammarContextCode!=null?zt(i.grammarContextCode,e,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:kt,p=[];const m=[];for(let d=0,h=a.length;d<h;d++){const[f,y]=a[d];if(f===""){p=[],m.push([]);continue}if(s>0&&f.length>=s){p=[],m.push([{content:f,offset:y,color:"",fontStyle:0}]);continue}let E,g,b;i.includeExplanation&&(E=e.tokenizeLine(f,c,l),g=E.tokens,b=0);const _=e.tokenizeLine2(f,c,l),w=_.tokens.length/2;for(let v=0;v<w;v++){const k=_.tokens[2*v],N=v+1<w?_.tokens[2*v+2]:f.length;if(k===N)continue;const U=_.tokens[2*v+1],ke=K(n[de.getForeground(U)],o),ot=de.getFontStyle(U),_e={content:f.substring(k,N),offset:y+k,color:ke,fontStyle:ot};if(i.includeExplanation){const X=[];if(i.includeExplanation!=="scopeName")for(const W of r.settings){let ie;switch(typeof W.scope){case"string":ie=W.scope.split(/,/).map(st=>st.trim());break;case"object":ie=W.scope;break;default:continue}X.push({settings:W,selectors:ie.map(st=>st.split(/ /))})}_e.explanation=[];let er=0;for(;k+er<N;){const W=g[b],ie=f.substring(W.startIndex,W.endIndex);er+=ie.length,_e.explanation.push({content:ie,scopes:i.includeExplanation==="scopeName"?ds(W.scopes):hs(X,W.scopes)}),b+=1}}p.push(_e)}m.push(p),p=[],c=_.ruleStack}return{tokens:m,stateStack:c}}function ds(t){return t.map(e=>({scopeName:e}))}function hs(t,e){const r=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];r[n]={scopeName:o,themeMatches:gs(t,o,e.slice(0,n))}}return r}function hr(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function fs(t,e,r){if(!hr(t[t.length-1],e))return!1;let n=t.length-2,i=r.length-1;for(;n>=0&&i>=0;)hr(t[n],r[i])&&(n-=1),i-=1;return n===-1}function gs(t,e,r){const n=[];for(const{selectors:i,settings:o}of t)for(const s of i)if(fs(s,e,r)){n.push(o);break}return n}function fn(t,e,r){const n=Object.entries(r.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),i=n.map(a=>{const c=Ht(t,e,{...r,theme:a.theme}),p=Ie(c),m=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:p,theme:m}}),o=_s(...i.map(a=>a.tokens)),s=o[0].map((a,c)=>a.map((p,m)=>{const d={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in r&&r.includeExplanation&&(d.explanation=p.explanation),o.forEach((h,f)=>{const{content:y,explanation:E,offset:g,...b}=h[c][m];d.variants[n[f].color]=b}),d})),l=i[0].state?new he(Object.fromEntries(i.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),i[0].state.lang):void 0;return l&&Ze(s,l),s}function _s(...t){const e=t.map(()=>[]),r=t.length;for(let n=0;n<t[0].length;n++){const i=t.map(a=>a[n]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const s=i.map(()=>0),l=i.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<r;c++){const p=l[c];p.content.length===a?(o[c].push(p),s[c]+=1,l[c]=i[c][s[c]]):(o[c].push({...p,content:p.content.slice(0,a)}),l[c]={...p,content:p.content.slice(a),offset:p.offset+a})}}}return e}function Xe(t,e,r){let n,i,o,s,l,a;if("themes"in r){const{defaultColor:c="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=r,d=Object.entries(r.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,b)=>g.color===c?-1:b.color===c?1:0);if(d.length===0)throw new I("`themes` option must not be empty");const h=fn(t,e,r);if(a=Ie(h),c&&Wt!==c&&!d.find(g=>g.color===c))throw new I(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=d.map(g=>t.getTheme(g.theme)),y=d.map(g=>g.color);o=h.map(g=>g.map(b=>Jo(b,y,p,c,m))),a&&Ze(o,a);const E=d.map(g=>He(g.theme,r));i=fr(d,f,E,p,c,"fg",m),n=fr(d,f,E,p,c,"bg",m),s=`shiki-themes ${f.map(g=>g.name).join(" ")}`,l=c?void 0:[i,n].join(";")}else if("theme"in r){const c=He(r.theme,r);o=Ht(t,e,r);const p=t.getTheme(r.theme);n=K(p.bg,c),i=K(p.fg,c),s=p.name,a=Ie(o)}else throw new I("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:n,themeName:s,rootStyle:l,grammarState:a}}function fr(t,e,r,n,i,o,s){return t.map((l,a)=>{const c=K(e[a][o],r[a])||"inherit",p=`${n+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&i){if(i===Wt&&t.length>1){const m=t.findIndex(y=>y.color==="light"),d=t.findIndex(y=>y.color==="dark");if(m===-1||d===-1)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=K(e[m][o],r[m])||"inherit",f=K(e[d][o],r[d])||"inherit";return`light-dark(${h}, ${f});${p}`}return c}return s==="css-vars"?p:null}).filter(l=>!!l).join(";")}function Qe(t,e,r,n={meta:{},options:r,codeToHast:(i,o)=>Qe(t,i,o),codeToTokens:(i,o)=>Xe(t,i,o)}){let i=e;for(const f of qe(r))i=f.preprocess?.call(n,i,r)||i;let{tokens:o,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:p}=Xe(t,i,r);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:d=!1}=r;m===!0?o=Es(o):m==="never"&&(o=bs(o)),d&&(o=ws(o));const h={...n,get source(){return i}};for(const f of qe(r))o=f.tokens?.call(h,o)||o;return ys(o,{...r,fg:s,bg:l,themeName:a,rootStyle:r.rootStyle===!1?!1:r.rootStyle??c},h,p)}function ys(t,e,r,n=Ie(t)){const i=qe(e),o=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[y,E]of Object.entries(e.meta||{}))y.startsWith("_")||(c[y]=E);let p={type:"element",tagName:"pre",properties:c,children:[],data:e.data},m={type:"element",tagName:"code",properties:{},children:o};const d=[],h={...r,structure:l,addClassToHast:mn,get source(){return r.source},get tokens(){return t},get options(){return e},get root(){return s},get pre(){return p},get code(){return m},get lines(){return d}};if(t.forEach((y,E)=>{E&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
12
+ `}));let g={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(const _ of y){let w={type:"element",tagName:"span",properties:{..._.htmlAttrs},children:[{type:"text",value:_.content}]};const v=Pt(_.htmlStyle||ze(_));v&&(w.properties.style=v);for(const k of i)w=k?.span?.call(h,w,E+1,b,g,_)||w;l==="inline"?s.children.push(w):l==="classic"&&g.children.push(w),b+=_.content.length}if(l==="classic"){for(const _ of i)g=_?.line?.call(h,g,E+1)||g;d.push(g),o.push(g)}else l==="inline"&&d.push(g)}),l==="classic"){for(const y of i)m=y?.code?.call(h,m)||m;p.children.push(m);for(const y of i)p=y?.pre?.call(h,p)||p;s.children.push(p)}else if(l==="inline"){const y=[];let E={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of s.children)_.type==="element"&&_.tagName==="br"?(y.push(E),E={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&E.children.push(_);y.push(E);let b={type:"element",tagName:"code",properties:{},children:y};for(const _ of i)b=_?.code?.call(h,b)||b;s.children=[];for(let _=0;_<b.children.length;_++){_>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const w=b.children[_];w.type==="element"&&s.children.push(...w.children)}}let f=s;for(const y of i)f=y?.root?.call(h,f)||f;return n&&Ze(f,n),f}function Es(t){return t.map(e=>{const r=[];let n="",i;return e.forEach((o,s)=>{const a=!(o.fontStyle&&(o.fontStyle&x.Underline||o.fontStyle&x.Strikethrough));a&&o.content.match(/^\s+$/)&&e[s+1]?(i===void 0&&(i=o.offset),n+=o.content):n?(a?r.push({...o,offset:i,content:n+o.content}):r.push({content:n,offset:i},o),i=void 0,n=""):r.push(o)}),r})}function bs(t){return t.map(e=>e.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,i,o,s]=n;if(!i&&!s)return r;const l=[{...r,offset:r.offset+i.length,content:o}];return i&&l.unshift({content:i,offset:r.offset}),s&&l.push({content:s,offset:r.offset+i.length+o.length}),l}))}function ws(t){return t.map(e=>{const r=[];for(const n of e){if(r.length===0){r.push({...n});continue}const i=r[r.length-1],o=Pt(i.htmlStyle||ze(i)),s=Pt(n.htmlStyle||ze(n)),l=i.fontStyle&&(i.fontStyle&x.Underline||i.fontStyle&x.Strikethrough),a=n.fontStyle&&(n.fontStyle&x.Underline||n.fontStyle&x.Strikethrough);!l&&!a&&o===s?i.content+=n.content:r.push({...n})}return r})}const As=jo;function vs(t,e,r){const n={meta:{},options:r,codeToHast:(o,s)=>Qe(t,o,s),codeToTokens:(o,s)=>Xe(t,o,s)};let i=As(Qe(t,e,r,n));for(const o of qe(r))i=o.postprocess?.call(n,i,r)||i;return i}const gr={light:"#333333",dark:"#bbbbbb"},_r={light:"#fffffe",dark:"#1e1e1e"},yr="__shiki_resolved";function qt(t){if(t?.[yr])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:r,fg:n}=e;if(!r||!n){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(n=l.settings.foreground),l?.settings?.background&&(r=l.settings.background),!n&&e?.colors?.["editor.foreground"]&&(n=e.colors["editor.foreground"]),!r&&e?.colors?.["editor.background"]&&(r=e.colors["editor.background"]),n||(n=e.type==="light"?gr.light:gr.dark),r||(r=e.type==="light"?_r.light:_r.dark),e.fg=n,e.bg=r}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const o=new Map;function s(l){if(o.has(l))return o.get(l);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const p={...l,settings:{...l.settings}};if(a){const m=s(l.settings.foreground);e.colorReplacements[m]=l.settings.foreground,p.settings.foreground=m}if(c){const m=s(l.settings.background);e.colorReplacements[m]=l.settings.background,p.settings.background=m}return p});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=s(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,yr,{enumerable:!1,writable:!1,value:!0}),e}async function gn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!un(e)).map(async e=>await cn(e).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function _n(t){return(await Promise.all(t.map(async r=>pn(r)?null:qt(await cn(r))))).filter(r=>!!r)}let Cs=3;function Is(t,e=3){e>Cs||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let pe=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function yn(t,e){if(!e)return t;if(e[t]){const r=new Set([t]);for(;e[t];){if(t=e[t],r.has(t))throw new pe(`Circular alias \`${Array.from(r).join(" -> ")} -> ${t}\``);r.add(t)}}return t}class Rs extends Gi{constructor(e,r,n,i={}){super(e),this._resolver=e,this._themes=r,this._langs=n,this._alias=i,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const r=qt(e);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let r=this._textmateThemeCache.get(e);r||(r=Be.createFromRawTheme(e),this._textmateThemeCache.set(e,r)),this._syncRegistry.setTheme(r)}getGrammar(e){return e=yn(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const r=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,r.size)for(const o of r)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const r=Array.from(this._langGraph.entries()),n=r.filter(([i,o])=>!o);if(n.length){const i=r.filter(([o,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(a=>n.map(([c])=>c).includes(a)):!1).filter(o=>!n.includes(o));throw new pe(`Missing languages ${n.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of r)this._resolver.addLanguage(o);for(const[i,o]of r)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const r=e.embeddedLanguages??e.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}}class Ss{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,r){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(r=>{this._langs.set(r,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(e.scopeName)})}getInjections(e){const r=e.split(".");let n=[];for(let i=1;i<=r.length;i++){const o=r.slice(0,i).join(".");n=[...n,...this._injections.get(o)||[]]}return n}}let ye=0;function Ls(t){ye+=1,t.warnings!==!1&&ye>=10&&ye%10===0&&console.warn(`[Shiki] ${ye} 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 e=!1;if(!t.engine)throw new pe("`engine` option is required for synchronous mode");const r=(t.langs||[]).flat(1),n=(t.themes||[]).flat(1).map(qt),i=new Ss(t.engine,r),o=new Rs(i,n,r,t.langAlias);let s;function l(_){return yn(_,t.langAlias)}function a(_){g();const w=o.getGrammar(typeof _=="string"?_:_.name);if(!w)throw new pe(`Language \`${_}\` not found, you may need to load it first`);return w}function c(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const w=o.getTheme(_);if(!w)throw new pe(`Theme \`${_}\` not found, you may need to load it first`);return w}function p(_){g();const w=c(_);s!==_&&(o.setTheme(w),s=_);const v=o.getColorMap();return{theme:w,colorMap:v}}function m(){return g(),o.getLoadedThemes()}function d(){return g(),o.getLoadedLanguages()}function h(..._){g(),o.loadLanguages(_.flat(1))}async function f(..._){return h(await gn(_))}function y(..._){g();for(const w of _.flat(1))o.loadTheme(w)}async function E(..._){return g(),y(await _n(_))}function g(){if(e)throw new pe("Shiki instance has been disposed")}function b(){e||(e=!0,o.dispose(),ye-=1)}return{setTheme:p,getTheme:c,getLanguage:a,getLoadedThemes:m,getLoadedLanguages:d,resolveLangAlias:l,loadLanguage:f,loadLanguageSync:h,loadTheme:E,loadThemeSync:y,dispose:b,[Symbol.dispose]:b}}async function ks(t){t.engine||Is("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,r,n]=await Promise.all([_n(t.themes||[]),gn(t.langs||[]),t.engine]);return Ls({...t,themes:e,langs:r,engine:n})}async function Ts(t){const e=await ks(t);return{getLastGrammarState:(...r)=>ps(e,...r),codeToTokensBase:(r,n)=>Ht(e,r,n),codeToTokensWithThemes:(r,n)=>fn(e,r,n),codeToTokens:(r,n)=>Xe(e,r,n),codeToHast:(r,n)=>Qe(e,r,n),codeToHtml:(r,n)=>vs(e,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Ps(t){const e=t.langs,r=t.themes,n=t.engine;async function i(o){function s(m){if(typeof m=="string"){if(m=o.langAlias?.[m]||m,un(m))return[];const d=e[m];if(!d)throw new I(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return d}return m}function l(m){if(pn(m))return"none";if(typeof m=="string"){const d=r[m];if(!d)throw new I(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return d}return m}const a=(o.themes??[]).map(m=>l(m)),c=(o.langs??[]).map(m=>s(m)),p=await Ts({engine:o.engine??n(),...o,themes:a,langs:c});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(s))},loadTheme(...m){return p.loadTheme(...m.map(l))},getBundledLanguages(){return e},getBundledThemes(){return r}}}return i}const En=[{id:"abap",name:"ABAP",import:(()=>u(()=>import("./abap-BdImnpbu.js"),[],import.meta.url))},{id:"actionscript-3",name:"ActionScript",import:(()=>u(()=>import("./actionscript-3-CoDkCxhg.js"),[],import.meta.url))},{id:"ada",name:"Ada",import:(()=>u(()=>import("./ada-bCR0ucgS.js"),[],import.meta.url))},{id:"angular-html",name:"Angular HTML",import:(()=>u(()=>import("./angular-html-CU67Zn6k.js").then(t=>t.f),[],import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>u(()=>import("./angular-ts-BwZT4LLn.js"),[],import.meta.url))},{id:"apache",name:"Apache Conf",import:(()=>u(()=>import("./apache-Pmp26Uib.js"),[],import.meta.url))},{id:"apex",name:"Apex",import:(()=>u(()=>import("./apex-D8_7TLub.js"),[],import.meta.url))},{id:"apl",name:"APL",import:(()=>u(()=>import("./apl-dKokRX4l.js"),[],import.meta.url))},{id:"applescript",name:"AppleScript",import:(()=>u(()=>import("./applescript-Co6uUVPk.js"),[],import.meta.url))},{id:"ara",name:"Ara",import:(()=>u(()=>import("./ara-BRHolxvo.js"),[],import.meta.url))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>u(()=>import("./asciidoc-Ve4PFQV2.js"),[],import.meta.url))},{id:"asm",name:"Assembly",import:(()=>u(()=>import("./asm-D_Q5rh1f.js"),[],import.meta.url))},{id:"astro",name:"Astro",import:(()=>u(()=>import("./astro-CbQHKStN.js"),[],import.meta.url))},{id:"awk",name:"AWK",import:(()=>u(()=>import("./awk-DMzUqQB5.js"),[],import.meta.url))},{id:"ballerina",name:"Ballerina",import:(()=>u(()=>import("./ballerina-BFfxhgS-.js"),[],import.meta.url))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>u(()=>import("./bat-BkioyH1T.js"),[],import.meta.url))},{id:"beancount",name:"Beancount",import:(()=>u(()=>import("./beancount-k_qm7-4y.js"),[],import.meta.url))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>u(()=>import("./berry-uYugtg8r.js"),[],import.meta.url))},{id:"bibtex",name:"BibTeX",import:(()=>u(()=>import("./bibtex-CHM0blh-.js"),[],import.meta.url))},{id:"bicep",name:"Bicep",import:(()=>u(()=>import("./bicep-Bmn6On1c.js"),[],import.meta.url))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>u(()=>import("./bird2-DPOp833l.js"),[],import.meta.url))},{id:"blade",name:"Blade",import:(()=>u(()=>import("./blade-D4QpJJKB.js"),[],import.meta.url))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>u(()=>import("./bsl-BO_Y6i37.js"),[],import.meta.url))},{id:"c",name:"C",import:(()=>u(()=>import("./c-BIGW1oBm.js"),[],import.meta.url))},{id:"c3",name:"C3",import:(()=>u(()=>import("./c3-eo99z4R2.js"),[],import.meta.url))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>u(()=>import("./cadence-Bv_4Rxtq.js"),[],import.meta.url))},{id:"cairo",name:"Cairo",import:(()=>u(()=>import("./cairo-KRGpt6FW.js"),[],import.meta.url))},{id:"clarity",name:"Clarity",import:(()=>u(()=>import("./clarity-D53aC0YG.js"),[],import.meta.url))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>u(()=>import("./clojure-P80f7IUj.js"),[],import.meta.url))},{id:"cmake",name:"CMake",import:(()=>u(()=>import("./cmake-D1j8_8rp.js"),[],import.meta.url))},{id:"cobol",name:"COBOL",import:(()=>u(()=>import("./cobol-nwyudZeR.js"),[],import.meta.url))},{id:"codeowners",name:"CODEOWNERS",import:(()=>u(()=>import("./codeowners-Bp6g37R7.js"),[],import.meta.url))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>u(()=>import("./codeql-DsOJ9woJ.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>u(()=>import("./coffee-Ch7k5sss.js"),[],import.meta.url))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>u(()=>import("./common-lisp-Cg-RD9OK.js"),[],import.meta.url))},{id:"coq",name:"Coq",import:(()=>u(()=>import("./coq-DkFqJrB1.js"),[],import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>u(()=>import("./cpp-CofmeUqb.js"),[],import.meta.url))},{id:"crystal",name:"Crystal",import:(()=>u(()=>import("./crystal-tKQVLTB8.js"),[],import.meta.url))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>u(()=>import("./csharp-COcwbKMJ.js"),[],import.meta.url))},{id:"css",name:"CSS",import:(()=>u(()=>import("./css-DPfMkruS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>u(()=>import("./csv-fuZLfV_i.js"),[],import.meta.url))},{id:"cue",name:"CUE",import:(()=>u(()=>import("./cue-D82EKSYY.js"),[],import.meta.url))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>u(()=>import("./cypher-COkxafJQ.js"),[],import.meta.url))},{id:"d",name:"D",import:(()=>u(()=>import("./d-85-TOEBH.js"),[],import.meta.url))},{id:"dart",name:"Dart",import:(()=>u(()=>import("./dart-CF10PKvl.js"),[],import.meta.url))},{id:"dax",name:"DAX",import:(()=>u(()=>import("./dax-CEL-wOlO.js"),[],import.meta.url))},{id:"desktop",name:"Desktop",import:(()=>u(()=>import("./desktop-BmXAJ9_W.js"),[],import.meta.url))},{id:"diff",name:"Diff",import:(()=>u(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>u(()=>import("./docker-BcOcwvcX.js"),[],import.meta.url))},{id:"dotenv",name:"dotEnv",import:(()=>u(()=>import("./dotenv-Da5cRb03.js"),[],import.meta.url))},{id:"dream-maker",name:"Dream Maker",import:(()=>u(()=>import("./dream-maker-BtqSS_iP.js"),[],import.meta.url))},{id:"edge",name:"Edge",import:(()=>u(()=>import("./edge-BkV0erSs.js"),[],import.meta.url))},{id:"elixir",name:"Elixir",import:(()=>u(()=>import("./elixir-CDX3lj18.js"),[],import.meta.url))},{id:"elm",name:"Elm",import:(()=>u(()=>import("./elm-DbKCFpqz.js"),[],import.meta.url))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>u(()=>import("./emacs-lisp-C9XAeP06.js"),[],import.meta.url))},{id:"erb",name:"ERB",import:(()=>u(()=>import("./erb-B12qg9BL.js"),[],import.meta.url))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>u(()=>import("./erlang-DsQrWhSR.js"),[],import.meta.url))},{id:"fennel",name:"Fennel",import:(()=>u(()=>import("./fennel-BYunw83y.js"),[],import.meta.url))},{id:"fish",name:"Fish",import:(()=>u(()=>import("./fish-BvzEVeQv.js"),[],import.meta.url))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>u(()=>import("./fluent-C4IJs8-o.js"),[],import.meta.url))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>u(()=>import("./fortran-fixed-form-CkoXwp7k.js"),[],import.meta.url))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>u(()=>import("./fortran-free-form-BxgE0vQu.js"),[],import.meta.url))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>u(()=>import("./fsharp-CXgrBDvD.js"),[],import.meta.url))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>u(()=>import("./gdresource-BOOCDP_w.js"),[],import.meta.url))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>u(()=>import("./gdscript-C5YyOfLZ.js"),[],import.meta.url))},{id:"gdshader",name:"GDShader",import:(()=>u(()=>import("./gdshader-DkwncUOv.js"),[],import.meta.url))},{id:"genie",name:"Genie",import:(()=>u(()=>import("./genie-D0YGMca9.js"),[],import.meta.url))},{id:"gherkin",name:"Gherkin",import:(()=>u(()=>import("./gherkin-DyxjwDmM.js"),[],import.meta.url))},{id:"git-commit",name:"Git Commit Message",import:(()=>u(()=>import("./git-commit-F4YmCXRG.js"),[],import.meta.url))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>u(()=>import("./git-rebase-r7XF79zn.js"),[],import.meta.url))},{id:"gleam",name:"Gleam",import:(()=>u(()=>import("./gleam-BspZqrRM.js"),[],import.meta.url))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>u(()=>import("./glimmer-js-Rg0-pVw9.js"),[],import.meta.url))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>u(()=>import("./glimmer-ts-U6CK756n.js"),[],import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>u(()=>import("./glsl-DplSGwfg.js"),[],import.meta.url))},{id:"gn",name:"GN",import:(()=>u(()=>import("./gn-n2N0HUVH.js"),[],import.meta.url))},{id:"gnuplot",name:"Gnuplot",import:(()=>u(()=>import("./gnuplot-DdkO51Og.js"),[],import.meta.url))},{id:"go",name:"Go",import:(()=>u(()=>import("./go-CxLEBnE3.js"),[],import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>u(()=>import("./graphql-ChdNCCLP.js"),[],import.meta.url))},{id:"groovy",name:"Groovy",import:(()=>u(()=>import("./groovy-gcz8RCvz.js"),[],import.meta.url))},{id:"hack",name:"Hack",import:(()=>u(()=>import("./hack-CaT9iCJl.js"),[],import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>u(()=>import("./haml-B8DHNrY2.js"),[],import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>u(()=>import("./handlebars-BL8al0AC.js"),[],import.meta.url))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>u(()=>import("./haskell-Df6bDoY_.js"),[],import.meta.url))},{id:"haxe",name:"Haxe",import:(()=>u(()=>import("./haxe-CzTSHFRz.js"),[],import.meta.url))},{id:"hcl",name:"HashiCorp HCL",import:(()=>u(()=>import("./hcl-BWvSN4gD.js"),[],import.meta.url))},{id:"hjson",name:"Hjson",import:(()=>u(()=>import("./hjson-D5-asLiD.js"),[],import.meta.url))},{id:"hlsl",name:"HLSL",import:(()=>u(()=>import("./hlsl-D3lLCCz7.js"),[],import.meta.url))},{id:"html",name:"HTML",import:(()=>u(()=>import("./html-GMplVEZG.js"),[],import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>u(()=>import("./html-derivative-BFtXZ54Q.js"),[],import.meta.url))},{id:"http",name:"HTTP",import:(()=>u(()=>import("./http-jrhK8wxY.js"),[],import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>u(()=>import("./hurl-irOxFIW8.js"),[],import.meta.url))},{id:"hxml",name:"HXML",import:(()=>u(()=>import("./hxml-Bvhsp5Yf.js"),[],import.meta.url))},{id:"hy",name:"Hy",import:(()=>u(()=>import("./hy-DFXneXwc.js"),[],import.meta.url))},{id:"imba",name:"Imba",import:(()=>u(()=>import("./imba-DGztddWO.js"),[],import.meta.url))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>u(()=>import("./ini-BEwlwnbL.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>u(()=>import("./java-CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>u(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>u(()=>import("./jinja-4LBKfQ-Z.js"),[],import.meta.url))},{id:"jison",name:"Jison",import:(()=>u(()=>import("./jison-wvAkD_A8.js"),[],import.meta.url))},{id:"json",name:"JSON",import:(()=>u(()=>import("./json-Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>u(()=>import("./json5-C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>u(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>u(()=>import("./jsonl-DcaNXYhu.js"),[],import.meta.url))},{id:"jsonnet",name:"Jsonnet",import:(()=>u(()=>import("./jsonnet-DFQXde-d.js"),[],import.meta.url))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>u(()=>import("./jssm-C2t-YnRu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>u(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>u(()=>import("./julia-CxzCAyBv.js"),[],import.meta.url))},{id:"just",name:"Just",import:(()=>u(()=>import("./just-Cw27pwNe.js"),[],import.meta.url))},{id:"kdl",name:"KDL",import:(()=>u(()=>import("./kdl-DV7GczEv.js"),[],import.meta.url))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>u(()=>import("./kotlin-BdnUsdx6.js"),[],import.meta.url))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>u(()=>import("./kusto-DZf3V79B.js"),[],import.meta.url))},{id:"latex",name:"LaTeX",import:(()=>u(()=>import("./latex-CWtU0Tv5.js"),[],import.meta.url))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>u(()=>import("./lean-BZvkOJ9d.js"),[],import.meta.url))},{id:"less",name:"Less",import:(()=>u(()=>import("./less-B1dDrJ26.js"),[],import.meta.url))},{id:"liquid",name:"Liquid",import:(()=>u(()=>import("./liquid-DYVedYrR.js"),[],import.meta.url))},{id:"llvm",name:"LLVM IR",import:(()=>u(()=>import("./llvm-DjAJT7YJ.js"),[],import.meta.url))},{id:"log",name:"Log file",import:(()=>u(()=>import("./log-2UxHyX5q.js"),[],import.meta.url))},{id:"logo",name:"Logo",import:(()=>u(()=>import("./logo-BtOb2qkB.js"),[],import.meta.url))},{id:"lua",name:"Lua",import:(()=>u(()=>import("./lua-BaeVxFsk.js"),[],import.meta.url))},{id:"luau",name:"Luau",import:(()=>u(()=>import("./luau-C-HG3fhB.js"),[],import.meta.url))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>u(()=>import("./make-CHLpvVh8.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>u(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>u(()=>import("./marko-CnJfTvn9.js"),[],import.meta.url))},{id:"matlab",name:"MATLAB",import:(()=>u(()=>import("./matlab-D7o27uSR.js"),[],import.meta.url))},{id:"mdc",name:"MDC",import:(()=>u(()=>import("./mdc-BMNejdWA.js"),[],import.meta.url))},{id:"mdx",name:"MDX",import:(()=>u(()=>import("./mdx-Cmh6b_Ma.js"),[],import.meta.url))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>u(()=>import("./mermaid-mWjccvbQ.js"),[],import.meta.url))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>u(()=>import("./mipsasm-CKIfxQSi.js"),[],import.meta.url))},{id:"mojo",name:"Mojo",import:(()=>u(()=>import("./mojo-rZm6bMo-.js"),[],import.meta.url))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>u(()=>import("./moonbit-_H4v1dQx.js"),[],import.meta.url))},{id:"move",name:"Move",import:(()=>u(()=>import("./move-IF9eRakj.js"),[],import.meta.url))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>u(()=>import("./narrat-DRg8JJMk.js"),[],import.meta.url))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>u(()=>import("./nextflow-Zz6hmt5N.js"),[],import.meta.url))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>u(()=>import("./nextflow-groovy-BeH2EWoN.js"),[],import.meta.url))},{id:"nginx",name:"Nginx",import:(()=>u(()=>import("./nginx-BpAMiNFr.js"),[],import.meta.url))},{id:"nim",name:"Nim",import:(()=>u(()=>import("./nim-CVrawwO9.js"),[],import.meta.url))},{id:"nix",name:"Nix",import:(()=>u(()=>import("./nix-CwoSXNpI.js"),[],import.meta.url))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>u(()=>import("./nushell-Cz2AlsmD.js"),[],import.meta.url))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>u(()=>import("./objective-c-DXmwc3jG.js"),[],import.meta.url))},{id:"objective-cpp",name:"Objective-C++",import:(()=>u(()=>import("./objective-cpp-CLxacb5B.js"),[],import.meta.url))},{id:"ocaml",name:"OCaml",import:(()=>u(()=>import("./ocaml-C0hk2d4L.js"),[],import.meta.url))},{id:"odin",name:"Odin",import:(()=>u(()=>import("./odin-BBf5iR-q.js"),[],import.meta.url))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>u(()=>import("./openscad-C4EeE6gA.js"),[],import.meta.url))},{id:"pascal",name:"Pascal",import:(()=>u(()=>import("./pascal-D93ZcfNL.js"),[],import.meta.url))},{id:"perl",name:"Perl",import:(()=>u(()=>import("./perl-C0TMdlhV.js"),[],import.meta.url))},{id:"php",name:"PHP",import:(()=>u(()=>import("./php-Dhbhpdrm.js"),[],import.meta.url))},{id:"pkl",name:"Pkl",import:(()=>u(()=>import("./pkl-u5AG7uiY.js"),[],import.meta.url))},{id:"plsql",name:"PL/SQL",import:(()=>u(()=>import("./plsql-ChMvpjG-.js"),[],import.meta.url))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>u(()=>import("./po-BTJTHyun.js"),[],import.meta.url))},{id:"polar",name:"Polar",import:(()=>u(()=>import("./polar-C0HS_06l.js"),[],import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>u(()=>import("./postcss-CXtECtnM.js"),[],import.meta.url))},{id:"powerquery",name:"PowerQuery",import:(()=>u(()=>import("./powerquery-CEu0bR-o.js"),[],import.meta.url))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>u(()=>import("./powershell-Dpen1YoG.js"),[],import.meta.url))},{id:"prisma",name:"Prisma",import:(()=>u(()=>import("./prisma-Dd19v3D-.js"),[],import.meta.url))},{id:"prolog",name:"Prolog",import:(()=>u(()=>import("./prolog-CbFg5uaA.js"),[],import.meta.url))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>u(()=>import("./proto-C7zT0LnQ.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>u(()=>import("./pug-CGlum2m_.js"),[],import.meta.url))},{id:"puppet",name:"Puppet",import:(()=>u(()=>import("./puppet-BMWR74SV.js"),[],import.meta.url))},{id:"purescript",name:"PureScript",import:(()=>u(()=>import("./purescript-CklMAg4u.js"),[],import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>u(()=>import("./python-B6aJPvgy.js"),[],import.meta.url))},{id:"qml",name:"QML",import:(()=>u(()=>import("./qml-3beO22l8.js"),[],import.meta.url))},{id:"qmldir",name:"QML Directory",import:(()=>u(()=>import("./qmldir-C8lEn-DE.js"),[],import.meta.url))},{id:"qss",name:"Qt Style Sheets",import:(()=>u(()=>import("./qss-IeuSbFQv.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>u(()=>import("./r-Dspwwk_N.js"),[],import.meta.url))},{id:"racket",name:"Racket",import:(()=>u(()=>import("./racket-BqYA7rlc.js"),[],import.meta.url))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>u(()=>import("./raku-DXvB9xmW.js"),[],import.meta.url))},{id:"razor",name:"ASP.NET Razor",import:(()=>u(()=>import("./razor-Uh8Bk_45.js"),[],import.meta.url))},{id:"reg",name:"Windows Registry Script",import:(()=>u(()=>import("./reg-C-SQnVFl.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>u(()=>import("./regexp-CDVJQ6XC.js"),[],import.meta.url))},{id:"rel",name:"Rel",import:(()=>u(()=>import("./rel-C3B-1QV4.js"),[],import.meta.url))},{id:"riscv",name:"RISC-V",import:(()=>u(()=>import("./riscv-BM1_JUlF.js"),[],import.meta.url))},{id:"ron",name:"RON",import:(()=>u(()=>import("./ron-D8l8udqQ.js"),[],import.meta.url))},{id:"rosmsg",name:"ROS Interface",import:(()=>u(()=>import("./rosmsg-BJDFO7_C.js"),[],import.meta.url))},{id:"rst",name:"reStructuredText",import:(()=>u(()=>import("./rst-BrH8l1NY.js"),[],import.meta.url))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>u(()=>import("./ruby-Dw2BHqvy.js"),[],import.meta.url))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>u(()=>import("./rust-B1yitclQ.js"),[],import.meta.url))},{id:"sas",name:"SAS",import:(()=>u(()=>import("./sas-cz2c8ADy.js"),[],import.meta.url))},{id:"sass",name:"Sass",import:(()=>u(()=>import("./sass-Cj5Yp3dK.js"),[],import.meta.url))},{id:"scala",name:"Scala",import:(()=>u(()=>import("./scala-C151Ov-r.js"),[],import.meta.url))},{id:"scheme",name:"Scheme",import:(()=>u(()=>import("./scheme-C98Dy4si.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>u(()=>import("./scss-OYdSNvt2.js"),[],import.meta.url))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>u(()=>import("./sdbl-DVxCFoDh.js"),[],import.meta.url))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>u(()=>import("./shaderlab-Dg9Lc6iA.js"),[],import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>u(()=>import("./shellscript-Yzrsuije.js"),[],import.meta.url))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>u(()=>import("./shellsession-BADoaaVG.js"),[],import.meta.url))},{id:"smalltalk",name:"Smalltalk",import:(()=>u(()=>import("./smalltalk-BERRCDM3.js"),[],import.meta.url))},{id:"solidity",name:"Solidity",import:(()=>u(()=>import("./solidity-rGO070M0.js"),[],import.meta.url))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>u(()=>import("./soy-Brmx7dQM.js"),[],import.meta.url))},{id:"sparql",name:"SPARQL",import:(()=>u(()=>import("./sparql-rVzFXLq3.js"),[],import.meta.url))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>u(()=>import("./splunk-BtCnVYZw.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>u(()=>import("./sql-BLtJtn59.js"),[],import.meta.url))},{id:"ssh-config",name:"SSH Config",import:(()=>u(()=>import("./ssh-config-_ykCGR6B.js"),[],import.meta.url))},{id:"stata",name:"Stata",import:(()=>u(()=>import("./stata-BH5u7GGu.js"),[],import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>u(()=>import("./stylus-BEDo0Tqx.js"),[],import.meta.url))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>u(()=>import("./surrealql-Bq5Q-fJD.js"),[],import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>u(()=>import("./svelte-C_ipcX3V.js"),[],import.meta.url))},{id:"swift",name:"Swift",import:(()=>u(()=>import("./swift-D82vCrfD.js"),[],import.meta.url))},{id:"system-verilog",name:"SystemVerilog",import:(()=>u(()=>import("./system-verilog-CnnmHF94.js"),[],import.meta.url))},{id:"systemd",name:"Systemd Units",import:(()=>u(()=>import("./systemd-4A_iFExJ.js"),[],import.meta.url))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>u(()=>import("./talonscript-CkByrt1z.js"),[],import.meta.url))},{id:"tasl",name:"Tasl",import:(()=>u(()=>import("./tasl-QIJgUcNo.js"),[],import.meta.url))},{id:"tcl",name:"Tcl",import:(()=>u(()=>import("./tcl-dwOrl1Do.js"),[],import.meta.url))},{id:"templ",name:"Templ",import:(()=>u(()=>import("./templ-P3uqSqPl.js"),[],import.meta.url))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>u(()=>import("./terraform-BETggiCN.js"),[],import.meta.url))},{id:"tex",name:"TeX",import:(()=>u(()=>import("./tex-idrVyKtj.js"),[],import.meta.url))},{id:"toml",name:"TOML",import:(()=>u(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>u(()=>import("./ts-tags-zn1MmPIZ.js"),[],import.meta.url))},{id:"tsv",name:"TSV",import:(()=>u(()=>import("./tsv-B_m7g4N7.js"),[],import.meta.url))},{id:"tsx",name:"TSX",import:(()=>u(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url))},{id:"turtle",name:"Turtle",import:(()=>u(()=>import("./turtle-BsS91CYL.js"),[],import.meta.url))},{id:"twig",name:"Twig",import:(()=>u(()=>import("./twig-DNn4PbVi.js"),[],import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>u(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>u(()=>import("./typespec-BGHnOYBU.js"),[],import.meta.url))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>u(()=>import("./typst-DHCkPAjA.js"),[],import.meta.url))},{id:"v",name:"V",import:(()=>u(()=>import("./v-BcVCzyr7.js"),[],import.meta.url))},{id:"vala",name:"Vala",import:(()=>u(()=>import("./vala-CsfeWuGM.js"),[],import.meta.url))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>u(()=>import("./vb-D17OF-Vu.js"),[],import.meta.url))},{id:"verilog",name:"Verilog",import:(()=>u(()=>import("./verilog-BQ8w6xss.js"),[],import.meta.url))},{id:"vhdl",name:"VHDL",import:(()=>u(()=>import("./vhdl-CeAyd5Ju.js"),[],import.meta.url))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>u(()=>import("./viml-CJc9bBzg.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>u(()=>import("./vue-DN_0RTcg.js"),[],import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>u(()=>import("./vue-html-AaS7Mt5G.js"),[],import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>u(()=>import("./vue-vine-CQOfvN7w.js"),[],import.meta.url))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>u(()=>import("./vyper-CDx5xZoG.js"),[],import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>u(()=>import("./wasm-MzD3tlZU.js"),[],import.meta.url))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>u(()=>import("./wenyan-BV7otONQ.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>u(()=>import("./wgsl-Dx-B1_4e.js"),[],import.meta.url))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>u(()=>import("./wikitext-BhOHFoWU.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>u(()=>import("./wit-5i3qLPDT.js"),[],import.meta.url))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>u(()=>import("./wolfram-lXgVvXCa.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>u(()=>import("./xml-sdJ4AIDG.js"),[],import.meta.url))},{id:"xsl",name:"XSL",import:(()=>u(()=>import("./xsl-CtQFsRM5.js"),[],import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>u(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url))},{id:"zenscript",name:"ZenScript",import:(()=>u(()=>import("./zenscript-DVFEvuxE.js"),[],import.meta.url))},{id:"zig",name:"Zig",import:(()=>u(()=>import("./zig-VOosw3JB.js"),[],import.meta.url))}],Os=Object.fromEntries(En.map(t=>[t.id,t.import])),xs=Object.fromEntries(En.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),bn={...Os,...xs},Ns=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>u(()=>import("./andromeeda-C4gqWexZ.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>u(()=>import("./aurora-x-D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>u(()=>import("./ayu-dark-DYE7WIF3.js"),[],import.meta.url))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>u(()=>import("./ayu-light-BA47KaF1.js"),[],import.meta.url))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>u(()=>import("./ayu-mirage-32ctXXKs.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>u(()=>import("./catppuccin-frappe-DFWUc33u.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>u(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>u(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>u(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>u(()=>import("./dark-plus-C3mMm8J8.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>u(()=>import("./dracula-BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>u(()=>import("./dracula-soft-BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>u(()=>import("./everforest-dark-BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>u(()=>import("./everforest-light-C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>u(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>u(()=>import("./github-dark-default-Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>u(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>u(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>u(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>u(()=>import("./github-light-default-D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>u(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>u(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>u(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>u(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[],import.meta.url))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>u(()=>import("./horizon-BUw7H-hv.js"),[],import.meta.url))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>u(()=>import("./horizon-bright-Cn-bp-IR.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>u(()=>import("./houston-DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>u(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>u(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>u(()=>import("./kanagawa-wave-DWedfzmr.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>u(()=>import("./laserwave-DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>u(()=>import("./light-plus-B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>u(()=>import("./material-theme-D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>u(()=>import("./material-theme-darker-BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>u(()=>import("./material-theme-lighter-B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>u(()=>import("./material-theme-ocean-CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>u(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>u(()=>import("./min-dark-CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>u(()=>import("./min-light-CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>u(()=>import("./monokai-D4h5O-jR.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>u(()=>import("./night-owl-C39BiMTA.js"),[],import.meta.url))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>u(()=>import("./night-owl-light-CMTm3GFP.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>u(()=>import("./nord-Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>u(()=>import("./one-dark-pro-DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>u(()=>import("./one-light-C3Wv6jpd.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>u(()=>import("./plastic-3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>u(()=>import("./poimandres-CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>u(()=>import("./red-bN70gL4F.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>u(()=>import("./rose-pine-qdsjHGoJ.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>u(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>u(()=>import("./rose-pine-moon-D4_iv3hh.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>u(()=>import("./slack-dark-BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>u(()=>import("./slack-ochin-DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>u(()=>import("./snazzy-light-Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>u(()=>import("./solarized-dark-DXbdFlpD.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>u(()=>import("./solarized-light-L9t79GZl.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>u(()=>import("./synthwave-84-CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>u(()=>import("./tokyo-night-hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>u(()=>import("./vesper-DU1UobuO.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>u(()=>import("./vitesse-black-Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>u(()=>import("./vitesse-dark-D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>u(()=>import("./vitesse-light-CVO1_9PV.js"),[],import.meta.url))}],Ds=Object.fromEntries(Ns.map(t=>[t.id,t.import]));class Xt extends Error{constructor(e){super(e),this.name="ShikiError"}}function $s(){return 2147483648}function Vs(){return typeof performance<"u"?performance.now():Date.now()}const Ms=(t,e)=>t+(e-t%e)%e;async function Gs(t){let e,r;const n={};function i(h){r=h,n.HEAPU8=new Uint8Array(h),n.HEAPU32=new Uint32Array(h)}function o(h,f,y){n.HEAPU8.copyWithin(h,f,f+y)}function s(h){try{return e.grow(h-r.byteLength+65535>>>16),i(e.buffer),1}catch{}}function l(h){const f=n.HEAPU8.length;h=h>>>0;const y=$s();if(h>y)return!1;for(let E=1;E<=4;E*=2){let g=f*(1+.2/E);g=Math.min(g,h+100663296);const b=Math.min(y,Ms(Math.max(h,g),65536));if(s(b))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(h,f,y=1024){const E=f+y;let g=f;for(;h[g]&&!(g>=E);)++g;if(g-f>16&&h.buffer&&a)return a.decode(h.subarray(f,g));let b="";for(;f<g;){let _=h[f++];if(!(_&128)){b+=String.fromCharCode(_);continue}const w=h[f++]&63;if((_&224)===192){b+=String.fromCharCode((_&31)<<6|w);continue}const v=h[f++]&63;if((_&240)===224?_=(_&15)<<12|w<<6|v:_=(_&7)<<18|w<<12|v<<6|h[f++]&63,_<65536)b+=String.fromCharCode(_);else{const k=_-65536;b+=String.fromCharCode(55296|k>>10,56320|k&1023)}}return b}function p(h,f){return h?c(n.HEAPU8,h,f):""}const m={emscripten_get_now:Vs,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function d(){const f=await t({env:m,wasi_snapshot_preview1:m});e=f.memory,i(e.buffer),Object.assign(n,f),n.UTF8ToString=p}return await d(),n}var Bs=Object.defineProperty,Fs=(t,e,r)=>e in t?Bs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R=(t,e,r)=>Fs(t,typeof e!="symbol"?e+"":e,r);let T=null;function js(t){throw new Xt(t.UTF8ToString(t.getLastOnigError()))}class Ye{constructor(e){R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16Value"),R(this,"utf8Value"),R(this,"utf16OffsetToUtf8"),R(this,"utf8OffsetToUtf16");const r=e.length,n=Ye._utf8ByteLength(e),i=n!==r,o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const l=new Uint8Array(n);let a=0;for(let c=0;c<r;c++){const p=e.charCodeAt(c);let m=p,d=!1;if(p>=55296&&p<=56319&&c+1<r){const h=e.charCodeAt(c+1);h>=56320&&h<=57343&&(m=(p-55296<<10)+65536|h-56320,d=!0)}i&&(o[c]=a,d&&(o[c+1]=a),m<=127?s[a+0]=c:m<=2047?(s[a+0]=c,s[a+1]=c):m<=65535?(s[a+0]=c,s[a+1]=c,s[a+2]=c):(s[a+0]=c,s[a+1]=c,s[a+2]=c,s[a+3]=c)),m<=127?l[a++]=m:m<=2047?(l[a++]=192|(m&1984)>>>6,l[a++]=128|(m&63)>>>0):m<=65535?(l[a++]=224|(m&61440)>>>12,l[a++]=128|(m&4032)>>>6,l[a++]=128|(m&63)>>>0):(l[a++]=240|(m&1835008)>>>18,l[a++]=128|(m&258048)>>>12,l[a++]=128|(m&4032)>>>6,l[a++]=128|(m&63)>>>0),d&&c++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let r=0;for(let n=0,i=e.length;n<i;n++){const o=e.charCodeAt(n);let s=o,l=!1;if(o>=55296&&o<=56319&&n+1<i){const a=e.charCodeAt(n+1);a>=56320&&a<=57343&&(s=(o-55296<<10)+65536|a-56320,l=!0)}s<=127?r+=1:s<=2047?r+=2:s<=65535?r+=3:r+=4,l&&n++}return r}createString(e){const r=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,r),r}}const et=class j{constructor(e){if(R(this,"id",++j.LAST_ID),R(this,"_onigBinding"),R(this,"content"),R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16OffsetToUtf8"),R(this,"utf8OffsetToUtf16"),R(this,"ptr"),!T)throw new Xt("Must invoke loadWasm first.");this._onigBinding=T,this.content=e;const r=new Ye(e);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!j._sharedPtrInUse?(j._sharedPtr||(j._sharedPtr=T.omalloc(1e4)),j._sharedPtrInUse=!0,T.HEAPU8.set(r.utf8Value,j._sharedPtr),this.ptr=j._sharedPtr):this.ptr=r.createString(T)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===j._sharedPtr?j._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};R(et,"LAST_ID",0);R(et,"_sharedPtr",0);R(et,"_sharedPtrInUse",!1);let wn=et;class Us{constructor(e){if(R(this,"_onigBinding"),R(this,"_ptr"),!T)throw new Xt("Must invoke loadWasm first.");const r=[],n=[];for(let l=0,a=e.length;l<a;l++){const c=new Ye(e[l]);r[l]=c.createString(T),n[l]=c.utf8Length}const i=T.omalloc(4*e.length);T.HEAPU32.set(r,i/4);const o=T.omalloc(4*e.length);T.HEAPU32.set(n,o/4);const s=T.createOnigScanner(i,o,e.length);for(let l=0,a=e.length;l<a;l++)T.ofree(r[l]);T.ofree(o),T.ofree(i),s===0&&js(T),this._onigBinding=T,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof e=="string"){e=new wn(e);const o=this._findNextMatchSync(e,r,!1,i);return e.dispose(),o}return this._findNextMatchSync(e,r,!1,i)}_findNextMatchSync(e,r,n,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(r),i);if(s===0)return null;const l=o.HEAPU32;let a=s/4;const c=l[a++],p=l[a++],m=[];for(let d=0;d<p;d++){const h=e.convertUtf8OffsetToUtf16(l[a++]),f=e.convertUtf8OffsetToUtf16(l[a++]);m[d]={start:h,end:f,length:f-h}}return{index:c,captureIndices:m}}}function Ws(t){return typeof t.instantiator=="function"}function Hs(t){return typeof t.default=="function"}function zs(t){return typeof t.data<"u"}function qs(t){return typeof Response<"u"&&t instanceof Response}function Xs(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let xe;function Qs(t){if(xe)return xe;async function e(){T=await Gs(async r=>{let n=t;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),Ws(n)?n=await n.instantiator(r):Hs(n)?n=await n.default(r):(zs(n)&&(n=n.data),qs(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await Js(n)(r):n=await Ks(n)(r):Xs(n)?n=await dt(n)(r):n instanceof WebAssembly.Module?n=await dt(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await dt(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return xe=e(),xe}function dt(t){return e=>WebAssembly.instantiate(t,e)}function Js(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Ks(t){return async e=>{const r=await t.arrayBuffer();return WebAssembly.instantiate(r,e)}}async function Zs(t){return t&&await Qs(t),{createScanner(e){return new Us(e.map(r=>typeof r=="string"?r:r.source))},createString(e){return new wn(e)}}}const Ys=Ps({langs:bn,themes:Ds,engine:()=>Zs(u(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))});function fe(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function ea(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}const Qt=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),P=String.raw;function ge(t,e){if(t==null)throw new Error(e??"Value expected");return t}const An=P`\[\^?`,vn=`c.? | C(?:-.?)?|${P`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${P`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${P`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${P`o\{[^\}]*\}?`}|${P`\d{1,3}`}`,Jt=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ne=new RegExp(P`
13
13
  \\ (?:
14
14
  ${vn}
15
15
  | [gk]<[^>]*>?
@@ -40,8 +40,8 @@ import{lP as Mt,lQ as Br,lR as Fr,lS as qn,lT as Xn,lU as Qn,lV as tr,lW as Jn,l
40
40
  | ${An}
41
41
  | &&
42
42
  | .
43
- `.replace(/\s+/g,""),"gsu");function ea(t,e={}){const r={flags:"",...e,rules:{captureGroup:!1,singleline:!1,...e.rules}};if(typeof t!="string")throw new Error("String expected as pattern");const n=Ea(r.flags),i=[n.extended],o={captureGroup:r.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(m){i.push(m)},replaceCurrentModX(m){i[i.length-1]=m},singleline:r.rules.singleline};let s=[],l;for(Ne.lastIndex=0;l=Ne.exec(t);){const m=ta(o,t,l[0],Ne.lastIndex);m.tokens?s.push(...m.tokens):m.token&&s.push(m.token),m.lastIndex!==void 0&&(Ne.lastIndex=m.lastIndex)}const a=[];let c=0;s.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++c:m.raw==="("&&a.push(m)}),c||a.forEach((m,d)=>{m.kind="capturing",m.number=d+1});const p=c||a.length;return{tokens:s.map(m=>m.type==="EscapedNumber"?wa(m,p):m).flat(),flags:n}}function ta(t,e,r,n){const[i,o]=r;if(r==="["||r==="[^"){const s=ra(e,r,n);return{tokens:s.tokens,lastIndex:s.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:Er(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:ma(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:In(r)}}if(o==="K")return{token:Rn("keep",r)};if(o==="N"||o==="R")return{token:re("newline",r,{negate:o==="N"})};if(o==="O")return{token:re("any",r)};if(o==="X")return{token:re("text_segment",r)};const s=Cn(r,{inCharClass:!1});return Array.isArray(s)?{tokens:s}:{token:s}}if(i==="("){if(o==="*")return{token:ga(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(e[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:fa(r,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,r==="("&&!t.captureGroup||r==="(?:")return{token:le("group",r)};if(r==="(?>")return{token:le("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:le(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&t.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:le("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:le("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:ca(r)}}if(t.getCurrentModX()){if(r==="#"){const s=e.indexOf(`
44
- `,n);return{lastIndex:s===-1?e.length:s}}if(/^\s$/.test(r)){const s=/\s+/y;return s.lastIndex=n,{lastIndex:s.exec(e)?s.lastIndex:n}}}if(r===".")return{token:re("dot",r)};if(r==="^"||r==="$"){const s=t.singleline?{"^":P`\A`,$:P`\Z`}[r]:r;return{token:Er(s,r)}}return r==="|"?{token:ia(r)}:Jt.test(r)?{tokens:Aa(r)}:{token:q(fe(r),r)}}function ra(t,e,r){const n=[br(e[1]==="^",e)];let i=1,o;for(ht.lastIndex=r;o=ht.exec(t);){const s=o[0];if(s[0]==="["&&s[1]!==":")i++,n.push(br(s[1]==="^",s));else if(s==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(q(93,s));else if(i--,n.push(oa(s)),!i)break}else{const l=na(s);Array.isArray(l)?n.push(...l):n.push(l)}}return{tokens:n,lastIndex:ht.lastIndex||t.length}}function na(t){if(t[0]==="\\")return Cn(t,{inCharClass:!0});if(t[0]==="["){const e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!Qt.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return re("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?sa(t):t==="&&"?aa(t):q(fe(t),t)}function Cn(t,{inCharClass:e}){const r=t[1];if(r==="c"||r==="C")return ha(t);if("dDhHsSwW".includes(r))return _a(t);if(t.startsWith(P`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return ya(t)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(t))try{const n=t.split(/\\x/).slice(1).map(s=>parseInt(s,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),o=new TextEncoder;return[...i].map(s=>{const l=[...o.encode(s)].map(a=>`\\x${a.toString(16)}`).join("");return q(fe(s),l)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return q(ba(t),t);if(wr.has(r))return q(wr.get(r),t);if(/\d/.test(r))return la(e,t);if(t==="\\")throw new Error(P`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return q(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function ia(t){return{type:"Alternator",raw:t}}function Er(t,e){return{type:"Assertion",kind:t,raw:e}}function In(t){return{type:"Backreference",raw:t}}function q(t,e){return{type:"Character",value:t,raw:e}}function oa(t){return{type:"CharacterClassClose",raw:t}}function sa(t){return{type:"CharacterClassHyphen",raw:t}}function aa(t){return{type:"CharacterClassIntersector",raw:t}}function br(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function re(t,e,r={}){return{type:"CharacterSet",kind:t,...r,raw:e}}function Rn(t,e,r={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:ge(r.flags),raw:e}}function la(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function ca(t){return{type:"GroupClose",raw:t}}function le(t,e,r={}){return{type:"GroupOpen",kind:t,...r,raw:e}}function ua(t,e,r,n){return{type:"NamedCallout",kind:t,tag:e,arguments:r,raw:n}}function pa(t,e,r,n){return{type:"Quantifier",kind:t,min:e,max:r,raw:n}}function ma(t){return{type:"Subroutine",raw:t}}const da=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),wr=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function ha(t){const e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return q(fe(e.toUpperCase())-64,t)}function fa(t,e){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;n??="";const i=(e.getCurrentModX()||r.includes("x"))&&!n.includes("x"),o=vr(r),s=vr(n),l={};if(o&&(l.enable=o),s&&(l.disable=s),t.endsWith(")"))return e.replaceCurrentModX(i),Rn("flags",t,{flags:l});if(t.endsWith(":"))return e.pushModX(i),e.numOpenGroups++,le("group",t,{...(o||s)&&{flags:l}});throw new Error(`Unexpected flag modifier "${t}"`)}function ga(t){const e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);const{name:r,tag:n,args:i}=e.groups;if(!r)throw new Error(`Invalid named callout "${t}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);const o=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[s,l,a]=o,c=da.has(r)?r.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof s=="string")throw new Error(`Named callout argument must be a number "${s}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(o.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof s=="number"||!/^[<>X]$/.test(s)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${s}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(typeof l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument three must be a tag or number "${a}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return ua(c,n??null,i?.split(",")??null,t)}function Ar(t){let e=null,r,n;if(t[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,s=1e5;if(+i>s||o&&+o>s)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+i,n=o===void 0?+i:o===""?1/0:+o,r>n&&(e="possessive",[r,n]=[n,r]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else r=t[0]==="+"?1:0,n=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return pa(e,r,n,t)}function _a(t){const e=t[1].toLowerCase();return re({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function ya(t){const{p:e,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return re("property",t,{value:n,negate:e==="P"&&!r||e==="p"&&!!r})}function vr(t){const e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function Ea(t){const e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<t.length;r++){const n=t[r];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(t.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[r+2]==="g"?"grapheme":"word",r+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return e}function ba(t){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t))throw new Error(`Incomplete or invalid escape "${t}"`);const e=t[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function wa(t,e){const{raw:r,inCharClass:n}=t,i=r.slice(1);if(!n&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=e))return[In(r)];const o=[],s=i.match(/^[0-7]+|\d/g);for(let l=0;l<s.length;l++){const a=s[l];let c;if(l===0&&a!=="8"&&a!=="9"){if(c=parseInt(a,8),c>127)throw new Error(P`Octal encoded byte above 177 unsupported "${r}"`)}else c=fe(a);o.push(q(c,(l===0?"\\":"")+a))}return o}function Aa(t){const e=[],r=new RegExp(Jt,"gy");let n;for(;n=r.exec(t);){const i=n[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:s,max:l}=o.groups;if(+s>+l&&i.endsWith("?")){r.lastIndex--,e.push(Ar(i.slice(0,-1)));continue}}}e.push(Ar(i))}return e}function Sn(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;const r=t.body[0];return!e||Object.keys(e).every(n=>e[n]===r[n])}function va(t){return Ca.has(t.type)}const Ca=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Ln(t,e={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},n=ea(t,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),i=(d,h)=>{const f=n.tokens[o.nextIndex];switch(o.parent=d,o.nextIndex++,f.type){case"Alternator":return ne();case"Assertion":return Ia(f);case"Backreference":return Ra(f,o);case"Character":return tt(f.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return Sa(f,o,h);case"CharacterClassOpen":return La(f,o,h);case"CharacterSet":return ka(f,o);case"Directive":return Da(f.kind,{flags:f.flags});case"GroupOpen":return Ta(f,o,h);case"NamedCallout":return Va(f.kind,f.tag,f.arguments);case"Quantifier":return Pa(f,o);case"Subroutine":return Oa(f,o);default:throw new Error(`Unexpected token type "${f.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:i},s=Ga($a(n.flags));let l=s.body[0];for(;o.nextIndex<n.tokens.length;){const d=i(l,{});d.type==="Alternative"?(s.body.push(d),l=d):l.body.push(d)}const{capturingGroups:a,hasNumberedRef:c,namedGroupsByName:p,subroutines:m}=o;if(c&&p.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:d}of m)if(typeof d=="number"){if(d>a.length)throw new Error("Subroutine uses a group number that's not defined");d&&(a[d-1].isSubroutined=!0)}else if(p.has(d)){if(p.get(d).length>1)throw new Error(P`Subroutine uses a duplicate group name "\g<${d}>"`);p.get(d)[0].isSubroutined=!0}else throw new Error(P`Subroutine uses a group name that's not defined "\g<${d}>"`);return s}function Ia({kind:t}){return Ot(ge({"^":"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"}[t],`Unexpected assertion kind "${t}"`),{negate:t===P`\B`||t===P`\Y`})}function Ra({raw:t},e){const r=/^\\k[<']/.test(t),n=r?t.slice(3,-1):t.slice(1),i=(o,s=!1)=>{const l=e.capturingGroups.length;let a=!1;if(o>l)if(e.skipBackrefValidation)a=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,xt(s?l+1-o:o,{orphan:a})};if(r){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${t}"`);return xt(n)}return i(+n)}function Sa(t,e,r){const{tokens:n,walk:i}=e,o=e.parent,s=o.body.at(-1),l=n[e.nextIndex];if(!r.isCheckingRangeEnd&&s&&s.type!=="CharacterClass"&&s.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const a=i(o,{...r,isCheckingRangeEnd:!0});if(s.type==="Character"&&a.type==="Character")return o.body.pop(),Na(s,a);throw new Error("Invalid character class range")}return tt(fe("-"))}function La({negate:t},e,r){const{tokens:n,walk:i}=e,o=[Ge()],s=n[e.nextIndex];let l=Rr(s);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")o.push(Ge()),e.nextIndex++;else{const c=o.at(-1);c.body.push(i(c,r))}l=Rr(n[e.nextIndex],s)}const a=Ge({negate:t});return o.length===1?a.body=o[0].body:(a.kind="intersection",a.body=o.map(c=>c.body.length===1?c.body[0]:c)),e.nextIndex++,a}function ka({kind:t,negate:e,value:r},n){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s}=n;if(t==="property"){const l=rt(r);if(Qt.has(l)&&!s?.has(l))t="posix",r=l;else return ce(r,{negate:e,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s})}return t==="posix"?Ma(r,{negate:e}):Nt(t,{negate:e})}function Ta(t,e,r){const{tokens:n,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:s,walk:l}=e,a=Ba(t),c=a.type==="AbsenceFunction",p=Ir(a),m=p&&a.negate;if(a.type==="CapturingGroup"&&(i.push(a),a.name&&Ys(o,a.name,[]).push(a)),c&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=Sr(n[e.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")a.body.push(ne()),e.nextIndex++;else{const h=a.body.at(-1),f=l(h,{...r,isInAbsenceFunction:r.isInAbsenceFunction||c,isInLookbehind:r.isInLookbehind||p,isInNegLookbehind:r.isInNegLookbehind||m});if(h.body.push(f),(p||r.isInLookbehind)&&!s){const y="Lookbehind includes a pattern not allowed by Oniguruma";if(m||r.isInNegLookbehind){if(Cr(f)||f.type==="CapturingGroup")throw new Error(y)}else if(Cr(f)||Ir(f)&&f.negate)throw new Error(y)}}d=Sr(n[e.nextIndex])}return e.nextIndex++,a}function Pa({kind:t,min:e,max:r},n){const i=n.parent,o=i.body.at(-1);if(!o||!va(o))throw new Error("Quantifier requires a repeatable token");const s=Tn(t,e,r,o);return i.body.pop(),s}function Oa({raw:t},e){const{capturingGroups:r,subroutines:n}=e;let i=t.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const l=+o.groups.num,a=r.length;if(e.hasNumberedRef=!0,i={"":l,"+":a+l,"-":a+1-l}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const s=Pn(i);return n.push(s),s}function xa(t,e){return{type:"AbsenceFunction",kind:t,body:Le(e?.body)}}function ne(t){return{type:"Alternative",body:On(t?.body)}}function Ot(t,e){const r={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(r.negate=!!e?.negate),r}function xt(t,e){const r=!!e?.orphan;return{type:"Backreference",ref:t,...r&&{orphan:r}}}function kn(t,e){const r={name:void 0,isSubroutined:!1,...e};if(r.name!==void 0&&!Fa(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:Le(e?.body)}}function tt(t,e){const r={useLastValid:!1,...e};if(t>1114111){const n=t.toString(16);if(r.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:t}}function Ge(t){const e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:On(t?.body)}}function Na(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function Nt(t,e){const r=!!e?.negate,n={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(n.negate=r),(t==="text_segment"||t==="newline"&&!r)&&(n.variableLength=!0),n}function Da(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:ge(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function $a(t){return{type:"Flags",...t}}function G(t){const e=t?.atomic,r=t?.flags;if(e&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...r&&{flags:r},body:Le(t?.body)}}function ee(t){const e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:Le(t?.body)}}function Va(t,e,r){return{type:"NamedCallout",kind:t,tag:e,arguments:r}}function Ma(t,e){const r=!!e?.negate;if(!Qt.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:r}}function Tn(t,e,r,n){if(e>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:r,body:n}}function Ga(t,e){return{type:"Regex",body:Le(e?.body),flags:t}}function Pn(t){return{type:"Subroutine",ref:t}}function ce(t,e){const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e};let n=r.unicodePropertyMap?.get(rt(t));if(!n){if(r.normalizeUnknownPropertyNames)n=ja(t);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(P`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:n??t,negate:r.negate}}function Ba({flags:t,kind:e,name:r,negate:n,number:i}){switch(e){case"absence_repeater":return xa("repeater");case"atomic":return G({atomic:!0});case"capturing":return kn(i,{name:r});case"group":return G({flags:t});case"lookahead":case"lookbehind":return ee({behind:e==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${e}"`)}}function Le(t){if(t===void 0)t=[ne()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function On(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function Cr(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function Ir(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function Fa(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function ja(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function rt(t){return t.replace(/[- _]+/g,"").toLowerCase()}function Rr(t,e){const r=e;return ge(t,`Unclosed character class${r?.type==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function Sr(t){return ge(t,"Unclosed group")}function we(t,e,r=null){function n(o,s){for(let l=0;l<o.length;l++){const a=i(o[l],s,l,o);l=Math.max(-1,l+a)}}function i(o,s=null,l=null,a=null){let c=0,p=!1;const m={node:o,parent:s,key:l,container:a,root:t,remove(){De(a).splice(Math.max(0,oe(l)+c),1),c--,p=!0},removeAllNextSiblings(){return De(a).splice(oe(l)+1)},removeAllPrevSiblings(){const g=oe(l)+c;return c-=g,De(a).splice(0,Math.max(0,g))},replaceWith(g,b={}){const _=!!b.traverse;a?a[Math.max(0,oe(l)+c)]=g:ge(s,"Can't replace root node")[l]=g,_&&i(g,s,l,a),p=!0},replaceWithMultiple(g,b={}){const _=!!b.traverse;if(De(a).splice(Math.max(0,oe(l)+c),1,...g),c+=g.length-1,_){let w=0;for(let v=0;v<g.length;v++)w+=i(g[v],s,oe(l)+v+w,a)}p=!0},skip(){p=!0}},{type:d}=o,h=e["*"],f=e[d],y=typeof h=="function"?h:h?.enter,E=typeof f=="function"?f:f?.enter;if(y?.(m,r),E?.(m,r),!p)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":n(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return f?.exit?.(m,r),h?.exit?.(m,r),c}return i(t),t}function De(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function oe(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}const Ua=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Wa(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function Ha(t,e,r,n){return t.slice(0,e)+n+t.slice(e+r.length)}const M=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Kt(t,e,r,n){const i=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let s=0,l="";for(const a of t.matchAll(i)){const{0:c,groups:{$skip:p}}=a;if(!p&&(!n||n===M.DEFAULT==!s)){r instanceof Function?l+=r(a,{context:s?M.CHAR_CLASS:M.DEFAULT,negated:o[o.length-1]}):l+=r;continue}c[0]==="["?(s++,o.push(c[1]==="^")):c==="]"&&s&&(s--,o.pop()),l+=c}return l}function xn(t,e,r,n){Kt(t,e,r,n)}function za(t,e,r=0,n){if(!new RegExp(e,"su").test(t))return null;const i=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let o=0,s;for(;s=i.exec(t);){const{0:l,groups:{$skip:a}}=s;if(!a&&(!n||n===M.DEFAULT==!o))return s;l==="["?o++:l==="]"&&o&&o--,i.lastIndex==s.index&&i.lastIndex++}return null}function $e(t,e,r){return!!za(t,e,0,r)}function qa(t,e){const r=/\\?./gsu;r.lastIndex=e;let n=t.length,i=0,o=1,s;for(;s=r.exec(t);){const[l]=s;if(l==="[")i++;else if(i)l==="]"&&i--;else if(l==="(")o++;else if(l===")"&&(o--,!o)){n=s.index;break}}return t.slice(e,n)}const Lr=new RegExp(String.raw`(?<noncapturingStart>${Ua})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Xa(t,e){const r=e?.hiddenCaptures??[];let n=e?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:n,hiddenCaptures:r};const i="(?>",o="(?:(?=(",s=[0],l=[];let a=0,c=0,p=NaN,m;do{m=!1;let d=0,h=0,f=!1,y;for(Lr.lastIndex=Number.isNaN(p)?0:p+o.length;y=Lr.exec(t);){const{0:E,index:g,groups:{capturingStart:b,noncapturingStart:_}}=y;if(E==="[")d++;else if(d)E==="]"&&d--;else if(E===i&&!f)p=g,f=!0;else if(f&&_)h++;else if(b)f?h++:(a++,s.push(a+c));else if(E===")"&&f){if(!h){c++;const w=a+c;if(t=`${t.slice(0,p)}${o}${t.slice(p+i.length,g)}))<$$${w}>)${t.slice(g+1)}`,m=!0,l.push(w),Wa(r,w),n.size){const v=new Map;n.forEach((k,N)=>{v.set(N>=w?N+1:N,k.map(U=>U>=w?U+1:U))}),n=v}break}h--}}}while(m);return r.push(...l),t=Kt(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:f}})=>{if(h){const y=+h;if(y>s.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${s[y]}`}return`\\${f}`},M.DEFAULT),{pattern:t,captureTransfers:n,hiddenCaptures:r}}const Nn=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,ft=new RegExp(String.raw`
43
+ `.replace(/\s+/g,""),"gsu");function ta(t,e={}){const r={flags:"",...e,rules:{captureGroup:!1,singleline:!1,...e.rules}};if(typeof t!="string")throw new Error("String expected as pattern");const n=ba(r.flags),i=[n.extended],o={captureGroup:r.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(m){i.push(m)},replaceCurrentModX(m){i[i.length-1]=m},singleline:r.rules.singleline};let s=[],l;for(Ne.lastIndex=0;l=Ne.exec(t);){const m=ra(o,t,l[0],Ne.lastIndex);m.tokens?s.push(...m.tokens):m.token&&s.push(m.token),m.lastIndex!==void 0&&(Ne.lastIndex=m.lastIndex)}const a=[];let c=0;s.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++c:m.raw==="("&&a.push(m)}),c||a.forEach((m,d)=>{m.kind="capturing",m.number=d+1});const p=c||a.length;return{tokens:s.map(m=>m.type==="EscapedNumber"?Aa(m,p):m).flat(),flags:n}}function ra(t,e,r,n){const[i,o]=r;if(r==="["||r==="[^"){const s=na(e,r,n);return{tokens:s.tokens,lastIndex:s.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:Er(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:da(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:In(r)}}if(o==="K")return{token:Rn("keep",r)};if(o==="N"||o==="R")return{token:re("newline",r,{negate:o==="N"})};if(o==="O")return{token:re("any",r)};if(o==="X")return{token:re("text_segment",r)};const s=Cn(r,{inCharClass:!1});return Array.isArray(s)?{tokens:s}:{token:s}}if(i==="("){if(o==="*")return{token:_a(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(e[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:ga(r,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,r==="("&&!t.captureGroup||r==="(?:")return{token:le("group",r)};if(r==="(?>")return{token:le("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:le(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&t.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:le("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:le("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:ua(r)}}if(t.getCurrentModX()){if(r==="#"){const s=e.indexOf(`
44
+ `,n);return{lastIndex:s===-1?e.length:s}}if(/^\s$/.test(r)){const s=/\s+/y;return s.lastIndex=n,{lastIndex:s.exec(e)?s.lastIndex:n}}}if(r===".")return{token:re("dot",r)};if(r==="^"||r==="$"){const s=t.singleline?{"^":P`\A`,$:P`\Z`}[r]:r;return{token:Er(s,r)}}return r==="|"?{token:oa(r)}:Jt.test(r)?{tokens:va(r)}:{token:q(fe(r),r)}}function na(t,e,r){const n=[br(e[1]==="^",e)];let i=1,o;for(ht.lastIndex=r;o=ht.exec(t);){const s=o[0];if(s[0]==="["&&s[1]!==":")i++,n.push(br(s[1]==="^",s));else if(s==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(q(93,s));else if(i--,n.push(sa(s)),!i)break}else{const l=ia(s);Array.isArray(l)?n.push(...l):n.push(l)}}return{tokens:n,lastIndex:ht.lastIndex||t.length}}function ia(t){if(t[0]==="\\")return Cn(t,{inCharClass:!0});if(t[0]==="["){const e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!Qt.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return re("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?aa(t):t==="&&"?la(t):q(fe(t),t)}function Cn(t,{inCharClass:e}){const r=t[1];if(r==="c"||r==="C")return fa(t);if("dDhHsSwW".includes(r))return ya(t);if(t.startsWith(P`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return Ea(t)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(t))try{const n=t.split(/\\x/).slice(1).map(s=>parseInt(s,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),o=new TextEncoder;return[...i].map(s=>{const l=[...o.encode(s)].map(a=>`\\x${a.toString(16)}`).join("");return q(fe(s),l)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return q(wa(t),t);if(wr.has(r))return q(wr.get(r),t);if(/\d/.test(r))return ca(e,t);if(t==="\\")throw new Error(P`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return q(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function oa(t){return{type:"Alternator",raw:t}}function Er(t,e){return{type:"Assertion",kind:t,raw:e}}function In(t){return{type:"Backreference",raw:t}}function q(t,e){return{type:"Character",value:t,raw:e}}function sa(t){return{type:"CharacterClassClose",raw:t}}function aa(t){return{type:"CharacterClassHyphen",raw:t}}function la(t){return{type:"CharacterClassIntersector",raw:t}}function br(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function re(t,e,r={}){return{type:"CharacterSet",kind:t,...r,raw:e}}function Rn(t,e,r={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:ge(r.flags),raw:e}}function ca(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function ua(t){return{type:"GroupClose",raw:t}}function le(t,e,r={}){return{type:"GroupOpen",kind:t,...r,raw:e}}function pa(t,e,r,n){return{type:"NamedCallout",kind:t,tag:e,arguments:r,raw:n}}function ma(t,e,r,n){return{type:"Quantifier",kind:t,min:e,max:r,raw:n}}function da(t){return{type:"Subroutine",raw:t}}const ha=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),wr=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function fa(t){const e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return q(fe(e.toUpperCase())-64,t)}function ga(t,e){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;n??="";const i=(e.getCurrentModX()||r.includes("x"))&&!n.includes("x"),o=vr(r),s=vr(n),l={};if(o&&(l.enable=o),s&&(l.disable=s),t.endsWith(")"))return e.replaceCurrentModX(i),Rn("flags",t,{flags:l});if(t.endsWith(":"))return e.pushModX(i),e.numOpenGroups++,le("group",t,{...(o||s)&&{flags:l}});throw new Error(`Unexpected flag modifier "${t}"`)}function _a(t){const e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);const{name:r,tag:n,args:i}=e.groups;if(!r)throw new Error(`Invalid named callout "${t}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);const o=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[s,l,a]=o,c=ha.has(r)?r.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof s=="string")throw new Error(`Named callout argument must be a number "${s}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(o.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof s=="number"||!/^[<>X]$/.test(s)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${s}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(typeof l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument three must be a tag or number "${a}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return pa(c,n??null,i?.split(",")??null,t)}function Ar(t){let e=null,r,n;if(t[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,s=1e5;if(+i>s||o&&+o>s)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+i,n=o===void 0?+i:o===""?1/0:+o,r>n&&(e="possessive",[r,n]=[n,r]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else r=t[0]==="+"?1:0,n=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return ma(e,r,n,t)}function ya(t){const e=t[1].toLowerCase();return re({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function Ea(t){const{p:e,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return re("property",t,{value:n,negate:e==="P"&&!r||e==="p"&&!!r})}function vr(t){const e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function ba(t){const e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<t.length;r++){const n=t[r];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(t.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[r+2]==="g"?"grapheme":"word",r+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return e}function wa(t){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t))throw new Error(`Incomplete or invalid escape "${t}"`);const e=t[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function Aa(t,e){const{raw:r,inCharClass:n}=t,i=r.slice(1);if(!n&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=e))return[In(r)];const o=[],s=i.match(/^[0-7]+|\d/g);for(let l=0;l<s.length;l++){const a=s[l];let c;if(l===0&&a!=="8"&&a!=="9"){if(c=parseInt(a,8),c>127)throw new Error(P`Octal encoded byte above 177 unsupported "${r}"`)}else c=fe(a);o.push(q(c,(l===0?"\\":"")+a))}return o}function va(t){const e=[],r=new RegExp(Jt,"gy");let n;for(;n=r.exec(t);){const i=n[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:s,max:l}=o.groups;if(+s>+l&&i.endsWith("?")){r.lastIndex--,e.push(Ar(i.slice(0,-1)));continue}}}e.push(Ar(i))}return e}function Sn(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;const r=t.body[0];return!e||Object.keys(e).every(n=>e[n]===r[n])}function Ca(t){return Ia.has(t.type)}const Ia=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Ln(t,e={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},n=ta(t,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),i=(d,h)=>{const f=n.tokens[o.nextIndex];switch(o.parent=d,o.nextIndex++,f.type){case"Alternator":return ne();case"Assertion":return Ra(f);case"Backreference":return Sa(f,o);case"Character":return tt(f.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return La(f,o,h);case"CharacterClassOpen":return ka(f,o,h);case"CharacterSet":return Ta(f,o);case"Directive":return $a(f.kind,{flags:f.flags});case"GroupOpen":return Pa(f,o,h);case"NamedCallout":return Ma(f.kind,f.tag,f.arguments);case"Quantifier":return Oa(f,o);case"Subroutine":return xa(f,o);default:throw new Error(`Unexpected token type "${f.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:i},s=Ba(Va(n.flags));let l=s.body[0];for(;o.nextIndex<n.tokens.length;){const d=i(l,{});d.type==="Alternative"?(s.body.push(d),l=d):l.body.push(d)}const{capturingGroups:a,hasNumberedRef:c,namedGroupsByName:p,subroutines:m}=o;if(c&&p.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:d}of m)if(typeof d=="number"){if(d>a.length)throw new Error("Subroutine uses a group number that's not defined");d&&(a[d-1].isSubroutined=!0)}else if(p.has(d)){if(p.get(d).length>1)throw new Error(P`Subroutine uses a duplicate group name "\g<${d}>"`);p.get(d)[0].isSubroutined=!0}else throw new Error(P`Subroutine uses a group name that's not defined "\g<${d}>"`);return s}function Ra({kind:t}){return Ot(ge({"^":"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"}[t],`Unexpected assertion kind "${t}"`),{negate:t===P`\B`||t===P`\Y`})}function Sa({raw:t},e){const r=/^\\k[<']/.test(t),n=r?t.slice(3,-1):t.slice(1),i=(o,s=!1)=>{const l=e.capturingGroups.length;let a=!1;if(o>l)if(e.skipBackrefValidation)a=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,xt(s?l+1-o:o,{orphan:a})};if(r){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${t}"`);return xt(n)}return i(+n)}function La(t,e,r){const{tokens:n,walk:i}=e,o=e.parent,s=o.body.at(-1),l=n[e.nextIndex];if(!r.isCheckingRangeEnd&&s&&s.type!=="CharacterClass"&&s.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const a=i(o,{...r,isCheckingRangeEnd:!0});if(s.type==="Character"&&a.type==="Character")return o.body.pop(),Da(s,a);throw new Error("Invalid character class range")}return tt(fe("-"))}function ka({negate:t},e,r){const{tokens:n,walk:i}=e,o=[Ge()],s=n[e.nextIndex];let l=Rr(s);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")o.push(Ge()),e.nextIndex++;else{const c=o.at(-1);c.body.push(i(c,r))}l=Rr(n[e.nextIndex],s)}const a=Ge({negate:t});return o.length===1?a.body=o[0].body:(a.kind="intersection",a.body=o.map(c=>c.body.length===1?c.body[0]:c)),e.nextIndex++,a}function Ta({kind:t,negate:e,value:r},n){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s}=n;if(t==="property"){const l=rt(r);if(Qt.has(l)&&!s?.has(l))t="posix",r=l;else return ce(r,{negate:e,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s})}return t==="posix"?Ga(r,{negate:e}):Nt(t,{negate:e})}function Pa(t,e,r){const{tokens:n,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:s,walk:l}=e,a=Fa(t),c=a.type==="AbsenceFunction",p=Ir(a),m=p&&a.negate;if(a.type==="CapturingGroup"&&(i.push(a),a.name&&ea(o,a.name,[]).push(a)),c&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=Sr(n[e.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")a.body.push(ne()),e.nextIndex++;else{const h=a.body.at(-1),f=l(h,{...r,isInAbsenceFunction:r.isInAbsenceFunction||c,isInLookbehind:r.isInLookbehind||p,isInNegLookbehind:r.isInNegLookbehind||m});if(h.body.push(f),(p||r.isInLookbehind)&&!s){const y="Lookbehind includes a pattern not allowed by Oniguruma";if(m||r.isInNegLookbehind){if(Cr(f)||f.type==="CapturingGroup")throw new Error(y)}else if(Cr(f)||Ir(f)&&f.negate)throw new Error(y)}}d=Sr(n[e.nextIndex])}return e.nextIndex++,a}function Oa({kind:t,min:e,max:r},n){const i=n.parent,o=i.body.at(-1);if(!o||!Ca(o))throw new Error("Quantifier requires a repeatable token");const s=Tn(t,e,r,o);return i.body.pop(),s}function xa({raw:t},e){const{capturingGroups:r,subroutines:n}=e;let i=t.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const l=+o.groups.num,a=r.length;if(e.hasNumberedRef=!0,i={"":l,"+":a+l,"-":a+1-l}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const s=Pn(i);return n.push(s),s}function Na(t,e){return{type:"AbsenceFunction",kind:t,body:Le(e?.body)}}function ne(t){return{type:"Alternative",body:On(t?.body)}}function Ot(t,e){const r={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(r.negate=!!e?.negate),r}function xt(t,e){const r=!!e?.orphan;return{type:"Backreference",ref:t,...r&&{orphan:r}}}function kn(t,e){const r={name:void 0,isSubroutined:!1,...e};if(r.name!==void 0&&!ja(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:Le(e?.body)}}function tt(t,e){const r={useLastValid:!1,...e};if(t>1114111){const n=t.toString(16);if(r.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:t}}function Ge(t){const e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:On(t?.body)}}function Da(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function Nt(t,e){const r=!!e?.negate,n={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(n.negate=r),(t==="text_segment"||t==="newline"&&!r)&&(n.variableLength=!0),n}function $a(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:ge(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function Va(t){return{type:"Flags",...t}}function G(t){const e=t?.atomic,r=t?.flags;if(e&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...r&&{flags:r},body:Le(t?.body)}}function ee(t){const e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:Le(t?.body)}}function Ma(t,e,r){return{type:"NamedCallout",kind:t,tag:e,arguments:r}}function Ga(t,e){const r=!!e?.negate;if(!Qt.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:r}}function Tn(t,e,r,n){if(e>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:r,body:n}}function Ba(t,e){return{type:"Regex",body:Le(e?.body),flags:t}}function Pn(t){return{type:"Subroutine",ref:t}}function ce(t,e){const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e};let n=r.unicodePropertyMap?.get(rt(t));if(!n){if(r.normalizeUnknownPropertyNames)n=Ua(t);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(P`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:n??t,negate:r.negate}}function Fa({flags:t,kind:e,name:r,negate:n,number:i}){switch(e){case"absence_repeater":return Na("repeater");case"atomic":return G({atomic:!0});case"capturing":return kn(i,{name:r});case"group":return G({flags:t});case"lookahead":case"lookbehind":return ee({behind:e==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${e}"`)}}function Le(t){if(t===void 0)t=[ne()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function On(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function Cr(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function Ir(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function ja(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function Ua(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function rt(t){return t.replace(/[- _]+/g,"").toLowerCase()}function Rr(t,e){const r=e;return ge(t,`Unclosed character class${r?.type==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function Sr(t){return ge(t,"Unclosed group")}function we(t,e,r=null){function n(o,s){for(let l=0;l<o.length;l++){const a=i(o[l],s,l,o);l=Math.max(-1,l+a)}}function i(o,s=null,l=null,a=null){let c=0,p=!1;const m={node:o,parent:s,key:l,container:a,root:t,remove(){De(a).splice(Math.max(0,oe(l)+c),1),c--,p=!0},removeAllNextSiblings(){return De(a).splice(oe(l)+1)},removeAllPrevSiblings(){const g=oe(l)+c;return c-=g,De(a).splice(0,Math.max(0,g))},replaceWith(g,b={}){const _=!!b.traverse;a?a[Math.max(0,oe(l)+c)]=g:ge(s,"Can't replace root node")[l]=g,_&&i(g,s,l,a),p=!0},replaceWithMultiple(g,b={}){const _=!!b.traverse;if(De(a).splice(Math.max(0,oe(l)+c),1,...g),c+=g.length-1,_){let w=0;for(let v=0;v<g.length;v++)w+=i(g[v],s,oe(l)+v+w,a)}p=!0},skip(){p=!0}},{type:d}=o,h=e["*"],f=e[d],y=typeof h=="function"?h:h?.enter,E=typeof f=="function"?f:f?.enter;if(y?.(m,r),E?.(m,r),!p)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":n(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return f?.exit?.(m,r),h?.exit?.(m,r),c}return i(t),t}function De(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function oe(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}const Wa=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Ha(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function za(t,e,r,n){return t.slice(0,e)+n+t.slice(e+r.length)}const M=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Kt(t,e,r,n){const i=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let s=0,l="";for(const a of t.matchAll(i)){const{0:c,groups:{$skip:p}}=a;if(!p&&(!n||n===M.DEFAULT==!s)){r instanceof Function?l+=r(a,{context:s?M.CHAR_CLASS:M.DEFAULT,negated:o[o.length-1]}):l+=r;continue}c[0]==="["?(s++,o.push(c[1]==="^")):c==="]"&&s&&(s--,o.pop()),l+=c}return l}function xn(t,e,r,n){Kt(t,e,r,n)}function qa(t,e,r=0,n){if(!new RegExp(e,"su").test(t))return null;const i=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let o=0,s;for(;s=i.exec(t);){const{0:l,groups:{$skip:a}}=s;if(!a&&(!n||n===M.DEFAULT==!o))return s;l==="["?o++:l==="]"&&o&&o--,i.lastIndex==s.index&&i.lastIndex++}return null}function $e(t,e,r){return!!qa(t,e,0,r)}function Xa(t,e){const r=/\\?./gsu;r.lastIndex=e;let n=t.length,i=0,o=1,s;for(;s=r.exec(t);){const[l]=s;if(l==="[")i++;else if(i)l==="]"&&i--;else if(l==="(")o++;else if(l===")"&&(o--,!o)){n=s.index;break}}return t.slice(e,n)}const Lr=new RegExp(String.raw`(?<noncapturingStart>${Wa})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Qa(t,e){const r=e?.hiddenCaptures??[];let n=e?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:n,hiddenCaptures:r};const i="(?>",o="(?:(?=(",s=[0],l=[];let a=0,c=0,p=NaN,m;do{m=!1;let d=0,h=0,f=!1,y;for(Lr.lastIndex=Number.isNaN(p)?0:p+o.length;y=Lr.exec(t);){const{0:E,index:g,groups:{capturingStart:b,noncapturingStart:_}}=y;if(E==="[")d++;else if(d)E==="]"&&d--;else if(E===i&&!f)p=g,f=!0;else if(f&&_)h++;else if(b)f?h++:(a++,s.push(a+c));else if(E===")"&&f){if(!h){c++;const w=a+c;if(t=`${t.slice(0,p)}${o}${t.slice(p+i.length,g)}))<$$${w}>)${t.slice(g+1)}`,m=!0,l.push(w),Ha(r,w),n.size){const v=new Map;n.forEach((k,N)=>{v.set(N>=w?N+1:N,k.map(U=>U>=w?U+1:U))}),n=v}break}h--}}}while(m);return r.push(...l),t=Kt(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:f}})=>{if(h){const y=+h;if(y>s.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${s[y]}`}return`\\${f}`},M.DEFAULT),{pattern:t,captureTransfers:n,hiddenCaptures:r}}const Nn=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,ft=new RegExp(String.raw`
45
45
  \\(?: \d+
46
46
  | c[A-Za-z]
47
47
  | [gk]<[^>]+>
@@ -56,7 +56,7 @@ import{lP as Mt,lQ as Br,lR as Fr,lS as qn,lT as Xn,lU as Qn,lV as tr,lW as Jn,l
56
56
  ))?
57
57
  | (?<qBase>${Nn})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
58
58
  | \\?.
59
- `.replace(/\s+/g,""),"gsu");function Qa(t){if(!new RegExp(`${Nn}\\+`).test(t))return{pattern:t};const e=[];let r=null,n=null,i="",o=0,s;for(ft.lastIndex=0;s=ft.exec(t);){const{0:l,index:a,groups:{qBase:c,qMod:p,invalidQ:m}}=s;if(l==="[")o||(n=a),o++;else if(l==="]")o?o--:n=null;else if(!o)if(p==="+"&&i&&!i.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${l}"`);let d=-1;if(/^\{\d+\}$/.test(c))t=Ha(t,a+c.length,p,"");else{if(i===")"||i==="]"){const h=i===")"?r:n;if(h===null)throw new Error(`Invalid unmatched "${i}"`);t=`${t.slice(0,h)}(?>${t.slice(h,a)}${c})${t.slice(a+l.length)}`}else t=`${t.slice(0,a-i.length)}(?>${i}${c})${t.slice(a+l.length)}`;d+=4}ft.lastIndex+=d}else l[0]==="("?e.push(a):l===")"&&(r=e.length?e.pop():null);i=l}return{pattern:t}}const $=String.raw,Ja=$`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Dt=$`\(\?R=(?<rDepth>[^\)]+)\)|${Ja}`,nt=$`\(\?<(?![=!])(?<captureName>[^>]+)>`,Dn=$`${nt}|(?<unnamed>\()(?!\?)`,Z=new RegExp($`${nt}|${Dt}|\(\?|\\?.`,"gsu"),gt="Cannot use multiple overlapping recursions";function Ka(t,e){const{hiddenCaptures:r,mode:n}={hiddenCaptures:[],mode:"plugin",...e};let i=e?.captureTransfers??new Map;if(!new RegExp(Dt,"su").test(t))return{pattern:t,captureTransfers:i,hiddenCaptures:r};if(n==="plugin"&&$e(t,$`\(\?\(DEFINE\)`,M.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],s=$e(t,$`\\[1-9]`,M.DEFAULT),l=new Map,a=[];let c=!1,p=0,m=0,d;for(Z.lastIndex=0;d=Z.exec(t);){const{0:h,groups:{captureName:f,rDepth:y,gRNameOrNum:E,gRDepth:g}}=d;if(h==="[")p++;else if(p)h==="]"&&p--;else if(y){if(kr(y),c)throw new Error(gt);if(s)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const b=t.slice(0,d.index),_=t.slice(Z.lastIndex);if($e(_,Dt,M.DEFAULT))throw new Error(gt);const w=+y-1;t=Tr(b,_,w,!1,r,o,m),i=Or(i,b,w,o.length,0,m);break}else if(E){kr(g);let b=!1;for(const X of a)if(X.name===E||X.num===+E){if(b=!0,X.hasRecursedWithin)throw new Error(gt);break}if(!b)throw new Error($`Recursive \g cannot be used outside the referenced group "${n==="external"?E:$`\g<${E}&R=${g}>`}"`);const _=l.get(E),w=qa(t,_);if(s&&$e(w,$`${nt}|\((?!\?)`,M.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const v=t.slice(_,d.index),k=w.slice(v.length+h.length),N=o.length,U=+g-1,ke=Tr(v,k,U,!0,r,o,m);i=Or(i,v,U,o.length-N,N,m);const ot=t.slice(0,_),_e=t.slice(_+w.length);t=`${ot}${ke}${_e}`,Z.lastIndex+=ke.length-h.length-v.length-k.length,a.forEach(X=>X.hasRecursedWithin=!0),c=!0}else if(f)m++,l.set(String(m),Z.lastIndex),l.set(f,Z.lastIndex),a.push({num:m,name:f});else if(h[0]==="("){const b=h==="(";b&&(m++,l.set(String(m),Z.lastIndex)),a.push(b?{num:m}:{})}else h===")"&&a.pop()}return r.push(...o),{pattern:t,captureTransfers:i,hiddenCaptures:r}}function kr(t){const e=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(e);if(t=+t,t<2||t>100)throw new Error(e)}function Tr(t,e,r,n,i,o,s){const l=new Set;n&&xn(t+e,nt,({groups:{captureName:c}})=>{l.add(c)},M.DEFAULT);const a=[r,n?l:null,i,o,s];return`${t}${Pr(`(?:${t}`,"forward",...a)}(?:)${Pr(`${e})`,"backward",...a)}${e}`}function Pr(t,e,r,n,i,o,s){const a=p=>e==="forward"?p+2:r-p+2-1;let c="";for(let p=0;p<r;p++){const m=a(p);c+=Kt(t,$`${Dn}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:f,backref:y}})=>{if(y&&n&&!n.has(y))return d;const E=`_$${m}`;if(f||h){const g=s+o.length+1;return o.push(g),Za(i,g),f?d:`(?<${h}${E}>`}return $`\k<${y}${E}>`},M.DEFAULT)}return c}function Za(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function Or(t,e,r,n,i,o){if(t.size&&n){let s=0;xn(e,Dn,()=>s++,M.DEFAULT);const l=o-s+i,a=new Map;return t.forEach((c,p)=>{const m=(n-s*r)/r,d=s*r,h=p>l+s?p+n:p,f=[];for(const y of c)if(y<=l)f.push(y);else if(y>l+s+m)f.push(y+n);else if(y<=l+s)for(let E=0;E<=r;E++)f.push(y+s*E);else for(let E=0;E<=r;E++)f.push(y+d+m*E);a.set(h,f)}),a}return t}var S=String.fromCodePoint,A=String.raw,B={},it=globalThis.RegExp;B.flagGroups=(()=>{try{new it("(?i:)")}catch{return!1}return!0})();B.unicodeSets=(()=>{try{new it("[[]]","v")}catch{return!1}return!0})();B.bugFlagVLiteralHyphenIsRange=B.unicodeSets?(()=>{try{new it(A`[\d\-a]`,"v")}catch{return!0}return!1})():!1;B.bugNestedClassIgnoresNegation=B.unicodeSets&&new it("[[^a]]","v").test("a");function Je(t,{enable:e,disable:r}){return{dotAll:!r?.dotAll&&!!(e?.dotAll||t.dotAll),ignoreCase:!r?.ignoreCase&&!!(e?.ignoreCase||t.ignoreCase)}}function Re(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}function $t(t,e){return xr[t]>=xr[e]}function Ya(t,e){if(t==null)throw new Error(e??"Value expected");return t}var xr={ES2025:2025,ES2024:2024,ES2018:2018},el={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function $n(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!el[t.target])throw new Error(`Unexpected target "${t.target}"`);const e={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return e.target==="auto"&&(e.target=B.flagGroups?"ES2025":B.unicodeSets?"ES2024":"ES2018"),e}var tl="[ -\r ]",rl=new Set([S(304),S(305)]),H=A`[\p{L}\p{M}\p{N}\p{Pc}]`;function Vn(t){if(rl.has(t))return[t];const e=new Set,r=t.toLowerCase(),n=r.toUpperCase(),i=ol.get(r),o=nl.get(r),s=il.get(r);return[...n].length===1&&e.add(n),s&&e.add(s),i&&e.add(i),e.add(r),o&&e.add(o),[...e]}var Zt=new Map(`C Other
59
+ `.replace(/\s+/g,""),"gsu");function Ja(t){if(!new RegExp(`${Nn}\\+`).test(t))return{pattern:t};const e=[];let r=null,n=null,i="",o=0,s;for(ft.lastIndex=0;s=ft.exec(t);){const{0:l,index:a,groups:{qBase:c,qMod:p,invalidQ:m}}=s;if(l==="[")o||(n=a),o++;else if(l==="]")o?o--:n=null;else if(!o)if(p==="+"&&i&&!i.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${l}"`);let d=-1;if(/^\{\d+\}$/.test(c))t=za(t,a+c.length,p,"");else{if(i===")"||i==="]"){const h=i===")"?r:n;if(h===null)throw new Error(`Invalid unmatched "${i}"`);t=`${t.slice(0,h)}(?>${t.slice(h,a)}${c})${t.slice(a+l.length)}`}else t=`${t.slice(0,a-i.length)}(?>${i}${c})${t.slice(a+l.length)}`;d+=4}ft.lastIndex+=d}else l[0]==="("?e.push(a):l===")"&&(r=e.length?e.pop():null);i=l}return{pattern:t}}const $=String.raw,Ka=$`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Dt=$`\(\?R=(?<rDepth>[^\)]+)\)|${Ka}`,nt=$`\(\?<(?![=!])(?<captureName>[^>]+)>`,Dn=$`${nt}|(?<unnamed>\()(?!\?)`,Z=new RegExp($`${nt}|${Dt}|\(\?|\\?.`,"gsu"),gt="Cannot use multiple overlapping recursions";function Za(t,e){const{hiddenCaptures:r,mode:n}={hiddenCaptures:[],mode:"plugin",...e};let i=e?.captureTransfers??new Map;if(!new RegExp(Dt,"su").test(t))return{pattern:t,captureTransfers:i,hiddenCaptures:r};if(n==="plugin"&&$e(t,$`\(\?\(DEFINE\)`,M.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],s=$e(t,$`\\[1-9]`,M.DEFAULT),l=new Map,a=[];let c=!1,p=0,m=0,d;for(Z.lastIndex=0;d=Z.exec(t);){const{0:h,groups:{captureName:f,rDepth:y,gRNameOrNum:E,gRDepth:g}}=d;if(h==="[")p++;else if(p)h==="]"&&p--;else if(y){if(kr(y),c)throw new Error(gt);if(s)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const b=t.slice(0,d.index),_=t.slice(Z.lastIndex);if($e(_,Dt,M.DEFAULT))throw new Error(gt);const w=+y-1;t=Tr(b,_,w,!1,r,o,m),i=Or(i,b,w,o.length,0,m);break}else if(E){kr(g);let b=!1;for(const X of a)if(X.name===E||X.num===+E){if(b=!0,X.hasRecursedWithin)throw new Error(gt);break}if(!b)throw new Error($`Recursive \g cannot be used outside the referenced group "${n==="external"?E:$`\g<${E}&R=${g}>`}"`);const _=l.get(E),w=Xa(t,_);if(s&&$e(w,$`${nt}|\((?!\?)`,M.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const v=t.slice(_,d.index),k=w.slice(v.length+h.length),N=o.length,U=+g-1,ke=Tr(v,k,U,!0,r,o,m);i=Or(i,v,U,o.length-N,N,m);const ot=t.slice(0,_),_e=t.slice(_+w.length);t=`${ot}${ke}${_e}`,Z.lastIndex+=ke.length-h.length-v.length-k.length,a.forEach(X=>X.hasRecursedWithin=!0),c=!0}else if(f)m++,l.set(String(m),Z.lastIndex),l.set(f,Z.lastIndex),a.push({num:m,name:f});else if(h[0]==="("){const b=h==="(";b&&(m++,l.set(String(m),Z.lastIndex)),a.push(b?{num:m}:{})}else h===")"&&a.pop()}return r.push(...o),{pattern:t,captureTransfers:i,hiddenCaptures:r}}function kr(t){const e=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(e);if(t=+t,t<2||t>100)throw new Error(e)}function Tr(t,e,r,n,i,o,s){const l=new Set;n&&xn(t+e,nt,({groups:{captureName:c}})=>{l.add(c)},M.DEFAULT);const a=[r,n?l:null,i,o,s];return`${t}${Pr(`(?:${t}`,"forward",...a)}(?:)${Pr(`${e})`,"backward",...a)}${e}`}function Pr(t,e,r,n,i,o,s){const a=p=>e==="forward"?p+2:r-p+2-1;let c="";for(let p=0;p<r;p++){const m=a(p);c+=Kt(t,$`${Dn}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:f,backref:y}})=>{if(y&&n&&!n.has(y))return d;const E=`_$${m}`;if(f||h){const g=s+o.length+1;return o.push(g),Ya(i,g),f?d:`(?<${h}${E}>`}return $`\k<${y}${E}>`},M.DEFAULT)}return c}function Ya(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function Or(t,e,r,n,i,o){if(t.size&&n){let s=0;xn(e,Dn,()=>s++,M.DEFAULT);const l=o-s+i,a=new Map;return t.forEach((c,p)=>{const m=(n-s*r)/r,d=s*r,h=p>l+s?p+n:p,f=[];for(const y of c)if(y<=l)f.push(y);else if(y>l+s+m)f.push(y+n);else if(y<=l+s)for(let E=0;E<=r;E++)f.push(y+s*E);else for(let E=0;E<=r;E++)f.push(y+d+m*E);a.set(h,f)}),a}return t}var S=String.fromCodePoint,A=String.raw,B={},it=globalThis.RegExp;B.flagGroups=(()=>{try{new it("(?i:)")}catch{return!1}return!0})();B.unicodeSets=(()=>{try{new it("[[]]","v")}catch{return!1}return!0})();B.bugFlagVLiteralHyphenIsRange=B.unicodeSets?(()=>{try{new it(A`[\d\-a]`,"v")}catch{return!0}return!1})():!1;B.bugNestedClassIgnoresNegation=B.unicodeSets&&new it("[[^a]]","v").test("a");function Je(t,{enable:e,disable:r}){return{dotAll:!r?.dotAll&&!!(e?.dotAll||t.dotAll),ignoreCase:!r?.ignoreCase&&!!(e?.ignoreCase||t.ignoreCase)}}function Re(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}function $t(t,e){return xr[t]>=xr[e]}function el(t,e){if(t==null)throw new Error(e??"Value expected");return t}var xr={ES2025:2025,ES2024:2024,ES2018:2018},tl={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function $n(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!tl[t.target])throw new Error(`Unexpected target "${t.target}"`);const e={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return e.target==="auto"&&(e.target=B.flagGroups?"ES2025":B.unicodeSets?"ES2024":"ES2018"),e}var rl="[ -\r ]",nl=new Set([S(304),S(305)]),H=A`[\p{L}\p{M}\p{N}\p{Pc}]`;function Vn(t){if(nl.has(t))return[t];const e=new Set,r=t.toLowerCase(),n=r.toUpperCase(),i=sl.get(r),o=il.get(r),s=ol.get(r);return[...n].length===1&&e.add(n),s&&e.add(s),i&&e.add(i),e.add(r),o&&e.add(o),[...e]}var Zt=new Map(`C Other
60
60
  Cc Control cntrl
61
61
  Cf Format
62
62
  Cn Unassigned
@@ -146,8 +146,8 @@ Uppercase Upper
146
146
  Variation_Selector VS
147
147
  White_Space space
148
148
  XID_Continue XIDC
149
- XID_Start XIDS`.split(/\s/).map(t=>[rt(t),t])),nl=new Map([["s",S(383)],[S(383),"s"]]),il=new Map([[S(223),S(7838)],[S(107),S(8490)],[S(229),S(8491)],[S(969),S(8486)]]),ol=new Map([Q(453),Q(456),Q(459),Q(498),..._t(8072,8079),..._t(8088,8095),..._t(8104,8111),Q(8124),Q(8140),Q(8188)]),sl=new Map([["alnum",A`[\p{Alpha}\p{Nd}]`],["alpha",A`\p{Alpha}`],["ascii",A`\p{ASCII}`],["blank",A`[\p{Zs}\t]`],["cntrl",A`\p{Cc}`],["digit",A`\p{Nd}`],["graph",A`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",A`\p{Lower}`],["print",A`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",A`[\p{P}\p{S}]`],["space",A`\p{space}`],["upper",A`\p{Upper}`],["word",A`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",A`\p{AHex}`]]);function al(t,e){const r=[];for(let n=t;n<=e;n++)r.push(n);return r}function Q(t){const e=S(t);return[e.toLowerCase(),e]}function _t(t,e){return al(t,e).map(r=>Q(r))}var Mn=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function ll(t,e){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...e};Gn(t);const n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:$t(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};we(t,cl,n);const i={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};we(t,ul,o);const s={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return we(t,pl,s),t._originMap=o.groupOriginByCopy,t._strategy=n.strategy,t}var cl={AbsenceFunction({node:t,parent:e,replaceWith:r}){const{body:n,kind:i}=t;if(i==="repeater"){const o=G();o.body[0].body.push(ee({negate:!0,body:n}),ce("Any"));const s=G();s.body[0].body.push(Tn("greedy",0,1/0,o)),r(C(s,e),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:e,key:r},{flagDirectivesByAlt:n}){const i=t.body.filter(o=>o.kind==="flags");for(let o=r+1;o<e.body.length;o++){const s=e.body[o];Re(n,s,[]).push(...i)}},exit({node:t},{flagDirectivesByAlt:e}){if(e.get(t)?.length){const r=Fn(e.get(t));if(r){const n=G({flags:r});n.body[0].body=t.body,t.body=[C(n,t)]}}}},Assertion({node:t,parent:e,key:r,container:n,root:i,remove:o,replaceWith:s},l){const{kind:a,negate:c}=t,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:d,wordIsAscii:h}=l;if(a==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(a==="line_end")s(C(ee({body:[ne({body:[Ot("string_end")]}),ne({body:[tt(10)]})]}),e));else if(a==="line_start")s(C(z(A`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),e));else if(a==="search_start")if(d.has(t))i.flags.sticky=!0,o();else{const f=n[r-1];if(f&&_l(f))s(C(ee({negate:!0}),e));else{if(m)throw new Error(A`Uses "\G" in a way that requires a subclass`);s(J(Ot("string_start"),e)),l.strategy="clip_search"}}else if(!(a==="string_end"||a==="string_start"))if(a==="string_end_newline")s(C(z(A`(?=\n?\z)`),e));else if(a==="word_boundary"){if(!h&&!p){const f=`(?:(?<=${H})(?!${H})|(?<!${H})(?=${H}))`,y=`(?:(?<=${H})(?=${H})|(?<!${H})(?!${H}))`;s(C(z(c?y:f),e))}}else throw new Error(`Unexpected assertion kind "${a}"`)},Backreference({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!Et(r)&&(r=yt(r,e),t.ref=r)},CapturingGroup({node:t},{jsGroupNameMap:e,subroutineRefMap:r}){let{name:n}=t;n&&!Et(n)&&(n=yt(n,e),t.name=n),r.set(t.number,t),n&&r.set(n,t)},CharacterClassRange({node:t,parent:e,replaceWith:r}){if(e.kind==="intersection"){const n=Ge({body:[t]});r(C(n,e),{traverse:!0})}},CharacterSet({node:t,parent:e,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:s,wordIsAscii:l}){const{kind:a,negate:c,value:p}=t;if(o&&(a==="digit"||p==="digit")){r(J(Nt("digit",{negate:c}),e));return}if(s&&(a==="space"||p==="space")){r(C(bt(z(tl),c),e));return}if(l&&(a==="word"||p==="word")){r(J(Nt("word",{negate:c}),e));return}if(a==="any")r(J(ce("Any"),e));else if(a==="digit")r(J(ce("Nd",{negate:c}),e));else if(a!=="dot")if(a==="text_segment"){if(n==="strict")throw new Error(A`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=A`\p{RI}{2}|${m}(?:\u200D${m})*`;r(C(z(A`(?>\r\n|${i?A`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),e))}else if(a==="hex")r(J(ce("AHex",{negate:c}),e));else if(a==="newline")r(C(z(c?`[^
149
+ XID_Start XIDS`.split(/\s/).map(t=>[rt(t),t])),il=new Map([["s",S(383)],[S(383),"s"]]),ol=new Map([[S(223),S(7838)],[S(107),S(8490)],[S(229),S(8491)],[S(969),S(8486)]]),sl=new Map([Q(453),Q(456),Q(459),Q(498),..._t(8072,8079),..._t(8088,8095),..._t(8104,8111),Q(8124),Q(8140),Q(8188)]),al=new Map([["alnum",A`[\p{Alpha}\p{Nd}]`],["alpha",A`\p{Alpha}`],["ascii",A`\p{ASCII}`],["blank",A`[\p{Zs}\t]`],["cntrl",A`\p{Cc}`],["digit",A`\p{Nd}`],["graph",A`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",A`\p{Lower}`],["print",A`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",A`[\p{P}\p{S}]`],["space",A`\p{space}`],["upper",A`\p{Upper}`],["word",A`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",A`\p{AHex}`]]);function ll(t,e){const r=[];for(let n=t;n<=e;n++)r.push(n);return r}function Q(t){const e=S(t);return[e.toLowerCase(),e]}function _t(t,e){return ll(t,e).map(r=>Q(r))}var Mn=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function cl(t,e){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...e};Gn(t);const n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:$t(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};we(t,ul,n);const i={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};we(t,pl,o);const s={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return we(t,ml,s),t._originMap=o.groupOriginByCopy,t._strategy=n.strategy,t}var ul={AbsenceFunction({node:t,parent:e,replaceWith:r}){const{body:n,kind:i}=t;if(i==="repeater"){const o=G();o.body[0].body.push(ee({negate:!0,body:n}),ce("Any"));const s=G();s.body[0].body.push(Tn("greedy",0,1/0,o)),r(C(s,e),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:e,key:r},{flagDirectivesByAlt:n}){const i=t.body.filter(o=>o.kind==="flags");for(let o=r+1;o<e.body.length;o++){const s=e.body[o];Re(n,s,[]).push(...i)}},exit({node:t},{flagDirectivesByAlt:e}){if(e.get(t)?.length){const r=Fn(e.get(t));if(r){const n=G({flags:r});n.body[0].body=t.body,t.body=[C(n,t)]}}}},Assertion({node:t,parent:e,key:r,container:n,root:i,remove:o,replaceWith:s},l){const{kind:a,negate:c}=t,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:d,wordIsAscii:h}=l;if(a==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(a==="line_end")s(C(ee({body:[ne({body:[Ot("string_end")]}),ne({body:[tt(10)]})]}),e));else if(a==="line_start")s(C(z(A`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),e));else if(a==="search_start")if(d.has(t))i.flags.sticky=!0,o();else{const f=n[r-1];if(f&&yl(f))s(C(ee({negate:!0}),e));else{if(m)throw new Error(A`Uses "\G" in a way that requires a subclass`);s(J(Ot("string_start"),e)),l.strategy="clip_search"}}else if(!(a==="string_end"||a==="string_start"))if(a==="string_end_newline")s(C(z(A`(?=\n?\z)`),e));else if(a==="word_boundary"){if(!h&&!p){const f=`(?:(?<=${H})(?!${H})|(?<!${H})(?=${H}))`,y=`(?:(?<=${H})(?=${H})|(?<!${H})(?!${H}))`;s(C(z(c?y:f),e))}}else throw new Error(`Unexpected assertion kind "${a}"`)},Backreference({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!Et(r)&&(r=yt(r,e),t.ref=r)},CapturingGroup({node:t},{jsGroupNameMap:e,subroutineRefMap:r}){let{name:n}=t;n&&!Et(n)&&(n=yt(n,e),t.name=n),r.set(t.number,t),n&&r.set(n,t)},CharacterClassRange({node:t,parent:e,replaceWith:r}){if(e.kind==="intersection"){const n=Ge({body:[t]});r(C(n,e),{traverse:!0})}},CharacterSet({node:t,parent:e,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:s,wordIsAscii:l}){const{kind:a,negate:c,value:p}=t;if(o&&(a==="digit"||p==="digit")){r(J(Nt("digit",{negate:c}),e));return}if(s&&(a==="space"||p==="space")){r(C(bt(z(rl),c),e));return}if(l&&(a==="word"||p==="word")){r(J(Nt("word",{negate:c}),e));return}if(a==="any")r(J(ce("Any"),e));else if(a==="digit")r(J(ce("Nd",{negate:c}),e));else if(a!=="dot")if(a==="text_segment"){if(n==="strict")throw new Error(A`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=A`\p{RI}{2}|${m}(?:\u200D${m})*`;r(C(z(A`(?>\r\n|${i?A`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),e))}else if(a==="hex")r(J(ce("AHex",{negate:c}),e));else if(a==="newline")r(C(z(c?`[^
150
150
  ]`:`(?>\r
151
151
  ?|[
152
- \v\f…\u2028\u2029])`),e));else if(a==="posix")if(!i&&(p==="graph"||p==="print")){if(n==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];c&&(m=`\0-${S(m.codePointAt(0)-1)}${S(m.codePointAt(2)+1)}-􏿿`),r(C(z(`[${m}]`),e))}else r(C(bt(z(sl.get(p)),c),e));else if(a==="property")Zt.has(rt(p))||(t.key="sc");else if(a==="space")r(J(ce("space",{negate:c}),e));else if(a==="word")r(C(bt(z(H),c),e));else throw new Error(`Unexpected character set kind "${a}"`)},Directive({node:t,parent:e,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:s}){const{kind:l,flags:a}=t;if(l==="flags")if(!a.enable&&!a.disable)n();else{const c=G({flags:a});c.body[0].body=s(),i(C(c,e),{traverse:!0})}else if(l==="keep"){const c=r.body[0],m=r.body.length===1&&Sn(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:r;if(e.parent!==m||m.body.length>1)throw new Error(A`Uses "\K" in a way that's unsupported`);const d=ee({behind:!0});d.body[0].body=o(),i(C(d,e))}else throw new Error(`Unexpected directive kind "${l}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete t[r]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;const{enable:e,disable:r}=t.flags;e?.extended&&delete e.extended,r?.extended&&delete r.extended,e?.dotAll&&r?.dotAll&&delete e.dotAll,e?.ignoreCase&&r?.ignoreCase&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,r&&!Object.keys(r).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){const{kind:r}=t;r==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:r}){const{kind:n}=t;if(n==="fail")r(C(ee({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){const e=G();e.body[0].body.push(t.body),t.body=C(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){const r=[];let n=!1,i=!1;for(const o of t.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const s=Un(o.body);s?(n=!0,Array.isArray(s)?r.push(...s):r.push(s)):i=!0}n&&!i&&r.forEach(o=>e.add(o))},exit(t,{accuracy:e,passedLookbehind:r,strategy:n}){if(e==="strict"&&r&&n)throw new Error(A`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!Et(r)&&(r=yt(r,e),t.ref=r)}},ul={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:r}){const{orphan:n,ref:i}=t;n||r.set(t,[...e.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:s,openRefs:l,reffedNodesByReferencer:a}){const c=i.get(t);if(c&&l.has(t.number)){const m=J(Nr(t.number),e);a.set(m,l.get(t.number)),r(m);return}l.set(t.number,t),s.set(t.number,[]),t.name&&Re(s,t.name,[]);const p=s.get(t.name??t.number);for(let m=0;m<p.length;m++){const d=p[m];if(c===d.node||c&&c===d.origin||t===d.origin){p.splice(m,1);break}}if(s.get(t.number).push({node:t,origin:c}),t.name&&s.get(t.name).push({node:t,origin:c}),t.name){const m=Re(o,t.name,new Map);let d=!1;if(c)d=!0;else for(const h of m.values())if(!h.hasDuplicateNameToRemove){d=!0;break}o.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:d})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=Je(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:r},n){const{isRecursive:i,ref:o}=t;if(i){let p=e;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===o||p.number===o)););n.reffedNodesByReferencer.set(t,p);return}const s=n.subroutineRefMap.get(o),l=o===0,a=l?Nr(0):Bn(s,n.groupOriginByCopy,null);let c=a;if(!l){const p=Fn(hl(s,d=>d.type==="Group"&&!!d.flags)),m=p?Je(n.globalFlags,p):n.globalFlags;ml(m,n.currentFlags)||(c=G({flags:fl(m)}),c.body[0].body.push(a))}r(C(c,e),{traverse:!l})}},pl={Backreference({node:t,parent:e,replaceWith:r},n){if(t.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,t.ref);return}const o=n.reffedNodesByReferencer.get(t).filter(s=>dl(s,t));if(!o.length)r(C(ee({negate:!0}),e));else if(o.length>1){const s=G({atomic:!0,body:o.reverse().map(l=>ne({body:[xt(l.number)]}))});r(C(s,e))}else t.ref=o[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){const r=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let n=0;n<r;n++){const i=kn();t.body.at(-1).body.push(i)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function Gn(t){we(t,{"*"({node:e,parent:r}){e.parent=r}})}function ml(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function dl(t,e){let r=e;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===t)return!1;const n=jn(r.parent);for(const i of n){if(i===r)break;if(i===t||Wn(i,t))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function Bn(t,e,r,n){const i=Array.isArray(t)?[]:{};for(const[o,s]of Object.entries(t))o==="parent"?i.parent=Array.isArray(r)?n:r:s&&typeof s=="object"?i[o]=Bn(s,e,i,r):(o==="type"&&s==="CapturingGroup"&&e.set(i,e.get(t)??t),i[o]=s);return i}function Nr(t){const e=Pn(t);return e.isRecursive=!0,e}function hl(t,e){const r=[];for(;t=t.parent;)(!e||e(t))&&r.push(t);return r}function yt(t,e){if(e.has(t))return e.get(t);const r=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,r),r}function Fn(t){const e=["dotAll","ignoreCase"],r={enable:{},disable:{}};return t.forEach(({flags:n})=>{e.forEach(i=>{n.enable?.[i]&&(delete r.disable[i],r.enable[i]=!0),n.disable?.[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function fl({dotAll:t,ignoreCase:e}){const r={};return(t||e)&&(r.enable={},t&&(r.enable.dotAll=!0),e&&(r.enable.ignoreCase=!0)),(!t||!e)&&(r.disable={},!t&&(r.disable.dotAll=!0),!e&&(r.disable.ignoreCase=!0)),r}function jn(t){if(!t)throw new Error("Node expected");const{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function Un(t){const e=t.find(r=>r.kind==="search_start"||yl(r,{negate:!1})||!gl(r));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){const r=[];for(const n of e.body){const i=Un(n.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function Wn(t,e){const r=jn(t)??[];for(const n of r)if(n===e||Wn(n,e))return!0;return!1}function gl({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function _l(t){const e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function yl(t,e){const r={negate:null,...e};return t.type==="LookaroundAssertion"&&(r.negate===null||t.negate===r.negate)&&t.body.length===1&&Sn(t.body[0],{type:"Assertion",kind:"search_start"})}function Et(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function z(t,e){const n=Ln(t,{...e,unicodePropertyMap:Zt}).body;return n.length>1||n[0].body.length>1?G({body:n}):n[0].body[0]}function bt(t,e){return t.negate=e,t}function J(t,e){return t.parent=e,t}function C(t,e){return Gn(t),t.parent=e,t}function El(t,e){const r=$n(e),n=$t(r.target,"ES2024"),i=$t(r.target,"ES2025"),o=r.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let s=null,l=null;if(!i){const h=[t.flags.ignoreCase];we(t,bl,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(f){h.push(f)},setHasCasedChar(){h.at(-1)?s=!0:l=!0}})}const a={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||s)&&!l)};let c=t;const p={accuracy:r.accuracy,appliedGlobalFlags:a,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:t._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&s&&l),useFlagMods:i,useFlagV:n,verbose:r.verbose};function m(h){return p.lastNode=c,c=h,Ya(wl[h.type],`Unexpected node type "${h.type}"`)(h,p,m)}const d={pattern:t.body.map(m).join("|"),flags:m(t.flags),options:{...t.options}};return n||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],p.captureMap.forEach((h,f)=>{h.hidden&&d._hiddenCaptures.push(f),h.transferTo&&Re(d._captureTransfers,h.transferTo,[]).push(f)}),d}var bl={"*":{enter({node:t},e){if($r(t)){const r=e.getCurrentModI();e.pushModI(t.flags?Je({ignoreCase:r},t.flags).ignoreCase:r)}},exit({node:t},e){$r(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){Yt(S(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},r){e(),Hn(t,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&Mn.has(t.value)&&e.setHasCasedChar()}},wl={Alternative({body:t},e,r){return t.map(r).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?A`\B`:A`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,r){const{body:n,name:i,number:o}=t,s={ignoreCase:e.currentFlags.ignoreCase},l=e.originMap.get(t);return l&&(s.hidden=!0,o>l.number&&(s.transferTo=l.number)),e.captureMap.set(o,s),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:t},e){const r=S(t),n=se(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(n!==r)return n;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&Yt(r)){const i=Vn(r);return e.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(t,e,r){const{kind:n,negate:i,parent:o}=t;let{body:s}=t;if(n==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");B.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&s.some(Vr)&&(s=[tt(45),...s.filter(c=>!Vr(c))]);const l=()=>`[${i?"^":""}${s.map(r).join(n==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||B.bugNestedClassIgnoresNegation)&&!i){const p=s.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=G(),d=m.body[0];return m.parent=o,d.parent=m,s=s.filter(h=>!p.includes(h)),t.body=s,s.length?(t.parent=d,d.body.push(t)):m.body.pop(),p.forEach(h=>{const f=ne({body:[h]});h.parent=f,f.parent=m,m.body.push(f)}),r(m)}}e.inCharClass=!0;const c=l();return e.inCharClass=!1,c}const a=s[0];if(n==="union"&&!i&&a&&((!e.useFlagV||!e.verbose)&&o.kind==="union"&&!(B.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&o.kind==="intersection"&&s.length===1&&a.type!=="CharacterClassRange"))return s.map(r).join("");if(!e.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return l()},CharacterClassRange(t,e){const r=t.min.value,n=t.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},o=se(r,i),s=se(n,i),l=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){const a=Hn(t);Rl(a).forEach(p=>{l.add(Array.isArray(p)?`${se(p[0],i)}-${se(p[1],i)}`:se(p,i))})}return`${o}-${s}${[...l].join("")}`},CharacterSet({kind:t,negate:e,value:r,key:n},i){if(t==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":A`[^\n]`;if(t==="digit")return e?A`\D`:A`\d`;if(t==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Mn.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${e?A`\P`:A`\p`}{${n?`${n}=`:""}${r}}`}if(t==="word")return e?A`\W`:A`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:r,parent:n},i,o){const s=i.currentFlags;r&&(i.currentFlags=Je(s,r));const l=e.map(o).join("|"),a=!i.verbose&&e.length===1&&n.type!=="Quantifier"&&!t&&(!i.useFlagMods||!r)?l:`(?${Sl(t,r,i.useFlagMods)}${l})`;return i.currentFlags=s,a},LookaroundAssertion({body:t,kind:e,negate:r},n,i){return`(?${`${e==="lookahead"?"":"<"}${r?"!":"="}`}${t.map(i).join("|")})`},Quantifier(t,e,r){return r(t.body)+Ll(t)},Subroutine({isRecursive:t,ref:e},r){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=r.recursionLimit;return e===0?`(?R=${n})`:A`\g<${e}&R=${n}>`}},Al=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),vl=new Set(["-","\\","]","^","["]),Cl=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Dr=new Map([[9,A`\t`],[10,A`\n`],[11,A`\v`],[12,A`\f`],[13,A`\r`],[8232,A`\u2028`],[8233,A`\u2029`],[65279,A`\uFEFF`]]),Il=/^\p{Cased}$/u;function Yt(t){return Il.test(t)}function Hn(t,e){const r=!!e?.firstOnly,n=t.min.value,i=t.max.value,o=[];if(n<65&&(i===65535||i>=131071)||n===65536&&i>=131071)return o;for(let s=n;s<=i;s++){const l=S(s);if(!Yt(l))continue;const a=Vn(l).filter(c=>{const p=c.codePointAt(0);return p<n||p>i});if(a.length&&(o.push(...a),r))break}return o}function se(t,{escDigit:e,inCharClass:r,useFlagV:n}){if(Dr.has(t))return Dr.get(t);if(t<32||t>126&&t<160||t>262143||e&&kl(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?n?Cl:vl:Al,o=S(t);return(i.has(o)?"\\":"")+o}function Rl(t){const e=t.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),r=[];let n=null;for(let i=0;i<e.length;i++)e[i+1]===e[i]+1?n??=e[i]:n===null?r.push(e[i]):(r.push([n,e[i]]),n=null);return r}function Sl(t,e,r){if(t)return">";let n="";if(e&&r){const{enable:i,disable:o}=e;n=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${n}:`}function Ll({kind:t,max:e,min:r}){let n;return!r&&e===1?n="?":!r&&e===1/0?n="*":r===1&&e===1/0?n="+":r===e?n=`{${r}}`:n=`{${r},${e===1/0?"":e}}`,n+{greedy:"",lazy:"?",possessive:"+"}[t]}function $r({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function kl(t){return t>47&&t<58}function Vr({type:t,value:e}){return t==="Character"&&e===45}var Tl=class Vt extends RegExp{#t=new Map;#e=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(e,r,n){const i=!!n?.lazyCompile;if(e instanceof RegExp){if(n)throw new Error("Cannot provide options when copying a regexp");const o=e;super(o,r),this.#n=o.source,o instanceof Vt&&(this.#t=o.#t,this.#r=o.#r,this.#i=o.#i,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...n};super(i?"":e,r),this.#n=e,this.#t=Ol(o.hiddenCaptures,o.transfers),this.#i=o.strategy,this.rawOptions=n??{}}i||(this.#e=this)}exec(e){if(!this.#e){const{lazyCompile:i,...o}=this.rawOptions;this.#e=new Vt(this.#n,this.flags,o)}const r=this.global||this.sticky,n=this.lastIndex;if(this.#i==="clip_search"&&r&&n){this.lastIndex=0;const i=this.#o(e.slice(n));return i&&(Pl(i,n,e,this.hasIndices),this.lastIndex+=n),i}return this.#o(e)}#o(e){this.#e.lastIndex=this.lastIndex;const r=super.exec.call(this.#e,e);if(this.lastIndex=this.#e.lastIndex,!r||!this.#t.size)return r;const n=[...r];r.length=1;let i;this.hasIndices&&(i=[...r.indices],r.indices.length=1);const o=[0];for(let s=1;s<n.length;s++){const{hidden:l,transferTo:a}=this.#t.get(s)??{};if(l?o.push(null):(o.push(r.length),r.push(n[s]),this.hasIndices&&r.indices.push(i[s])),a&&n[s]!==void 0){const c=o[a];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(r[c]=n[s],this.hasIndices&&(r.indices[c]=i[s]),r.groups){this.#r||(this.#r=xl(this.source));const p=this.#r.get(a);p&&(r.groups[p]=n[s],this.hasIndices&&(r.indices.groups[p]=i[s]))}}}return r}};function Pl(t,e,r,n){if(t.index+=e,t.input=r,n){const i=t.indices;for(let s=0;s<i.length;s++){const l=i[s];l&&(i[s]=[l[0]+e,l[1]+e])}const o=i.groups;o&&Object.keys(o).forEach(s=>{const l=o[s];l&&(o[s]=[l[0]+e,l[1]+e])})}}function Ol(t,e){const r=new Map;for(const n of t)r.set(n,{hidden:!0});for(const[n,i]of e)for(const o of i)Re(r,o,{}).transferTo=n;return r}function xl(t){const e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let n=0,i=0,o;for(;o=e.exec(t);){const{0:s,groups:{capture:l,name:a}}=o;s==="["?n++:n?s==="]"&&n--:l&&(i++,a&&r.set(i,a))}return r}function Nl(t,e){const r=Dl(t,e);return r.options?new Tl(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function Dl(t,e){const r=$n(e),n=Ln(t,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Zt}),i=ll(n,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),o=El(i,r),s=Ka(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),l=Qa(s.pattern),a=Xa(l.pattern,{captureTransfers:s.captureTransfers,hiddenCaptures:s.hiddenCaptures}),c={pattern:a.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=a.hiddenCaptures.sort((f,y)=>f-y),m=Array.from(a.captureTransfers),d=i._strategy,h=c.pattern.length>=r.lazyCompileLength;(p.length||m.length||d||h)&&(c.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...d&&{strategy:d},...h&&{lazyCompile:h}})}return c}const Mr=4294967295;class $l{constructor(e,r={}){this.patterns=e,this.options=r;const{forgiving:n=!1,cache:i,regexConstructor:o}=r;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const l=i?.get(s);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const a=o(s);return i?.set(s,a),a}catch(a){if(i?.set(s,a),n)return null;throw a}})}regexps;findNextMatchSync(e,r,n){const i=typeof e=="string"?e:e.content,o=[];function s(l,a,c=0){return{index:l,captureIndices:a.indices.map(p=>p==null?{start:Mr,end:Mr,length:0}:{start:p[0]+c,end:p[1]+c,length:p[1]-p[0]})}}for(let l=0;l<this.regexps.length;l++){const a=this.regexps[l];if(a)try{a.lastIndex=r;const c=a.exec(i);if(!c)continue;if(c.index===r)return s(l,c,0);o.push([l,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(o.length){const l=Math.min(...o.map(a=>a[1].index));for(const[a,c,p]of o)if(c.index===l)return s(a,c,p)}return null}}function Vl(t,e){return Nl(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function Ml(t={}){const e=Object.assign({target:"auto",cache:new Map},t);return e.regexConstructor||=r=>Vl(r,{target:e.target}),{createScanner(r){return new $l(r,e)},createString(r){return{content:r}}}}var Gl=Gt("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-4","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Bl=ue.memo(({children:t,result:e,language:r,className:n,...i})=>{let o=ue.useMemo(()=>({backgroundColor:e.bg,color:e.fg}),[e.bg,e.fg]);return V.jsx("pre",{className:Gt(n,"p-4 text-sm dark:bg-(--shiki-dark-bg)!"),"data-language":r,"data-streamdown":"code-block-body",style:o,...i,children:V.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:e.tokens.map((s,l)=>V.jsx("span",{className:Gl,children:s.map((a,c)=>V.jsx("span",{className:"dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!",style:{color:a.color,backgroundColor:a.bgColor,...a.htmlStyle},...a.htmlAttrs,children:a.content},c))},l))})})},(t,e)=>t.result===e.result&&t.language===e.language&&t.className===e.className),Fl=({className:t,language:e,style:r,...n})=>V.jsx("div",{className:Gt("my-4 w-full overflow-hidden rounded-xl border border-border",t),"data-language":e,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...n}),jl=({language:t,children:e})=>V.jsxs("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-language":t,"data-streamdown":"code-block-header",children:[V.jsx("span",{className:"ml-1 font-mono lowercase",children:t}),V.jsx("div",{className:"flex items-center gap-2",children:e})]}),Ul=Ml({forgiving:!0}),wt=new Map,At=new Map,ae=new Map,Wl=(t,e)=>`${t}-${e[0]}-${e[1]}`,Hl=(t,e,r)=>{let n=t.slice(0,100),i=t.length>100?t.slice(-100):"";return`${e}:${r[0]}:${r[1]}:${t.length}:${n}:${i}`},zn=t=>Object.hasOwn(bn,t),zl=(t,e)=>{let r=zn(t)?t:"text",n=Wl(r,e);if(wt.has(n))return wt.get(n);let i=Zs({themes:e,langs:[r],engine:Ul});return wt.set(n,i),i},Gr=(t,e,r,n)=>{let i=zn(e)?e:"text",o=Hl(t,i,r);return At.has(o)?At.get(o):(n&&(ae.has(o)||ae.set(o,new Set),ae.get(o).add(n)),zl(i,r).then(s=>{let l=s.codeToTokens(t,{lang:i,themes:{light:r[0],dark:r[1]}});At.set(o,l);let a=ae.get(o);if(a){for(let c of a)c(l);ae.delete(o)}}).catch(s=>{console.error("Failed to highlight code:",s),ae.delete(o)}),null)},Kl=({code:t,language:e,className:r,children:n,...i})=>{let{shikiTheme:o}=ue.useContext(Zn),s=ue.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:t.split(`
153
- `).map(c=>[{content:c,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[t]),[l,a]=ue.useState(s);return ue.useEffect(()=>{let c=Gr(t,e,o);if(c){a(c);return}Gr(t,e,o,p=>{a(p)})},[t,e,o]),V.jsx(Yn.Provider,{value:{code:t},children:V.jsxs(Fl,{language:e,children:[V.jsx(jl,{language:e,children:n}),V.jsx(Bl,{className:r,language:e,result:l,...i})]})})};export{Kl as CodeBlock};
152
+ \v\f…\u2028\u2029])`),e));else if(a==="posix")if(!i&&(p==="graph"||p==="print")){if(n==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];c&&(m=`\0-${S(m.codePointAt(0)-1)}${S(m.codePointAt(2)+1)}-􏿿`),r(C(z(`[${m}]`),e))}else r(C(bt(z(al.get(p)),c),e));else if(a==="property")Zt.has(rt(p))||(t.key="sc");else if(a==="space")r(J(ce("space",{negate:c}),e));else if(a==="word")r(C(bt(z(H),c),e));else throw new Error(`Unexpected character set kind "${a}"`)},Directive({node:t,parent:e,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:s}){const{kind:l,flags:a}=t;if(l==="flags")if(!a.enable&&!a.disable)n();else{const c=G({flags:a});c.body[0].body=s(),i(C(c,e),{traverse:!0})}else if(l==="keep"){const c=r.body[0],m=r.body.length===1&&Sn(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:r;if(e.parent!==m||m.body.length>1)throw new Error(A`Uses "\K" in a way that's unsupported`);const d=ee({behind:!0});d.body[0].body=o(),i(C(d,e))}else throw new Error(`Unexpected directive kind "${l}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete t[r]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;const{enable:e,disable:r}=t.flags;e?.extended&&delete e.extended,r?.extended&&delete r.extended,e?.dotAll&&r?.dotAll&&delete e.dotAll,e?.ignoreCase&&r?.ignoreCase&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,r&&!Object.keys(r).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){const{kind:r}=t;r==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:r}){const{kind:n}=t;if(n==="fail")r(C(ee({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){const e=G();e.body[0].body.push(t.body),t.body=C(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){const r=[];let n=!1,i=!1;for(const o of t.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const s=Un(o.body);s?(n=!0,Array.isArray(s)?r.push(...s):r.push(s)):i=!0}n&&!i&&r.forEach(o=>e.add(o))},exit(t,{accuracy:e,passedLookbehind:r,strategy:n}){if(e==="strict"&&r&&n)throw new Error(A`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!Et(r)&&(r=yt(r,e),t.ref=r)}},pl={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:r}){const{orphan:n,ref:i}=t;n||r.set(t,[...e.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:s,openRefs:l,reffedNodesByReferencer:a}){const c=i.get(t);if(c&&l.has(t.number)){const m=J(Nr(t.number),e);a.set(m,l.get(t.number)),r(m);return}l.set(t.number,t),s.set(t.number,[]),t.name&&Re(s,t.name,[]);const p=s.get(t.name??t.number);for(let m=0;m<p.length;m++){const d=p[m];if(c===d.node||c&&c===d.origin||t===d.origin){p.splice(m,1);break}}if(s.get(t.number).push({node:t,origin:c}),t.name&&s.get(t.name).push({node:t,origin:c}),t.name){const m=Re(o,t.name,new Map);let d=!1;if(c)d=!0;else for(const h of m.values())if(!h.hasDuplicateNameToRemove){d=!0;break}o.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:d})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=Je(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:r},n){const{isRecursive:i,ref:o}=t;if(i){let p=e;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===o||p.number===o)););n.reffedNodesByReferencer.set(t,p);return}const s=n.subroutineRefMap.get(o),l=o===0,a=l?Nr(0):Bn(s,n.groupOriginByCopy,null);let c=a;if(!l){const p=Fn(fl(s,d=>d.type==="Group"&&!!d.flags)),m=p?Je(n.globalFlags,p):n.globalFlags;dl(m,n.currentFlags)||(c=G({flags:gl(m)}),c.body[0].body.push(a))}r(C(c,e),{traverse:!l})}},ml={Backreference({node:t,parent:e,replaceWith:r},n){if(t.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,t.ref);return}const o=n.reffedNodesByReferencer.get(t).filter(s=>hl(s,t));if(!o.length)r(C(ee({negate:!0}),e));else if(o.length>1){const s=G({atomic:!0,body:o.reverse().map(l=>ne({body:[xt(l.number)]}))});r(C(s,e))}else t.ref=o[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){const r=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let n=0;n<r;n++){const i=kn();t.body.at(-1).body.push(i)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function Gn(t){we(t,{"*"({node:e,parent:r}){e.parent=r}})}function dl(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function hl(t,e){let r=e;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===t)return!1;const n=jn(r.parent);for(const i of n){if(i===r)break;if(i===t||Wn(i,t))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function Bn(t,e,r,n){const i=Array.isArray(t)?[]:{};for(const[o,s]of Object.entries(t))o==="parent"?i.parent=Array.isArray(r)?n:r:s&&typeof s=="object"?i[o]=Bn(s,e,i,r):(o==="type"&&s==="CapturingGroup"&&e.set(i,e.get(t)??t),i[o]=s);return i}function Nr(t){const e=Pn(t);return e.isRecursive=!0,e}function fl(t,e){const r=[];for(;t=t.parent;)(!e||e(t))&&r.push(t);return r}function yt(t,e){if(e.has(t))return e.get(t);const r=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,r),r}function Fn(t){const e=["dotAll","ignoreCase"],r={enable:{},disable:{}};return t.forEach(({flags:n})=>{e.forEach(i=>{n.enable?.[i]&&(delete r.disable[i],r.enable[i]=!0),n.disable?.[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function gl({dotAll:t,ignoreCase:e}){const r={};return(t||e)&&(r.enable={},t&&(r.enable.dotAll=!0),e&&(r.enable.ignoreCase=!0)),(!t||!e)&&(r.disable={},!t&&(r.disable.dotAll=!0),!e&&(r.disable.ignoreCase=!0)),r}function jn(t){if(!t)throw new Error("Node expected");const{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function Un(t){const e=t.find(r=>r.kind==="search_start"||El(r,{negate:!1})||!_l(r));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){const r=[];for(const n of e.body){const i=Un(n.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function Wn(t,e){const r=jn(t)??[];for(const n of r)if(n===e||Wn(n,e))return!0;return!1}function _l({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function yl(t){const e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function El(t,e){const r={negate:null,...e};return t.type==="LookaroundAssertion"&&(r.negate===null||t.negate===r.negate)&&t.body.length===1&&Sn(t.body[0],{type:"Assertion",kind:"search_start"})}function Et(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function z(t,e){const n=Ln(t,{...e,unicodePropertyMap:Zt}).body;return n.length>1||n[0].body.length>1?G({body:n}):n[0].body[0]}function bt(t,e){return t.negate=e,t}function J(t,e){return t.parent=e,t}function C(t,e){return Gn(t),t.parent=e,t}function bl(t,e){const r=$n(e),n=$t(r.target,"ES2024"),i=$t(r.target,"ES2025"),o=r.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let s=null,l=null;if(!i){const h=[t.flags.ignoreCase];we(t,wl,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(f){h.push(f)},setHasCasedChar(){h.at(-1)?s=!0:l=!0}})}const a={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||s)&&!l)};let c=t;const p={accuracy:r.accuracy,appliedGlobalFlags:a,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:t._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&s&&l),useFlagMods:i,useFlagV:n,verbose:r.verbose};function m(h){return p.lastNode=c,c=h,el(Al[h.type],`Unexpected node type "${h.type}"`)(h,p,m)}const d={pattern:t.body.map(m).join("|"),flags:m(t.flags),options:{...t.options}};return n||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],p.captureMap.forEach((h,f)=>{h.hidden&&d._hiddenCaptures.push(f),h.transferTo&&Re(d._captureTransfers,h.transferTo,[]).push(f)}),d}var wl={"*":{enter({node:t},e){if($r(t)){const r=e.getCurrentModI();e.pushModI(t.flags?Je({ignoreCase:r},t.flags).ignoreCase:r)}},exit({node:t},e){$r(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){Yt(S(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},r){e(),Hn(t,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&Mn.has(t.value)&&e.setHasCasedChar()}},Al={Alternative({body:t},e,r){return t.map(r).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?A`\B`:A`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,r){const{body:n,name:i,number:o}=t,s={ignoreCase:e.currentFlags.ignoreCase},l=e.originMap.get(t);return l&&(s.hidden=!0,o>l.number&&(s.transferTo=l.number)),e.captureMap.set(o,s),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:t},e){const r=S(t),n=se(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(n!==r)return n;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&Yt(r)){const i=Vn(r);return e.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(t,e,r){const{kind:n,negate:i,parent:o}=t;let{body:s}=t;if(n==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");B.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&s.some(Vr)&&(s=[tt(45),...s.filter(c=>!Vr(c))]);const l=()=>`[${i?"^":""}${s.map(r).join(n==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||B.bugNestedClassIgnoresNegation)&&!i){const p=s.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=G(),d=m.body[0];return m.parent=o,d.parent=m,s=s.filter(h=>!p.includes(h)),t.body=s,s.length?(t.parent=d,d.body.push(t)):m.body.pop(),p.forEach(h=>{const f=ne({body:[h]});h.parent=f,f.parent=m,m.body.push(f)}),r(m)}}e.inCharClass=!0;const c=l();return e.inCharClass=!1,c}const a=s[0];if(n==="union"&&!i&&a&&((!e.useFlagV||!e.verbose)&&o.kind==="union"&&!(B.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&o.kind==="intersection"&&s.length===1&&a.type!=="CharacterClassRange"))return s.map(r).join("");if(!e.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return l()},CharacterClassRange(t,e){const r=t.min.value,n=t.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},o=se(r,i),s=se(n,i),l=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){const a=Hn(t);Sl(a).forEach(p=>{l.add(Array.isArray(p)?`${se(p[0],i)}-${se(p[1],i)}`:se(p,i))})}return`${o}-${s}${[...l].join("")}`},CharacterSet({kind:t,negate:e,value:r,key:n},i){if(t==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":A`[^\n]`;if(t==="digit")return e?A`\D`:A`\d`;if(t==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Mn.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${e?A`\P`:A`\p`}{${n?`${n}=`:""}${r}}`}if(t==="word")return e?A`\W`:A`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:r,parent:n},i,o){const s=i.currentFlags;r&&(i.currentFlags=Je(s,r));const l=e.map(o).join("|"),a=!i.verbose&&e.length===1&&n.type!=="Quantifier"&&!t&&(!i.useFlagMods||!r)?l:`(?${Ll(t,r,i.useFlagMods)}${l})`;return i.currentFlags=s,a},LookaroundAssertion({body:t,kind:e,negate:r},n,i){return`(?${`${e==="lookahead"?"":"<"}${r?"!":"="}`}${t.map(i).join("|")})`},Quantifier(t,e,r){return r(t.body)+kl(t)},Subroutine({isRecursive:t,ref:e},r){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=r.recursionLimit;return e===0?`(?R=${n})`:A`\g<${e}&R=${n}>`}},vl=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Cl=new Set(["-","\\","]","^","["]),Il=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Dr=new Map([[9,A`\t`],[10,A`\n`],[11,A`\v`],[12,A`\f`],[13,A`\r`],[8232,A`\u2028`],[8233,A`\u2029`],[65279,A`\uFEFF`]]),Rl=/^\p{Cased}$/u;function Yt(t){return Rl.test(t)}function Hn(t,e){const r=!!e?.firstOnly,n=t.min.value,i=t.max.value,o=[];if(n<65&&(i===65535||i>=131071)||n===65536&&i>=131071)return o;for(let s=n;s<=i;s++){const l=S(s);if(!Yt(l))continue;const a=Vn(l).filter(c=>{const p=c.codePointAt(0);return p<n||p>i});if(a.length&&(o.push(...a),r))break}return o}function se(t,{escDigit:e,inCharClass:r,useFlagV:n}){if(Dr.has(t))return Dr.get(t);if(t<32||t>126&&t<160||t>262143||e&&Tl(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?n?Il:Cl:vl,o=S(t);return(i.has(o)?"\\":"")+o}function Sl(t){const e=t.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),r=[];let n=null;for(let i=0;i<e.length;i++)e[i+1]===e[i]+1?n??=e[i]:n===null?r.push(e[i]):(r.push([n,e[i]]),n=null);return r}function Ll(t,e,r){if(t)return">";let n="";if(e&&r){const{enable:i,disable:o}=e;n=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${n}:`}function kl({kind:t,max:e,min:r}){let n;return!r&&e===1?n="?":!r&&e===1/0?n="*":r===1&&e===1/0?n="+":r===e?n=`{${r}}`:n=`{${r},${e===1/0?"":e}}`,n+{greedy:"",lazy:"?",possessive:"+"}[t]}function $r({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function Tl(t){return t>47&&t<58}function Vr({type:t,value:e}){return t==="Character"&&e===45}var Pl=class Vt extends RegExp{#t=new Map;#e=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(e,r,n){const i=!!n?.lazyCompile;if(e instanceof RegExp){if(n)throw new Error("Cannot provide options when copying a regexp");const o=e;super(o,r),this.#n=o.source,o instanceof Vt&&(this.#t=o.#t,this.#r=o.#r,this.#i=o.#i,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...n};super(i?"":e,r),this.#n=e,this.#t=xl(o.hiddenCaptures,o.transfers),this.#i=o.strategy,this.rawOptions=n??{}}i||(this.#e=this)}exec(e){if(!this.#e){const{lazyCompile:i,...o}=this.rawOptions;this.#e=new Vt(this.#n,this.flags,o)}const r=this.global||this.sticky,n=this.lastIndex;if(this.#i==="clip_search"&&r&&n){this.lastIndex=0;const i=this.#o(e.slice(n));return i&&(Ol(i,n,e,this.hasIndices),this.lastIndex+=n),i}return this.#o(e)}#o(e){this.#e.lastIndex=this.lastIndex;const r=super.exec.call(this.#e,e);if(this.lastIndex=this.#e.lastIndex,!r||!this.#t.size)return r;const n=[...r];r.length=1;let i;this.hasIndices&&(i=[...r.indices],r.indices.length=1);const o=[0];for(let s=1;s<n.length;s++){const{hidden:l,transferTo:a}=this.#t.get(s)??{};if(l?o.push(null):(o.push(r.length),r.push(n[s]),this.hasIndices&&r.indices.push(i[s])),a&&n[s]!==void 0){const c=o[a];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(r[c]=n[s],this.hasIndices&&(r.indices[c]=i[s]),r.groups){this.#r||(this.#r=Nl(this.source));const p=this.#r.get(a);p&&(r.groups[p]=n[s],this.hasIndices&&(r.indices.groups[p]=i[s]))}}}return r}};function Ol(t,e,r,n){if(t.index+=e,t.input=r,n){const i=t.indices;for(let s=0;s<i.length;s++){const l=i[s];l&&(i[s]=[l[0]+e,l[1]+e])}const o=i.groups;o&&Object.keys(o).forEach(s=>{const l=o[s];l&&(o[s]=[l[0]+e,l[1]+e])})}}function xl(t,e){const r=new Map;for(const n of t)r.set(n,{hidden:!0});for(const[n,i]of e)for(const o of i)Re(r,o,{}).transferTo=n;return r}function Nl(t){const e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let n=0,i=0,o;for(;o=e.exec(t);){const{0:s,groups:{capture:l,name:a}}=o;s==="["?n++:n?s==="]"&&n--:l&&(i++,a&&r.set(i,a))}return r}function Dl(t,e){const r=$l(t,e);return r.options?new Pl(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function $l(t,e){const r=$n(e),n=Ln(t,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Zt}),i=cl(n,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),o=bl(i,r),s=Za(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),l=Ja(s.pattern),a=Qa(l.pattern,{captureTransfers:s.captureTransfers,hiddenCaptures:s.hiddenCaptures}),c={pattern:a.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=a.hiddenCaptures.sort((f,y)=>f-y),m=Array.from(a.captureTransfers),d=i._strategy,h=c.pattern.length>=r.lazyCompileLength;(p.length||m.length||d||h)&&(c.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...d&&{strategy:d},...h&&{lazyCompile:h}})}return c}const Mr=4294967295;class Vl{constructor(e,r={}){this.patterns=e,this.options=r;const{forgiving:n=!1,cache:i,regexConstructor:o}=r;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const l=i?.get(s);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const a=o(s);return i?.set(s,a),a}catch(a){if(i?.set(s,a),n)return null;throw a}})}regexps;findNextMatchSync(e,r,n){const i=typeof e=="string"?e:e.content,o=[];function s(l,a,c=0){return{index:l,captureIndices:a.indices.map(p=>p==null?{start:Mr,end:Mr,length:0}:{start:p[0]+c,end:p[1]+c,length:p[1]-p[0]})}}for(let l=0;l<this.regexps.length;l++){const a=this.regexps[l];if(a)try{a.lastIndex=r;const c=a.exec(i);if(!c)continue;if(c.index===r)return s(l,c,0);o.push([l,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(o.length){const l=Math.min(...o.map(a=>a[1].index));for(const[a,c,p]of o)if(c.index===l)return s(a,c,p)}return null}}function Ml(t,e){return Dl(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function Gl(t={}){const e=Object.assign({target:"auto",cache:new Map},t);return e.regexConstructor||=r=>Ml(r,{target:e.target}),{createScanner(r){return new Vl(r,e)},createString(r){return{content:r}}}}var Bl=Gt("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-4","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Fl=ue.memo(({children:t,result:e,language:r,className:n,...i})=>{let o=ue.useMemo(()=>({backgroundColor:e.bg,color:e.fg}),[e.bg,e.fg]);return V.jsx("pre",{className:Gt(n,"p-4 text-sm dark:bg-(--shiki-dark-bg)!"),"data-language":r,"data-streamdown":"code-block-body",style:o,...i,children:V.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:e.tokens.map((s,l)=>V.jsx("span",{className:Bl,children:s.map((a,c)=>V.jsx("span",{className:"dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!",style:{color:a.color,backgroundColor:a.bgColor,...a.htmlStyle},...a.htmlAttrs,children:a.content},c))},l))})})},(t,e)=>t.result===e.result&&t.language===e.language&&t.className===e.className),jl=({className:t,language:e,style:r,...n})=>V.jsx("div",{className:Gt("my-4 w-full overflow-hidden rounded-xl border border-border",t),"data-language":e,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...n}),Ul=({language:t,children:e})=>V.jsxs("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-language":t,"data-streamdown":"code-block-header",children:[V.jsx("span",{className:"ml-1 font-mono lowercase",children:t}),V.jsx("div",{className:"flex items-center gap-2",children:e})]}),Wl=Gl({forgiving:!0}),wt=new Map,At=new Map,ae=new Map,Hl=(t,e)=>`${t}-${e[0]}-${e[1]}`,zl=(t,e,r)=>{let n=t.slice(0,100),i=t.length>100?t.slice(-100):"";return`${e}:${r[0]}:${r[1]}:${t.length}:${n}:${i}`},zn=t=>Object.hasOwn(bn,t),ql=(t,e)=>{let r=zn(t)?t:"text",n=Hl(r,e);if(wt.has(n))return wt.get(n);let i=Ys({themes:e,langs:[r],engine:Wl});return wt.set(n,i),i},Gr=(t,e,r,n)=>{let i=zn(e)?e:"text",o=zl(t,i,r);return At.has(o)?At.get(o):(n&&(ae.has(o)||ae.set(o,new Set),ae.get(o).add(n)),ql(i,r).then(s=>{let l=s.codeToTokens(t,{lang:i,themes:{light:r[0],dark:r[1]}});At.set(o,l);let a=ae.get(o);if(a){for(let c of a)c(l);ae.delete(o)}}).catch(s=>{console.error("Failed to highlight code:",s),ae.delete(o)}),null)},Zl=({code:t,language:e,className:r,children:n,...i})=>{let{shikiTheme:o}=ue.useContext(Zn),s=ue.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:t.split(`
153
+ `).map(c=>[{content:c,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[t]),[l,a]=ue.useState(s);return ue.useEffect(()=>{let c=Gr(t,e,o);if(c){a(c);return}Gr(t,e,o,p=>{a(p)})},[t,e,o]),V.jsx(Yn.Provider,{value:{code:t},children:V.jsxs(jl,{language:e,children:[V.jsx(Ul,{language:e,children:n}),V.jsx(Fl,{className:r,language:e,result:l,...i})]})})};export{Zl as CodeBlock};
@@ -3506,7 +3506,7 @@ Please report this to https://github.com/markedjs/marked.`,lo){let Iu="<p>An err
3506
3506
  `||ju==="\r"){Mu=!0;break}}if(!Mu)return Du;let Lu=[];for(let Bu=0;Bu<Du.length;Bu+=1){let ju=Du[Bu];ju===" "?Lu.push("\\t"):ju===`
3507
3507
  `?Lu.push("\\n"):ju==="\r"?Lu.push("\\r"):Lu.push(ju)}return Lu.join("")},Iu=lo.length>0?$u.length+1:$u.length,Pu=new Array(Iu),Ou=0;lo.length>0&&(Pu[Ou]=lo.map(Ru).join(" "),Ou+=1);for(let Du of $u)Pu[Ou]=Du.map(Ru).join(" "),Ou+=1;return Pu.join(`
3508
3508
  `)},ce$3=Au=>{let lo=!1;for(let Ru=0;Ru<Au.length;Ru+=1){let Iu=Au[Ru];if(Iu==="\\"||Iu==="|"){lo=!0;break}}if(!lo)return Au;let $u=[];for(let Ru=0;Ru<Au.length;Ru+=1){let Iu=Au[Ru];Iu==="\\"?$u.push("\\\\"):Iu==="|"?$u.push("\\|"):$u.push(Iu)}return $u.join("")},Be$3=Au=>{let{headers:lo,rows:$u}=Au;if(lo.length===0)return"";let Ru=new Array($u.length+2),Iu=0,Pu=lo.map(Du=>ce$3(Du));Ru[Iu]=`| ${Pu.join(" | ")} |`,Iu+=1;let Ou=new Array(lo.length);for(let Du=0;Du<lo.length;Du+=1)Ou[Du]="---";Ru[Iu]=`| ${Ou.join(" | ")} |`,Iu+=1;for(let Du of $u)if(Du.length<lo.length){let Mu=new Array(lo.length);for(let Lu=0;Lu<lo.length;Lu+=1)Mu[Lu]=Lu<Du.length?ce$3(Du[Lu]):"";Ru[Iu]=`| ${Mu.join(" | ")} |`,Iu+=1}else{let Mu=Du.map(Lu=>ce$3(Lu));Ru[Iu]=`| ${Mu.join(" | ")} |`,Iu+=1}return Ru.join(`
3509
- `)},Oe$2=({children:Au,className:lo,onCopy:$u,onError:Ru,timeout:Iu=2e3})=>{let[Pu,Ou]=reactExports.useState(!1),[Du,Mu]=reactExports.useState(!1),Lu=reactExports.useRef(null),Bu=reactExports.useRef(0),{isAnimating:ju}=reactExports.useContext(C$1),Fu=async Uu=>{var Hu,Vu;if(typeof window>"u"||!((Hu=navigator?.clipboard)!=null&&Hu.write)){Ru?.(new Error("Clipboard API not available"));return}try{let Gu=(Vu=Lu.current)==null?void 0:Vu.closest('[data-streamdown="table-wrapper"]'),Wu=Gu?.querySelector("table");if(!Wu){Ru?.(new Error("Table not found"));return}let Ku=Y$1(Wu),Ju=Uu==="csv"?Q$1(Ku):Le$3(Ku),Yu=new ClipboardItem({"text/plain":new Blob([Ju],{type:"text/plain"}),"text/html":new Blob([Wu.outerHTML],{type:"text/html"})});await navigator.clipboard.write([Yu]),Mu(!0),Ou(!1),$u?.(Uu),Bu.current=window.setTimeout(()=>Mu(!1),Iu)}catch(Gu){Ru?.(Gu)}};reactExports.useEffect(()=>{let Uu=Hu=>{Lu.current&&!Lu.current.contains(Hu.target)&&Ou(!1)};return document.addEventListener("mousedown",Uu),()=>{document.removeEventListener("mousedown",Uu),window.clearTimeout(Bu.current)}},[]);let zu=Du?Check:Copy;return jsxRuntimeExports.jsxs("div",{className:"relative",ref:Lu,children:[jsxRuntimeExports.jsx("button",{className:u$2("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",lo),disabled:ju,onClick:()=>Ou(!Pu),title:"Copy table",type:"button",children:Au??jsxRuntimeExports.jsx(zu,{size:14})}),Pu&&jsxRuntimeExports.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Fu("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Fu("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]})]})},$e$3=({children:Au,className:lo,onDownload:$u,onError:Ru})=>{let[Iu,Pu]=reactExports.useState(!1),Ou=reactExports.useRef(null),{isAnimating:Du}=reactExports.useContext(C$1),Mu=Lu=>{var Bu;try{let ju=(Bu=Ou.current)==null?void 0:Bu.closest('[data-streamdown="table-wrapper"]'),Fu=ju?.querySelector("table");if(!Fu){Ru?.(new Error("Table not found"));return}let zu=Y$1(Fu),Uu=Lu==="csv"?Q$1(zu):Be$3(zu);R$2(`table.${Lu==="csv"?"csv":"md"}`,Uu,Lu==="csv"?"text/csv":"text/markdown"),Pu(!1),$u?.(Lu)}catch(ju){Ru?.(ju)}};return reactExports.useEffect(()=>{let Lu=Bu=>{Ou.current&&!Ou.current.contains(Bu.target)&&Pu(!1)};return document.addEventListener("mousedown",Lu),()=>{document.removeEventListener("mousedown",Lu)}},[]),jsxRuntimeExports.jsxs("div",{className:"relative",ref:Ou,children:[jsxRuntimeExports.jsx("button",{className:u$2("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",lo),disabled:Du,onClick:()=>Pu(!Iu),title:"Download table",type:"button",children:Au??jsxRuntimeExports.jsx(Download$1,{size:14})}),Iu&&jsxRuntimeExports.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Mu("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Mu("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]})]})},Xe$3=({children:Au,className:lo,showControls:$u,...Ru})=>jsxRuntimeExports.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[$u&&jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-1",children:[jsxRuntimeExports.jsx(Oe$2,{}),jsxRuntimeExports.jsx($e$3,{})]}),jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsx("table",{className:u$2("w-full border-collapse border border-border",lo),"data-streamdown":"table",...Ru,children:Au})})]}),fo$1=reactExports.lazy(()=>__vitePreload(()=>import("./chunks/code-block-IT6T5CEO-Rra2QX20.js"),[],import.meta.url).then(Au=>({default:Au.CodeBlock}))),go$1=reactExports.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>mermaidVLURNSYL),void 0,import.meta.url).then(Au=>({default:Au.Mermaid}))),bo$1=/language-([^\s]+)/;function re$4(Au,lo){if(!(Au!=null&&Au.position||lo!=null&&lo.position))return!0;if(!(Au!=null&&Au.position&&lo!=null&&lo.position))return!1;let $u=Au.position.start,Ru=lo.position.start,Iu=Au.position.end,Pu=lo.position.end;return $u?.line===Ru?.line&&$u?.column===Ru?.column&&Iu?.line===Pu?.line&&Iu?.column===Pu?.column}function x$6(Au,lo){return Au.className===lo.className&&re$4(Au.node,lo.node)}var pe$2=(Au,lo)=>typeof Au=="boolean"?Au:Au[lo]!==!1,ne$2=(Au,lo)=>{if(typeof Au=="boolean")return Au;let $u=Au.mermaid;return $u===!1?!1:$u===!0||$u===void 0?!0:$u[lo]!==!1},ue$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("ol",{className:u$2("list-inside list-decimal whitespace-normal",lo),"data-streamdown":"ordered-list",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));ue$3.displayName="MarkdownOl";var Ve$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("li",{className:u$2("py-1 [&>p]:inline",lo),"data-streamdown":"list-item",...Ru,children:Au}),(Au,lo)=>Au.className===lo.className&&re$4(Au.node,lo.node));Ve$3.displayName="MarkdownLi";var Ke$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("ul",{className:u$2("list-inside list-disc whitespace-normal",lo),"data-streamdown":"unordered-list",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Ke$3.displayName="MarkdownUl";var Ze$3=reactExports.memo(({className:Au,node:lo,...$u})=>jsxRuntimeExports.jsx("hr",{className:u$2("my-6 border-border",Au),"data-streamdown":"horizontal-rule",...$u}),(Au,lo)=>x$6(Au,lo));Ze$3.displayName="MarkdownHr";var Ue$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("span",{className:u$2("font-semibold",lo),"data-streamdown":"strong",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Ue$3.displayName="MarkdownStrong";var Ge$3=reactExports.memo(({children:Au,className:lo,href:$u,node:Ru,...Iu})=>{let Pu=$u==="streamdown:incomplete-link";return jsxRuntimeExports.jsx("a",{className:u$2("wrap-anywhere font-medium text-primary underline",lo),"data-incomplete":Pu,"data-streamdown":"link",href:$u,rel:"noreferrer",target:"_blank",...Iu,children:Au})},(Au,lo)=>x$6(Au,lo)&&Au.href===lo.href);Ge$3.displayName="MarkdownA";var _e$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h1",{className:u$2("mt-6 mb-2 font-semibold text-3xl",lo),"data-streamdown":"heading-1",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));_e$3.displayName="MarkdownH1";var Ye$2=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h2",{className:u$2("mt-6 mb-2 font-semibold text-2xl",lo),"data-streamdown":"heading-2",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Ye$2.displayName="MarkdownH2";var Qe$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h3",{className:u$2("mt-6 mb-2 font-semibold text-xl",lo),"data-streamdown":"heading-3",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Qe$3.displayName="MarkdownH3";var et$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h4",{className:u$2("mt-6 mb-2 font-semibold text-lg",lo),"data-streamdown":"heading-4",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));et$3.displayName="MarkdownH4";var tt$2=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h5",{className:u$2("mt-6 mb-2 font-semibold text-base",lo),"data-streamdown":"heading-5",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));tt$2.displayName="MarkdownH5";var ot$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h6",{className:u$2("mt-6 mb-2 font-semibold text-sm",lo),"data-streamdown":"heading-6",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));ot$4.displayName="MarkdownH6";var nt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>{let{controls:Iu}=reactExports.useContext(C$1),Pu=pe$2(Iu,"table");return jsxRuntimeExports.jsx(Xe$3,{className:lo,"data-streamdown":"table-wrapper",showControls:Pu,...Ru,children:Au})},(Au,lo)=>x$6(Au,lo));nt$4.displayName="MarkdownTable";var rt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("thead",{className:u$2("bg-muted/80",lo),"data-streamdown":"table-header",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));rt$4.displayName="MarkdownThead";var st$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("tbody",{className:u$2("divide-y divide-border bg-muted/40",lo),"data-streamdown":"table-body",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));st$4.displayName="MarkdownTbody";var at$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("tr",{className:u$2("border-border border-b",lo),"data-streamdown":"table-row",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));at$3.displayName="MarkdownTr";var it$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("th",{className:u$2("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",lo),"data-streamdown":"table-header-cell",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));it$4.displayName="MarkdownTh";var lt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("td",{className:u$2("px-4 py-2 text-sm",lo),"data-streamdown":"table-cell",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));lt$4.displayName="MarkdownTd";var dt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("blockquote",{className:u$2("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",lo),"data-streamdown":"blockquote",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));dt$4.displayName="MarkdownBlockquote";var ct$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("sup",{className:u$2("text-sm",lo),"data-streamdown":"superscript",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));ct$4.displayName="MarkdownSup";var mt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("sub",{className:u$2("text-sm",lo),"data-streamdown":"subscript",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));mt$4.displayName="MarkdownSub";var pt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>{if("data-footnotes"in Ru){let Iu=Ou=>{var Du,Mu;if(!reactExports.isValidElement(Ou))return!1;let Lu=Array.isArray(Ou.props.children)?Ou.props.children:[Ou.props.children],Bu=!1,ju=!1;for(let Fu of Lu)if(Fu){if(typeof Fu=="string")Fu.trim()!==""&&(Bu=!0);else if(reactExports.isValidElement(Fu))if(((Du=Fu.props)==null?void 0:Du["data-footnote-backref"])!==void 0)ju=!0;else{let zu=Array.isArray(Fu.props.children)?Fu.props.children:[Fu.props.children];for(let Uu of zu){if(typeof Uu=="string"&&Uu.trim()!==""){Bu=!0;break}if(reactExports.isValidElement(Uu)&&((Mu=Uu.props)==null?void 0:Mu["data-footnote-backref"])===void 0){Bu=!0;break}}}}return ju&&!Bu},Pu=Array.isArray(Au)?Au.map(Ou=>{if(!reactExports.isValidElement(Ou))return Ou;if(Ou.type===ue$3){let Du=(Array.isArray(Ou.props.children)?Ou.props.children:[Ou.props.children]).filter(Mu=>!Iu(Mu));return Du.length===0?null:{...Ou,props:{...Ou.props,children:Du}}}return Ou}):Au;return(Array.isArray(Pu)?Pu.some(Ou=>Ou!==null):Pu!==null)?jsxRuntimeExports.jsx("section",{className:lo,...Ru,children:Pu}):null}return jsxRuntimeExports.jsx("section",{className:lo,...Ru,children:Au})},(Au,lo)=>x$6(Au,lo));pt$4.displayName="MarkdownSection";var ho$1=({node:Au,className:lo,children:$u,...Ru})=>{var Iu,Pu,Ou;let Du=((Iu=Au?.position)==null?void 0:Iu.start.line)===((Pu=Au?.position)==null?void 0:Pu.end.line),{mermaid:Mu,controls:Lu}=reactExports.useContext(C$1);if(Du)return jsxRuntimeExports.jsx("code",{className:u$2("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",lo),"data-streamdown":"inline-code",...Ru,children:$u});let Bu=lo?.match(bo$1),ju=(Ou=Bu?.at(1))!=null?Ou:"",Fu="";if(reactExports.isValidElement($u)&&$u.props&&typeof $u.props=="object"&&"children"in $u.props&&typeof $u.props.children=="string"?Fu=$u.props.children:typeof $u=="string"&&(Fu=$u),ju==="mermaid"){let Uu=pe$2(Lu,"mermaid"),Hu=ne$2(Lu,"download"),Vu=ne$2(Lu,"copy"),Gu=ne$2(Lu,"fullscreen"),Wu=ne$2(Lu,"panZoom");return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(de$3,{}),children:jsxRuntimeExports.jsxs("div",{className:u$2("group relative my-4 h-auto rounded-xl border p-4",lo),"data-streamdown":"mermaid-block",children:[Uu&&(Hu||Vu||Gu)&&jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-2",children:[Hu&&jsxRuntimeExports.jsx(Se$2,{chart:Fu,config:Mu?.config}),Vu&&jsxRuntimeExports.jsx(ie$4,{code:Fu}),Gu&&jsxRuntimeExports.jsx(De$2,{chart:Fu,config:Mu?.config})]}),jsxRuntimeExports.jsx(go$1,{chart:Fu,config:Mu?.config,showControls:Wu})]})})}let zu=pe$2(Lu,"code");return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(de$3,{}),children:jsxRuntimeExports.jsx(fo$1,{className:u$2("overflow-x-auto border-border border-t",lo),code:Fu,language:ju,children:zu&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Me$3,{code:Fu,language:ju}),jsxRuntimeExports.jsx(ie$4,{})]})})})},ut$4=reactExports.memo(ho$1,(Au,lo)=>Au.className===lo.className&&re$4(Au.node,lo.node));ut$4.displayName="MarkdownCode";var ft$3=reactExports.memo(Pe$3,(Au,lo)=>Au.className===lo.className&&re$4(Au.node,lo.node));ft$3.displayName="MarkdownImg";var gt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>{var Iu;let Pu=(Array.isArray(Au)?Au:[Au]).filter(Ou=>Ou!=null&&Ou!=="");return Pu.length===1&&reactExports.isValidElement(Pu[0])&&((Iu=Pu[0].props.node)==null?void 0:Iu.tagName)==="img"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Au}):jsxRuntimeExports.jsx("p",{className:lo,...Ru,children:Au})},(Au,lo)=>x$6(Au,lo));gt$4.displayName="MarkdownParagraph";var bt$3={ol:ue$3,li:Ve$3,ul:Ke$3,hr:Ze$3,strong:Ue$3,a:Ge$3,h1:_e$3,h2:Ye$2,h3:Qe$3,h4:et$3,h5:tt$2,h6:ot$4,table:nt$4,thead:rt$4,tbody:st$4,tr:at$3,th:it$4,td:lt$4,blockquote:dt$4,code:ut$4,img:ft$3,pre:({children:Au})=>Au,sup:ct$4,sub:mt$4,p:gt$4,section:pt$4},yt$4=[],wt$3={allowDangerousHtml:!0},se$3=new WeakMap,fe$3=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(lo){let $u=this.keyCache.get(lo);if($u)return $u;let Ru=lo.rehypePlugins,Iu=lo.remarkPlugins,Pu=lo.remarkRehypeOptions;if(!(Ru||Iu||Pu)){let ju="default";return this.keyCache.set(lo,ju),ju}let Ou=ju=>{if(!ju||ju.length===0)return"";let Fu="";for(let zu=0;zu<ju.length;zu+=1){let Uu=ju[zu];if(zu>0&&(Fu+=","),Array.isArray(Uu)){let[Hu,Vu]=Uu;if(typeof Hu=="function"){let Gu=se$3.get(Hu);Gu||(Gu=Hu.name,se$3.set(Hu,Gu)),Fu+=Gu}else Fu+=String(Hu);Fu+=":",Fu+=JSON.stringify(Vu)}else if(typeof Uu=="function"){let Hu=se$3.get(Uu);Hu||(Hu=Uu.name,se$3.set(Uu,Hu)),Fu+=Hu}else Fu+=String(Uu)}return Fu},Du=Ou(Ru),Mu=Ou(Iu),Lu=Pu?JSON.stringify(Pu):"",Bu=`${Mu}::${Du}::${Lu}`;return this.keyCache.set(lo,Bu),Bu}get(lo){let $u=this.generateCacheKey(lo),Ru=this.cache.get($u);return Ru&&(this.cache.delete($u),this.cache.set($u,Ru)),Ru}set(lo,$u){let Ru=this.generateCacheKey(lo);if(this.cache.size>=this.maxSize){let Iu=this.cache.keys().next().value;Iu&&this.cache.delete(Iu)}this.cache.set(Ru,$u)}clear(){this.cache.clear()}},kt$3=new fe$3,ge$2=Au=>{let lo=Po$1(Au),$u=Au.children||"";return No$1(lo.runSync(lo.parse($u),$u),Au)},Po$1=Au=>{let lo=kt$3.get(Au);if(lo)return lo;let $u=To$1(Au);return kt$3.set(Au,$u),$u},To$1=Au=>{let lo=Au.rehypePlugins||yt$4,$u=Au.remarkPlugins||yt$4,Ru=Au.remarkRehypeOptions?{...wt$3,...Au.remarkRehypeOptions}:wt$3;return unified().use(remarkParse).use($u).use(remarkRehype,Ru).use(lo)},No$1=(Au,lo)=>toJsxRuntime(Au,{Fragment:jsxRuntimeExports.Fragment,components:lo.components,ignoreInvalidStyle:!0,jsx:jsxRuntimeExports.jsx,jsxs:jsxRuntimeExports.jsxs,passKeys:!0,passNode:!0}),Ro$1=/\[\^[^\]\s]{1,200}\](?!:)/,Io$1=/\[\^[^\]\s]{1,200}\]:/,Eo$1=/<\/(\w+)>/,Do$1=/<(\w+)[\s>]/,be$2=Au=>{let lo=0;for(;lo<Au.length&&(Au[lo]===" "||Au[lo]===" "||Au[lo]===`
3509
+ `)},Oe$2=({children:Au,className:lo,onCopy:$u,onError:Ru,timeout:Iu=2e3})=>{let[Pu,Ou]=reactExports.useState(!1),[Du,Mu]=reactExports.useState(!1),Lu=reactExports.useRef(null),Bu=reactExports.useRef(0),{isAnimating:ju}=reactExports.useContext(C$1),Fu=async Uu=>{var Hu,Vu;if(typeof window>"u"||!((Hu=navigator?.clipboard)!=null&&Hu.write)){Ru?.(new Error("Clipboard API not available"));return}try{let Gu=(Vu=Lu.current)==null?void 0:Vu.closest('[data-streamdown="table-wrapper"]'),Wu=Gu?.querySelector("table");if(!Wu){Ru?.(new Error("Table not found"));return}let Ku=Y$1(Wu),Ju=Uu==="csv"?Q$1(Ku):Le$3(Ku),Yu=new ClipboardItem({"text/plain":new Blob([Ju],{type:"text/plain"}),"text/html":new Blob([Wu.outerHTML],{type:"text/html"})});await navigator.clipboard.write([Yu]),Mu(!0),Ou(!1),$u?.(Uu),Bu.current=window.setTimeout(()=>Mu(!1),Iu)}catch(Gu){Ru?.(Gu)}};reactExports.useEffect(()=>{let Uu=Hu=>{Lu.current&&!Lu.current.contains(Hu.target)&&Ou(!1)};return document.addEventListener("mousedown",Uu),()=>{document.removeEventListener("mousedown",Uu),window.clearTimeout(Bu.current)}},[]);let zu=Du?Check:Copy;return jsxRuntimeExports.jsxs("div",{className:"relative",ref:Lu,children:[jsxRuntimeExports.jsx("button",{className:u$2("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",lo),disabled:ju,onClick:()=>Ou(!Pu),title:"Copy table",type:"button",children:Au??jsxRuntimeExports.jsx(zu,{size:14})}),Pu&&jsxRuntimeExports.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Fu("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Fu("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]})]})},$e$3=({children:Au,className:lo,onDownload:$u,onError:Ru})=>{let[Iu,Pu]=reactExports.useState(!1),Ou=reactExports.useRef(null),{isAnimating:Du}=reactExports.useContext(C$1),Mu=Lu=>{var Bu;try{let ju=(Bu=Ou.current)==null?void 0:Bu.closest('[data-streamdown="table-wrapper"]'),Fu=ju?.querySelector("table");if(!Fu){Ru?.(new Error("Table not found"));return}let zu=Y$1(Fu),Uu=Lu==="csv"?Q$1(zu):Be$3(zu);R$2(`table.${Lu==="csv"?"csv":"md"}`,Uu,Lu==="csv"?"text/csv":"text/markdown"),Pu(!1),$u?.(Lu)}catch(ju){Ru?.(ju)}};return reactExports.useEffect(()=>{let Lu=Bu=>{Ou.current&&!Ou.current.contains(Bu.target)&&Pu(!1)};return document.addEventListener("mousedown",Lu),()=>{document.removeEventListener("mousedown",Lu)}},[]),jsxRuntimeExports.jsxs("div",{className:"relative",ref:Ou,children:[jsxRuntimeExports.jsx("button",{className:u$2("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",lo),disabled:Du,onClick:()=>Pu(!Iu),title:"Download table",type:"button",children:Au??jsxRuntimeExports.jsx(Download$1,{size:14})}),Iu&&jsxRuntimeExports.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Mu("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),jsxRuntimeExports.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>Mu("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]})]})},Xe$3=({children:Au,className:lo,showControls:$u,...Ru})=>jsxRuntimeExports.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[$u&&jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-1",children:[jsxRuntimeExports.jsx(Oe$2,{}),jsxRuntimeExports.jsx($e$3,{})]}),jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsx("table",{className:u$2("w-full border-collapse border border-border",lo),"data-streamdown":"table",...Ru,children:Au})})]}),fo$1=reactExports.lazy(()=>__vitePreload(()=>import("./chunks/code-block-IT6T5CEO-PC_FMPVL.js"),[],import.meta.url).then(Au=>({default:Au.CodeBlock}))),go$1=reactExports.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>mermaidVLURNSYL),void 0,import.meta.url).then(Au=>({default:Au.Mermaid}))),bo$1=/language-([^\s]+)/;function re$4(Au,lo){if(!(Au!=null&&Au.position||lo!=null&&lo.position))return!0;if(!(Au!=null&&Au.position&&lo!=null&&lo.position))return!1;let $u=Au.position.start,Ru=lo.position.start,Iu=Au.position.end,Pu=lo.position.end;return $u?.line===Ru?.line&&$u?.column===Ru?.column&&Iu?.line===Pu?.line&&Iu?.column===Pu?.column}function x$6(Au,lo){return Au.className===lo.className&&re$4(Au.node,lo.node)}var pe$2=(Au,lo)=>typeof Au=="boolean"?Au:Au[lo]!==!1,ne$2=(Au,lo)=>{if(typeof Au=="boolean")return Au;let $u=Au.mermaid;return $u===!1?!1:$u===!0||$u===void 0?!0:$u[lo]!==!1},ue$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("ol",{className:u$2("list-inside list-decimal whitespace-normal",lo),"data-streamdown":"ordered-list",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));ue$3.displayName="MarkdownOl";var Ve$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("li",{className:u$2("py-1 [&>p]:inline",lo),"data-streamdown":"list-item",...Ru,children:Au}),(Au,lo)=>Au.className===lo.className&&re$4(Au.node,lo.node));Ve$3.displayName="MarkdownLi";var Ke$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("ul",{className:u$2("list-inside list-disc whitespace-normal",lo),"data-streamdown":"unordered-list",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Ke$3.displayName="MarkdownUl";var Ze$3=reactExports.memo(({className:Au,node:lo,...$u})=>jsxRuntimeExports.jsx("hr",{className:u$2("my-6 border-border",Au),"data-streamdown":"horizontal-rule",...$u}),(Au,lo)=>x$6(Au,lo));Ze$3.displayName="MarkdownHr";var Ue$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("span",{className:u$2("font-semibold",lo),"data-streamdown":"strong",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Ue$3.displayName="MarkdownStrong";var Ge$3=reactExports.memo(({children:Au,className:lo,href:$u,node:Ru,...Iu})=>{let Pu=$u==="streamdown:incomplete-link";return jsxRuntimeExports.jsx("a",{className:u$2("wrap-anywhere font-medium text-primary underline",lo),"data-incomplete":Pu,"data-streamdown":"link",href:$u,rel:"noreferrer",target:"_blank",...Iu,children:Au})},(Au,lo)=>x$6(Au,lo)&&Au.href===lo.href);Ge$3.displayName="MarkdownA";var _e$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h1",{className:u$2("mt-6 mb-2 font-semibold text-3xl",lo),"data-streamdown":"heading-1",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));_e$3.displayName="MarkdownH1";var Ye$2=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h2",{className:u$2("mt-6 mb-2 font-semibold text-2xl",lo),"data-streamdown":"heading-2",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Ye$2.displayName="MarkdownH2";var Qe$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h3",{className:u$2("mt-6 mb-2 font-semibold text-xl",lo),"data-streamdown":"heading-3",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));Qe$3.displayName="MarkdownH3";var et$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h4",{className:u$2("mt-6 mb-2 font-semibold text-lg",lo),"data-streamdown":"heading-4",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));et$3.displayName="MarkdownH4";var tt$2=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h5",{className:u$2("mt-6 mb-2 font-semibold text-base",lo),"data-streamdown":"heading-5",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));tt$2.displayName="MarkdownH5";var ot$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("h6",{className:u$2("mt-6 mb-2 font-semibold text-sm",lo),"data-streamdown":"heading-6",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));ot$4.displayName="MarkdownH6";var nt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>{let{controls:Iu}=reactExports.useContext(C$1),Pu=pe$2(Iu,"table");return jsxRuntimeExports.jsx(Xe$3,{className:lo,"data-streamdown":"table-wrapper",showControls:Pu,...Ru,children:Au})},(Au,lo)=>x$6(Au,lo));nt$4.displayName="MarkdownTable";var rt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("thead",{className:u$2("bg-muted/80",lo),"data-streamdown":"table-header",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));rt$4.displayName="MarkdownThead";var st$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("tbody",{className:u$2("divide-y divide-border bg-muted/40",lo),"data-streamdown":"table-body",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));st$4.displayName="MarkdownTbody";var at$3=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("tr",{className:u$2("border-border border-b",lo),"data-streamdown":"table-row",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));at$3.displayName="MarkdownTr";var it$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("th",{className:u$2("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",lo),"data-streamdown":"table-header-cell",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));it$4.displayName="MarkdownTh";var lt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("td",{className:u$2("px-4 py-2 text-sm",lo),"data-streamdown":"table-cell",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));lt$4.displayName="MarkdownTd";var dt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("blockquote",{className:u$2("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",lo),"data-streamdown":"blockquote",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));dt$4.displayName="MarkdownBlockquote";var ct$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("sup",{className:u$2("text-sm",lo),"data-streamdown":"superscript",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));ct$4.displayName="MarkdownSup";var mt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>jsxRuntimeExports.jsx("sub",{className:u$2("text-sm",lo),"data-streamdown":"subscript",...Ru,children:Au}),(Au,lo)=>x$6(Au,lo));mt$4.displayName="MarkdownSub";var pt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>{if("data-footnotes"in Ru){let Iu=Ou=>{var Du,Mu;if(!reactExports.isValidElement(Ou))return!1;let Lu=Array.isArray(Ou.props.children)?Ou.props.children:[Ou.props.children],Bu=!1,ju=!1;for(let Fu of Lu)if(Fu){if(typeof Fu=="string")Fu.trim()!==""&&(Bu=!0);else if(reactExports.isValidElement(Fu))if(((Du=Fu.props)==null?void 0:Du["data-footnote-backref"])!==void 0)ju=!0;else{let zu=Array.isArray(Fu.props.children)?Fu.props.children:[Fu.props.children];for(let Uu of zu){if(typeof Uu=="string"&&Uu.trim()!==""){Bu=!0;break}if(reactExports.isValidElement(Uu)&&((Mu=Uu.props)==null?void 0:Mu["data-footnote-backref"])===void 0){Bu=!0;break}}}}return ju&&!Bu},Pu=Array.isArray(Au)?Au.map(Ou=>{if(!reactExports.isValidElement(Ou))return Ou;if(Ou.type===ue$3){let Du=(Array.isArray(Ou.props.children)?Ou.props.children:[Ou.props.children]).filter(Mu=>!Iu(Mu));return Du.length===0?null:{...Ou,props:{...Ou.props,children:Du}}}return Ou}):Au;return(Array.isArray(Pu)?Pu.some(Ou=>Ou!==null):Pu!==null)?jsxRuntimeExports.jsx("section",{className:lo,...Ru,children:Pu}):null}return jsxRuntimeExports.jsx("section",{className:lo,...Ru,children:Au})},(Au,lo)=>x$6(Au,lo));pt$4.displayName="MarkdownSection";var ho$1=({node:Au,className:lo,children:$u,...Ru})=>{var Iu,Pu,Ou;let Du=((Iu=Au?.position)==null?void 0:Iu.start.line)===((Pu=Au?.position)==null?void 0:Pu.end.line),{mermaid:Mu,controls:Lu}=reactExports.useContext(C$1);if(Du)return jsxRuntimeExports.jsx("code",{className:u$2("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",lo),"data-streamdown":"inline-code",...Ru,children:$u});let Bu=lo?.match(bo$1),ju=(Ou=Bu?.at(1))!=null?Ou:"",Fu="";if(reactExports.isValidElement($u)&&$u.props&&typeof $u.props=="object"&&"children"in $u.props&&typeof $u.props.children=="string"?Fu=$u.props.children:typeof $u=="string"&&(Fu=$u),ju==="mermaid"){let Uu=pe$2(Lu,"mermaid"),Hu=ne$2(Lu,"download"),Vu=ne$2(Lu,"copy"),Gu=ne$2(Lu,"fullscreen"),Wu=ne$2(Lu,"panZoom");return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(de$3,{}),children:jsxRuntimeExports.jsxs("div",{className:u$2("group relative my-4 h-auto rounded-xl border p-4",lo),"data-streamdown":"mermaid-block",children:[Uu&&(Hu||Vu||Gu)&&jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-2",children:[Hu&&jsxRuntimeExports.jsx(Se$2,{chart:Fu,config:Mu?.config}),Vu&&jsxRuntimeExports.jsx(ie$4,{code:Fu}),Gu&&jsxRuntimeExports.jsx(De$2,{chart:Fu,config:Mu?.config})]}),jsxRuntimeExports.jsx(go$1,{chart:Fu,config:Mu?.config,showControls:Wu})]})})}let zu=pe$2(Lu,"code");return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(de$3,{}),children:jsxRuntimeExports.jsx(fo$1,{className:u$2("overflow-x-auto border-border border-t",lo),code:Fu,language:ju,children:zu&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Me$3,{code:Fu,language:ju}),jsxRuntimeExports.jsx(ie$4,{})]})})})},ut$4=reactExports.memo(ho$1,(Au,lo)=>Au.className===lo.className&&re$4(Au.node,lo.node));ut$4.displayName="MarkdownCode";var ft$3=reactExports.memo(Pe$3,(Au,lo)=>Au.className===lo.className&&re$4(Au.node,lo.node));ft$3.displayName="MarkdownImg";var gt$4=reactExports.memo(({children:Au,className:lo,node:$u,...Ru})=>{var Iu;let Pu=(Array.isArray(Au)?Au:[Au]).filter(Ou=>Ou!=null&&Ou!=="");return Pu.length===1&&reactExports.isValidElement(Pu[0])&&((Iu=Pu[0].props.node)==null?void 0:Iu.tagName)==="img"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Au}):jsxRuntimeExports.jsx("p",{className:lo,...Ru,children:Au})},(Au,lo)=>x$6(Au,lo));gt$4.displayName="MarkdownParagraph";var bt$3={ol:ue$3,li:Ve$3,ul:Ke$3,hr:Ze$3,strong:Ue$3,a:Ge$3,h1:_e$3,h2:Ye$2,h3:Qe$3,h4:et$3,h5:tt$2,h6:ot$4,table:nt$4,thead:rt$4,tbody:st$4,tr:at$3,th:it$4,td:lt$4,blockquote:dt$4,code:ut$4,img:ft$3,pre:({children:Au})=>Au,sup:ct$4,sub:mt$4,p:gt$4,section:pt$4},yt$4=[],wt$3={allowDangerousHtml:!0},se$3=new WeakMap,fe$3=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(lo){let $u=this.keyCache.get(lo);if($u)return $u;let Ru=lo.rehypePlugins,Iu=lo.remarkPlugins,Pu=lo.remarkRehypeOptions;if(!(Ru||Iu||Pu)){let ju="default";return this.keyCache.set(lo,ju),ju}let Ou=ju=>{if(!ju||ju.length===0)return"";let Fu="";for(let zu=0;zu<ju.length;zu+=1){let Uu=ju[zu];if(zu>0&&(Fu+=","),Array.isArray(Uu)){let[Hu,Vu]=Uu;if(typeof Hu=="function"){let Gu=se$3.get(Hu);Gu||(Gu=Hu.name,se$3.set(Hu,Gu)),Fu+=Gu}else Fu+=String(Hu);Fu+=":",Fu+=JSON.stringify(Vu)}else if(typeof Uu=="function"){let Hu=se$3.get(Uu);Hu||(Hu=Uu.name,se$3.set(Uu,Hu)),Fu+=Hu}else Fu+=String(Uu)}return Fu},Du=Ou(Ru),Mu=Ou(Iu),Lu=Pu?JSON.stringify(Pu):"",Bu=`${Mu}::${Du}::${Lu}`;return this.keyCache.set(lo,Bu),Bu}get(lo){let $u=this.generateCacheKey(lo),Ru=this.cache.get($u);return Ru&&(this.cache.delete($u),this.cache.set($u,Ru)),Ru}set(lo,$u){let Ru=this.generateCacheKey(lo);if(this.cache.size>=this.maxSize){let Iu=this.cache.keys().next().value;Iu&&this.cache.delete(Iu)}this.cache.set(Ru,$u)}clear(){this.cache.clear()}},kt$3=new fe$3,ge$2=Au=>{let lo=Po$1(Au),$u=Au.children||"";return No$1(lo.runSync(lo.parse($u),$u),Au)},Po$1=Au=>{let lo=kt$3.get(Au);if(lo)return lo;let $u=To$1(Au);return kt$3.set(Au,$u),$u},To$1=Au=>{let lo=Au.rehypePlugins||yt$4,$u=Au.remarkPlugins||yt$4,Ru=Au.remarkRehypeOptions?{...wt$3,...Au.remarkRehypeOptions}:wt$3;return unified().use(remarkParse).use($u).use(remarkRehype,Ru).use(lo)},No$1=(Au,lo)=>toJsxRuntime(Au,{Fragment:jsxRuntimeExports.Fragment,components:lo.components,ignoreInvalidStyle:!0,jsx:jsxRuntimeExports.jsx,jsxs:jsxRuntimeExports.jsxs,passKeys:!0,passNode:!0}),Ro$1=/\[\^[^\]\s]{1,200}\](?!:)/,Io$1=/\[\^[^\]\s]{1,200}\]:/,Eo$1=/<\/(\w+)>/,Do$1=/<(\w+)[\s>]/,be$2=Au=>{let lo=0;for(;lo<Au.length&&(Au[lo]===" "||Au[lo]===" "||Au[lo]===`
3510
3510
  `||Au[lo]==="\r");)lo+=1;return lo+1<Au.length&&Au[lo]==="$"&&Au[lo+1]==="$"},Lo$1=Au=>{let lo=Au.length-1;for(;lo>=0&&(Au[lo]===" "||Au[lo]===" "||Au[lo]===`
3511
3511
  `||Au[lo]==="\r");)lo-=1;return lo>=1&&Au[lo]==="$"&&Au[lo-1]==="$"},he$2=Au=>{let lo=0;for(let $u=0;$u<Au.length-1;$u+=1)Au[$u]==="$"&&Au[$u+1]==="$"&&(lo+=1,$u+=1);return lo},ye$2=Au=>{let lo=Ro$1.test(Au),$u=Io$1.test(Au);if(lo||$u)return[Au];let Ru=x$7.lex(Au,{gfm:!0}),Iu=[],Pu=[];for(let Ou of Ru){let Du=Ou.raw,Mu=Iu.length;if(Pu.length>0){if(Iu[Mu-1]+=Du,Ou.type==="html"){let Lu=Du.match(Eo$1);if(Lu){let Bu=Lu[1];Pu.at(-1)===Bu&&Pu.pop()}}continue}if(Ou.type==="html"&&Ou.block){let Lu=Du.match(Do$1);if(Lu){let Bu=Lu[1];Du.includes(`</${Bu}>`)||Pu.push(Bu)}}if(Du.trim()==="$$"&&Mu>0){let Lu=Iu[Mu-1],Bu=be$2(Lu),ju=he$2(Lu);if(Bu&&ju%2===1){Iu[Mu-1]=Lu+Du;continue}}if(Mu>0&&Lo$1(Du)){let Lu=Iu[Mu-1],Bu=be$2(Lu),ju=he$2(Lu),Fu=he$2(Du);if(Bu&&ju%2===1&&!be$2(Du)&&Fu===1){Iu[Mu-1]=Lu+Du;continue}}Iu.push(Du)}return Iu},Wo$1={raw:rehypeRaw,katex:[rehypeKatex,{errorColor:"var(--color-muted-foreground)"}],sanitize:[rehypeSanitize,{}],harden:[harden,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Vo$1={gfm:[remarkGfm,{}],math:[remarkMath,{singleDollarTextMath:!1}],cjkFriendly:[remarkCjkFriendly,{}],cjkFriendlyGfmStrikethrough:[remarkGfmStrikethroughCjkFriendly,{}]},Ko$1=Object.values(Wo$1),Zo$1=Object.values(Vo$1),Uo$1={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0},C$1=reactExports.createContext(Uo$1),Ct$4=reactExports.memo(({content:Au,shouldParseIncompleteMarkdown:lo,...$u})=>{let Ru=reactExports.useMemo(()=>typeof Au=="string"&&lo?$n$1(Au.trim()):Au,[Au,lo]);return jsxRuntimeExports.jsx(ge$2,{...$u,children:Ru})},(Au,lo)=>{if(Au.content!==lo.content||Au.shouldParseIncompleteMarkdown!==lo.shouldParseIncompleteMarkdown||Au.index!==lo.index)return!1;if(Au.components!==lo.components){let $u=Object.keys(Au.components||{}),Ru=Object.keys(lo.components||{});if($u.length!==Ru.length||$u.some(Iu=>{var Pu,Ou;return((Pu=Au.components)==null?void 0:Pu[Iu])!==((Ou=lo.components)==null?void 0:Ou[Iu])}))return!1}return!(Au.rehypePlugins!==lo.rehypePlugins||Au.remarkPlugins!==lo.remarkPlugins)});Ct$4.displayName="Block";var Go$1=["github-light","github-dark"],_o$1=reactExports.memo(({children:Au,mode:lo="streaming",parseIncompleteMarkdown:$u=!0,components:Ru,rehypePlugins:Iu=Ko$1,remarkPlugins:Pu=Zo$1,className:Ou,shikiTheme:Du=Go$1,mermaid:Mu,controls:Lu=!0,isAnimating:Bu=!1,BlockComponent:ju=Ct$4,parseMarkdownIntoBlocksFn:Fu=ye$2,...zu})=>{let Uu=reactExports.useId(),[Hu,Vu]=reactExports.useTransition(),[Gu,Wu]=reactExports.useState([]),Ku=reactExports.useMemo(()=>Fu(typeof Au=="string"?Au:""),[Au,Fu]);reactExports.useEffect(()=>{lo==="streaming"?Vu(()=>{Wu(Ku)}):Wu(Ku)},[Ku,lo]);let Ju=lo==="streaming"?Gu:Ku,Yu=reactExports.useMemo(()=>Ju.map((td,nd)=>`${Uu}-${nd}`),[Ju.length,Uu]),Xu=reactExports.useMemo(()=>({shikiTheme:Du,controls:Lu,isAnimating:Bu,mode:lo,mermaid:Mu}),[Du,Lu,Bu,lo,Mu]),ed=reactExports.useMemo(()=>({...bt$3,...Ru}),[Ru]);return reactExports.useEffect(()=>{if(!(Array.isArray(Iu)&&Iu.some(ad=>Array.isArray(ad)?ad[0]===rehypeKatex:ad===rehypeKatex)))return;let td=!1;if(Array.isArray(Pu)){let ad=Pu.find(hd=>Array.isArray(hd)?hd[0]===remarkMath:hd===remarkMath);ad&&Array.isArray(ad)&&ad[1]&&(td=ad[1].singleDollarTextMath===!0)}let nd=typeof Au=="string"?Au:"",od=nd.includes("$$"),sd=td&&(/[^$]\$[^$]/.test(nd)||/^\$[^$]/.test(nd)||/[^$]\$$/.test(nd));(od||sd)&&__vitePreload(()=>Promise.resolve({}),[],import.meta.url)},[Iu,Pu,Au]),lo==="static"?jsxRuntimeExports.jsx(C$1.Provider,{value:Xu,children:jsxRuntimeExports.jsx("div",{className:u$2("space-y-4 whitespace-normal",Ou),children:jsxRuntimeExports.jsx(ge$2,{components:ed,rehypePlugins:Iu,remarkPlugins:Pu,...zu,children:Au})})}):jsxRuntimeExports.jsx(C$1.Provider,{value:Xu,children:jsxRuntimeExports.jsx("div",{className:u$2("space-y-4 whitespace-normal",Ou),children:Ju.map((td,nd)=>jsxRuntimeExports.jsx(ju,{components:ed,content:td,index:nd,rehypePlugins:Iu,remarkPlugins:Pu,shouldParseIncompleteMarkdown:$u,...zu},Yu[nd]))})})},(Au,lo)=>Au.children===lo.children&&Au.shikiTheme===lo.shikiTheme&&Au.isAnimating===lo.isAnimating&&Au.mode===lo.mode);_o$1.displayName="Streamdown";var Nt$4=({children:Au,className:lo,minZoom:$u=.5,maxZoom:Ru=3,zoomStep:Iu=.1,showControls:Pu=!0,initialZoom:Ou=1,fullscreen:Du=!1})=>{let Mu=reactExports.useRef(null),Lu=reactExports.useRef(null),[Bu,ju]=reactExports.useState(Ou),[Fu,zu]=reactExports.useState({x:0,y:0}),[Uu,Hu]=reactExports.useState(!1),[Vu,Gu]=reactExports.useState({x:0,y:0}),[Wu,Ku]=reactExports.useState({x:0,y:0}),Ju=reactExports.useCallback(ad=>{ju(hd=>Math.max($u,Math.min(Ru,hd+ad)))},[$u,Ru]),Yu=reactExports.useCallback(()=>{Ju(Iu)},[Ju,Iu]),Xu=reactExports.useCallback(()=>{Ju(-Iu)},[Ju,Iu]),ed=reactExports.useCallback(()=>{ju(Ou),zu({x:0,y:0})},[Ou]),td=reactExports.useCallback(ad=>{ad.preventDefault();let hd=ad.deltaY>0?-Iu:Iu;Ju(hd)},[Ju,Iu]),nd=reactExports.useCallback(ad=>{if(ad.button!==0||ad.isPrimary===!1)return;Hu(!0),Gu({x:ad.clientX,y:ad.clientY}),Ku(Fu);let hd=ad.currentTarget;hd instanceof HTMLElement&&hd.setPointerCapture(ad.pointerId)},[Fu]),od=reactExports.useCallback(ad=>{if(!Uu)return;ad.preventDefault();let hd=ad.clientX-Vu.x,bd=ad.clientY-Vu.y;zu({x:Wu.x+hd,y:Wu.y+bd})},[Uu,Vu,Wu]),sd=reactExports.useCallback(ad=>{Hu(!1);let hd=ad.currentTarget;hd instanceof HTMLElement&&hd.releasePointerCapture(ad.pointerId)},[]);return reactExports.useEffect(()=>{let ad=Mu.current;if(ad)return ad.addEventListener("wheel",td,{passive:!1}),()=>{ad.removeEventListener("wheel",td)}},[td]),reactExports.useEffect(()=>{let ad=Lu.current;if(ad&&Uu)return document.body.style.userSelect="none",ad.addEventListener("pointermove",od,{passive:!1}),ad.addEventListener("pointerup",sd),ad.addEventListener("pointercancel",sd),()=>{document.body.style.userSelect="",ad.removeEventListener("pointermove",od),ad.removeEventListener("pointerup",sd),ad.removeEventListener("pointercancel",sd)}},[Uu,od,sd]),jsxRuntimeExports.jsxs("div",{className:u$2("relative",Du?"h-full w-full":"w-full",lo),ref:Mu,style:{cursor:Uu?"grabbing":"grab"},children:[Pu&&jsxRuntimeExports.jsxs("div",{className:u$2("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",Du?"bottom-4 left-4":"bottom-2 left-2"),children:[jsxRuntimeExports.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:Bu>=Ru,onClick:Yu,title:"Zoom in",type:"button",children:jsxRuntimeExports.jsx(ZoomIn,{size:16})}),jsxRuntimeExports.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:Bu<=$u,onClick:Xu,title:"Zoom out",type:"button",children:jsxRuntimeExports.jsx(ZoomOut,{size:16})}),jsxRuntimeExports.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:ed,title:"Reset zoom and pan",type:"button",children:jsxRuntimeExports.jsx(RotateCcw,{size:16})})]}),jsxRuntimeExports.jsx("div",{className:u$2("origin-center transition-transform duration-150 ease-out",Du&&"flex w-full items-center justify-center"),onPointerDown:nd,ref:Lu,role:"application",style:{transform:`translate(${Fu.x}px, ${Fu.y}px) scale(${Bu})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:Au})]})},Ee$2=({chart:Au,className:lo,config:$u,fullscreen:Ru=!1,showControls:Iu=!0})=>{let[Pu,Ou]=reactExports.useState(null),[Du,Mu]=reactExports.useState(!0),[Lu,Bu]=reactExports.useState(""),[ju,Fu]=reactExports.useState(""),[zu,Uu]=reactExports.useState(0),{mermaid:Hu}=reactExports.useContext(C$1),Vu=Hu?.errorComponent;if(reactExports.useEffect(()=>{(async()=>{try{Ou(null),Mu(!0);let Wu=await _$3($u),Ku=Au.split("").reduce((Xu,ed)=>(Xu<<5)-Xu+ed.charCodeAt(0)|0,0),Ju=`mermaid-${Math.abs(Ku)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:Yu}=await Wu.render(Ju,Au);Bu(Yu),Fu(Yu)}catch(Wu){if(!(ju||Lu)){let Ku=Wu instanceof Error?Wu.message:"Failed to render Mermaid chart";Ou(Ku)}}finally{Mu(!1)}})()},[Au,$u,zu]),Du&&!Lu&&!ju)return jsxRuntimeExports.jsx("div",{className:u$2("my-4 flex justify-center p-4",lo),children:jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[jsxRuntimeExports.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),jsxRuntimeExports.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(Pu&&!Lu&&!ju){let Wu=()=>Uu(Ku=>Ku+1);return Vu?jsxRuntimeExports.jsx(Vu,{chart:Au,error:Pu,retry:Wu}):jsxRuntimeExports.jsxs("div",{className:u$2("rounded-lg border border-red-200 bg-red-50 p-4",lo),children:[jsxRuntimeExports.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",Pu]}),jsxRuntimeExports.jsxs("details",{className:"mt-2",children:[jsxRuntimeExports.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),jsxRuntimeExports.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:Au})]})]})}let Gu=Lu||ju;return jsxRuntimeExports.jsx(Nt$4,{className:u$2(Ru?"h-full w-full overflow-hidden":"my-4 overflow-hidden",lo),fullscreen:Ru,maxZoom:3,minZoom:.5,showControls:Iu,zoomStep:.1,children:jsxRuntimeExports.jsx("div",{"aria-label":"Mermaid chart",className:u$2("flex justify-center",Ru&&"h-full w-full items-center"),dangerouslySetInnerHTML:{__html:Gu},role:"img"})})};function htmlAsText(Au){Au.children&&(Au.children=Au.children.map(lo=>lo.type==="raw"?{type:"text",value:lo.value??""}:(htmlAsText(lo),lo)))}function rehypeHtmlAsText(){return Au=>htmlAsText(Au)}const{raw,...withoutRaw}=Wo$1;if(!raw)throw new Error("Streamdown's rehype plugins have no `raw`: markdownWithoutHtml cannot say what it leaves out.");const REHYPE_PLUGINS_WITHOUT_HTML=[rehypeHtmlAsText,...Object.values(withoutRaw)];function expandCompactMarkdownTableBody(Au){return!Au||!/\|\s*[-:| ]{3,}\|/.test(Au)||!Au.includes("||")?Au:Au.replace(/\|\|/g,`|
3512
3512
  |`)}function normalizeAssistantMarkdown(Au){if(!Au)return Au;let lo=Au.replace(/```(markdown|md)\s*\n([\s\S]*?)```/gi,($u,Ru,Iu)=>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.6.90",
3
+ "version": "1.6.92",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",