nuxt-og-image 2.0.4 → 2.0.6

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.
Files changed (60) hide show
  1. package/dist/client/200.html +2 -2
  2. package/dist/client/404.html +2 -2
  3. package/dist/client/_nuxt/{IconCSS.b4882023.js → IconCSS.acbfc761.js} +1 -1
  4. package/dist/client/_nuxt/{ImageLoader.b68e14b5.js → ImageLoader.45e71895.js} +1 -1
  5. package/dist/client/_nuxt/{entry.fb0efd99.js → entry.f886005d.js} +63 -63
  6. package/dist/client/_nuxt/{error-404.644be599.js → error-404.0a0b8ce2.js} +1 -1
  7. package/dist/client/_nuxt/{error-500.a96819db.js → error-500.20847d33.js} +1 -1
  8. package/dist/client/_nuxt/{index.60e5b582.js → index.0cbeeabd.js} +1 -1
  9. package/dist/client/_nuxt/{options.727a8560.js → options.1070a0ba.js} +1 -1
  10. package/dist/client/_nuxt/{png.42d9c3d5.js → png.e3b1ce6b.js} +1 -1
  11. package/dist/client/_nuxt/shiki.4671d705.js +7 -0
  12. package/dist/client/_nuxt/{svg.c50d59f2.js → svg.26cfe41e.js} +1 -1
  13. package/dist/client/_nuxt/{vnodes.12ed942f.js → vnodes.7d34f085.js} +1 -1
  14. package/dist/client/index.html +2 -2
  15. package/dist/module.json +1 -1
  16. package/dist/module.mjs +45 -31
  17. package/dist/runtime/browserUtil.d.ts +1 -1
  18. package/dist/runtime/cache.d.ts +11 -0
  19. package/dist/runtime/cache.mjs +42 -0
  20. package/dist/runtime/components/OgImage/Cached.d.ts +1 -1
  21. package/dist/runtime/components/OgImage/Dynamic.d.ts +1 -1
  22. package/dist/runtime/components/OgImage/Screenshot.d.ts +1 -1
  23. package/dist/runtime/components/OgImage/Static.d.ts +1 -1
  24. package/dist/runtime/components/OgImage/WithoutCache.d.ts +1 -1
  25. package/dist/runtime/components/OgImage/index.d.ts +1 -1
  26. package/dist/runtime/composables/defineOgImage.d.ts +1 -1
  27. package/dist/runtime/composables/defineOgImage.mjs +2 -2
  28. package/dist/runtime/composables/util.d.ts +1 -1
  29. package/dist/runtime/composables/util.mjs +5 -9
  30. package/dist/runtime/nitro/middleware/og.png.mjs +21 -23
  31. package/dist/runtime/nitro/middleware/playground.mjs +2 -2
  32. package/dist/runtime/nitro/providers/png/resvg-node.d.ts +1 -1
  33. package/dist/runtime/nitro/providers/png/resvg-wasm.d.ts +1 -1
  34. package/dist/runtime/nitro/providers/png/svg2png.d.ts +1 -1
  35. package/dist/runtime/nitro/providers/satori/yoga-wasm.d.ts +1 -1
  36. package/dist/runtime/nitro/renderers/browser.d.ts +1 -1
  37. package/dist/runtime/nitro/renderers/satori/index.d.ts +1 -1
  38. package/dist/runtime/nitro/renderers/satori/plugins/emojis.d.ts +1 -1
  39. package/dist/runtime/nitro/renderers/satori/plugins/encoding.d.ts +1 -1
  40. package/dist/runtime/nitro/renderers/satori/plugins/flex.d.ts +1 -1
  41. package/dist/runtime/nitro/renderers/satori/plugins/imageSrc.d.ts +1 -1
  42. package/dist/runtime/nitro/renderers/satori/plugins/twClasses.d.ts +1 -1
  43. package/dist/runtime/nitro/renderers/satori/utils.d.ts +1 -1
  44. package/dist/runtime/nitro/routes/html.mjs +2 -2
  45. package/dist/runtime/nitro/routes/options.d.ts +1 -1
  46. package/dist/runtime/nitro/routes/options.mjs +8 -8
  47. package/dist/runtime/nitro/routes/svg.mjs +2 -2
  48. package/dist/runtime/nitro/routes/vnode.mjs +2 -2
  49. package/dist/runtime/nitro/utils-pure.d.ts +2 -2
  50. package/dist/runtime/nitro/utils-pure.mjs +9 -3
  51. package/dist/runtime/nitro/utils.d.ts +2 -1
  52. package/dist/runtime/nitro/utils.mjs +33 -34
  53. package/dist/runtime/types.d.ts +69 -0
  54. package/dist/runtime/types.mjs +0 -0
  55. package/package.json +14 -11
  56. package/dist/client/_nuxt/shiki.4d6ce36e.js +0 -7
  57. package/dist/client/options/index.html +0 -7
  58. package/dist/client/png/index.html +0 -7
  59. package/dist/client/svg/index.html +0 -7
  60. package/dist/client/vnodes/index.html +0 -7
@@ -1 +1 @@
1
- import{_ as a,u as n,o as r,c as l,a as e,t as s,b as c,w as d,d as p,e as f,p as x,f as h}from"./entry.fb0efd99.js";const m=t=>(x("data-v-ac41e552"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),_={class:"max-w-520px text-center z-20"},b=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),l("div",u,[g,e("div",_,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,b),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[c(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:d(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-ac41e552"]]);export{z as default};
1
+ import{_ as a,u as n,o as r,c as l,a as e,t as s,b as c,w as d,d as p,e as f,p as x,f as h}from"./entry.f886005d.js";const m=t=>(x("data-v-ac41e552"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),_={class:"max-w-520px text-center z-20"},b=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),l("div",u,[g,e("div",_,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,b),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[c(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:d(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-ac41e552"]]);export{z as default};
@@ -1 +1 @@
1
- import{_ as i,u as a,o as r,c as n,a as e,t as s,p as l,f as d}from"./entry.fb0efd99.js";const c=t=>(l("data-v-35000bea"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(x,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(b,[["__scopeId","data-v-35000bea"]]);export{w as default};
1
+ import{_ as i,u as a,o as r,c as n,a as e,t as s,p as l,f as d}from"./entry.f886005d.js";const c=t=>(l("data-v-35000bea"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(x,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(b,[["__scopeId","data-v-35000bea"]]);export{w as default};
@@ -1 +1 @@
1
- import{g as y,r as u,h as k,i as W,j as t,k as b,l as d,m as B,u as D,n as S,q as F,o as $,c as H,a as I,s as w,v as s,_ as L,x as M,y as z,z as C,A as N,B as T,b as j,C as q}from"./entry.fb0efd99.js";const A=["width","height"],V=y({__name:"IFrameLoader",props:{src:String,aspectRatio:Number,description:String},setup(i){const a=i,l=u(a.src),o=k(),c=u(),n=u(0),r=W(()=>{let e=c.value;e||(e=document.querySelector("#iframe-loader"));const p=Date.now();e.src="";const m=t.value.width,_=t.value.height,f=e.offsetHeight,v=e.offsetWidth,g=f>_?1:f/_,x=v>m?1:v/m,R=x>g?g:x;n.value=0,e.style.opacity="0",e.onload=()=>{e.style.opacity="1",n.value=Date.now()-p},e.src=`${l.value}&scale=${R}&mode=${o.value}`},200);b(()=>{d(()=>a.src,e=>{l.value=e,r()},{immediate:!0}),d([()=>B.value,o],()=>{r()})}),D({bodyAttrs:{onresize:()=>{r()}}});const h=S(()=>a.description.replace("%s",n.value.toString()));return d(h,e=>{F.value=e}),(e,p)=>($(),H("div",{class:"w-full mx-auto h-full justify-center flex",style:w({maxHeight:`${s(t).height}px`,maxWidth:`${s(t).width}px`})},[I("iframe",{id:"iframe-loader",ref_key:"iframe",ref:c,class:"max-h-full",style:w({aspectRatio:i.aspectRatio}),width:s(t).width,height:s(t).height},null,12,A)],4))}});const E=L(V,[["__scopeId","data-v-cc6e66d7"]]),G={class:"flex h-full w-full"},Q=y({__name:"index",setup(i){const a=t.value?.height||630,o=(t.value?.width||1200)/a,c=S(()=>M(`${T.value}/api/og-image-html`,{options:z.value,path:C.value,timestamp:N.value}));return(n,r)=>{const h=E;return $(),H("div",G,[j(h,{src:s(c),"aspect-ratio":o,description:"[HTML] Generated in %sms.",class:"max-h-full",onRefresh:s(q)},null,8,["src","onRefresh"])])}}});export{Q as default};
1
+ import{g as y,r as u,h as k,i as W,j as t,k as b,l as d,m as B,u as D,n as S,q as F,o as $,c as H,a as I,s as w,v as s,_ as L,x as M,y as z,z as C,A as N,B as T,b as j,C as q}from"./entry.f886005d.js";const A=["width","height"],V=y({__name:"IFrameLoader",props:{src:String,aspectRatio:Number,description:String},setup(i){const a=i,l=u(a.src),o=k(),c=u(),n=u(0),r=W(()=>{let e=c.value;e||(e=document.querySelector("#iframe-loader"));const p=Date.now();e.src="";const m=t.value.width,_=t.value.height,f=e.offsetHeight,v=e.offsetWidth,g=f>_?1:f/_,x=v>m?1:v/m,R=x>g?g:x;n.value=0,e.style.opacity="0",e.onload=()=>{e.style.opacity="1",n.value=Date.now()-p},e.src=`${l.value}&scale=${R}&mode=${o.value}`},200);b(()=>{d(()=>a.src,e=>{l.value=e,r()},{immediate:!0}),d([()=>B.value,o],()=>{r()})}),D({bodyAttrs:{onresize:()=>{r()}}});const h=S(()=>a.description.replace("%s",n.value.toString()));return d(h,e=>{F.value=e}),(e,p)=>($(),H("div",{class:"w-full mx-auto h-full justify-center flex",style:w({maxHeight:`${s(t).height}px`,maxWidth:`${s(t).width}px`})},[I("iframe",{id:"iframe-loader",ref_key:"iframe",ref:c,class:"max-h-full",style:w({aspectRatio:i.aspectRatio}),width:s(t).width,height:s(t).height},null,12,A)],4))}});const E=L(V,[["__scopeId","data-v-cc6e66d7"]]),G={class:"flex h-full w-full"},Q=y({__name:"index",setup(i){const a=t.value?.height||630,o=(t.value?.width||1200)/a,c=S(()=>M(`${T.value}/api/og-image-html`,{options:z.value,path:C.value,timestamp:N.value}));return(n,r)=>{const h=E;return $(),H("div",G,[j(h,{src:s(c),"aspect-ratio":o,description:"[HTML] Generated in %sms.",class:"max-h-full",onRefresh:s(q)},null,8,["src","onRefresh"])])}}});export{Q as default};
@@ -1 +1 @@
1
- import{h as t}from"./shiki.4d6ce36e.js";import{g as n,o,c as s,v as e,j as r}from"./entry.fb0efd99.js";const a=["innerHTML"],f=n({__name:"options",setup(i){return(p,c)=>(o(),s("pre",{"of-auto":"","h-full":"","text-sm":"",style:{"white-space":"break-spaces"},innerHTML:e(t)(JSON.stringify(e(r),null,2),"json")},null,8,a))}});export{f as default};
1
+ import{h as t}from"./shiki.4671d705.js";import{g as n,o,c as s,v as e,j as r}from"./entry.f886005d.js";const a=["innerHTML"],f=n({__name:"options",setup(i){return(p,c)=>(o(),s("pre",{"of-auto":"","h-full":"","text-sm":"",style:{"white-space":"break-spaces"},innerHTML:e(t)(JSON.stringify(e(r),null,2),"json")},null,8,a))}});export{f as default};
@@ -1 +1 @@
1
- import{_ as n}from"./ImageLoader.b68e14b5.js";import{g as r,j as e,n as i,x as c,A as _,y as p,D as u,o as m,E as g,v as h}from"./entry.fb0efd99.js";const B=r({__name:"png",setup(l){const t=e.value?.height||630,s=(e.value?.width||1200)/t,a=i(()=>c(`${u.value}/__og_image__/og.png`,{timestamp:_.value,...p.value}));return(v,f)=>{const o=n;return m(),g(o,{src:h(a),"aspect-ratio":s,description:"[PNG] Generated in %sms using Satori & Resvg."},null,8,["src"])}}});export{B as default};
1
+ import{_ as n}from"./ImageLoader.45e71895.js";import{g as r,j as e,n as i,x as c,A as _,y as p,D as u,o as m,E as g,v as h}from"./entry.f886005d.js";const B=r({__name:"png",setup(l){const t=e.value?.height||630,s=(e.value?.width||1200)/t,a=i(()=>c(`${u.value}/__og_image__/og.png`,{timestamp:_.value,...p.value}));return(v,f)=>{const o=n;return m(),g(o,{src:h(a),"aspect-ratio":s,description:"[PNG] Generated in %sms using Satori & Resvg."},null,8,["src"])}}});export{B as default};
@@ -0,0 +1,7 @@
1
+ import{r as Je,h as Qe}from"./entry.f886005d.js";var Ge=typeof globalThis<"u"?globalThis:typeof{}<"u"?{}:typeof global<"u"?global:typeof self<"u"?self:{},Me={exports:{}};(function(e,h){(function(L,o){e.exports=o()})(Ge,()=>{return L={770:function(T,i,k){var b=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(i,"__esModule",{value:!0}),i.setDefaultDebugCall=i.createOnigScanner=i.createOnigString=i.loadWASM=i.OnigScanner=i.OnigString=void 0;const v=b(k(418));let n=null,j=!1;class d{static _utf8ByteLength(y){let m=0;for(let l=0,_=y.length;l<_;l++){const c=y.charCodeAt(l);let t=c,r=!1;if(c>=55296&&c<=56319&&l+1<_){const a=y.charCodeAt(l+1);a>=56320&&a<=57343&&(t=65536+(c-55296<<10)|a-56320,r=!0)}m+=t<=127?1:t<=2047?2:t<=65535?3:4,r&&l++}return m}constructor(y){const m=y.length,l=d._utf8ByteLength(y),_=l!==m,c=_?new Uint32Array(m+1):null;_&&(c[m]=l);const t=_?new Uint32Array(l+1):null;_&&(t[l]=m);const r=new Uint8Array(l);let a=0;for(let s=0;s<m;s++){const p=y.charCodeAt(s);let u=p,f=!1;if(p>=55296&&p<=56319&&s+1<m){const w=y.charCodeAt(s+1);w>=56320&&w<=57343&&(u=65536+(p-55296<<10)|w-56320,f=!0)}_&&(c[s]=a,f&&(c[s+1]=a),u<=127?t[a+0]=s:u<=2047?(t[a+0]=s,t[a+1]=s):u<=65535?(t[a+0]=s,t[a+1]=s,t[a+2]=s):(t[a+0]=s,t[a+1]=s,t[a+2]=s,t[a+3]=s)),u<=127?r[a++]=u:u<=2047?(r[a++]=192|(1984&u)>>>6,r[a++]=128|(63&u)>>>0):u<=65535?(r[a++]=224|(61440&u)>>>12,r[a++]=128|(4032&u)>>>6,r[a++]=128|(63&u)>>>0):(r[a++]=240|(1835008&u)>>>18,r[a++]=128|(258048&u)>>>12,r[a++]=128|(4032&u)>>>6,r[a++]=128|(63&u)>>>0),f&&s++}this.utf16Length=m,this.utf8Length=l,this.utf16Value=y,this.utf8Value=r,this.utf16OffsetToUtf8=c,this.utf8OffsetToUtf16=t}createString(y){const m=y._omalloc(this.utf8Length);return y.HEAPU8.set(this.utf8Value,m),m}}class N{constructor(y){if(this.id=++N.LAST_ID,!n)throw new Error("Must invoke loadWASM first.");this._onigBinding=n,this.content=y;const m=new d(y);this.utf16Length=m.utf16Length,this.utf8Length=m.utf8Length,this.utf16OffsetToUtf8=m.utf16OffsetToUtf8,this.utf8OffsetToUtf16=m.utf8OffsetToUtf16,this.utf8Length<1e4&&!N._sharedPtrInUse?(N._sharedPtr||(N._sharedPtr=n._omalloc(1e4)),N._sharedPtrInUse=!0,n.HEAPU8.set(m.utf8Value,N._sharedPtr),this.ptr=N._sharedPtr):this.ptr=m.createString(n)}convertUtf8OffsetToUtf16(y){return this.utf8OffsetToUtf16?y<0?0:y>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[y]:y}convertUtf16OffsetToUtf8(y){return this.utf16OffsetToUtf8?y<0?0:y>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[y]:y}dispose(){this.ptr===N._sharedPtr?N._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}i.OnigString=N,N.LAST_ID=0,N._sharedPtr=0,N._sharedPtrInUse=!1;class P{constructor(y){if(!n)throw new Error("Must invoke loadWASM first.");const m=[],l=[];for(let r=0,a=y.length;r<a;r++){const s=new d(y[r]);m[r]=s.createString(n),l[r]=s.utf8Length}const _=n._omalloc(4*y.length);n.HEAPU32.set(m,_/4);const c=n._omalloc(4*y.length);n.HEAPU32.set(l,c/4);const t=n._createOnigScanner(_,c,y.length);for(let r=0,a=y.length;r<a;r++)n._ofree(m[r]);n._ofree(c),n._ofree(_),t===0&&function(r){throw new Error(r.UTF8ToString(r._getLastOnigError()))}(n),this._onigBinding=n,this._ptr=t}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(y,m,l){let _=j,c=0;if(typeof l=="number"?(8&l&&(_=!0),c=l):typeof l=="boolean"&&(_=l),typeof y=="string"){y=new N(y);const t=this._findNextMatchSync(y,m,_,c);return y.dispose(),t}return this._findNextMatchSync(y,m,_,c)}_findNextMatchSync(y,m,l,_){const c=this._onigBinding;let t;if(t=l?c._findNextOnigScannerMatchDbg(this._ptr,y.id,y.ptr,y.utf8Length,y.convertUtf16OffsetToUtf8(m),_):c._findNextOnigScannerMatch(this._ptr,y.id,y.ptr,y.utf8Length,y.convertUtf16OffsetToUtf8(m),_),t===0)return null;const r=c.HEAPU32;let a=t/4;const s=r[a++],p=r[a++];let u=[];for(let f=0;f<p;f++){const w=y.convertUtf8OffsetToUtf16(r[a++]),x=y.convertUtf8OffsetToUtf16(r[a++]);u[f]={start:w,end:x,length:x-w}}return{index:s,captureIndices:u}}}i.OnigScanner=P;let g=!1,A=null;i.loadWASM=function(S){if(g)return A;let y,m,l,_;if(g=!0,function(c){return typeof c.instantiator=="function"}(S))y=S.instantiator,m=S.print;else{let c;(function(t){return t.data!==void 0})(S)?(c=S.data,m=S.print):c=S,y=function(t){return typeof Response<"u"&&t instanceof Response}(c)?typeof WebAssembly.instantiateStreaming=="function"?function(t){return r=>WebAssembly.instantiateStreaming(t,r)}(c):function(t){return async r=>{const a=await t.arrayBuffer();return WebAssembly.instantiate(a,r)}}(c):function(t){return r=>WebAssembly.instantiate(t,r)}(c)}return A=new Promise((c,t)=>{l=c,_=t}),function(c,t,r,a){(0,v.default)({print:t,instantiateWasm:(s,p)=>{if(typeof performance>"u"){const u=()=>Date.now();s.env.emscripten_get_now=u,s.wasi_snapshot_preview1.emscripten_get_now=u}return c(s).then(u=>p(u.instance),a),{}}}).then(s=>{n=s,r()})}(y,m,l,_),A},i.createOnigString=function(S){return new N(S)},i.createOnigScanner=function(S){return new P(S)},i.setDefaultDebugCall=function(S){j=S}},418:T=>{var i=(typeof document<"u"&&document.currentScript&&document.currentScript.src,function(k){var b,v,n=(k=k||{})!==void 0?k:{};n.ready=new Promise(function(I,E){b=I,v=E});var j,d=Object.assign({},n),N=!1,P="";function g(I){return n.locateFile?n.locateFile(I,P):P+I}j=function(I){let E;return typeof readbuffer=="function"?new Uint8Array(readbuffer(I)):(E=read(I,"binary"),_(typeof E=="object"),E)},typeof scriptArgs<"u"&&scriptArgs,typeof onig_print<"u"&&(typeof console>"u"&&(console={}),console.log=onig_print,console.warn=console.error=typeof printErr<"u"?printErr:onig_print);var A,S,y=n.print||console.log.bind(console),m=n.printErr||console.warn.bind(console);Object.assign(n,d),d=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(A=n.wasmBinary),n.noExitRuntime,typeof WebAssembly!="object"&&D("no native wasm support detected");var l=!1;function _(I,E){I||D(E)}var c,t,r,a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function s(I,E,X){for(var te=E+X,q=E;I[q]&&!(q>=te);)++q;if(q-E>16&&I.buffer&&a)return a.decode(I.subarray(E,q));for(var U="";E<q;){var Y=I[E++];if(128&Y){var de=63&I[E++];if((224&Y)!=192){var ge=63&I[E++];if((Y=(240&Y)==224?(15&Y)<<12|de<<6|ge:(7&Y)<<18|de<<12|ge<<6|63&I[E++])<65536)U+=String.fromCharCode(Y);else{var we=Y-65536;U+=String.fromCharCode(55296|we>>10,56320|1023&we)}}else U+=String.fromCharCode((31&Y)<<6|de)}else U+=String.fromCharCode(Y)}return U}function p(I,E){return I?s(t,I,E):""}function u(I){c=I,n.HEAP8=new Int8Array(I),n.HEAP16=new Int16Array(I),n.HEAP32=new Int32Array(I),n.HEAPU8=t=new Uint8Array(I),n.HEAPU16=new Uint16Array(I),n.HEAPU32=r=new Uint32Array(I),n.HEAPF32=new Float32Array(I),n.HEAPF64=new Float64Array(I)}n.INITIAL_MEMORY;var f=[],w=[],x=[];function O(){if(n.preRun)for(typeof n.preRun=="function"&&(n.preRun=[n.preRun]);n.preRun.length;)W(n.preRun.shift());se(f)}function B(){se(w)}function H(){if(n.postRun)for(typeof n.postRun=="function"&&(n.postRun=[n.postRun]);n.postRun.length;)V(n.postRun.shift());se(x)}function W(I){f.unshift(I)}function G(I){w.unshift(I)}function V(I){x.unshift(I)}var z=0,C=null;function $(I){z++,n.monitorRunDependencies&&n.monitorRunDependencies(z)}function M(I){if(z--,n.monitorRunDependencies&&n.monitorRunDependencies(z),z==0&&C){var E=C;C=null,E()}}function D(I){n.onAbort&&n.onAbort(I),m(I="Aborted("+I+")"),l=!0,I+=". Build with -sASSERTIONS for more info.";var E=new WebAssembly.RuntimeError(I);throw v(E),E}var Q,R,J="data:application/octet-stream;base64,";function F(I){return I.startsWith(J)}function ee(I){try{if(I==Q&&A)return new Uint8Array(A);if(j)return j(I);throw"both async and sync fetching of the wasm failed"}catch(E){D(E)}}function oe(){return A||!N||typeof fetch!="function"?Promise.resolve().then(function(){return ee(Q)}):fetch(Q,{credentials:"same-origin"}).then(function(I){if(!I.ok)throw"failed to load wasm binary file at '"+Q+"'";return I.arrayBuffer()}).catch(function(){return ee(Q)})}function ye(){var I={env:pe,wasi_snapshot_preview1:pe};function E(q,U){var Y=q.exports;n.asm=Y,u((S=n.asm.memory).buffer),n.asm.__indirect_function_table,G(n.asm.__wasm_call_ctors),M()}function X(q){E(q.instance)}function te(q){return oe().then(function(U){return WebAssembly.instantiate(U,I)}).then(function(U){return U}).then(q,function(U){m("failed to asynchronously prepare wasm: "+U),D(U)})}if($(),n.instantiateWasm)try{return n.instantiateWasm(I,E)}catch(q){m("Module.instantiateWasm callback failed with error: "+q),v(q)}return(A||typeof WebAssembly.instantiateStreaming!="function"||F(Q)||typeof fetch!="function"?te(X):fetch(Q,{credentials:"same-origin"}).then(function(q){return WebAssembly.instantiateStreaming(q,I).then(X,function(U){return m("wasm streaming compile failed: "+U),m("falling back to ArrayBuffer instantiation"),te(X)})})).catch(v),{}}function se(I){for(;I.length>0;)I.shift()(n)}function ae(I,E,X){t.copyWithin(I,E,E+X)}function he(I){try{return S.grow(I-c.byteLength+65535>>>16),u(S.buffer),1}catch{}}function ce(I){var E,X=t.length,te=2147483648;if((I>>>=0)>te)return!1;for(var q=1;q<=4;q*=2){var U=X*(1+.2/q);if(U=Math.min(U,I+100663296),he(Math.min(te,(E=Math.max(I,U))+(65536-E%65536)%65536)))return!0}return!1}F(Q="onig.wasm")||(Q=g(Q)),R=typeof dateNow<"u"?dateNow:()=>performance.now();var le=[null,[],[]];function ue(I,E){var X=le[I];E===0||E===10?((I===1?y:m)(s(X,0)),X.length=0):X.push(E)}function re(I,E,X,te){for(var q=0,U=0;U<X;U++){var Y=r[E>>2],de=r[E+4>>2];E+=8;for(var ge=0;ge<de;ge++)ue(I,t[Y+ge]);q+=de}return r[te>>2]=q,0}var Z,pe={emscripten_get_now:R,emscripten_memcpy_big:ae,emscripten_resize_heap:ce,fd_write:re};function me(I){function E(){Z||(Z=!0,n.calledRun=!0,l||(B(),b(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),H()))}z>0||(O(),z>0||(n.setStatus?(n.setStatus("Running..."),setTimeout(function(){setTimeout(function(){n.setStatus("")},1),E()},1)):E()))}if(ye(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.__wasm_call_ctors).apply(null,arguments)},n.___errno_location=function(){return(n.___errno_location=n.asm.__errno_location).apply(null,arguments)},n._omalloc=function(){return(n._omalloc=n.asm.omalloc).apply(null,arguments)},n._ofree=function(){return(n._ofree=n.asm.ofree).apply(null,arguments)},n._getLastOnigError=function(){return(n._getLastOnigError=n.asm.getLastOnigError).apply(null,arguments)},n._createOnigScanner=function(){return(n._createOnigScanner=n.asm.createOnigScanner).apply(null,arguments)},n._freeOnigScanner=function(){return(n._freeOnigScanner=n.asm.freeOnigScanner).apply(null,arguments)},n._findNextOnigScannerMatch=function(){return(n._findNextOnigScannerMatch=n.asm.findNextOnigScannerMatch).apply(null,arguments)},n._findNextOnigScannerMatchDbg=function(){return(n._findNextOnigScannerMatchDbg=n.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},n.stackSave=function(){return(n.stackSave=n.asm.stackSave).apply(null,arguments)},n.stackRestore=function(){return(n.stackRestore=n.asm.stackRestore).apply(null,arguments)},n.stackAlloc=function(){return(n.stackAlloc=n.asm.stackAlloc).apply(null,arguments)},n.dynCall_jiji=function(){return(n.dynCall_jiji=n.asm.dynCall_jiji).apply(null,arguments)},n.UTF8ToString=p,C=function I(){Z||me(),Z||(C=I)},n.preInit)for(typeof n.preInit=="function"&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return me(),k.ready});T.exports=i}},o={},function T(i){var k=o[i];if(k!==void 0)return k.exports;var b=o[i]={exports:{}};return L[i].call(b.exports,b,b.exports,T),b.exports}(770);var L,o})})(Me);var ke=Me.exports,De={exports:{}};(function(e,h){(function(L,o){e.exports=o()})(Ge,function(){return(()=>{var L={350:(T,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UseOnigurumaFindOptions=i.DebugFlags=void 0,i.DebugFlags={InDebugMode:typeof process<"u"&&!1},i.UseOnigurumaFindOptions=!1},36:(T,i)=>{var k;Object.defineProperty(i,"__esModule",{value:!0}),i.toOptionalTokenType=i.EncodedTokenAttributes=void 0,(k=i.EncodedTokenAttributes||(i.EncodedTokenAttributes={})).toBinaryStr=function(b){let v=b.toString(2);for(;v.length<32;)v="0"+v;return v},k.print=function(b){const v=k.getLanguageId(b),n=k.getTokenType(b),j=k.getFontStyle(b),d=k.getForeground(b),N=k.getBackground(b);console.log({languageId:v,tokenType:n,fontStyle:j,foreground:d,background:N})},k.getLanguageId=function(b){return(255&b)>>>0},k.getTokenType=function(b){return(768&b)>>>8},k.containsBalancedBrackets=function(b){return(1024&b)!=0},k.getFontStyle=function(b){return(30720&b)>>>11},k.getForeground=function(b){return(16744448&b)>>>15},k.getBackground=function(b){return(4278190080&b)>>>24},k.set=function(b,v,n,j,d,N,P){let g=k.getLanguageId(b),A=k.getTokenType(b),S=k.containsBalancedBrackets(b)?1:0,y=k.getFontStyle(b),m=k.getForeground(b),l=k.getBackground(b);return v!==0&&(g=v),n!==8&&(A=n),j!==null&&(S=j?1:0),d!==-1&&(y=d),N!==0&&(m=N),P!==0&&(l=P),(g<<0|A<<8|S<<10|y<<11|m<<15|l<<24)>>>0},i.toOptionalTokenType=function(b){return b}},996:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BasicScopeAttributesProvider=i.BasicScopeAttributes=void 0;const b=k(878);class v{constructor(N,P){this.languageId=N,this.tokenType=P}}i.BasicScopeAttributes=v;class n{constructor(N,P){this._getBasicScopeAttributes=new b.CachedFn(g=>{const A=this._scopeToLanguage(g),S=this._toStandardTokenType(g);return new v(A,S)}),this._defaultAttributes=new v(N,8),this._embeddedLanguagesMatcher=new j(Object.entries(P||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(N){return N===null?n._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(N)}_scopeToLanguage(N){return this._embeddedLanguagesMatcher.match(N)||0}_toStandardTokenType(N){const P=N.match(n.STANDARD_TOKEN_TYPE_REGEXP);if(!P)return 8;switch(P[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}i.BasicScopeAttributesProvider=n,n._NULL_SCOPE_METADATA=new v(0,0),n.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class j{constructor(N){if(N.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(N);const P=N.map(([g,A])=>b.escapeRegExpCharacters(g));P.sort(),P.reverse(),this.scopesRegExp=new RegExp(`^((${P.join(")|(")}))($|\\.)`,"")}}match(N){if(!this.scopesRegExp)return;const P=N.match(this.scopesRegExp);return P?this.values.get(P[1]):void 0}}},947:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LineTokens=i.BalancedBracketSelectors=i.StateStack=i.AttributedScopeStack=i.Grammar=i.createGrammar=void 0;const b=k(350),v=k(36),n=k(736),j=k(44),d=k(792),N=k(583),P=k(878),g=k(996),A=k(47);function S(a,s,p,u,f){const w=n.createMatchers(s,y),x=d.RuleFactory.getCompiledRuleId(p,u,f.repository);for(const O of w)a.push({debugSelector:s,matcher:O.matcher,ruleId:x,grammar:f,priority:O.priority})}function y(a,s){if(s.length<a.length)return!1;let p=0;return a.every(u=>{for(let f=p;f<s.length;f++)if(m(s[f],u))return p=f+1,!0;return!1})}function m(a,s){if(!a)return!1;if(a===s)return!0;const p=s.length;return a.length>p&&a.substr(0,p)===s&&a[p]==="."}i.createGrammar=function(a,s,p,u,f,w,x,O){return new l(a,s,p,u,f,w,x,O)};class l{constructor(s,p,u,f,w,x,O,B){if(this._rootScopeName=s,this.balancedBracketSelectors=x,this._onigLib=B,this._basicScopeAttributesProvider=new g.BasicScopeAttributesProvider(u,f),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=O,this._grammar=_(p,null),this._injections=null,this._tokenTypeMatchers=[],w)for(const H of Object.keys(w)){const W=n.createMatchers(H,y);for(const G of W)this._tokenTypeMatchers.push({matcher:G.matcher,type:w[H]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const s of this._ruleId2desc)s&&s.dispose()}createOnigScanner(s){return this._onigLib.createOnigScanner(s)}createOnigString(s){return this._onigLib.createOnigString(s)}getMetadataForScope(s){return this._basicScopeAttributesProvider.getBasicScopeAttributes(s)}_collectInjections(){const s=[],p=this._rootScopeName,u=(f=>f===this._rootScopeName?this._grammar:this.getExternalGrammar(f))(p);if(u){const f=u.injections;if(f)for(let x in f)S(s,x,f[x],this,u);const w=this._grammarRepository.injections(p);w&&w.forEach(x=>{const O=this.getExternalGrammar(x);if(O){const B=O.injectionSelector;B&&S(s,B,O,this,O)}})}return s.sort((f,w)=>f.priority-w.priority),s}getInjections(){if(this._injections===null&&(this._injections=this._collectInjections(),b.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const s of this._injections)console.log(` - ${s.debugSelector}`)}return this._injections}registerRule(s){const p=++this._lastRuleId,u=s(d.ruleIdFromNumber(p));return this._ruleId2desc[p]=u,u}getRule(s){return this._ruleId2desc[d.ruleIdToNumber(s)]}getExternalGrammar(s,p){if(this._includedGrammars[s])return this._includedGrammars[s];if(this._grammarRepository){const u=this._grammarRepository.lookup(s);if(u)return this._includedGrammars[s]=_(u,p&&p.$base),this._includedGrammars[s]}}tokenizeLine(s,p,u=0){const f=this._tokenize(s,p,!1,u);return{tokens:f.lineTokens.getResult(f.ruleStack,f.lineLength),ruleStack:f.ruleStack,stoppedEarly:f.stoppedEarly}}tokenizeLine2(s,p,u=0){const f=this._tokenize(s,p,!0,u);return{tokens:f.lineTokens.getBinaryResult(f.ruleStack,f.lineLength),ruleStack:f.ruleStack,stoppedEarly:f.stoppedEarly}}_tokenize(s,p,u,f){let w;if(this._rootId===-1&&(this._rootId=d.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),p&&p!==t.NULL)w=!1,p.reset();else{w=!0;const W=this._basicScopeAttributesProvider.getDefaultAttributes(),G=this.themeProvider.getDefaults(),V=v.EncodedTokenAttributes.set(0,W.languageId,W.tokenType,null,G.fontStyle,G.foregroundId,G.backgroundId),z=this.getRule(this._rootId).getName(null,null);let C;C=z?c.createRootAndLookUpScopeName(z,V,this):c.createRoot("unknown",V),p=new t(null,this._rootId,-1,-1,!1,null,C,C)}s+=`
2
+ `;const x=this.createOnigString(s),O=x.content.length,B=new r(u,s,this._tokenTypeMatchers,this.balancedBracketSelectors),H=A._tokenizeString(this,x,w,0,p,B,!0,f);return j.disposeOnigString(x),{lineLength:O,lineTokens:B,ruleStack:H.stack,stoppedEarly:H.stoppedEarly}}}function _(a,s){return(a=P.clone(a)).repository=a.repository||{},a.repository.$self={$vscodeTextmateLocation:a.$vscodeTextmateLocation,patterns:a.patterns,name:a.scopeName},a.repository.$base=s||a.repository.$self,a}i.Grammar=l;class c{constructor(s,p,u){this.parent=s,this.scopePath=p,this.tokenAttributes=u}static createRoot(s,p){return new c(null,new N.ScopeStack(null,s),p)}static createRootAndLookUpScopeName(s,p,u){const f=u.getMetadataForScope(s),w=new N.ScopeStack(null,s),x=u.themeProvider.themeMatch(w),O=c.mergeAttributes(p,f,x);return new c(null,w,O)}get scopeName(){return this.scopePath.scopeName}equals(s){return c._equals(this,s)}static _equals(s,p){for(;;){if(s===p||!s&&!p)return!0;if(!s||!p||s.scopeName!==p.scopeName||s.tokenAttributes!==p.tokenAttributes)return!1;s=s.parent,p=p.parent}}static mergeAttributes(s,p,u){let f=-1,w=0,x=0;return u!==null&&(f=u.fontStyle,w=u.foregroundId,x=u.backgroundId),v.EncodedTokenAttributes.set(s,p.languageId,p.tokenType,null,f,w,x)}pushAttributed(s,p){if(s===null)return this;if(s.indexOf(" ")===-1)return c._pushAttributed(this,s,p);const u=s.split(/ /g);let f=this;for(const w of u)f=c._pushAttributed(f,w,p);return f}static _pushAttributed(s,p,u){const f=u.getMetadataForScope(p),w=s.scopePath.push(p),x=u.themeProvider.themeMatch(w),O=c.mergeAttributes(s.tokenAttributes,f,x);return new c(s,w,O)}getScopeNames(){return this.scopePath.getSegments()}}i.AttributedScopeStack=c;class t{constructor(s,p,u,f,w,x,O,B){this.parent=s,this.ruleId=p,this.beginRuleCapturedEOL=w,this.endRule=x,this.nameScopesList=O,this.contentNameScopesList=B,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=u,this._anchorPos=f}equals(s){return s!==null&&t._equals(this,s)}static _equals(s,p){return s===p||!!this._structuralEquals(s,p)&&s.contentNameScopesList.equals(p.contentNameScopesList)}static _structuralEquals(s,p){for(;;){if(s===p||!s&&!p)return!0;if(!s||!p||s.depth!==p.depth||s.ruleId!==p.ruleId||s.endRule!==p.endRule)return!1;s=s.parent,p=p.parent}}clone(){return this}static _reset(s){for(;s;)s._enterPos=-1,s._anchorPos=-1,s=s.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(s,p,u,f,w,x,O){return new t(this,s,p,u,f,w,x,O)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(s){return s.getRule(this.ruleId)}toString(){const s=[];return this._writeString(s,0),"["+s.join(",")+"]"}_writeString(s,p){return this.parent&&(p=this.parent._writeString(s,p)),s[p++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,p}withContentNameScopesList(s){return this.contentNameScopesList===s?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,s)}withEndRule(s){return this.endRule===s?this:new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,s,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(s){let p=this;for(;p&&p._enterPos===s._enterPos;){if(p.ruleId===s.ruleId)return!0;p=p.parent}return!1}}i.StateStack=t,t.NULL=new t(null,0,0,0,!1,null,null,null),i.BalancedBracketSelectors=class{constructor(a,s){this.allowAny=!1,this.balancedBracketScopes=a.flatMap(p=>p==="*"?(this.allowAny=!0,[]):n.createMatchers(p,y).map(u=>u.matcher)),this.unbalancedBracketScopes=s.flatMap(p=>n.createMatchers(p,y).map(u=>u.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(a){for(const s of this.unbalancedBracketScopes)if(s(a))return!1;for(const s of this.balancedBracketScopes)if(s(a))return!0;return this.allowAny}};class r{constructor(s,p,u,f){this.balancedBracketSelectors=f,this._emitBinaryTokens=s,this._tokenTypeOverrides=u,b.DebugFlags.InDebugMode?this._lineText=p:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(s,p){this.produceFromScopes(s.contentNameScopesList,p)}produceFromScopes(s,p){if(this._lastTokenEndIndex>=p)return;if(this._emitBinaryTokens){let f=s.tokenAttributes,w=!1;if(this.balancedBracketSelectors?.matchesAlways&&(w=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const x=s.getScopeNames();for(const O of this._tokenTypeOverrides)O.matcher(x)&&(f=v.EncodedTokenAttributes.set(f,0,v.toOptionalTokenType(O.type),null,-1,0,0));this.balancedBracketSelectors&&(w=this.balancedBracketSelectors.match(x))}if(w&&(f=v.EncodedTokenAttributes.set(f,0,8,w,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===f)return void(this._lastTokenEndIndex=p);if(b.DebugFlags.InDebugMode){const x=s.getScopeNames();console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,p).replace(/\n$/,"\\n")+"|");for(let O=0;O<x.length;O++)console.log(" * "+x[O])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(f),void(this._lastTokenEndIndex=p)}const u=s.getScopeNames();if(b.DebugFlags.InDebugMode){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,p).replace(/\n$/,"\\n")+"|");for(let f=0;f<u.length;f++)console.log(" * "+u[f])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:p,scopes:u}),this._lastTokenEndIndex=p}getResult(s,p){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===p-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(s,p),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(s,p){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===p-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(s,p),this._binaryTokens[this._binaryTokens.length-2]=0);const u=new Uint32Array(this._binaryTokens.length);for(let f=0,w=this._binaryTokens.length;f<w;f++)u[f]=this._binaryTokens[f];return u}}i.LineTokens=r},965:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.parseInclude=i.TopLevelRepositoryReference=i.TopLevelReference=i.RelativeReference=i.SelfReference=i.BaseReference=i.ScopeDependencyProcessor=i.ExternalReferenceCollector=i.TopLevelRepositoryRuleReference=i.TopLevelRuleReference=void 0;const b=k(878);class v{constructor(t){this.scopeName=t}toKey(){return this.scopeName}}i.TopLevelRuleReference=v;class n{constructor(t,r){this.scopeName=t,this.ruleName=r}toKey(){return`${this.scopeName}#${this.ruleName}`}}i.TopLevelRepositoryRuleReference=n;class j{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(t){const r=t.toKey();this._seenReferenceKeys.has(r)||(this._seenReferenceKeys.add(r),this._references.push(t))}}function d(c,t,r,a){const s=r.lookup(c.scopeName);if(!s){if(c.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const p=r.lookup(t);c instanceof v?P({baseGrammar:p,selfGrammar:s},a):N(c.ruleName,{baseGrammar:p,selfGrammar:s,repository:s.repository},a);const u=r.injections(c.scopeName);if(u)for(const f of u)a.add(new v(f))}function N(c,t,r){t.repository&&t.repository[c]&&g([t.repository[c]],t,r)}function P(c,t){c.selfGrammar.patterns&&Array.isArray(c.selfGrammar.patterns)&&g(c.selfGrammar.patterns,{...c,repository:c.selfGrammar.repository},t),c.selfGrammar.injections&&g(Object.values(c.selfGrammar.injections),{...c,repository:c.selfGrammar.repository},t)}function g(c,t,r){for(const a of c){if(r.visitedRule.has(a))continue;r.visitedRule.add(a);const s=a.repository?b.mergeObjects({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&g(a.patterns,{...t,repository:s},r);const p=a.include;if(!p)continue;const u=_(p);switch(u.kind){case 0:P({...t,selfGrammar:t.baseGrammar},r);break;case 1:P(t,r);break;case 2:N(u.ruleName,{...t,repository:s},r);break;case 3:case 4:const f=u.scopeName===t.selfGrammar.scopeName?t.selfGrammar:u.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(f){const w={baseGrammar:t.baseGrammar,selfGrammar:f,repository:s};u.kind===4?N(u.ruleName,w,r):P(w,r)}else u.kind===4?r.add(new n(u.scopeName,u.ruleName)):r.add(new v(u.scopeName))}}}i.ExternalReferenceCollector=j,i.ScopeDependencyProcessor=class{constructor(c,t){this.repo=c,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new v(this.initialScopeName)]}processQueue(){const c=this.Q;this.Q=[];const t=new j;for(const r of c)d(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof v){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};class A{constructor(){this.kind=0}}i.BaseReference=A;class S{constructor(){this.kind=1}}i.SelfReference=S;class y{constructor(t){this.ruleName=t,this.kind=2}}i.RelativeReference=y;class m{constructor(t){this.scopeName=t,this.kind=3}}i.TopLevelReference=m;class l{constructor(t,r){this.scopeName=t,this.ruleName=r,this.kind=4}}function _(c){if(c==="$base")return new A;if(c==="$self")return new S;const t=c.indexOf("#");if(t===-1)return new m(c);if(t===0)return new y(c.substring(1));{const r=c.substring(0,t),a=c.substring(t+1);return new l(r,a)}}i.TopLevelRepositoryReference=l,i.parseInclude=_},391:function(T,i,k){var b=this&&this.__createBinding||(Object.create?function(n,j,d,N){N===void 0&&(N=d),Object.defineProperty(n,N,{enumerable:!0,get:function(){return j[d]}})}:function(n,j,d,N){N===void 0&&(N=d),n[N]=j[d]}),v=this&&this.__exportStar||function(n,j){for(var d in n)d==="default"||Object.prototype.hasOwnProperty.call(j,d)||b(j,n,d)};Object.defineProperty(i,"__esModule",{value:!0}),v(k(947),i)},47:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LocalStackElement=i._tokenizeString=void 0;const b=k(350),v=k(44),n=k(792),j=k(878);class d{constructor(l,_){this.stack=l,this.stoppedEarly=_}}function N(m,l,_,c,t,r,a,s){const p=l.content.length;let u=!1,f=-1;if(a){const O=function(B,H,W,G,V,z){let C=V.beginRuleCapturedEOL?0:-1;const $=[];for(let M=V;M;M=M.pop()){const D=M.getRule(B);D instanceof n.BeginWhileRule&&$.push({rule:D,stack:M})}for(let M=$.pop();M;M=$.pop()){const{ruleScanner:D,findOptions:Q}=g(M.rule,B,M.stack.endRule,W,G===C),R=D.findNextMatchSync(H,G,Q);if(b.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(D.toString())),!R){b.DebugFlags.InDebugMode&&console.log(" popping "+M.rule.debugName+" - "+M.rule.debugWhileRegExp),V=M.stack.pop();break}if(R.ruleId!==n.whileRuleId){V=M.stack.pop();break}R.captureIndices&&R.captureIndices.length&&(z.produce(M.stack,R.captureIndices[0].start),S(B,H,W,M.stack,z,M.rule.whileCaptures,R.captureIndices),z.produce(M.stack,R.captureIndices[0].end),C=R.captureIndices[0].end,R.captureIndices[0].end>G&&(G=R.captureIndices[0].end,W=!1))}return{stack:V,linePos:G,anchorPosition:C,isFirstLine:W}}(m,l,_,c,t,r);t=O.stack,c=O.linePos,_=O.isFirstLine,f=O.anchorPosition}const w=Date.now();for(;!u;){if(s!==0&&Date.now()-w>s)return new d(t,!0);x()}return new d(t,!1);function x(){b.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${c}: |${l.content.substr(c).replace(/\n$/,"\\n")}|`));const O=function(G,V,z,C,$,M){const D=function(ee,oe,ye,se,ae,he){const ce=ae.getRule(ee),{ruleScanner:le,findOptions:ue}=P(ce,ee,ae.endRule,ye,se===he);let re=0;b.DebugFlags.InDebugMode&&(re=j.performanceNow());const Z=le.findNextMatchSync(oe,se,ue);if(b.DebugFlags.InDebugMode){const pe=j.performanceNow()-re;pe>5&&console.warn(`Rule ${ce.debugName} (${ce.id}) matching took ${pe} against '${oe}'`),console.log(` scanning for (linePos: ${se}, anchorPosition: ${he})`),console.log(le.toString()),Z&&console.log(`matched rule id: ${Z.ruleId} from ${Z.captureIndices[0].start} to ${Z.captureIndices[0].end}`)}return Z?{captureIndices:Z.captureIndices,matchedRuleId:Z.ruleId}:null}(G,V,z,C,$,M),Q=G.getInjections();if(Q.length===0)return D;const R=function(ee,oe,ye,se,ae,he,ce){let le,ue=Number.MAX_VALUE,re=null,Z=0;const pe=he.contentNameScopesList.getScopeNames();for(let me=0,I=ee.length;me<I;me++){const E=ee[me];if(!E.matcher(pe))continue;const X=oe.getRule(E.ruleId),{ruleScanner:te,findOptions:q}=P(X,oe,null,se,ae===ce),U=te.findNextMatchSync(ye,ae,q);if(!U)continue;b.DebugFlags.InDebugMode&&(console.log(` matched injection: ${E.debugSelector}`),console.log(te.toString()));const Y=U.captureIndices[0].start;if(!(Y>=ue)&&(ue=Y,re=U.captureIndices,le=U.ruleId,Z=E.priority,ue===ae))break}return re?{priorityMatch:Z===-1,captureIndices:re,matchedRuleId:le}:null}(Q,G,V,z,C,$,M);if(!R)return D;if(!D)return R;const J=D.captureIndices[0].start,F=R.captureIndices[0].start;return F<J||R.priorityMatch&&F===J?R:D}(m,l,_,c,t,f);if(!O)return b.DebugFlags.InDebugMode&&console.log(" no more matches."),r.produce(t,p),void(u=!0);const B=O.captureIndices,H=O.matchedRuleId,W=!!(B&&B.length>0)&&B[0].end>c;if(H===n.endRuleId){const G=t.getRule(m);b.DebugFlags.InDebugMode&&console.log(" popping "+G.debugName+" - "+G.debugEndRegExp),r.produce(t,B[0].start),t=t.withContentNameScopesList(t.nameScopesList),S(m,l,_,t,r,G.endCaptures,B),r.produce(t,B[0].end);const V=t;if(t=t.parent,f=V.getAnchorPos(),!W&&V.getEnterPos()===c)return b.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),t=V,r.produce(t,p),void(u=!0)}else{const G=m.getRule(H);r.produce(t,B[0].start);const V=t,z=G.getName(l.content,B),C=t.contentNameScopesList.pushAttributed(z,m);if(t=t.push(H,c,f,B[0].end===p,null,C,C),G instanceof n.BeginEndRule){const $=G;b.DebugFlags.InDebugMode&&console.log(" pushing "+$.debugName+" - "+$.debugBeginRegExp),S(m,l,_,t,r,$.beginCaptures,B),r.produce(t,B[0].end),f=B[0].end;const M=$.getContentName(l.content,B),D=C.pushAttributed(M,m);if(t=t.withContentNameScopesList(D),$.endHasBackReferences&&(t=t.withEndRule($.getEndWithResolvedBackReferences(l.content,B))),!W&&V.hasSameRuleAs(t))return b.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),t=t.pop(),r.produce(t,p),void(u=!0)}else if(G instanceof n.BeginWhileRule){const $=G;b.DebugFlags.InDebugMode&&console.log(" pushing "+$.debugName),S(m,l,_,t,r,$.beginCaptures,B),r.produce(t,B[0].end),f=B[0].end;const M=$.getContentName(l.content,B),D=C.pushAttributed(M,m);if(t=t.withContentNameScopesList(D),$.whileHasBackReferences&&(t=t.withEndRule($.getWhileWithResolvedBackReferences(l.content,B))),!W&&V.hasSameRuleAs(t))return b.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),t=t.pop(),r.produce(t,p),void(u=!0)}else{const $=G;if(b.DebugFlags.InDebugMode&&console.log(" matched "+$.debugName+" - "+$.debugMatchRegExp),S(m,l,_,t,r,$.captures,B),r.produce(t,B[0].end),t=t.pop(),!W)return b.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),t=t.safePop(),r.produce(t,p),void(u=!0)}}B[0].end>c&&(c=B[0].end,_=!1)}}function P(m,l,_,c,t){return b.UseOnigurumaFindOptions?{ruleScanner:m.compile(l,_),findOptions:A(c,t)}:{ruleScanner:m.compileAG(l,_,c,t),findOptions:0}}function g(m,l,_,c,t){return b.UseOnigurumaFindOptions?{ruleScanner:m.compileWhile(l,_),findOptions:A(c,t)}:{ruleScanner:m.compileWhileAG(l,_,c,t),findOptions:0}}function A(m,l){let _=0;return m||(_|=1),l||(_|=4),_}function S(m,l,_,c,t,r,a){if(r.length===0)return;const s=l.content,p=Math.min(r.length,a.length),u=[],f=a[0].end;for(let w=0;w<p;w++){const x=r[w];if(x===null)continue;const O=a[w];if(O.length===0)continue;if(O.start>f)break;for(;u.length>0&&u[u.length-1].endPos<=O.start;)t.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?t.produceFromScopes(u[u.length-1].scopes,O.start):t.produce(c,O.start),x.retokenizeCapturedWithRuleId){const H=x.getName(s,a),W=c.contentNameScopesList.pushAttributed(H,m),G=x.getContentName(s,a),V=W.pushAttributed(G,m),z=c.push(x.retokenizeCapturedWithRuleId,O.start,-1,!1,null,W,V),C=m.createOnigString(s.substring(0,O.end));N(m,C,_&&O.start===0,O.start,z,t,!1,0),v.disposeOnigString(C);continue}const B=x.getName(s,a);if(B!==null){const H=(u.length>0?u[u.length-1].scopes:c.contentNameScopesList).pushAttributed(B,m);u.push(new y(H,O.end))}}for(;u.length>0;)t.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}i._tokenizeString=N;class y{constructor(l,_){this.scopes=l,this.endPos=_}}i.LocalStackElement=y},974:(T,i)=>{function k(j,d){throw new Error("Near offset "+j.pos+": "+d+" ~~~"+j.source.substr(j.pos,50)+"~~~")}Object.defineProperty(i,"__esModule",{value:!0}),i.parseJSON=void 0,i.parseJSON=function(j,d,N){let P=new b(j),g=new v,A=0,S=null,y=[],m=[];function l(){y.push(A),m.push(S)}function _(){A=y.pop(),S=m.pop()}function c(t){k(P,t)}for(;n(P,g);){if(A===0){if(S!==null&&c("too many constructs in root"),g.type===3){S={},N&&(S.$vscodeTextmateLocation=g.toLocation(d)),l(),A=1;continue}if(g.type===2){S=[],l(),A=4;continue}c("unexpected token in root")}if(A===2){if(g.type===5){_();continue}if(g.type===7){A=3;continue}c("expected , or }")}if(A===1||A===3){if(A===1&&g.type===5){_();continue}if(g.type===1){let t=g.value;if(n(P,g)&&g.type===6||c("expected colon"),n(P,g)||c("expected value"),A=2,g.type===1){S[t]=g.value;continue}if(g.type===8){S[t]=null;continue}if(g.type===9){S[t]=!0;continue}if(g.type===10){S[t]=!1;continue}if(g.type===11){S[t]=parseFloat(g.value);continue}if(g.type===2){let r=[];S[t]=r,l(),A=4,S=r;continue}if(g.type===3){let r={};N&&(r.$vscodeTextmateLocation=g.toLocation(d)),S[t]=r,l(),A=1,S=r;continue}}c("unexpected token in dict")}if(A===5){if(g.type===4){_();continue}if(g.type===7){A=6;continue}c("expected , or ]")}if(A===4||A===6){if(A===4&&g.type===4){_();continue}if(A=5,g.type===1){S.push(g.value);continue}if(g.type===8){S.push(null);continue}if(g.type===9){S.push(!0);continue}if(g.type===10){S.push(!1);continue}if(g.type===11){S.push(parseFloat(g.value));continue}if(g.type===2){let t=[];S.push(t),l(),A=4,S=t;continue}if(g.type===3){let t={};N&&(t.$vscodeTextmateLocation=g.toLocation(d)),S.push(t),l(),A=1,S=t;continue}c("unexpected token in array")}c("unknown state")}return m.length!==0&&c("unclosed constructs"),S};class b{constructor(d){this.source=d,this.pos=0,this.len=d.length,this.line=1,this.char=0}}class v{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(d){return{filename:d,line:this.line,char:this.char}}}function n(j,d){d.value=null,d.type=0,d.offset=-1,d.len=-1,d.line=-1,d.char=-1;let N,P=j.source,g=j.pos,A=j.len,S=j.line,y=j.char;for(;;){if(g>=A)return!1;if(N=P.charCodeAt(g),N!==32&&N!==9&&N!==13){if(N!==10)break;g++,S++,y=0}else g++,y++}if(d.offset=g,d.line=S,d.char=y,N===34){for(d.type=1,g++,y++;;){if(g>=A)return!1;if(N=P.charCodeAt(g),g++,y++,N!==92){if(N===34)break}else g++,y++}d.value=P.substring(d.offset+1,g-1).replace(/\\u([0-9A-Fa-f]{4})/g,(m,l)=>String.fromCodePoint(parseInt(l,16))).replace(/\\(.)/g,(m,l)=>{switch(l){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return`
3
+ `;case"r":return"\r";case"t":return" ";default:k(j,"invalid escape sequence")}throw new Error("unreachable")})}else if(N===91)d.type=2,g++,y++;else if(N===123)d.type=3,g++,y++;else if(N===93)d.type=4,g++,y++;else if(N===125)d.type=5,g++,y++;else if(N===58)d.type=6,g++,y++;else if(N===44)d.type=7,g++,y++;else if(N===110){if(d.type=8,g++,y++,N=P.charCodeAt(g),N!==117||(g++,y++,N=P.charCodeAt(g),N!==108)||(g++,y++,N=P.charCodeAt(g),N!==108))return!1;g++,y++}else if(N===116){if(d.type=9,g++,y++,N=P.charCodeAt(g),N!==114||(g++,y++,N=P.charCodeAt(g),N!==117)||(g++,y++,N=P.charCodeAt(g),N!==101))return!1;g++,y++}else if(N===102){if(d.type=10,g++,y++,N=P.charCodeAt(g),N!==97||(g++,y++,N=P.charCodeAt(g),N!==108)||(g++,y++,N=P.charCodeAt(g),N!==115)||(g++,y++,N=P.charCodeAt(g),N!==101))return!1;g++,y++}else for(d.type=11;;){if(g>=A)return!1;if(N=P.charCodeAt(g),!(N===46||N>=48&&N<=57||N===101||N===69||N===45||N===43))break;g++,y++}return d.len=g-d.offset,d.value===null&&(d.value=P.substr(d.offset,d.len)),j.pos=g,j.line=S,j.char=y,!0}},787:function(T,i,k){var b=this&&this.__createBinding||(Object.create?function(g,A,S,y){y===void 0&&(y=S),Object.defineProperty(g,y,{enumerable:!0,get:function(){return A[S]}})}:function(g,A,S,y){y===void 0&&(y=S),g[y]=A[S]}),v=this&&this.__exportStar||function(g,A){for(var S in g)S==="default"||Object.prototype.hasOwnProperty.call(A,S)||b(A,g,S)};Object.defineProperty(i,"__esModule",{value:!0}),i.parseRawGrammar=i.INITIAL=i.Registry=void 0;const n=k(391),j=k(50),d=k(652),N=k(583),P=k(965);v(k(44),i),i.Registry=class{constructor(g){this._options=g,this._syncRegistry=new d.SyncRegistry(N.Theme.createFromRawTheme(g.theme,g.colorMap),g.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(g,A){this._syncRegistry.setTheme(N.Theme.createFromRawTheme(g,A))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(g,A,S){return this.loadGrammarWithConfiguration(g,A,{embeddedLanguages:S})}loadGrammarWithConfiguration(g,A,S){return this._loadGrammar(g,A,S.embeddedLanguages,S.tokenTypes,new n.BalancedBracketSelectors(S.balancedBracketSelectors||[],S.unbalancedBracketSelectors||[]))}loadGrammar(g){return this._loadGrammar(g,0,null,null,null)}async _loadGrammar(g,A,S,y,m){const l=new P.ScopeDependencyProcessor(this._syncRegistry,g);for(;l.Q.length>0;)await Promise.all(l.Q.map(_=>this._loadSingleGrammar(_.scopeName))),l.processQueue();return this._grammarForScopeName(g,A,S,y,m)}async _loadSingleGrammar(g){return this._ensureGrammarCache.has(g)||this._ensureGrammarCache.set(g,this._doLoadSingleGrammar(g)),this._ensureGrammarCache.get(g)}async _doLoadSingleGrammar(g){const A=await this._options.loadGrammar(g);if(A){const S=typeof this._options.getInjections=="function"?this._options.getInjections(g):void 0;this._syncRegistry.addGrammar(A,S)}}async addGrammar(g,A=[],S=0,y=null){return this._syncRegistry.addGrammar(g,A),await this._grammarForScopeName(g.scopeName,S,y)}_grammarForScopeName(g,A=0,S=null,y=null,m=null){return this._syncRegistry.grammarForScopeName(g,A,S,y,m)}},i.INITIAL=n.StateStack.NULL,i.parseRawGrammar=j.parseRawGrammar},736:(T,i)=>{function k(b){return!!b&&!!b.match(/[\w\.:]+/)}Object.defineProperty(i,"__esModule",{value:!0}),i.createMatchers=void 0,i.createMatchers=function(b,v){const n=[],j=function(g){let A=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,S=A.exec(g);return{next:()=>{if(!S)return null;const y=S[0];return S=A.exec(g),y}}}(b);let d=j.next();for(;d!==null;){let g=0;if(d.length===2&&d.charAt(1)===":"){switch(d.charAt(0)){case"R":g=1;break;case"L":g=-1;break;default:console.log(`Unknown priority ${d} in scope selector`)}d=j.next()}let A=P();if(n.push({matcher:A,priority:g}),d!==",")break;d=j.next()}return n;function N(){if(d==="-"){d=j.next();const g=N();return A=>!!g&&!g(A)}if(d==="("){d=j.next();const g=function(){const A=[];let S=P();for(;S&&(A.push(S),d==="|"||d===",");){do d=j.next();while(d==="|"||d===",");S=P()}return y=>A.some(m=>m(y))}();return d===")"&&(d=j.next()),g}if(k(d)){const g=[];do g.push(d),d=j.next();while(k(d));return A=>v(g,A)}return null}function P(){const g=[];let A=N();for(;A;)g.push(A),A=N();return S=>g.every(y=>y(S))}}},44:(T,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.disposeOnigString=void 0,i.disposeOnigString=function(k){typeof k.dispose=="function"&&k.dispose()}},50:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.parseRawGrammar=void 0;const b=k(69),v=k(350),n=k(974);i.parseRawGrammar=function(j,d=null){return d!==null&&/\.json$/.test(d)?(N=j,P=d,v.DebugFlags.InDebugMode?n.parseJSON(N,P,!0):JSON.parse(N)):function(g,A){return v.DebugFlags.InDebugMode?b.parseWithLocation(g,A,"$vscodeTextmateLocation"):b.parsePLIST(g)}(j,d);var N,P}},69:(T,i)=>{function k(b,v,n){const j=b.length;let d=0,N=1,P=0;function g(R){if(n===null)d+=R;else for(;R>0;)b.charCodeAt(d)===10?(d++,N++,P=0):(d++,P++),R--}function A(R){n===null?d=R:g(R-d)}function S(){for(;d<j;){let R=b.charCodeAt(d);if(R!==32&&R!==9&&R!==13&&R!==10)break;g(1)}}function y(R){return b.substr(d,R.length)===R&&(g(R.length),!0)}function m(R){let J=b.indexOf(R,d);A(J!==-1?J+R.length:j)}function l(R){let J=b.indexOf(R,d);if(J!==-1){let F=b.substring(d,J);return A(J+R.length),F}{let F=b.substr(d);return A(j),F}}j>0&&b.charCodeAt(0)===65279&&(d=1);let _=0,c=null,t=[],r=[],a=null;function s(R,J){t.push(_),r.push(c),_=R,c=J}function p(){if(t.length===0)return u("illegal state stack");_=t.pop(),c=r.pop()}function u(R){throw new Error("Near offset "+d+": "+R+" ~~~"+b.substr(d,50)+"~~~")}const f=function(){if(a===null)return u("missing <key>");let R={};n!==null&&(R[n]={filename:v,line:N,char:P}),c[a]=R,a=null,s(1,R)},w=function(){if(a===null)return u("missing <key>");let R=[];c[a]=R,a=null,s(2,R)},x=function(){let R={};n!==null&&(R[n]={filename:v,line:N,char:P}),c.push(R),s(1,R)},O=function(){let R=[];c.push(R),s(2,R)};function B(){if(_!==1)return u("unexpected </dict>");p()}function H(){return _===1||_!==2?u("unexpected </array>"):void p()}function W(R){if(_===1){if(a===null)return u("missing <key>");c[a]=R,a=null}else _===2?c.push(R):c=R}function G(R){if(isNaN(R))return u("cannot parse float");if(_===1){if(a===null)return u("missing <key>");c[a]=R,a=null}else _===2?c.push(R):c=R}function V(R){if(isNaN(R))return u("cannot parse integer");if(_===1){if(a===null)return u("missing <key>");c[a]=R,a=null}else _===2?c.push(R):c=R}function z(R){if(_===1){if(a===null)return u("missing <key>");c[a]=R,a=null}else _===2?c.push(R):c=R}function C(R){if(_===1){if(a===null)return u("missing <key>");c[a]=R,a=null}else _===2?c.push(R):c=R}function $(R){if(_===1){if(a===null)return u("missing <key>");c[a]=R,a=null}else _===2?c.push(R):c=R}function M(){let R=l(">"),J=!1;return R.charCodeAt(R.length-1)===47&&(J=!0,R=R.substring(0,R.length-1)),{name:R.trim(),isClosed:J}}function D(R){if(R.isClosed)return"";let J=l("</");return m(">"),J.replace(/&#([0-9]+);/g,function(F,ee){return String.fromCodePoint(parseInt(ee,10))}).replace(/&#x([0-9a-f]+);/g,function(F,ee){return String.fromCodePoint(parseInt(ee,16))}).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,function(F){switch(F){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return F})}for(;d<j&&(S(),!(d>=j));){const R=b.charCodeAt(d);if(g(1),R!==60)return u("expected <");if(d>=j)return u("unexpected end of input");const J=b.charCodeAt(d);if(J===63){g(1),m("?>");continue}if(J===33){if(g(1),y("--")){m("-->");continue}m(">");continue}if(J===47){if(g(1),S(),y("plist")){m(">");continue}if(y("dict")){m(">"),B();continue}if(y("array")){m(">"),H();continue}return u("unexpected closed tag")}let F=M();switch(F.name){case"dict":_===1?f():_===2?x():(c={},n!==null&&(c[n]={filename:v,line:N,char:P}),s(1,c)),F.isClosed&&B();continue;case"array":_===1?w():_===2?O():(c=[],s(2,c)),F.isClosed&&H();continue;case"key":Q=D(F),_!==1?u("unexpected <key>"):a!==null?u("too many <key>"):a=Q;continue;case"string":W(D(F));continue;case"real":G(parseFloat(D(F)));continue;case"integer":V(parseInt(D(F),10));continue;case"date":z(new Date(D(F)));continue;case"data":C(D(F));continue;case"true":D(F),$(!0);continue;case"false":D(F),$(!1);continue}if(!/^plist/.test(F.name))return u("unexpected opened tag "+F.name)}var Q;return c}Object.defineProperty(i,"__esModule",{value:!0}),i.parsePLIST=i.parseWithLocation=void 0,i.parseWithLocation=function(b,v,n){return k(b,v,n)},i.parsePLIST=function(b){return k(b,null,null)}},652:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SyncRegistry=void 0;const b=k(391);i.SyncRegistry=class{constructor(v,n){this._onigLibPromise=n,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=v}dispose(){for(const v of this._grammars.values())v.dispose()}setTheme(v){this._theme=v}getColorMap(){return this._theme.getColorMap()}addGrammar(v,n){this._rawGrammars.set(v.scopeName,v),n&&this._injectionGrammars.set(v.scopeName,n)}lookup(v){return this._rawGrammars.get(v)}injections(v){return this._injectionGrammars.get(v)}getDefaults(){return this._theme.getDefaults()}themeMatch(v){return this._theme.match(v)}async grammarForScopeName(v,n,j,d,N){if(!this._grammars.has(v)){let P=this._rawGrammars.get(v);if(!P)return null;this._grammars.set(v,b.createGrammar(v,P,n,j,d,N,this,await this._onigLibPromise))}return this._grammars.get(v)}}},792:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CompiledRule=i.RegExpSourceList=i.RegExpSource=i.RuleFactory=i.BeginWhileRule=i.BeginEndRule=i.IncludeOnlyRule=i.MatchRule=i.CaptureRule=i.Rule=i.ruleIdToNumber=i.ruleIdFromNumber=i.whileRuleId=i.endRuleId=void 0;const b=k(878),v=k(965),n=/\\(\d+)/,j=/\\(\d+)/g;i.endRuleId=-1,i.whileRuleId=-2,i.ruleIdFromNumber=function(c){return c},i.ruleIdToNumber=function(c){return c};class d{constructor(t,r,a,s){this.$location=t,this.id=r,this._name=a||null,this._nameIsCapturing=b.RegexSource.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=b.RegexSource.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${b.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,r){return this._nameIsCapturing&&this._name!==null&&t!==null&&r!==null?b.RegexSource.replaceCaptures(this._name,t,r):this._name}getContentName(t,r){return this._contentNameIsCapturing&&this._contentName!==null?b.RegexSource.replaceCaptures(this._contentName,t,r):this._contentName}}i.Rule=d;class N extends d{constructor(t,r,a,s,p){super(t,r,a,s),this.retokenizeCapturedWithRuleId=p}dispose(){}collectPatterns(t,r){throw new Error("Not supported!")}compile(t,r){throw new Error("Not supported!")}compileAG(t,r,a,s){throw new Error("Not supported!")}}i.CaptureRule=N;class P extends d{constructor(t,r,a,s,p){super(t,r,a,null),this._match=new m(s,this.id),this.captures=p,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,r){r.push(this._match)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,a,s){return this._getCachedCompiledPatterns(t).compileAG(t,a,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new l,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}i.MatchRule=P;class g extends d{constructor(t,r,a,s,p){super(t,r,a,s),this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,r){for(const a of this.patterns)t.getRule(a).collectPatterns(t,r)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,a,s){return this._getCachedCompiledPatterns(t).compileAG(t,a,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new l,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}i.IncludeOnlyRule=g;class A extends d{constructor(t,r,a,s,p,u,f,w,x,O){super(t,r,a,s),this._begin=new m(p,this.id),this.beginCaptures=u,this._end=new m(f||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=w,this.applyEndPatternLast=x||!1,this.patterns=O.patterns,this.hasMissingPatterns=O.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,r){return this._end.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t,r).compile(t)}compileAG(t,r,a,s){return this._getCachedCompiledPatterns(t,r).compileAG(t,a,s)}_getCachedCompiledPatterns(t,r){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new l;for(const a of this.patterns)t.getRule(a).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,r):this._cachedCompiledPatterns.setSource(0,r)),this._cachedCompiledPatterns}}i.BeginEndRule=A;class S extends d{constructor(t,r,a,s,p,u,f,w,x){super(t,r,a,s),this._begin=new m(p,this.id),this.beginCaptures=u,this.whileCaptures=w,this._while=new m(f,i.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=x.patterns,this.hasMissingPatterns=x.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,r){return this._while.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,a,s){return this._getCachedCompiledPatterns(t).compileAG(t,a,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new l;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,r){return this._getCachedCompiledWhilePatterns(t,r).compile(t)}compileWhileAG(t,r,a,s){return this._getCachedCompiledWhilePatterns(t,r).compileAG(t,a,s)}_getCachedCompiledWhilePatterns(t,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new l,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,r||"￿"),this._cachedCompiledWhilePatterns}}i.BeginWhileRule=S;class y{static createCaptureRule(t,r,a,s,p){return t.registerRule(u=>new N(r,u,a,s,p))}static getCompiledRuleId(t,r,a){return t.id||r.registerRule(s=>{if(t.id=s,t.match)return new P(t.$vscodeTextmateLocation,t.id,t.name,t.match,y._compileCaptures(t.captures,r,a));if(t.begin===void 0){t.repository&&(a=b.mergeObjects({},a,t.repository));let p=t.patterns;return p===void 0&&t.include&&(p=[{include:t.include}]),new g(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,y._compilePatterns(p,r,a))}return t.while?new S(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,y._compileCaptures(t.beginCaptures||t.captures,r,a),t.while,y._compileCaptures(t.whileCaptures||t.captures,r,a),y._compilePatterns(t.patterns,r,a)):new A(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,y._compileCaptures(t.beginCaptures||t.captures,r,a),t.end,y._compileCaptures(t.endCaptures||t.captures,r,a),t.applyEndPatternLast,y._compilePatterns(t.patterns,r,a))}),t.id}static _compileCaptures(t,r,a){let s=[];if(t){let p=0;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const f=parseInt(u,10);f>p&&(p=f)}for(let u=0;u<=p;u++)s[u]=null;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const f=parseInt(u,10);let w=0;t[u].patterns&&(w=y.getCompiledRuleId(t[u],r,a)),s[f]=y.createCaptureRule(r,t[u].$vscodeTextmateLocation,t[u].name,t[u].contentName,w)}}return s}static _compilePatterns(t,r,a){let s=[];if(t)for(let p=0,u=t.length;p<u;p++){const f=t[p];let w=-1;if(f.include){const x=v.parseInclude(f.include);switch(x.kind){case 0:case 1:w=y.getCompiledRuleId(a[f.include],r,a);break;case 2:let O=a[x.ruleName];O&&(w=y.getCompiledRuleId(O,r,a));break;case 3:case 4:const B=x.scopeName,H=x.kind===4?x.ruleName:null,W=r.getExternalGrammar(B,a);if(W)if(H){let G=W.repository[H];G&&(w=y.getCompiledRuleId(G,r,W.repository))}else w=y.getCompiledRuleId(W.repository.$self,r,W.repository)}}else w=y.getCompiledRuleId(f,r,a);if(w!==-1){const x=r.getRule(w);let O=!1;if((x instanceof g||x instanceof A||x instanceof S)&&x.hasMissingPatterns&&x.patterns.length===0&&(O=!0),O)continue;s.push(w)}}return{patterns:s,hasMissingPatterns:(t?t.length:0)!==s.length}}}i.RuleFactory=y;class m{constructor(t,r){if(t){const a=t.length;let s=0,p=[],u=!1;for(let f=0;f<a;f++)if(t.charAt(f)==="\\"&&f+1<a){const w=t.charAt(f+1);w==="z"?(p.push(t.substring(s,f)),p.push("$(?!\\n)(?<!\\n)"),s=f+2):w!=="A"&&w!=="G"||(u=!0),f++}this.hasAnchor=u,s===0?this.source=t:(p.push(t.substring(s,a)),this.source=p.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,this.hasBackReferences=n.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){let a=r.map(s=>t.substring(s.start,s.end));return j.lastIndex=0,this.source.replace(j,(s,p)=>b.escapeRegExpCharacters(a[parseInt(p,10)]||""))}_buildAnchorCache(){let t,r,a,s,p=[],u=[],f=[],w=[];for(t=0,r=this.source.length;t<r;t++)a=this.source.charAt(t),p[t]=a,u[t]=a,f[t]=a,w[t]=a,a==="\\"&&t+1<r&&(s=this.source.charAt(t+1),s==="A"?(p[t+1]="￿",u[t+1]="￿",f[t+1]="A",w[t+1]="A"):s==="G"?(p[t+1]="￿",u[t+1]="G",f[t+1]="￿",w[t+1]="G"):(p[t+1]=s,u[t+1]=s,f[t+1]=s,w[t+1]=s),t++);return{A0_G0:p.join(""),A0_G1:u.join(""),A1_G0:f.join(""),A1_G1:w.join("")}}resolveAnchors(t,r){return this.hasAnchor&&this._anchorCache?t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}i.RegExpSource=m;class l{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,r){this._items[t].source!==r&&(this._disposeCaches(),this._items[t].setSource(r))}compile(t){if(!this._cached){let r=this._items.map(a=>a.source);this._cached=new _(t,r,this._items.map(a=>a.ruleId))}return this._cached}compileAG(t,r,a){return this._hasAnchors?r?a?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,r,a)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,r,a)),this._anchorCache.A1_G0):a?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,r,a)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,r,a)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,r,a){let s=this._items.map(p=>p.resolveAnchors(r,a));return new _(t,s,this._items.map(p=>p.ruleId))}}i.RegExpSourceList=l;class _{constructor(t,r,a){this.regExps=r,this.rules=a,this.scanner=t.createOnigScanner(r)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let r=0,a=this.rules.length;r<a;r++)t.push(" - "+this.rules[r]+": "+this.regExps[r]);return t.join(`
4
+ `)}findNextMatchSync(t,r,a){const s=this.scanner.findNextMatchSync(t,r,a);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}}i.CompiledRule=_},583:(T,i,k)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeTrieElement=i.ThemeTrieElementRule=i.ColorMap=i.fontStyleToString=i.ParsedThemeRule=i.parseTheme=i.StyleAttributes=i.ScopeStack=i.Theme=void 0;const b=k(878);class v{constructor(m,l,_){this._colorMap=m,this._defaults=l,this._root=_,this._cachedMatchRoot=new b.CachedFn(c=>this._root.match(c))}static createFromRawTheme(m,l){return this.createFromParsedTheme(N(m),l)}static createFromParsedTheme(m,l){return function(_,c){_.sort((f,w)=>{let x=b.strcmp(f.scope,w.scope);return x!==0?x:(x=b.strArrCmp(f.parentScopes,w.parentScopes),x!==0?x:f.index-w.index)});let t=0,r="#000000",a="#ffffff";for(;_.length>=1&&_[0].scope==="";){let f=_.shift();f.fontStyle!==-1&&(t=f.fontStyle),f.foreground!==null&&(r=f.foreground),f.background!==null&&(a=f.background)}let s=new g(c),p=new d(t,s.getId(r),s.getId(a)),u=new S(new A(0,null,-1,0,0),[]);for(let f=0,w=_.length;f<w;f++){let x=_[f];u.insert(0,x.scope,x.parentScopes,x.fontStyle,s.getId(x.foreground),s.getId(x.background))}return new v(s,p,u)}(m,l)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(m){if(m===null)return this._defaults;const l=m.scopeName,_=this._cachedMatchRoot.get(l).find(c=>function(t,r){if(r===null)return!0;let a=0,s=r[a];for(;t;){if(j(t.scopeName,s)){if(a++,a===r.length)return!0;s=r[a]}t=t.parent}return!1}(m.parent,c.parentScopes));return _?new d(_.fontStyle,_.foreground,_.background):null}}i.Theme=v;class n{constructor(m,l){this.parent=m,this.scopeName=l}static from(...m){let l=null;for(let _=0;_<m.length;_++)l=new n(l,m[_]);return l}push(m){return new n(this,m)}getSegments(){let m=this;const l=[];for(;m;)l.push(m.scopeName),m=m.parent;return l.reverse(),l}toString(){return this.getSegments().join(" ")}}function j(y,m){return m===y||y.startsWith(m)&&y[m.length]==="."}i.ScopeStack=n;class d{constructor(m,l,_){this.fontStyle=m,this.foregroundId=l,this.backgroundId=_}}function N(y){if(!y)return[];if(!y.settings||!Array.isArray(y.settings))return[];let m=y.settings,l=[],_=0;for(let c=0,t=m.length;c<t;c++){let r,a=m[c];if(!a.settings)continue;if(typeof a.scope=="string"){let f=a.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),r=f.split(",")}else r=Array.isArray(a.scope)?a.scope:[""];let s=-1;if(typeof a.settings.fontStyle=="string"){s=0;let f=a.settings.fontStyle.split(" ");for(let w=0,x=f.length;w<x;w++)switch(f[w]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}let p=null;typeof a.settings.foreground=="string"&&b.isValidHexColor(a.settings.foreground)&&(p=a.settings.foreground);let u=null;typeof a.settings.background=="string"&&b.isValidHexColor(a.settings.background)&&(u=a.settings.background);for(let f=0,w=r.length;f<w;f++){let x=r[f].trim().split(" "),O=x[x.length-1],B=null;x.length>1&&(B=x.slice(0,x.length-1),B.reverse()),l[_++]=new P(O,B,c,s,p,u)}}return l}i.StyleAttributes=d,i.parseTheme=N;class P{constructor(m,l,_,c,t,r){this.scope=m,this.parentScopes=l,this.index=_,this.fontStyle=c,this.foreground=t,this.background=r}}i.ParsedThemeRule=P,i.fontStyleToString=function(y){if(y===-1)return"not set";let m="";return 1&y&&(m+="italic "),2&y&&(m+="bold "),4&y&&(m+="underline "),8&y&&(m+="strikethrough "),m===""&&(m="none"),m.trim()};class g{constructor(m){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(m)){this._isFrozen=!0;for(let l=0,_=m.length;l<_;l++)this._color2id[m[l]]=l,this._id2color[l]=m[l]}else this._isFrozen=!1}getId(m){if(m===null)return 0;m=m.toUpperCase();let l=this._color2id[m];if(l)return l;if(this._isFrozen)throw new Error(`Missing color in color map - ${m}`);return l=++this._lastColorId,this._color2id[m]=l,this._id2color[l]=m,l}getColorMap(){return this._id2color.slice(0)}}i.ColorMap=g;class A{constructor(m,l,_,c,t){this.scopeDepth=m,this.parentScopes=l,this.fontStyle=_,this.foreground=c,this.background=t}clone(){return new A(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(m){let l=[];for(let _=0,c=m.length;_<c;_++)l[_]=m[_].clone();return l}acceptOverwrite(m,l,_,c){this.scopeDepth>m?console.log("how did this happen?"):this.scopeDepth=m,l!==-1&&(this.fontStyle=l),_!==0&&(this.foreground=_),c!==0&&(this.background=c)}}i.ThemeTrieElementRule=A;class S{constructor(m,l=[],_={}){this._mainRule=m,this._children=_,this._rulesWithParentScopes=l}static _sortBySpecificity(m){return m.length===1||m.sort(this._cmpBySpecificity),m}static _cmpBySpecificity(m,l){if(m.scopeDepth===l.scopeDepth){const _=m.parentScopes,c=l.parentScopes;let t=_===null?0:_.length,r=c===null?0:c.length;if(t===r)for(let a=0;a<t;a++){const s=_[a].length,p=c[a].length;if(s!==p)return p-s}return r-t}return l.scopeDepth-m.scopeDepth}match(m){if(m==="")return S._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let l,_,c=m.indexOf(".");return c===-1?(l=m,_=""):(l=m.substring(0,c),_=m.substring(c+1)),this._children.hasOwnProperty(l)?this._children[l].match(_):S._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(m,l,_,c,t,r){if(l==="")return void this._doInsertHere(m,_,c,t,r);let a,s,p,u=l.indexOf(".");u===-1?(a=l,s=""):(a=l.substring(0,u),s=l.substring(u+1)),this._children.hasOwnProperty(a)?p=this._children[a]:(p=new S(this._mainRule.clone(),A.cloneArr(this._rulesWithParentScopes)),this._children[a]=p),p.insert(m+1,s,_,c,t,r)}_doInsertHere(m,l,_,c,t){if(l!==null){for(let r=0,a=this._rulesWithParentScopes.length;r<a;r++){let s=this._rulesWithParentScopes[r];if(b.strArrCmp(s.parentScopes,l)===0)return void s.acceptOverwrite(m,_,c,t)}_===-1&&(_=this._mainRule.fontStyle),c===0&&(c=this._mainRule.foreground),t===0&&(t=this._mainRule.background),this._rulesWithParentScopes.push(new A(m,l,_,c,t))}else this._mainRule.acceptOverwrite(m,_,c,t)}}i.ThemeTrieElement=S},878:(T,i)=>{function k(n){return Array.isArray(n)?function(j){let d=[];for(let N=0,P=j.length;N<P;N++)d[N]=k(j[N]);return d}(n):typeof n=="object"?function(j){let d={};for(let N in j)d[N]=k(j[N]);return d}(n):n}Object.defineProperty(i,"__esModule",{value:!0}),i.performanceNow=i.CachedFn=i.escapeRegExpCharacters=i.isValidHexColor=i.strArrCmp=i.strcmp=i.RegexSource=i.basename=i.mergeObjects=i.clone=void 0,i.clone=function(n){return k(n)},i.mergeObjects=function(n,...j){return j.forEach(d=>{for(let N in d)n[N]=d[N]}),n},i.basename=function n(j){const d=~j.lastIndexOf("/")||~j.lastIndexOf("\\");return d===0?j:~d==j.length-1?n(j.substring(0,j.length-1)):j.substr(1+~d)};let b=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function v(n,j){return n<j?-1:n>j?1:0}i.RegexSource=class{static hasCaptures(n){return n!==null&&(b.lastIndex=0,b.test(n))}static replaceCaptures(n,j,d){return n.replace(b,(N,P,g,A)=>{let S=d[parseInt(P||g,10)];if(!S)return N;{let y=j.substring(S.start,S.end);for(;y[0]===".";)y=y.substring(1);switch(A){case"downcase":return y.toLowerCase();case"upcase":return y.toUpperCase();default:return y}}})}},i.strcmp=v,i.strArrCmp=function(n,j){if(n===null&&j===null)return 0;if(!n)return-1;if(!j)return 1;let d=n.length,N=j.length;if(d===N){for(let P=0;P<d;P++){let g=v(n[P],j[P]);if(g!==0)return g}return 0}return d-N},i.isValidHexColor=function(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))},i.escapeRegExpCharacters=function(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},i.CachedFn=class{constructor(n){this.fn=n,this.cache=new Map}get(n){if(this.cache.has(n))return this.cache.get(n);const j=this.fn(n);return this.cache.set(n,j),j}},i.performanceNow=typeof performance>"u"?function(){return Date.now()}:function(){return performance.now()}}},o={};return function T(i){var k=o[i];if(k!==void 0)return k.exports;var b=o[i]={exports:{}};return L[i].call(b.exports,b,b.exports,T),b.exports}(787)})()})})(De);var $e=De.exports;const Ne=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",displayName:"ABAP",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",displayName:"ActionScript",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",displayName:"Ada",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json",displayName:"Apache Conf"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",displayName:"Apex",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",displayName:"APL",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",displayName:"AppleScript",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",displayName:"Ara",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",displayName:"Assembly",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",displayName:"Astro",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",displayName:"AWK",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",displayName:"Ballerina",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",displayName:"Batch",samplePath:"bat.sample",aliases:["batch"]},{id:"beancount",scopeName:"text.beancount",path:"beancount.tmLanguage.json",displayName:"Beancount",samplePath:"beancount.sample"},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",displayName:"Berry",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json",displayName:"BibTeX"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",displayName:"Bicep",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",displayName:"Blade",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",displayName:"C",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",displayName:"Cadence",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",displayName:"Clarity",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",displayName:"Clojure",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",displayName:"CMake",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",displayName:"COBOL",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",displayName:"CodeQL",samplePath:"codeql.sample",aliases:["ql"],embeddedLangs:["markdown"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",displayName:"CoffeeScript",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",displayName:"C++",samplePath:"cpp.sample",embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",displayName:"Crystal",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",displayName:"C#",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",displayName:"CSS",samplePath:"css.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",displayName:"CUE",samplePath:"cue.sample"},{id:"cypher",scopeName:"source.cypher",path:"cypher.tmLanguage.json",displayName:"Cypher",samplePath:"cypher.sample",aliases:["cql"]},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",displayName:"D",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",displayName:"Dart",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",displayName:"DAX",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",displayName:"Diff",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",displayName:"Docker",samplePath:"docker.sample",aliases:["dockerfile"]},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json",displayName:"Dream Maker"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",displayName:"Elixir",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",displayName:"Elm",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",displayName:"ERB",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",displayName:"Erlang",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",displayName:"Fish",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",displayName:"F#",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gdresource",scopeName:"source.gdresource",path:"gdresource.tmLanguage.json",displayName:"GDResource",samplePath:"gdresource.sample",embeddedLangs:["gdshader","gdscript"]},{id:"gdscript",scopeName:"source.gdscript",path:"gdscript.tmLanguage.json",displayName:"GDScript",samplePath:"gdscript.sample"},{id:"gdshader",scopeName:"source.gdshader",path:"gdshader.tmLanguage.json",displayName:"GDShader",samplePath:"gdshader.sample"},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json",displayName:"Gherkin"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",displayName:"Git Commit Message",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",displayName:"Git Rebase Message",embeddedLangs:["shellscript"]},{id:"glimmer-js",scopeName:"source.gjs",path:"glimmer-js.tmLanguage.json",displayName:"Glimmer JS",aliases:["gjs"],embeddedLangs:["javascript","handlebars"]},{id:"glimmer-ts",scopeName:"source.gts",path:"glimmer-ts.tmLanguage.json",displayName:"Glimmer TS",aliases:["gts"],embeddedLangs:["typescript","handlebars"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",displayName:"GLSL",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json",displayName:"Gnuplot"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",displayName:"Go",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",displayName:"GraphQL",embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json",displayName:"Groovy"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",displayName:"Hack",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",displayName:"Ruby Haml",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",displayName:"Handlebars",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",displayName:"Haskell",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",displayName:"HashiCorp HCL",samplePath:"hcl.sample"},{id:"hjson",scopeName:"source.hjson",path:"hjson.tmLanguage.json",displayName:"Hjson",samplePath:"hjson.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json",displayName:"HLSL"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",displayName:"HTML",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",displayName:"HTTP",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",displayName:"Imba",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",displayName:"INI",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",displayName:"Java",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",displayName:"JavaScript",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",displayName:"Jinja",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",displayName:"Jison",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json",displayName:"JSON"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",displayName:"JSON5",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json",displayName:"JSON with Comments"},{id:"jsonl",scopeName:"source.json.lines",path:"jsonl.tmLanguage.json",displayName:"JSON Lines"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json",displayName:"Jsonnet"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",displayName:"JSSM",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json",displayName:"JSX"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",displayName:"Julia",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json",displayName:"Kotlin",samplePath:"kotlin.sample"},{id:"kusto",scopeName:"source.kusto",path:"kusto.tmLanguage.json",displayName:"Kusto",samplePath:"kusto.sample",aliases:["kql"]},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",displayName:"LaTeX",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",displayName:"Less",embeddedLangs:["css"]},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",displayName:"Liquid",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json",displayName:"Lisp"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json",displayName:"Logo"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",displayName:"Lua",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",displayName:"Makefile",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",displayName:"Markdown",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",displayName:"Marko",embeddedLangs:["css","less","scss","javascript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json",displayName:"MATLAB"},{id:"mdx",scopeName:"source.mdx",path:"mdx.tmLanguage.json",displayName:"MDX",embeddedLangs:["tsx","toml","yaml","c","clojure","coffee","cpp","csharp","css","diff","docker","elixir","elm","erlang","go","graphql","haskell","html","ini","java","javascript","json","julia","kotlin","less","lua","make","markdown","objective-c","perl","python","r","ruby","rust","scala","scss","shellscript","sql","xml","swift","typescript"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json",displayName:"Mermaid"},{id:"narrat",scopeName:"source.narrat",path:"narrat.tmLanguage.json",displayName:"Narrat Language",samplePath:"narrat.sample",aliases:["nar"]},{id:"nextflow",scopeName:"source.nextflow",path:"nextflow.tmLanguage.json",displayName:"Nextflow",samplePath:"nextflow.sample",aliases:["nf"]},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",displayName:"Nginx",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",displayName:"Nim",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json",displayName:"Nix"},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",displayName:"Objective-C",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json",displayName:"Objective-C++"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json",displayName:"OCaml"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json",displayName:"Pascal"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",displayName:"Perl",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",displayName:"PHP",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json",displayName:"PL/SQL"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json",displayName:"PostCSS"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",displayName:"PowerQuery",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",displayName:"PowerShell",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",displayName:"Prisma",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json",displayName:"Prolog"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",displayName:"Protocol Buffer 3",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",displayName:"Pug",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json",displayName:"Puppet"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json",displayName:"PureScript"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",displayName:"Python",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json",displayName:"R"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",displayName:"Perl 6",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",displayName:"ASP.NET Razor",embeddedLangs:["html","csharp"]},{id:"reg",scopeName:"source.reg",path:"reg.tmLanguage.json",displayName:"Windows Registry Script",samplePath:"reg.sample"},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",displayName:"Rel",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json",displayName:"RISC-V"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",displayName:"reStructuredText",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",displayName:"Ruby",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",displayName:"Rust",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",displayName:"SAS",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json",displayName:"Sass"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json",displayName:"Scala"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json",displayName:"Scheme"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",displayName:"SCSS",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",displayName:"ShaderLab",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",displayName:"Shell",aliases:["bash","console","sh","shell","zsh"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json",displayName:"Smalltalk"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json",displayName:"Solidity"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",displayName:"SPARQL",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json",displayName:"SQL"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json",displayName:"SSH Config"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",displayName:"Stata",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",displayName:"Stylus",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",displayName:"Svelte",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json",displayName:"Swift"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json",displayName:"SystemVerilog"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",displayName:"Tasl",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json",displayName:"Tcl"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",displayName:"TeX",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json",displayName:"TOML"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",displayName:"TSX",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",displayName:"Turtle",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",displayName:"Twig",embeddedLangs:["css","javascript","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",displayName:"TypeScript",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",displayName:"V",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",displayName:"Visual Basic",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json",displayName:"Verilog"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json",displayName:"VHDL"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",displayName:"Vim Script",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",displayName:"Vue HTML",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",displayName:"Vue",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"vyper",scopeName:"source.vyper",path:"vyper.tmLanguage.json",displayName:"Vyper",samplePath:"vyper.sample",aliases:["vy"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json",displayName:"WebAssembly"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",displayName:"Wenyan",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",displayName:"WGSL",samplePath:"wgsl.sample"},{id:"wolfram",scopeName:"source.wolfram",path:"wolfram.tmLanguage.json",displayName:"Wolfram",samplePath:"wolfram.sample"},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",displayName:"XML",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",displayName:"XSL",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",displayName:"YAML",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",displayName:"ZenScript",samplePath:"zenscript.sample"}];var ie=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(ie||{});class K{static toBinaryStr(h){let L=h.toString(2);for(;L.length<32;)L="0"+L;return L}static printMetadata(h){let L=K.getLanguageId(h),o=K.getTokenType(h),T=K.getFontStyle(h),i=K.getForeground(h),k=K.getBackground(h);console.log({languageId:L,tokenType:o,fontStyle:T,foreground:i,background:k})}static getLanguageId(h){return(h&255)>>>0}static getTokenType(h){return(h&768)>>>8}static getFontStyle(h){return(h&14336)>>>11}static getForeground(h){return(h&8372224)>>>15}static getBackground(h){return(h&4286578688)>>>24}static containsBalancedBrackets(h){return(h&1024)!==0}static set(h,L,o,T,i,k){let b=K.getLanguageId(h),v=K.getTokenType(h),n=K.getFontStyle(h),j=K.getForeground(h),d=K.getBackground(h),N=K.containsBalancedBrackets(h)?1:0;return L!==0&&(b=L),o!==0&&(v=o===8?0:o),T!==-1&&(n=T),i!==0&&(j=i),k!==0&&(d=k),(b<<0|v<<8|n<<11|N<<10|j<<15|d<<24)>>>0}}function Xe(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function Ye(e){return e.startsWith("./")?e.slice(2):e}function Fe(e){const h=e.split(/[\/\\]/g);return h.slice(0,h.length-1)}function We(...e){return e.map(Xe).map(Ye).join("/")}function Ze(e,h){const L=new Map;for(const o of e){const T=h(o);L.has(T)?L.get(T).push(o):L.set(T,[o])}return L}function Ke(e,h=!1){const L=e.length;let o=0,T="",i=0,k=16,b=0,v=0,n=0,j=0,d=0;function N(l,_){let c=0,t=0;for(;c<l||!_;){let r=e.charCodeAt(o);if(r>=48&&r<=57)t=t*16+r-48;else if(r>=65&&r<=70)t=t*16+r-65+10;else if(r>=97&&r<=102)t=t*16+r-97+10;else break;o++,c++}return c<l&&(t=-1),t}function P(l){o=l,T="",i=0,k=16,d=0}function g(){let l=o;if(e.charCodeAt(o)===48)o++;else for(o++;o<e.length&&fe(e.charCodeAt(o));)o++;if(o<e.length&&e.charCodeAt(o)===46)if(o++,o<e.length&&fe(e.charCodeAt(o)))for(o++;o<e.length&&fe(e.charCodeAt(o));)o++;else return d=3,e.substring(l,o);let _=o;if(o<e.length&&(e.charCodeAt(o)===69||e.charCodeAt(o)===101))if(o++,(o<e.length&&e.charCodeAt(o)===43||e.charCodeAt(o)===45)&&o++,o<e.length&&fe(e.charCodeAt(o))){for(o++;o<e.length&&fe(e.charCodeAt(o));)o++;_=o}else d=3;return e.substring(l,_)}function A(){let l="",_=o;for(;;){if(o>=L){l+=e.substring(_,o),d=2;break}const c=e.charCodeAt(o);if(c===34){l+=e.substring(_,o),o++;break}if(c===92){if(l+=e.substring(_,o),o++,o>=L){d=2;break}switch(e.charCodeAt(o++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
5
+ `;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:const r=N(4,!0);r>=0?l+=String.fromCharCode(r):d=4;break;default:d=5}_=o;continue}if(c>=0&&c<=31)if(be(c)){l+=e.substring(_,o),d=2;break}else d=6;o++}return l}function S(){if(T="",d=0,i=o,v=b,j=n,o>=L)return i=L,k=17;let l=e.charCodeAt(o);if(Le(l)){do o++,T+=String.fromCharCode(l),l=e.charCodeAt(o);while(Le(l));return k=15}if(be(l))return o++,T+=String.fromCharCode(l),l===13&&e.charCodeAt(o)===10&&(o++,T+=`
6
+ `),b++,n=o,k=14;switch(l){case 123:return o++,k=1;case 125:return o++,k=2;case 91:return o++,k=3;case 93:return o++,k=4;case 58:return o++,k=6;case 44:return o++,k=5;case 34:return o++,T=A(),k=10;case 47:const _=o-1;if(e.charCodeAt(o+1)===47){for(o+=2;o<L&&!be(e.charCodeAt(o));)o++;return T=e.substring(_,o),k=12}if(e.charCodeAt(o+1)===42){o+=2;const c=L-1;let t=!1;for(;o<c;){const r=e.charCodeAt(o);if(r===42&&e.charCodeAt(o+1)===47){o+=2,t=!0;break}o++,be(r)&&(r===13&&e.charCodeAt(o)===10&&o++,b++,n=o)}return t||(o++,d=1),T=e.substring(_,o),k=13}return T+=String.fromCharCode(l),o++,k=16;case 45:if(T+=String.fromCharCode(l),o++,o===L||!fe(e.charCodeAt(o)))return k=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return T+=g(),k=11;default:for(;o<L&&y(l);)o++,l=e.charCodeAt(o);if(i!==o){switch(T=e.substring(i,o),T){case"true":return k=8;case"false":return k=9;case"null":return k=7}return k=16}return T+=String.fromCharCode(l),o++,k=16}}function y(l){if(Le(l)||be(l))return!1;switch(l){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function m(){let l;do l=S();while(l>=12&&l<=15);return l}return{setPosition:P,getPosition:()=>o,scan:h?m:S,getToken:()=>k,getTokenValue:()=>T,getTokenOffset:()=>i,getTokenLength:()=>o-i,getTokenStartLine:()=>v,getTokenStartCharacter:()=>i-j,getTokenError:()=>d}}function Le(e){return e===32||e===9}function be(e){return e===10||e===13}function fe(e){return e>=48&&e<=57}var Ae;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Ae||(Ae={}));var _e;(function(e){e.DEFAULT={allowTrailingComma:!1}})(_e||(_e={}));function et(e,h=[],L=_e.DEFAULT){let o=null,T=[];const i=[];function k(v){Array.isArray(T)?T.push(v):o!==null&&(T[o]=v)}return tt(e,{onObjectBegin:()=>{const v={};k(v),i.push(T),T=v,o=null},onObjectProperty:v=>{o=v},onObjectEnd:()=>{T=i.pop()},onArrayBegin:()=>{const v=[];k(v),i.push(T),T=v,o=null},onArrayEnd:()=>{T=i.pop()},onLiteralValue:k,onError:(v,n,j)=>{h.push({error:v,offset:n,length:j})}},L),T[0]}function tt(e,h,L=_e.DEFAULT){const o=Ke(e,!1),T=[];function i(f){return f?()=>f(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0}function k(f){return f?()=>f(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),()=>T.slice()):()=>!0}function b(f){return f?w=>f(w,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0}function v(f){return f?w=>f(w,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),()=>T.slice()):()=>!0}const n=k(h.onObjectBegin),j=v(h.onObjectProperty),d=i(h.onObjectEnd),N=k(h.onArrayBegin),P=i(h.onArrayEnd),g=v(h.onLiteralValue),A=b(h.onSeparator),S=i(h.onComment),y=b(h.onError),m=L&&L.disallowComments,l=L&&L.allowTrailingComma;function _(){for(;;){const f=o.scan();switch(o.getTokenError()){case 4:c(14);break;case 5:c(15);break;case 3:c(13);break;case 1:m||c(11);break;case 2:c(12);break;case 6:c(16);break}switch(f){case 12:case 13:m?c(10):S();break;case 16:c(1);break;case 15:case 14:break;default:return f}}}function c(f,w=[],x=[]){if(y(f),w.length+x.length>0){let O=o.getToken();for(;O!==17;){if(w.indexOf(O)!==-1){_();break}else if(x.indexOf(O)!==-1)break;O=_()}}}function t(f){const w=o.getTokenValue();return f?g(w):(j(w),T.push(w)),_(),!0}function r(){switch(o.getToken()){case 11:const f=o.getTokenValue();let w=Number(f);isNaN(w)&&(c(2),w=0),g(w);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return _(),!0}function a(){return o.getToken()!==10?(c(3,[],[2,5]),!1):(t(!1),o.getToken()===6?(A(":"),_(),u()||c(4,[],[2,5])):c(5,[],[2,5]),T.pop(),!0)}function s(){n(),_();let f=!1;for(;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){if(f||c(4,[],[]),A(","),_(),o.getToken()===2&&l)break}else f&&c(6,[],[]);a()||c(4,[],[2,5]),f=!0}return d(),o.getToken()!==2?c(7,[2],[]):_(),!0}function p(){N(),_();let f=!0,w=!1;for(;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){if(w||c(4,[],[]),A(","),_(),o.getToken()===4&&l)break}else w&&c(6,[],[]);f?(T.push(0),f=!1):T[T.length-1]++,u()||c(4,[],[4,5]),w=!0}return P(),f||T.pop(),o.getToken()!==4?c(8,[4],[]):_(),!0}function u(){switch(o.getToken()){case 3:return p();case 1:return s();case 10:return t(!0);default:return r()}}return _(),o.getToken()===17?L.allowEmptyContent?!0:(c(4,[],[]),!1):u()?(o.getToken()!==17&&c(9,[],[]),!0):(c(4,[],[]),!1)}var Te;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Te||(Te={}));var Pe;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Pe||(Pe={}));const st=et;var Re;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Re||(Re={}));"process"in globalThis&&typeof process<"u"&&typeof process.release<"u"&&process.release.name;let Ue="";const nt="dist/";function at(e){Ue=e.endsWith("/")?e:e+"/"}let ve=null;async function rt(e){if(!ve){let h;h=ke.loadWASM({data:await(globalThis.__shiki_fetch__||globalThis.fetch)(Ce(We(...Fe(e),"onig.wasm")))}),ve=h.then(()=>({createOnigScanner(L){return ke.createOnigScanner(L)},createOnigString(L){return ke.createOnigString(L)}}))}return ve}function Ce(e){return`${Ue}${e}`}async function it(e){const h=Ce(e);return await(globalThis.__shiki_fetch__||globalThis.fetch)(h).then(L=>L.text())}async function qe(e){const h=[],L=await it(e);let o;try{o=JSON.parse(L)}catch{if(o=st(L,h,{allowTrailingComma:!0}),h.length)throw h[0]}return o}async function He(e){let h=await qe(e);const L=Ve(h);if(L.include){const o=await He(We(...Fe(e),L.include));o.settings&&(L.settings=o.settings.concat(L.settings)),o.bg&&!L.bg&&(L.bg=o.bg),o.colors&&(L.colors={...o.colors,...L.colors}),delete L.include}return L}async function ot(e){return await qe(e)}function ct(e){e.settings||(e.settings=[]),!(e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope)&&e.settings.unshift({settings:{foreground:e.fg,background:e.bg}})}function Ve(e){const h=e.type||"dark",L={name:e.name,type:h,...e,...lt(e)};return e.include&&(L.include=e.include),e.tokenColors&&(L.settings=e.tokenColors,delete L.tokenColors),ct(L),L}const xe={light:"#333333",dark:"#bbbbbb"},Ie={light:"#fffffe",dark:"#1e1e1e"};function lt(e){let h,L,o=e.settings?e.settings:e.tokenColors;const T=o?o.find(i=>!i.name&&!i.scope):void 0;return T?.settings?.foreground&&(h=T.settings.foreground),T?.settings?.background&&(L=T.settings.background),!h&&e?.colors?.["editor.foreground"]&&(h=e.colors["editor.foreground"]),!L&&e?.colors?.["editor.background"]&&(L=e.colors["editor.background"]),h||(h=e.type==="light"?xe.light:xe.dark),L||(L=e.type==="light"?Ie.light:Ie.dark),{fg:h,bg:L}}class ut{constructor(h,L){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=h,this._onigLibName=L}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(h){return this.languageMap[h]}async loadGrammar(h){const L=this.scopeToLangMap[h];if(!L)return null;if(L.grammar)return L.grammar;const o=await ot(Ne.includes(L)?`${this.languagesPath}${L.path}`:L.path);return L.grammar=o,o}addLanguage(h){this.languageMap[h.id]=h,h.aliases&&h.aliases.forEach(L=>{this.languageMap[L]=h}),this.scopeToLangMap[h.scopeName]=h}}function pt(e,h,L,o,T){let i=L.split(/\r\n|\r|\n/),k=$e.INITIAL,b=[],v=[];for(let n=0,j=i.length;n<j;n++){let d=i[n];if(d===""){b=[],v.push([]);continue}let N,P,g;T.includeExplanation&&(N=o.tokenizeLine(d,k),P=N.tokens,g=0);let A=o.tokenizeLine2(d,k),S=A.tokens.length/2;for(let y=0;y<S;y++){let m=A.tokens[2*y],l=y+1<S?A.tokens[2*y+2]:d.length;if(m===l)continue;let _=A.tokens[2*y+1],c=K.getForeground(_),t=h[c],r=K.getFontStyle(_),a=[];if(T.includeExplanation){let s=0;for(;m+s<l;){let p=P[g],u=d.substring(p.startIndex,p.endIndex);s+=u.length,a.push({content:u,scopes:ht(e,p.scopes)}),g++}}b.push({content:d.substring(m,l),color:t,fontStyle:r,explanation:a})}v.push(b),b=[],k=A.ruleStack}return v}function ht(e,h){let L=[];for(let o=0,T=h.length;o<T;o++){let i=h.slice(0,o),k=h[o];L[o]={scopeName:k,themeMatches:dt(e,k,i)}}return L}function Oe(e,h){let L=e+".";return e===h||h.substring(0,L.length)===L}function mt(e,h,L,o){if(!Oe(e,L))return!1;let T=h.length-1,i=o.length-1;for(;T>=0&&i>=0;)Oe(h[T],o[i])&&T--,i--;return T===-1}function dt(e,h,L){let o=[],T=0;for(let i=0,k=e.settings.length;i<k;i++){let b=e.settings[i],v;if(typeof b.scope=="string")v=b.scope.split(/,/).map(n=>n.trim());else if(Array.isArray(b.scope))v=b.scope;else continue;for(let n=0,j=v.length;n<j;n++){let N=v[n].split(/ /),P=N[N.length-1],g=N.slice(0,N.length-1);mt(P,g,h,L)&&(o[T++]=b,n=j)}}return o}var ne=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Se={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function gt(e,h){const L=e.indexOf("\x1B",h);if(L!==-1&&e[L+1]==="["){const o=e.indexOf("m",L);return{sequence:e.substring(L+2,o).split(";"),startPosition:L,position:o+1}}return{position:e.length}}function Be(e){const h=e.shift();if(h==="2"){const L=e.splice(0,3).map(o=>Number.parseInt(o));return L.length!==3||L.some(o=>Number.isNaN(o))?void 0:{type:"rgb",rgb:L}}else if(h==="5"){const L=e.shift();if(L)return{type:"table",index:Number(L)}}}function ft(e){const h=[];for(;e.length>0;){const L=e.shift();if(!L)continue;const o=Number.parseInt(L);if(!Number.isNaN(o))if(o===0)h.push({type:"resetAll"});else if(o<=9)Se[o]&&h.push({type:"setDecoration",value:Se[o]});else if(o<=29){const T=Se[o-20];T&&h.push({type:"resetDecoration",value:T})}else if(o<=37)h.push({type:"setForegroundColor",value:{type:"named",name:ne[o-30]}});else if(o===38){const T=Be(e);T&&h.push({type:"setForegroundColor",value:T})}else if(o===39)h.push({type:"resetForegroundColor"});else if(o<=47)h.push({type:"setBackgroundColor",value:{type:"named",name:ne[o-40]}});else if(o===48){const T=Be(e);T&&h.push({type:"setBackgroundColor",value:T})}else o===49?h.push({type:"resetBackgroundColor"}):o>=90&&o<=97?h.push({type:"setForegroundColor",value:{type:"named",name:ne[o-90+8]}}):o>=100&&o<=107&&h.push({type:"setBackgroundColor",value:{type:"named",name:ne[o-100+8]}})}return h}function yt(){let e=null,h=null,L=new Set;return{parse(o){const T=[];let i=0;do{const k=gt(o,i),b=k.sequence?o.substring(i,k.startPosition):o.substring(i);if(b.length>0&&T.push({value:b,foreground:e,background:h,decorations:new Set(L)}),k.sequence){const v=ft(k.sequence);for(const n of v)n.type==="resetAll"?(e=null,h=null,L.clear()):n.type==="resetForegroundColor"?e=null:n.type==="resetBackgroundColor"?h=null:n.type==="resetDecoration"&&L.delete(n.value);for(const n of v)n.type==="setForegroundColor"?e=n.value:n.type==="setBackgroundColor"?h=n.value:n.type==="setDecoration"&&L.add(n.value)}i=k.position}while(i<o.length);return T}}}var bt={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 _t(e=bt){function h(b){return e[b]}function L(b){return`#${b.map(v=>Math.max(0,Math.min(v,255)).toString(16).padStart(2,"0")).join("")}`}let o;function T(){if(o)return o;o=[];for(let n=0;n<ne.length;n++)o.push(h(ne[n]));let b=[0,95,135,175,215,255];for(let n=0;n<6;n++)for(let j=0;j<6;j++)for(let d=0;d<6;d++)o.push(L([b[n],b[j],b[d]]));let v=8;for(let n=0;n<24;n++,v+=10)o.push(L([v,v,v]));return o}function i(b){return T()[b]}function k(b){switch(b.type){case"named":return h(b.name);case"rgb":return L(b.rgb);case"table":return i(b.index)}}return{value:k}}function Nt(e,h){const L=h.split(/\r?\n/),o=_t(Object.fromEntries(ne.map(i=>[i,e.colors[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]]))),T=yt();return L.map(i=>T.parse(i).map(k=>{let b;k.decorations.has("reverse")?b=k.background?o.value(k.background):e.bg:b=k.foreground?o.value(k.foreground):e.fg,k.decorations.has("dim")&&(b=kt(b));let v=ie.None;return k.decorations.has("bold")&&(v|=ie.Bold),k.decorations.has("italic")&&(v|=ie.Italic),k.decorations.has("underline")&&(v|=ie.Underline),{content:k.value,color:b,fontStyle:v}}))}function kt(e){const h=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(h)if(h[3]){const o=Math.round(Number.parseInt(h[3],16)/2).toString(16).padStart(2,"0");return`#${h[1]}${h[2]}${o}`}else return h[2]?`#${h[1]}${h[2]}80`:`#${Array.from(h[1]).map(o=>`${o}${o}`).join("")}80`;const L=e.match(/var\((--shiki-color-ansi-[\w-]+)\)/);return L?`var(${L[1]}-dim)`:e}const Lt={pre({className:e,style:h,children:L}){return`<pre class="${e}" style="${h}" tabindex="0">${L}</pre>`},code({children:e}){return`<code>${e}</code>`},line({className:e,children:h}){return`<span class="${e}">${h}</span>`},token({style:e,children:h}){return`<span style="${e}">${h}</span>`}};function Ee(e,h={}){const L=h.bg||"#fff",o=Ze(h.lineOptions??[],k=>k.line),T=h.elements||{};function i(k="",b={},v){const n=T[k]||Lt[k];return n?(v=v.filter(Boolean),n({...b,children:k==="code"?v.join(`
7
+ `):v.join("")})):""}return i("pre",{className:"shiki "+(h.themeName||""),style:`background-color: ${L}`},[h.langId?`<div class="language-id">${h.langId}</div>`:"",i("code",{},e.map((k,b)=>{const v=b+1,n=o.get(v)??[],j=jt(n).join(" ");return i("line",{className:j,lines:e,line:k,index:b},k.map((d,N)=>{const P=[`color: ${d.color||h.fg}`];return d.fontStyle&ie.Italic&&P.push("font-style: italic"),d.fontStyle&ie.Bold&&P.push("font-weight: bold"),d.fontStyle&ie.Underline&&P.push("text-decoration: underline"),i("token",{style:P.join("; "),tokens:k,token:d,index:N},[St(d.content)])}))}))])}const vt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function St(e){return e.replace(/[&<>"']/g,h=>vt[h])}function jt(e){const h=new Set(["line"]);for(const L of e)for(const o of L.classes??[])h.add(o);return Array.from(h)}class wt extends $e.Registry{constructor(h){super(h),this._resolver=h,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=Ne.reduce((L,o)=>(L[o.id]=o,L),{})}getTheme(h){return typeof h=="string"?this._resolvedThemes[h]:h}async loadTheme(h){return typeof h=="string"?(this._resolvedThemes[h]||(this._resolvedThemes[h]=await He(`${this.themesPath}${h}.json`)),this._resolvedThemes[h]):(h=Ve(h),h.name&&(this._resolvedThemes[h.name]=h),h)}async loadThemes(h){return await Promise.all(h.map(L=>this.loadTheme(L)))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(h){return this._resolvedGrammars[h]}async loadLanguage(h){const o={embeddedLanguages:h.embeddedLangs?.reduce(async(i,k,b)=>{if(!this.getLoadedLanguages().includes(k)&&this._resolver.getLangRegistration(k))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(k).scopeName),i[this._resolver.getLangRegistration(k).scopeName]=b+2,i},{}),balancedBracketSelectors:h.balancedBracketSelectors||["*"],unbalancedBracketSelectors:h.unbalancedBracketSelectors||[]},T=await this.loadGrammarWithConfiguration(h.scopeName,1,o);this._resolvedGrammars[h.id]=T,h.aliases&&h.aliases.forEach(i=>{this._resolvedGrammars[i]=T})}async loadLanguages(h){for(const o of h)this.resolveEmbeddedLanguages(o);const L=Array.from(this._langGraph.values());for(const o of L)this._resolver.addLanguage(o);for(const o of L)await this.loadLanguage(o)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(h){if(this._langGraph.has(h.id)||this._langGraph.set(h.id,h),h.embeddedLangs)for(const L of h.embeddedLangs)this._langGraph.set(L,this._langMap[L])}}function ze(e){return typeof e=="string"?Ne.find(h=>h.id===e||h.aliases?.includes(e)):e}function At(e){let h=Ne,L=e.themes||[],o=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":nt;return e.langs&&(h=e.langs.map(ze)),e.theme&&L.unshift(e.theme),L.length||(L=["nord"]),{_languages:h,_themes:L,_wasmPath:o}}function Tt(){const e={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};for(let h=0;h<ne.length;h++){const L=`#A${h.toString().padStart(5,"0")}`,o=ne[h].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e[L]=`var(--shiki-color-ansi-${o})`}return e}async function Pt(e){const{_languages:h,_themes:L,_wasmPath:o}=At(e),T=new ut(rt(o),"vscode-oniguruma"),i=new wt(T);e.paths?.themes&&(i.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(T.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const b=(await i.loadThemes(L))[0];let v;await i.loadLanguages(h);let n=Tt();function j(a){n=a}function d(a,s){a.bg=n[a.bg]||a.bg,a.fg=n[a.fg]||a.fg,Object.entries(a.colors).forEach(([p,u])=>{a.colors[p]=n[u]||u}),s.forEach((p,u)=>{s[u]=n[p]||p})}function N(a){const s=a?i.getTheme(a):b;if(!s)throw Error(`No theme registration for ${a}`);(!v||v.name!==s.name)&&(i.setTheme(s),v=s);const p=i.getColorMap();return s.type==="css"&&d(s,p),{_theme:s,_colorMap:p}}function P(a){const s=i.getGrammar(a);if(!s)throw Error(`No language registration for ${a}`);return{_grammar:s}}function g(a,s="text",p,u={includeExplanation:!0}){if(Rt(s))return[...a.split(/\r\n|\r|\n/).map(B=>[{content:B}])];const{_grammar:f}=P(s),{_theme:w,_colorMap:x}=N(p);return pt(w,x,a,f,u)}function A(a,s){const{_theme:p}=N(s);return Nt(p,a)}function S(a,s="text",p){let u;typeof s=="object"?u=s:u={lang:s,theme:p};const f=g(a,u.lang,u.theme,{includeExplanation:!1}),{_theme:w}=N(u.theme);return Ee(f,{fg:w.fg,bg:w.bg,lineOptions:u?.lineOptions,themeName:w.name})}function y(a,s){const p=A(a,s?.theme),{_theme:u}=N(s?.theme);return Ee(p,{fg:u.fg,bg:u.bg,lineOptions:s?.lineOptions,themeName:u.name})}async function m(a){await i.loadTheme(a)}async function l(a){const s=ze(a);T.addLanguage(s),await i.loadLanguage(s)}function _(){return i.getLoadedThemes()}function c(){return i.getLoadedLanguages()}function t(a){const{_theme:s}=N(a);return s.bg}function r(a){const{_theme:s}=N(a);return s.fg}return{codeToThemedTokens:g,codeToHtml:S,ansiToThemedTokens:A,ansiToHtml:y,getTheme:a=>N(a)._theme,loadTheme:m,loadLanguage:l,getBackgroundColor:t,getForegroundColor:r,getLoadedThemes:_,getLoadedLanguages:c,setColorReplacements:j}}function Rt(e){return!e||["plaintext","txt","text"].includes(e)}const xt="0.14.0";at(`https://cdn.jsdelivr.net/npm/shiki-es@${xt}/dist/assets/`);const je=Je();Pt({themes:["vitesse-dark","vitesse-light"],langs:["css","json","javascript","typescript"]}).then(e=>{je.value=e});function Ot(e,h){const L=Qe();return je.value?je.value.codeToHtml(e,{lang:h,theme:L.value==="dark"?"vitesse-dark":"vitesse-light"}):e}export{Ot as h};
@@ -1 +1 @@
1
- import{_ as n}from"./ImageLoader.b68e14b5.js";import{g as r,j as e,n as i,x as c,z as p,A as u,y as m,B as _,o as h,E as l,v as d}from"./entry.fb0efd99.js";const k=r({__name:"svg",setup(v){const t=e.value?.height||630,s=(e.value?.width||1200)/t,a=i(()=>c(`${_.value}/api/og-image-svg`,{path:p.value,timestamp:u.value,...m.value}));return(f,w)=>{const o=n;return h(),l(o,{src:d(a),"aspect-ratio":s,description:"[SVG] Generated in %sms using Satori."},null,8,["src"])}}});export{k as default};
1
+ import{_ as n}from"./ImageLoader.45e71895.js";import{g as r,j as e,n as i,x as c,z as p,A as u,y as m,B as _,o as h,E as l,v as d}from"./entry.f886005d.js";const k=r({__name:"svg",setup(v){const t=e.value?.height||630,s=(e.value?.width||1200)/t,a=i(()=>c(`${_.value}/api/og-image-svg`,{path:p.value,timestamp:u.value,...m.value}));return(f,w)=>{const o=n;return h(),l(o,{src:d(a),"aspect-ratio":s,description:"[SVG] Generated in %sms using Satori."},null,8,["src"])}}});export{k as default};
@@ -1 +1 @@
1
- import{g as o,F as a,o as r,c,v as s,G as i}from"./entry.fb0efd99.js";import{h as _}from"./shiki.4d6ce36e.js";const l=["innerHTML"],d=o({__name:"vnodes",async setup(p){let e,t;const n=([e,t]=a(()=>i()),e=await e,t(),e);return(f,h)=>(r(),c("pre",{"of-auto":"","h-full":"","text-sm":"",style:{"white-space":"break-spaces"},innerHTML:s(_)(JSON.stringify(s(n),null,2),"json")},null,8,l))}});export{d as default};
1
+ import{g as o,F as a,o as r,c,v as s,G as i}from"./entry.f886005d.js";import{h as _}from"./shiki.4671d705.js";const l=["innerHTML"],d=o({__name:"vnodes",async setup(p){let e,t;const n=([e,t]=a(()=>i()),e=await e,t(),e);return(f,h)=>(r(),c("pre",{"of-auto":"","h-full":"","text-sm":"",style:{"white-space":"break-spaces"},innerHTML:s(_)(JSON.stringify(s(n),null,2),"json")},null,8,l))}});export{d as default};
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
- <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.fb0efd99.js"><link rel="preload" as="style" href="/__nuxt_og_image__/client/_nuxt/entry.1311cc29.css"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-404.f3dd5020.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-404.644be599.js"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-500.06915589.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-500.a96819db.js"><link rel="stylesheet" href="/__nuxt_og_image__/client/_nuxt/entry.1311cc29.css"><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
4
+ <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.f886005d.js"><link rel="preload" as="style" href="/__nuxt_og_image__/client/_nuxt/entry.1311cc29.css"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-404.f3dd5020.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-404.0a0b8ce2.js"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-500.06915589.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-500.20847d33.js"><link rel="stylesheet" href="/__nuxt_og_image__/client/_nuxt/entry.1311cc29.css"><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
5
5
  </script></head>
6
- <body ><div id="__nuxt"><svg class="nuxt-spa-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 25" fill="none" width="80"><path d="M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567"></path></svg><style>.nuxt-spa-loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.nuxt-spa-loading>path{fill:none;stroke:#00DC82;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:128;stroke-dashoffset:128;animation:nuxt-spa-loading-move 3s linear infinite}@keyframes nuxt-spa-loading-move{100%{stroke-dashoffset:-128}}</style></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.fb0efd99.js" crossorigin></script></body>
6
+ <body ><div id="__nuxt"><svg class="nuxt-spa-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 25" fill="none" width="80"><path d="M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567"></path></svg><style>.nuxt-spa-loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.nuxt-spa-loading>path{fill:none;stroke:#00DC82;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:128;stroke-dashoffset:128;animation:nuxt-spa-loading-move 3s linear infinite}@keyframes nuxt-spa-loading-move{100%{stroke-dashoffset:-128}}</style></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.f886005d.js" crossorigin></script></body>
7
7
  </html>
package/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "2.0.4"
8
+ "version": "2.0.6"
9
9
  }
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import { existsSync } from 'node:fs';
4
4
  import { useNuxt, addTemplate, defineNuxtModule, useLogger, createResolver, addServerHandler, addImports, addComponent, hasNuxtModule, addServerPlugin } from '@nuxt/kit';
5
5
  import { execa } from 'execa';
6
6
  import chalk from 'chalk';
7
- import defu from 'defu';
7
+ import defu$1, { defu } from 'defu';
8
8
  import { toRouteMatcher, createRouter } from 'radix3';
9
9
  import { withBase, joinURL } from 'ufo';
10
10
  import { resolve, relative, dirname } from 'pathe';
@@ -20,7 +20,7 @@ import { createBirpcGroup } from 'birpc';
20
20
  import { stringify, parse } from 'flatted';
21
21
  import { addDependency } from 'nypm';
22
22
 
23
- const version = "2.0.4";
23
+ const version = "2.0.6";
24
24
 
25
25
  async function createBrowser() {
26
26
  if (process.dev || process.env.prerender) {
@@ -190,15 +190,20 @@ function decodeObjectHtmlEntities(obj) {
190
190
  });
191
191
  return obj;
192
192
  }
193
- function extractOgImageOptions(html) {
193
+ function extractOgImageOptions(html, routeRules) {
194
194
  const htmlPayload = html.match(/<script id="nuxt-og-image-options" type="application\/json">(.+?)<\/script>/)?.[1];
195
195
  if (!htmlPayload)
196
196
  return false;
197
197
  let options;
198
198
  try {
199
- options = JSON.parse(htmlPayload);
199
+ const payload = JSON.parse(htmlPayload);
200
+ Object.entries(payload).forEach(([key, value]) => {
201
+ if (!value)
202
+ delete payload[key];
203
+ });
204
+ options = defu(payload, routeRules);
200
205
  } catch (e) {
201
- options = false;
206
+ options = routeRules;
202
207
  if (process.dev)
203
208
  console.warn("Failed to parse #nuxt-og-image-options", e, options);
204
209
  }
@@ -322,7 +327,7 @@ function getNitroProviderCompatibility(defaults, nuxt = useNuxt()) {
322
327
  return false;
323
328
  compatibility = lookup || {};
324
329
  }
325
- compatibility = defu(compatibility, defaults);
330
+ compatibility = defu$1(compatibility, defaults);
326
331
  compatibility.inlineCss = compatibility.inlineCss || (compatibility.node ? "node" : "mock");
327
332
  return compatibility;
328
333
  }
@@ -335,9 +340,9 @@ function ensureDependencies(nuxt, dep) {
335
340
  function extendTypes(module, template) {
336
341
  const nuxt = useNuxt();
337
342
  addTemplate({
338
- filename: `${module}.d.ts`,
339
- getContents: () => {
340
- const s = template();
343
+ filename: `module/${module}.d.ts`,
344
+ getContents: async () => {
345
+ const s = await template();
341
346
  return `// Generated by ${module}
342
347
  ${s}
343
348
  export {}
@@ -345,7 +350,7 @@ export {}
345
350
  }
346
351
  });
347
352
  nuxt.hooks.hook("prepare:types", ({ references }) => {
348
- references.push({ path: resolve(nuxt.options.buildDir, `${module}.d.ts`) });
353
+ references.push({ path: resolve(nuxt.options.buildDir, `module/${module}.d.ts`) });
349
354
  });
350
355
  }
351
356
 
@@ -430,12 +435,16 @@ const module = defineNuxtModule({
430
435
  };
431
436
  nuxt.options.experimental.componentIslands = true;
432
437
  extendTypes("nuxt-og-image", () => {
433
- return `interface NuxtOgImageNitroRules {
434
- ogImage?: false | Record<string, any>
435
- }
438
+ return `
439
+ import type { OgImageOptions } from '${resolve("./runtime/types")}'
440
+
436
441
  declare module 'nitropack' {
437
- interface NitroRouteRules extends NuxtOgImageNitroRules {}
438
- interface NitroRouteConfig extends NuxtOgImageNitroRules {}
442
+ interface NitroRouteRules {
443
+ ogImage?: false | OgImageOptions
444
+ }
445
+ interface NitroRouteConfig {
446
+ ogImage?: false | OgImageOptions
447
+ }
439
448
  }`;
440
449
  });
441
450
  addServerHandler({
@@ -521,7 +530,7 @@ declare module 'nitropack' {
521
530
  components.forEach((component) => {
522
531
  let valid = false;
523
532
  config.componentDirs.forEach((dir) => {
524
- if (component.pascalName.startsWith(dir) || component.kebabName.startsWith(dir))
533
+ if (component.pascalName.startsWith(dir) || component.kebabName.startsWith(dir) || component.shortPath.includes(`/${dir}/`))
525
534
  valid = true;
526
535
  });
527
536
  if (valid || component.pascalName === "OgImageTemplateFoo") {
@@ -594,7 +603,7 @@ declare module 'nitropack' {
594
603
  };
595
604
  });
596
605
  nuxt.hooks.hook("nitro:config", async (nitroConfig) => {
597
- nitroConfig.externals = defu(nitroConfig.externals || {}, {
606
+ nitroConfig.externals = defu$1(nitroConfig.externals || {}, {
598
607
  inline: [runtimeDir]
599
608
  });
600
609
  if (config.runtimeBrowser) {
@@ -711,15 +720,14 @@ export async function useProvider(provider) {
711
720
  const html = ctx.contents;
712
721
  if (!html)
713
722
  return;
714
- const extractedOptions = extractOgImageOptions(html);
715
- const routeRules = defu({}, ..._routeRulesMatcher.matchAll(ctx.route).reverse());
723
+ const routeRules = defu$1({}, ..._routeRulesMatcher.matchAll(ctx.route).reverse());
724
+ const extractedOptions = extractOgImageOptions(html, routeRules.ogImage || {});
716
725
  if (!extractedOptions || routeRules.ogImage === false)
717
726
  return;
718
727
  const entry = {
719
728
  route: ctx.route,
720
729
  path: extractedOptions.component ? `/api/og-image-html?path=${ctx.route}` : ctx.route,
721
- ...extractedOptions,
722
- ...routeRules.ogImage || {}
730
+ ...extractedOptions
723
731
  };
724
732
  if ((nuxt.options._generate || entry.cache) && entry.provider === "browser")
725
733
  screenshotQueue.push(entry);
@@ -756,23 +764,29 @@ export async function useProvider(provider) {
756
764
  browser = await createBrowser();
757
765
  if (browser) {
758
766
  nitro.logger.info(`Prerendering ${screenshotQueue.length} og:image screenshots...`);
759
- for (const entry of screenshotQueue) {
767
+ for (const k in screenshotQueue) {
768
+ let entry = screenshotQueue[k];
760
769
  if (entry.route && Object.keys(entry).length === 1) {
761
770
  const html = await $fetch(entry.route, { baseURL: withBase(nuxt.options.app.baseURL, host) });
762
- const extractedOptions = extractOgImageOptions(html);
763
- const routeRules = defu({}, ..._routeRulesMatcher.matchAll(entry.route).reverse());
764
- Object.assign(entry, {
765
- // @ts-expect-error runtime
766
- path: extractedOptions.component ? `/api/og-image-html?path=${entry.route}` : entry.route,
767
- ...extractedOptions,
768
- ...routeRules.ogImage || {}
769
- });
771
+ const routeRules = defu$1({}, ..._routeRulesMatcher.matchAll(entry.route).reverse());
772
+ const extractedOptions = extractOgImageOptions(html, routeRules.ogImage || {});
773
+ if (!extractedOptions || routeRules.ogImage === false) {
774
+ entry.skip = true;
775
+ continue;
776
+ }
777
+ screenshotQueue[k] = entry = defu$1(
778
+ { path: extractedOptions.component ? `/api/og-image-html?path=${entry.route}` : entry.route },
779
+ entry,
780
+ extractedOptions
781
+ );
770
782
  }
771
- if (entry.component)
783
+ if (!entry.skip && entry.component)
772
784
  entry.html = await globalThis.$fetch(entry.path);
773
785
  }
774
786
  for (const k in screenshotQueue) {
775
787
  const entry = screenshotQueue[k];
788
+ if (entry.skip)
789
+ continue;
776
790
  const start = Date.now();
777
791
  let hasError = false;
778
792
  const dirname2 = joinURL(nitro.options.output.publicDir, entry.route, "/__og_image__/");
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
2
  import type { Buffer } from 'node:buffer';
3
3
  import type { Browser } from 'playwright-core';
4
- import type { ScreenshotOptions } from '../types';
4
+ import type { ScreenshotOptions } from './types';
5
5
  export declare function screenshot(browser: Browser, options: Partial<ScreenshotOptions> & Record<string, any>): Promise<Buffer>;
@@ -0,0 +1,11 @@
1
+ import type { H3Event } from 'h3';
2
+ export declare function useNitroCache(e: H3Event, module: string, options: {
3
+ key: string;
4
+ cacheTtl: number;
5
+ cache: boolean;
6
+ headers: boolean;
7
+ }): Promise<{
8
+ enabled: any;
9
+ cachedItem: string | boolean;
10
+ update(item: any): Promise<void>;
11
+ }>;