@c4a/server-cli 0.4.12-alpha.2 → 0.4.12-beta.14

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 (194) hide show
  1. package/index.js +4255 -1109
  2. package/package.json +2 -1
  3. package/serve.js +11236 -2504
  4. package/web/assets/ContentCard-D0mL7yOO.js +1 -0
  5. package/web/assets/ContentCard-_I22pq8z.js +1 -0
  6. package/web/assets/ContentDetail-BlCJjlr2.js +65 -0
  7. package/web/assets/ContentDetail-BtrIxG3F.js +1 -0
  8. package/web/assets/ContentDetail-DVIbcpNs.js +65 -0
  9. package/web/assets/EntityDetail-BBLfJ9LL.js +3 -0
  10. package/web/assets/EntityDetail-CHe5PkO9.js +1 -0
  11. package/web/assets/EntityDetail-CQNu3A3D.js +3 -0
  12. package/web/assets/JsonTree-BRUca2ED.js +1 -0
  13. package/web/assets/JsonTree-Dd_iNoWA.js +1 -0
  14. package/web/assets/RelationDetail-BoTv8wr4.js +1 -0
  15. package/web/assets/RelationDetail-CZwj9HUp.js +1 -0
  16. package/web/assets/RelationDetail-CkBj9cCj.js +1 -0
  17. package/web/assets/andromeeda-C4gqWexZ.js +1 -0
  18. package/web/assets/angular-html-DA-rfuFy.js +1 -0
  19. package/web/assets/angular-ts-BrjP3tb8.js +1 -0
  20. package/web/assets/astro-HNnZUWAn.js +1 -0
  21. package/web/assets/aurora-x-D-2ljcwZ.js +1 -0
  22. package/web/assets/ayu-dark-DYE7WIF3.js +1 -0
  23. package/web/assets/ayu-light-BA47KaF1.js +1 -0
  24. package/web/assets/ayu-mirage-32ctXXKs.js +1 -0
  25. package/web/assets/blade-BjGOyj-B.js +1 -0
  26. package/web/assets/c-BIGW1oBm.js +1 -0
  27. package/web/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  28. package/web/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  29. package/web/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  30. package/web/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  31. package/web/assets/coffee-Ch7k5sss.js +1 -0
  32. package/web/assets/cpp-CofmeUqb.js +1 -0
  33. package/web/assets/css-CLj8gQPS.js +1 -0
  34. package/web/assets/csv-fuZLfV_i.js +1 -0
  35. package/web/assets/dark-plus-C3mMm8J8.js +1 -0
  36. package/web/assets/dracula-BzJJZx-M.js +1 -0
  37. package/web/assets/dracula-soft-BXkSAIEj.js +1 -0
  38. package/web/assets/everforest-dark-BgDCqdQA.js +1 -0
  39. package/web/assets/everforest-light-C8M2exoo.js +1 -0
  40. package/web/assets/github-dark-DHJKELXO.js +1 -0
  41. package/web/assets/github-dark-default-Cuk6v7N8.js +1 -0
  42. package/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  43. package/web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  44. package/web/assets/github-light-DAi9KRSo.js +1 -0
  45. package/web/assets/github-light-default-D7oLnXFd.js +1 -0
  46. package/web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  47. package/web/assets/glsl-DplSGwfg.js +1 -0
  48. package/web/assets/graphql-ChdNCCLP.js +1 -0
  49. package/web/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  50. package/web/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  51. package/web/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  52. package/web/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  53. package/web/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  54. package/web/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  55. package/web/assets/haml-D5jkg6IW.js +1 -0
  56. package/web/assets/handlebars-BpdQsYii.js +1 -0
  57. package/web/assets/horizon-BUw7H-hv.js +1 -0
  58. package/web/assets/horizon-bright-CUuTKBJd.js +1 -0
  59. package/web/assets/houston-DnULxvSX.js +1 -0
  60. package/web/assets/html-derivative-DlHx6ybY.js +1 -0
  61. package/web/assets/html-pp8916En.js +1 -0
  62. package/web/assets/http-jrhK8wxY.js +1 -0
  63. package/web/assets/hurl-irOxFIW8.js +1 -0
  64. package/web/assets/imba-DGztddWO.js +1 -0
  65. package/web/assets/index-1QkfhsIS.js +12 -0
  66. package/web/assets/index-8J6WgTr0.js +238 -0
  67. package/web/assets/index-B1KeXpYL.css +1 -0
  68. package/web/assets/index-B1zrTc3w.js +12 -0
  69. package/web/assets/index-B6uGMtfP.css +1 -0
  70. package/web/assets/index-BCzQnf3x.css +1 -0
  71. package/web/assets/index-BE9z9PQF.js +238 -0
  72. package/web/assets/index-BF6rVrre.js +238 -0
  73. package/web/assets/index-BLskFmu3.js +193 -0
  74. package/web/assets/index-BMVKFQ7h.js +238 -0
  75. package/web/assets/index-BRwgHwhm.js +12 -0
  76. package/web/assets/index-BU6YkKWq.css +1 -0
  77. package/web/assets/index-BXaK4HKi.js +12 -0
  78. package/web/assets/index-BaBWjAP7.css +1 -0
  79. package/web/assets/index-Be3yvSxB.js +12 -0
  80. package/web/assets/index-Bh0nrxkS.css +1 -0
  81. package/web/assets/index-BjM7CFih.js +12 -0
  82. package/web/assets/index-BoqItESG.js +13 -0
  83. package/web/assets/index-Bxc-msf3.js +238 -0
  84. package/web/assets/index-Bxkj7nBM.css +1 -0
  85. package/web/assets/index-ByCT34eF.css +1 -0
  86. package/web/assets/index-C0SbV7Fr.js +238 -0
  87. package/web/assets/index-C1T-mIJp.js +238 -0
  88. package/web/assets/index-C1tbhKrB.css +1 -0
  89. package/web/assets/index-C6uqUNjs.js +238 -0
  90. package/web/assets/index-CKPy6nsr.js +238 -0
  91. package/web/assets/index-CSQvEPnB.js +238 -0
  92. package/web/assets/index-CU-x3HVJ.js +12 -0
  93. package/web/assets/index-CVcqJsfJ.js +12 -0
  94. package/web/assets/index-CWKka1Dm.css +1 -0
  95. package/web/assets/index-Cs1wjzzB.css +1 -0
  96. package/web/assets/index-D0FYwi5D.css +1 -0
  97. package/web/assets/index-D9pKIRoL.js +12 -0
  98. package/web/assets/index-DHMM5gmZ.js +12 -0
  99. package/web/assets/index-DMIK6qP9.js +12 -0
  100. package/web/assets/index-DNSKIsZU.js +238 -0
  101. package/web/assets/index-DW-afpe4.js +12 -0
  102. package/web/assets/index-DYi5EQi6.css +1 -0
  103. package/web/assets/index-DaUMALOp.css +1 -0
  104. package/web/assets/index-DeStbuhs.css +1 -0
  105. package/web/assets/index-DfXQnmId.js +12 -0
  106. package/web/assets/index-DisDw0E0.css +1 -0
  107. package/web/assets/index-Dm-_KwmC.css +1 -0
  108. package/web/assets/index-DmRvWfJA.js +12 -0
  109. package/web/assets/index-Drfhm6bu.js +12 -0
  110. package/web/assets/index-DvnO8hAI.js +12 -0
  111. package/web/assets/index-G3fxfqeh.js +238 -0
  112. package/web/assets/index-JdgClnFG.css +1 -0
  113. package/web/assets/index-P648JtKx.js +12 -0
  114. package/web/assets/index-PGORoGGx.js +13 -0
  115. package/web/assets/index-VCinLKUc.css +1 -0
  116. package/web/assets/index-ZtrM6iGG.js +12 -0
  117. package/web/assets/index-oRdZsAv2.js +238 -0
  118. package/web/assets/index-snZ8He7E.js +12 -0
  119. package/web/assets/index-zH92nrE5.css +1 -0
  120. package/web/assets/java-CylS5w8V.js +1 -0
  121. package/web/assets/javascript-wDzz0qaB.js +1 -0
  122. package/web/assets/jinja-f2NsQr07.js +1 -0
  123. package/web/assets/jison-wvAkD_A8.js +1 -0
  124. package/web/assets/json-Cp-IABpG.js +1 -0
  125. package/web/assets/json5-C9tS-k6U.js +1 -0
  126. package/web/assets/jsonc-Des-eS-w.js +1 -0
  127. package/web/assets/jsonl-DcaNXYhu.js +1 -0
  128. package/web/assets/jsx-g9-lgVsj.js +1 -0
  129. package/web/assets/julia-CxzCAyBv.js +1 -0
  130. package/web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  131. package/web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  132. package/web/assets/kanagawa-wave-DWedfzmr.js +1 -0
  133. package/web/assets/laserwave-DUszq2jm.js +1 -0
  134. package/web/assets/less-B1dDrJ26.js +1 -0
  135. package/web/assets/light-plus-B7mTdjB0.js +1 -0
  136. package/web/assets/markdown-Cvjx9yec.js +1 -0
  137. package/web/assets/marko-DjSrsDqO.js +1 -0
  138. package/web/assets/material-theme-D5KoaKCx.js +1 -0
  139. package/web/assets/material-theme-darker-BfHTSMKl.js +1 -0
  140. package/web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  141. package/web/assets/material-theme-ocean-CyktbL80.js +1 -0
  142. package/web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  143. package/web/assets/mdc-DTYItulj.js +1 -0
  144. package/web/assets/mdx-Cmh6b_Ma.js +1 -0
  145. package/web/assets/min-dark-CafNBF8u.js +1 -0
  146. package/web/assets/min-light-CTRr51gU.js +1 -0
  147. package/web/assets/monokai-D4h5O-jR.js +1 -0
  148. package/web/assets/night-owl-C39BiMTA.js +1 -0
  149. package/web/assets/night-owl-light-CMTm3GFP.js +1 -0
  150. package/web/assets/nord-Ddv68eIx.js +1 -0
  151. package/web/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  152. package/web/assets/one-light-C3Wv6jpd.js +1 -0
  153. package/web/assets/php-R6g_5hLQ.js +1 -0
  154. package/web/assets/plastic-3e1v2bzS.js +1 -0
  155. package/web/assets/poimandres-CS3Unz2-.js +1 -0
  156. package/web/assets/postcss-CXtECtnM.js +1 -0
  157. package/web/assets/pug-DKIMFp6K.js +1 -0
  158. package/web/assets/python-B6aJPvgy.js +1 -0
  159. package/web/assets/r-Dspwwk_N.js +1 -0
  160. package/web/assets/red-bN70gL4F.js +1 -0
  161. package/web/assets/regexp-CDVJQ6XC.js +1 -0
  162. package/web/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  163. package/web/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  164. package/web/assets/rose-pine-qdsjHGoJ.js +1 -0
  165. package/web/assets/sass-Cj5Yp3dK.js +1 -0
  166. package/web/assets/scss-D5BDwBP9.js +1 -0
  167. package/web/assets/shellscript-Yzrsuije.js +1 -0
  168. package/web/assets/slack-dark-BthQWCQV.js +1 -0
  169. package/web/assets/slack-ochin-DqwNpetd.js +1 -0
  170. package/web/assets/snazzy-light-Bw305WKR.js +1 -0
  171. package/web/assets/solarized-dark-DXbdFlpD.js +1 -0
  172. package/web/assets/solarized-light-L9t79GZl.js +1 -0
  173. package/web/assets/sql-BLtJtn59.js +1 -0
  174. package/web/assets/stylus-BEDo0Tqx.js +1 -0
  175. package/web/assets/svelte-Cy7k_4gC.js +1 -0
  176. package/web/assets/synthwave-84-CbfX1IO0.js +1 -0
  177. package/web/assets/tokyo-night-hegEt444.js +1 -0
  178. package/web/assets/ts-tags-DQrlYJgV.js +1 -0
  179. package/web/assets/tsx-COt5Ahok.js +1 -0
  180. package/web/assets/typescript-BPQ3VLAy.js +1 -0
  181. package/web/assets/vesper-DU1UobuO.js +1 -0
  182. package/web/assets/vitesse-black-Bkuqu6BP.js +1 -0
  183. package/web/assets/vitesse-dark-D0r3Knsf.js +1 -0
  184. package/web/assets/vitesse-light-CVO1_9PV.js +1 -0
  185. package/web/assets/vue-D2xRrEX4.js +1 -0
  186. package/web/assets/vue-html-AaS7Mt5G.js +1 -0
  187. package/web/assets/vue-vine-BoDAl6tE.js +1 -0
  188. package/web/assets/wasm-CG6Dc4jp.js +1 -0
  189. package/web/assets/wasm-MzD3tlZU.js +1 -0
  190. package/web/assets/wgsl-Dx-B1_4e.js +1 -0
  191. package/web/assets/wit-5i3qLPDT.js +1 -0
  192. package/web/assets/xml-sdJ4AIDG.js +1 -0
  193. package/web/assets/yaml-Buea-lGh.js +1 -0
  194. package/web/index.html +2 -2
@@ -0,0 +1 @@
1
+ import{a as r,j as e}from"./index-PGORoGGx.js";import{s as i}from"./JsonTree-BRUca2ED.js";function c(s){return s<1024?`${s} B`:`${(s/1024).toFixed(1)} KB`}function x({content:s}){const a=r(),t=s.hash_id.slice(0,12);return e.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-3 cursor-pointer hover:border-c4a-accent transition-colors",onClick:()=>a(i.content(s.hash_id)),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0",children:"📄"}),e.jsx("span",{className:"font-mono text-xs text-c4a-accent hover:underline truncate",children:t}),s.byte_size!=null&&e.jsx("span",{className:"text-xs text-c4a-text-muted shrink-0",children:c(s.byte_size)})]}),s.source_path&&e.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted truncate",children:s.source_path}),s.span&&e.jsxs("p",{className:"mt-0.5 text-xs text-c4a-text-muted",children:["行 ",s.span.start,"-",s.span.end]})]})}export{x as C};
@@ -0,0 +1 @@
1
+ import{a as r,j as e}from"./index-BoqItESG.js";import{s as i}from"./JsonTree-Dd_iNoWA.js";function c(s){return s<1024?`${s} B`:`${(s/1024).toFixed(1)} KB`}function x({content:s}){const a=r(),t=s.hash_id.slice(0,12);return e.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-3 cursor-pointer hover:border-c4a-accent transition-colors",onClick:()=>a(i.content(s.hash_id)),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0",children:"📄"}),e.jsx("span",{className:"font-mono text-xs text-c4a-accent hover:underline truncate",children:t}),s.byte_size!=null&&e.jsx("span",{className:"text-xs text-c4a-text-muted shrink-0",children:c(s.byte_size)})]}),s.source_path&&e.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted truncate",children:s.source_path}),s.span&&e.jsxs("p",{className:"mt-0.5 text-xs text-c4a-text-muted",children:["行 ",s.span.start,"-",s.span.end]})]})}export{x as C};
@@ -0,0 +1,65 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/astro-HNnZUWAn.js","assets/json-Cp-IABpG.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-BjGOyj-B.js","assets/html-derivative-DlHx6ybY.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/sql-BLtJtn59.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/haml-D5jkg6IW.js","assets/handlebars-BpdQsYii.js","assets/yaml-Buea-lGh.js","assets/http-jrhK8wxY.js","assets/shellscript-Yzrsuije.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/python-B6aJPvgy.js","assets/r-Dspwwk_N.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/markdown-Cvjx9yec.js","assets/php-R6g_5hLQ.js","assets/pug-DKIMFp6K.js","assets/svelte-Cy7k_4gC.js","assets/ts-tags-DQrlYJgV.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
2
+ import{g as Sr,r as k,j as S,_ as d,u as Er,a as wr,b as pe,c as Cr,d as me,A as ge,E as _e,T as Tr,e as xr,f as Te,h as xe}from"./index-PGORoGGx.js";import{B as Ie,s as Lr,D as kr,J as _n,c as Rr}from"./JsonTree-BRUca2ED.js";function yn(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ar=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nr={};function Ot(t,e){return(Nr.jsx?Pr:Ar).test(t)}const Ir=/[ \t\n\f\r]/g;function Fe(t){return typeof t=="object"?t.type==="text"?Dt(t.value):!1:Dt(t)}function Dt(t){return t.replace(Ir,"")===""}class ye{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ye.prototype.normal={};ye.prototype.property={};ye.prototype.space=void 0;function bn(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new ye(n,r,e)}function lt(t){return t.toLowerCase()}class ${constructor(e,n){this.attribute=n,this.property=e}}$.prototype.attribute="";$.prototype.booleanish=!1;$.prototype.boolean=!1;$.prototype.commaOrSpaceSeparated=!1;$.prototype.commaSeparated=!1;$.prototype.defined=!1;$.prototype.mustUseProperty=!1;$.prototype.number=!1;$.prototype.overloadedBoolean=!1;$.prototype.property="";$.prototype.spaceSeparated=!1;$.prototype.space=void 0;let Or=0;const C=J(),N=J(),ct=J(),g=J(),R=J(),Z=J(),U=J();function J(){return 2**++Or}const ut=Object.freeze(Object.defineProperty({__proto__:null,boolean:C,booleanish:N,commaOrSpaceSeparated:U,commaSeparated:Z,number:g,overloadedBoolean:ct,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),Qe=Object.keys(ut);class wt extends ${constructor(e,n,r,i){let s=-1;if(super(e,n),jt(this,"space",i),typeof r=="number")for(;++s<Qe.length;){const o=Qe[s];jt(this,Qe[s],(r&ut[o])===ut[o])}}}wt.prototype.defined=!0;function jt(t,e,n){n&&(t[e]=n)}function ne(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new wt(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[lt(r)]=r,n[lt(s.attribute)]=r}return new ye(e,n,t.space)}const vn=ne({properties:{ariaActiveDescendant:null,ariaAtomic:N,ariaAutoComplete:null,ariaBusy:N,ariaChecked:N,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:R,ariaCurrent:null,ariaDescribedBy:R,ariaDetails:null,ariaDisabled:N,ariaDropEffect:R,ariaErrorMessage:null,ariaExpanded:N,ariaFlowTo:R,ariaGrabbed:N,ariaHasPopup:null,ariaHidden:N,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:R,ariaLevel:g,ariaLive:null,ariaModal:N,ariaMultiLine:N,ariaMultiSelectable:N,ariaOrientation:null,ariaOwns:R,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:N,ariaReadOnly:N,ariaRelevant:null,ariaRequired:N,ariaRoleDescription:R,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:N,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Sn(t,e){return e in t?t[e]:e}function En(t,e){return Sn(t,e.toLowerCase())}const Dr=ne({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Z,acceptCharset:R,accessKey:R,action:null,allow:null,allowFullScreen:C,allowPaymentRequest:C,allowUserMedia:C,alt:null,as:null,async:C,autoCapitalize:null,autoComplete:R,autoFocus:C,autoPlay:C,blocking:R,capture:null,charSet:null,checked:C,cite:null,className:R,cols:g,colSpan:null,content:null,contentEditable:N,controls:C,controlsList:R,coords:g|Z,crossOrigin:null,data:null,dateTime:null,decoding:null,default:C,defer:C,dir:null,dirName:null,disabled:C,download:ct,draggable:N,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:C,formTarget:null,headers:R,height:g,hidden:ct,high:g,href:null,hrefLang:null,htmlFor:R,httpEquiv:R,id:null,imageSizes:null,imageSrcSet:null,inert:C,inputMode:null,integrity:null,is:null,isMap:C,itemId:null,itemProp:R,itemRef:R,itemScope:C,itemType:R,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:C,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:C,muted:C,name:null,nonce:null,noModule:C,noValidate:C,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:C,optimum:g,pattern:null,ping:R,placeholder:null,playsInline:C,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:C,referrerPolicy:null,rel:R,required:C,reversed:C,rows:g,rowSpan:g,sandbox:R,scope:null,scoped:C,seamless:C,selected:C,shadowRootClonable:C,shadowRootDelegatesFocus:C,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:N,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:C,useMap:null,value:N,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:R,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:C,declare:C,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:C,noHref:C,noShade:C,noWrap:C,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:N,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:C,disableRemotePlayback:C,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:En}),jr=ne({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:U,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:R,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:C,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Z,g2:Z,glyphName:Z,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:U,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:R,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:U,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:U,rev:U,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:U,requiredFeatures:U,requiredFonts:U,requiredFormats:U,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:U,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:U,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:U,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sn}),wn=ne({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Cn=ne({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:En}),Tn=ne({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Mr={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Br=/[A-Z]/g,Mt=/-[a-z]/g,Gr=/^data[-\w.:]+$/i;function xn(t,e){const n=lt(e);let r=e,i=$;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Gr.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Mt,$r);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Mt.test(s)){let o=s.replace(Br,Vr);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=wt}return new i(r,e)}function Vr(t){return"-"+t.toLowerCase()}function $r(t){return t.charAt(1).toUpperCase()}const Ln=bn([vn,Dr,wn,Cn,Tn],"html"),be=bn([vn,jr,wn,Cn,Tn],"svg");function kn(t){return t.join(" ").trim()}var Q={},Ze,Bt;function Ur(){if(Bt)return Ze;Bt=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,a=`
3
+ `,c="/",u="*",h="",p="comment",f="declaration";function m(y,b){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];b=b||{};var _=1,v=1;function L(T){var w=T.match(e);w&&(_+=w.length);var B=T.lastIndexOf(a);v=~B?T.length-B:v+T.length}function x(){var T={line:_,column:v};return function(w){return w.position=new P(T),Se(),w}}function P(T){this.start=T,this.end={line:_,column:v},this.source=b.source}P.prototype.content=y;function V(T){var w=new Error(b.source+":"+_+":"+v+": "+T);if(w.reason=T,w.filename=b.source,w.line=_,w.column=v,w.source=y,!b.silent)throw w}function F(T){var w=T.exec(y);if(w){var B=w[0];return L(B),y=y.slice(B.length),w}}function Se(){F(n)}function Ee(T){var w;for(T=T||[];w=Y();)w!==!1&&T.push(w);return T}function Y(){var T=x();if(!(c!=y.charAt(0)||u!=y.charAt(1))){for(var w=2;h!=y.charAt(w)&&(u!=y.charAt(w)||c!=y.charAt(w+1));)++w;if(w+=2,h===y.charAt(w-1))return V("End of comment missing");var B=y.slice(2,w-2);return v+=2,L(B),y=y.slice(w),v+=2,T({type:p,comment:B})}}function we(){var T=x(),w=F(r);if(w){if(Y(),!F(i))return V("property missing ':'");var B=F(s),vr=T({type:f,property:E(w[0].replace(t,h)),value:B?E(B[0].replace(t,h)):h});return F(o),vr}}function Ce(){var T=[];Ee(T);for(var w;w=we();)w!==!1&&(T.push(w),Ee(T));return T}return Se(),Ce()}function E(y){return y?y.replace(l,h):h}return Ze=m,Ze}var Gt;function Hr(){if(Gt)return Q;Gt=1;var t=Q&&Q.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Q,"__esModule",{value:!0}),Q.default=n;const e=t(Ur());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const o=(0,e.default)(r),l=typeof i=="function";return o.forEach(a=>{if(a.type!=="declaration")return;const{property:c,value:u}=a;l?i(c,u,a):u&&(s=s||{},s[c]=u)}),s}return Q}var re={},Vt;function Fr(){if(Vt)return re;Vt=1,Object.defineProperty(re,"__esModule",{value:!0}),re.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(c){return!c||n.test(c)||t.test(c)},o=function(c,u){return u.toUpperCase()},l=function(c,u){return"".concat(u,"-")},a=function(c,u){return u===void 0&&(u={}),s(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,l):c=c.replace(r,l),c.replace(e,o))};return re.camelCase=a,re}var ie,$t;function zr(){if($t)return ie;$t=1;var t=ie&&ie.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(Hr()),n=Fr();function r(i,s){var o={};return!i||typeof i!="string"||(0,e.default)(i,function(l,a){l&&a&&(o[(0,n.camelCase)(l,s)]=a)}),o}return r.default=r,ie=r,ie}var Wr=zr();const qr=Sr(Wr),Kr=Xr("start");function Xr(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Jr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ut(t.position):"start"in t||"end"in t?Ut(t):"line"in t||"column"in t?ht(t):""}function ht(t){return Ht(t&&t.line)+":"+Ht(t&&t.column)}function Ut(t){return ht(t&&t.start)+"-"+ht(t&&t.end)}function Ht(t){return t&&typeof t=="number"?t:1}class G extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?s.ruleId=r:(s.source=r.slice(0,a),s.ruleId=r.slice(a+1))}if(!s.place&&s.ancestors&&s.ancestors){const a=s.ancestors[s.ancestors.length-1];a&&(s.place=a.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Jr(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}G.prototype.file="";G.prototype.name="";G.prototype.reason="";G.prototype.message="";G.prototype.stack="";G.prototype.column=void 0;G.prototype.line=void 0;G.prototype.ancestors=void 0;G.prototype.cause=void 0;G.prototype.fatal=void 0;G.prototype.place=void 0;G.prototype.ruleId=void 0;G.prototype.source=void 0;const Ct={}.hasOwnProperty,Yr=new Map,Qr=/[A-Z]/g,Zr=new Set(["table","tbody","thead","tfoot","tr"]),ei=new Set(["td","th"]),Rn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ti(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ci(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=li(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?be:Ln,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=An(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function An(t,e,n){if(e.type==="element")return ni(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return ri(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return si(t,e,n);if(e.type==="mdxjsEsm")return ii(t,e);if(e.type==="root")return oi(t,e,n);if(e.type==="text")return ai(t,e)}function ni(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=be,t.schema=i),t.ancestors.push(e);const s=Nn(t,e.tagName,!1),o=ui(t,e);let l=xt(t,e);return Zr.has(e.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!Fe(a):!0})),Pn(t,o,s,e),Tt(o,l),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function ri(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}ce(t,e.position)}function ii(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);ce(t,e.position)}function si(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=be,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:Nn(t,e.name,!0),o=hi(t,e),l=xt(t,e);return Pn(t,o,s,e),Tt(o,l),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function oi(t,e,n){const r={};return Tt(r,xt(t,e)),t.create(e,t.Fragment,r,n)}function ai(t,e){return e.value}function Pn(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function Tt(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function li(t,e,n){return r;function r(i,s,o,l){const c=Array.isArray(o.children)?n:e;return l?c(s,o,l):c(s,o)}}function ci(t,e){return n;function n(r,i,s,o){const l=Array.isArray(s.children),a=Kr(r);return e(i,s,o,l,{columnNumber:a?a.column-1:void 0,fileName:t,lineNumber:a?a.line:void 0},void 0)}}function ui(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&Ct.call(e.properties,i)){const s=di(t,i,e.properties[i]);if(s){const[o,l]=s;t.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&ei.has(e.tagName)?r=l:n[o]=l}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function hi(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,t.evaluater.evaluateExpression(l.argument))}else ce(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const l=r.value.data.estree.body[0];l.type,s=t.evaluater.evaluateExpression(l.expression)}else ce(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function xt(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:Yr;for(;++r<e.children.length;){const s=e.children[r];let o;if(t.passKeys){const a=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(a){const c=i.get(a)||0;o=a+"-"+c,i.set(a,c+1)}}const l=An(t,s,o);l!==void 0&&n.push(l)}return n}function di(t,e,n){const r=xn(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?yn(n):kn(n)),r.property==="style"){let i=typeof n=="object"?n:fi(t,String(n));return t.stylePropertyNameCase==="css"&&(i=pi(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?Mr[r.property]||r.property:r.attribute,n]}}function fi(t,e){try{return qr(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new G("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Rn+"#cannot-parse-style-attribute",i}}function Nn(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,o;for(;++s<i.length;){const l=Ot(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=o}else r=Ot(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return Ct.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);ce(t)}function ce(t,e){const n=new G("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Rn+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pi(t){const e={};let n;for(n in t)Ct.call(t,n)&&(e[mi(n)]=t[n]);return e}function mi(t){let e=t.replace(Qr,gi);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function gi(t){return"-"+t.toLowerCase()}var dt=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,yi=Object.getOwnPropertyNames,bi=Object.prototype.hasOwnProperty,vi=(t,e)=>{let n={};for(var r in t)dt(n,r,{get:t[r],enumerable:!0});return dt(n,Symbol.toStringTag,{value:"Module"}),n},Si=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=yi(e),s=0,o=i.length,l;s<o;s++)l=i[s],!bi.call(t,l)&&l!==n&&dt(t,l,{get:(a=>e[a]).bind(null,l),enumerable:!(r=_i(e,l))||r.enumerable});return t},Ei=(t,e,n)=>(Si(t,e,"default"),n),A=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function wi(t){return Lt(t)}function Lt(t){return Array.isArray(t)?Ci(t):t instanceof RegExp?t:typeof t=="object"?Ti(t):t}function Ci(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Lt(t[n]);return e}function Ti(t){let e={};for(let n in t)e[n]=Lt(t[n]);return e}function In(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function On(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?On(t.substring(0,t.length-1)):t.substr(~e+1)}var et=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Le=class{static hasCaptures(t){return t===null?!1:(et.lastIndex=0,et.test(t))}static replaceCaptures(t,e,n){return t.replace(et,(r,i,s,o)=>{let l=n[parseInt(i||s,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(o){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dn(t,e){return t<e?-1:t>e?1:0}function jn(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let s=Dn(t[i],e[i]);if(s!==0)return s}return 0}return n-r}function Ft(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Mn(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bn=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Oe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(ki(t),e)}static createFromParsedTheme(t,e){return Ai(t,e)}_cachedMatchRoot=new Bn(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>xi(t.parent,i.parentScopes));return r?new Gn(r.fontStyle,r.foreground,r.background):null}},tt=class Pe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new Pe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new Pe(n,e[r]);return n}push(e){return new Pe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function xi(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Li(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Li(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Gn=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function ki(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let l;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(o.scope)?l=o.scope:l=[""];let a=-1;if(typeof o.settings.fontStyle=="string"){a=0;let h=o.settings.fontStyle.split(" ");for(let p=0,f=h.length;p<f;p++)switch(h[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof o.settings.foreground=="string"&&Ft(o.settings.foreground)&&(c=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&Ft(o.settings.background)&&(u=o.settings.background);for(let h=0,p=l.length;h<p;h++){let m=l[h].trim().split(" "),E=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),n[r++]=new Ri(E,y,i,a,c,u)}}return n}var Ri=class{constructor(t,e,n,r,i,s){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},M=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(M||{});function Ai(t,e){t.sort((a,c)=>{let u=Dn(a.scope,c.scope);return u!==0||(u=jn(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(i=a.background)}let s=new Pi(e),o=new Gn(n,s.getId(r),s.getId(i)),l=new Ii(new ft(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,s.getId(u.foreground),s.getId(u.background))}return new Oe(s,o,l)}var Pi=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Ni=Object.freeze([]),ft=class Vn{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,i,s){this.scopeDepth=e,this.parentScopes=n||Ni,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new Vn(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Ii=class pt{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-e.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,s;if(r===-1?(i=e,s=""):(i=e.substring(0,r),s=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(pt._cmpBySpecificity),n}insert(e,n,r,i,s,o){if(n===""){this._doInsertHere(e,r,i,s,o);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new pt(this._mainRule.clone(),ft.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,i,s,o)}_doInsertHere(e,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(e,r,i,s);return}for(let o=0,l=this._rulesWithParentScopes.length;o<l;o++){let a=this._rulesWithParentScopes[o];if(jn(a.parentScopes,n)===0){a.acceptOverwrite(e,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new ft(e,n,r,i,s))}},te=class H{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=H.getLanguageId(e),r=H.getTokenType(e),i=H.getFontStyle(e),s=H.getForeground(e),o=H.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,s,o,l){let a=H.getLanguageId(e),c=H.getTokenType(e),u=H.containsBalancedBrackets(e)?1:0,h=H.getFontStyle(e),p=H.getForeground(e),f=H.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),i!==null&&(u=i?1:0),s!==-1&&(h=s),o!==0&&(p=o),l!==0&&(f=l),(a<<0|c<<8|u<<10|h<<11|p<<15|f<<24)>>>0}};function De(t,e){const n=[],r=Oi(t);let i=r.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=o();if(n.push({matcher:c,priority:a}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const a=s();return c=>!!a&&!a(c)}if(i==="("){i=r.next();const a=l();return i===")"&&(i=r.next()),a}if(zt(i)){const a=[];do a.push(i),i=r.next();while(zt(i));return c=>e(a,c)}return null}function o(){const a=[];let c=s();for(;c;)a.push(c),c=s();return u=>a.every(h=>h(u))}function l(){const a=[];let c=o();for(;c&&(a.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=o()}return u=>a.some(h=>h(u))}}function zt(t){return!!t&&!!t.match(/[\w\.:]+/)}function Oi(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function $n(t){typeof t.dispose=="function"&&t.dispose()}var ue=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Di=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},ji=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Mi=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ue(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new ji;for(const n of t)Bi(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof ue){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Bi(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=n.lookup(e);t instanceof ue?Ne({baseGrammar:s,selfGrammar:i},r):mt(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const o=n.injections(t.scopeName);if(o)for(const l of o)r.add(new ue(l))}function mt(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];je([r],e,n)}}function Ne(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&je(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&je(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function je(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?In({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&je(r.patterns,{...e,repository:i},n);const s=r.include;if(!s)continue;const o=Un(s);switch(o.kind){case 0:Ne({...e,selfGrammar:e.baseGrammar},n);break;case 1:Ne(e,n);break;case 2:mt(o.ruleName,{...e,repository:i},n);break;case 3:case 4:const l=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:i};o.kind===4?mt(o.ruleName,a,n):Ne(a,n)}else o.kind===4?n.add(new Di(o.scopeName,o.ruleName)):n.add(new ue(o.scopeName));break}}}var Gi=class{kind=0},Vi=class{kind=1},$i=class{constructor(t){this.ruleName=t}kind=2},Ui=class{constructor(t){this.scopeName=t}kind=3},Hi=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Un(t){if(t==="$base")return new Gi;if(t==="$self")return new Vi;const e=t.indexOf("#");if(e===-1)return new Ui(t);if(e===0)return new $i(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Hi(n,r)}}var Fi=/\\(\d+)/,Wt=/\\(\d+)/g,zi=-1,Hn=-2;var ve=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${On(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Le.replaceCaptures(this._contentName,t,e)}},Wi=class extends ve{retokenizeCapturedWithRuleId;constructor(t,e,n,r,i){super(t,e,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},qi=class extends ve{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,null),this._match=new he(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new de,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qt=class extends ve{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new de,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends ve{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i,s,o,l,a,c){super(t,e,n,r),this._begin=new he(i,this.id),this.beginCaptures=s,this._end=new he(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new de;for(const n of this.patterns)t.getRule(n).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,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},Me=class extends ve{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,i,s,o,l,a){super(t,e,n,r),this._begin=new he(i,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new he(o,Hn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.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,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new de;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new de,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},Fn=class j{static createCaptureRule(e,n,r,i,s){return e.registerRule(o=>new Wi(n,o,r,i,s))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new qi(e.$vscodeTextmateLocation,e.id,e.name,e.match,j._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=In({},r,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new qt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,j._compilePatterns(s,n,r))}return e.while?new Me(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,j._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,j._compileCaptures(e.whileCaptures||e.captures,n,r),j._compilePatterns(e.patterns,n,r)):new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,j._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,j._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,j._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const l=parseInt(o,10);l>s&&(s=l)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const l=parseInt(o,10);let a=0;e[o].patterns&&(a=j.getCompiledRuleId(e[o],n,r)),i[l]=j.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,a)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const l=e[s];let a=-1;if(l.include){const c=Un(l.include);switch(c.kind){case 0:case 1:a=j.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=j.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,p=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(p){let m=f.repository[p];m&&(a=j.getCompiledRuleId(m,n,f.repository))}else a=j.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else a=j.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof qt||c instanceof gt||c instanceof Me)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},he=class zn{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let i=0,s=[],o=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(s.push(e.substring(i,l)),s.push("$(?!\\n)(?<!\\n)"),i=l+2):(c==="A"||c==="G")&&(o=!0),l++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Fi.test(this.source):this.hasBackReferences=!1}clone(){return new zn(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return Wt.lastIndex=0,this.source.replace(Wt,(i,s)=>Mn(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],s,o,l,a;for(s=0,o=this.source.length;s<o;s++)l=this.source.charAt(s),e[s]=l,n[s]=l,r[s]=l,i[s]=l,l==="\\"&&s+1<o&&(a=this.source.charAt(s+1),a==="A"?(e[s+1]="￿",n[s+1]="￿",r[s+1]="A",i[s+1]="A"):a==="G"?(e[s+1]="￿",n[s+1]="G",r[s+1]="￿",i[s+1]="G"):(e[s+1]=a,n[s+1]=a,r[s+1]=a,i[s+1]=a),s++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},de=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),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,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new Kt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new Kt(t,r,this._items.map(i=>i.ruleId))}},Kt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
4
+ `)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},nt=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Ki=class _t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new nt(e,8),this._embeddedLanguagesMatcher=new Xi(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?_t._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new nt(0,0);_getBasicScopeAttributes=new Bn(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new nt(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(_t.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Xi=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>Mn(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Xt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Wn(t,e,n,r,i,s,o,l){const a=e.content.length;let c=!1,u=-1;if(o){const f=Ji(t,e,n,r,i,s);i=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new Xt(i,!0);p()}return new Xt(i,!1);function p(){const f=Yi(t,e,n,r,i,u);if(!f){s.produce(i,a),c=!0;return}const m=f.captureIndices,E=f.matchedRuleId,y=m&&m.length>0?m[0].end>r:!1;if(E===zi){const b=i.getRule(t);s.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),oe(t,e,n,i,s,b.endCaptures,m),s.produce(i,m[0].end);const _=i;if(i=i.parent,u=_.getAnchorPos(),!y&&_.getEnterPos()===r){i=_,s.produce(i,a),c=!0;return}}else{const b=t.getRule(E);s.produce(i,m[0].start);const _=i,v=b.getName(e.content,m),L=i.contentNameScopesList.pushAttributed(v,t);if(i=i.push(E,r,u,m[0].end===a,null,L,L),b instanceof gt){const x=b;oe(t,e,n,i,s,x.beginCaptures,m),s.produce(i,m[0].end),u=m[0].end;const P=x.getContentName(e.content,m),V=L.pushAttributed(P,t);if(i=i.withContentNameScopesList(V),x.endHasBackReferences&&(i=i.withEndRule(x.getEndWithResolvedBackReferences(e.content,m))),!y&&_.hasSameRuleAs(i)){i=i.pop(),s.produce(i,a),c=!0;return}}else if(b instanceof Me){const x=b;oe(t,e,n,i,s,x.beginCaptures,m),s.produce(i,m[0].end),u=m[0].end;const P=x.getContentName(e.content,m),V=L.pushAttributed(P,t);if(i=i.withContentNameScopesList(V),x.whileHasBackReferences&&(i=i.withEndRule(x.getWhileWithResolvedBackReferences(e.content,m))),!y&&_.hasSameRuleAs(i)){i=i.pop(),s.produce(i,a),c=!0;return}}else if(oe(t,e,n,i,s,b.captures,m),s.produce(i,m[0].end),i=i.pop(),!y){i=i.safePop(),s.produce(i,a),c=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function Ji(t,e,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1;const l=[];for(let a=i;a;a=a.pop()){const c=a.getRule(t);c instanceof Me&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=es(a.rule,t,a.stack.endRule,n,r===o),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==Hn){i=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(s.produce(a.stack,h.captureIndices[0].start),oe(t,e,n,a.stack,s,a.rule.whileCaptures,h.captureIndices),s.produce(a.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Yi(t,e,n,r,i,s){const o=Qi(t,e,n,r,i,s),l=t.getInjections();if(l.length===0)return o;const a=Zi(l,t,e,n,r,i,s);if(!a)return o;if(!o)return a;const c=o.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:o}function Qi(t,e,n,r,i,s){const o=i.getRule(t),{ruleScanner:l,findOptions:a}=qn(o,t,i.endRule,n,r===s),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Zi(t,e,n,r,i,s,o){let l=Number.MAX_VALUE,a=null,c,u=0;const h=s.contentNameScopesList.getScopeNames();for(let p=0,f=t.length;p<f;p++){const m=t[p];if(!m.matcher(h))continue;const E=e.getRule(m.ruleId),{ruleScanner:y,findOptions:b}=qn(E,e,null,r,i===o),_=y.findNextMatchSync(n,i,b);if(!_)continue;const v=_.captureIndices[0].start;if(!(v>=l)&&(l=v,a=_.captureIndices,c=_.ruleId,u=m.priority,l===i))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function qn(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function es(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function oe(t,e,n,r,i,s,o){if(s.length===0)return;const l=e.content,a=Math.min(s.length,o.length),c=[],u=o[0].end;for(let h=0;h<a;h++){const p=s[h];if(p===null)continue;const f=o[h];if(f.length===0)continue;if(f.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=f.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,f.start):i.produce(r,f.start),p.retokenizeCapturedWithRuleId){const E=p.getName(l,o),y=r.contentNameScopesList.pushAttributed(E,t),b=p.getContentName(l,o),_=y.pushAttributed(b,t),v=r.push(p.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,_),L=t.createOnigString(l.substring(0,f.end));Wn(t,L,n&&f.start===0,f.start,v,i,!1,0),$n(L);continue}const m=p.getName(l,o);if(m!==null){const y=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(m,t);c.push(new ts(y,f.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var ts=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function ns(t,e,n,r,i,s,o,l){return new is(t,e,n,r,i,s,o,l)}function Jt(t,e,n,r,i){const s=De(e,Be),o=Fn.getCompiledRuleId(n,r,i.repository);for(const l of s)t.push({debugSelector:e,matcher:l.matcher,ruleId:o,grammar:i,priority:l.priority})}function Be(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(rs(e[i],r))return n=i+1,!0;return!1})}function rs(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var is=class{constructor(t,e,n,r,i,s,o,l){if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new Ki(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Yt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const c=De(a,Be);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let o in i)Jt(e,o,i[o],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(o=>{const l=this.getExternalGrammar(o);if(l){const a=l.injectionSelector;a&&Jt(e,a,l,this,l)}})}return e.sort((i,s)=>i.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Yt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Fn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===yt.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=te.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),p=this.getRule(this._rootId).getName(null,null);let f;p?f=ae.createRootAndLookUpScopeName(p,h,this):f=ae.createRoot("unknown",h),e=new yt(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,e.reset();t=t+`
5
+ `;const s=this.createOnigString(t),o=s.content.length,l=new os(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Wn(this,s,i,0,e,l,!0,r);return $n(s),{lineLength:o,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Yt(t,e){return t=wi(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ae=class z{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=e?.scopePath??null;for(const s of n)i=tt.push(i,s.scopeNames),r=new z(r,i,s.encodedTokenAttributes);return r}static createRoot(e,n){return new z(null,new tt(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),s=new tt(null,e),o=r.themeProvider.themeMatch(s),l=z.mergeAttributes(n,i,o);return new z(null,s,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return z.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let i=-1,s=0,o=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,o=r.backgroundId),te.set(e,n.languageId,n.tokenType,null,i,s,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return z._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const s of r)i=z._pushAttributed(i,s,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),s=e.scopePath.push(n),o=r.themeProvider.themeMatch(s),l=z.mergeAttributes(e.tokenAttributes,i,o);return new z(e,s,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},yt=class K{constructor(e,n,r,i,s,o,l,a){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new K(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:K._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ae.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){K._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,s,o,l){return new K(this,e,n,r,i,s,o,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new K(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=ae.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new K(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ae.fromExtension(r,n.contentNameScopesList))}},ss=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):De(n,Be).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>De(n,Be).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},os=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=t?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(s)&&(r=te.set(r,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=te.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},as=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,i){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,ns(t,s,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},ls=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new as(Oe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(Oe.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new ss(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,i,s){const o=new Mi(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(l=>this._loadSingleGrammar(l.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,r,i,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,i=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(e,n,r,i,s)}},bt=yt.NULL;function Ge(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[i,s]of Object.entries(e?.colorReplacements||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function q(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function cs(t){return Array.isArray(t)?t:[t]}async function Kn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ze(t){return!t||["plaintext","txt","text","plain"].includes(t)}function kt(t){return t==="ansi"||ze(t)}function We(t){return t==="none"}function Xn(t){return We(t)}function qe(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(/(\r?\n)/g);let r=0;const i=[];for(let s=0;s<n.length;s+=2){const o=e?n[s]+(n[s+1]||""):n[s];i.push([o,r]),r+=n[s].length,r+=n[s+1]?.length||0}return i}const Qt={light:"#333333",dark:"#bbbbbb"},Zt={light:"#fffffe",dark:"#1e1e1e"},en="__shiki_resolved";function Rt(t){if(t?.[en])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Qt.light:Qt.dark),n||(n=e.type==="light"?Zt.light:Zt.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const s=new Map;function o(l){if(s.has(l))return s.get(l);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?o(l):(s.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const h=o(l.settings.foreground);e.colorReplacements[h]=l.settings.foreground,u.settings.foreground=h}if(c){const h=o(l.settings.background);e.colorReplacements[h]=l.settings.background,u.settings.background=h}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=o(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,en,{enumerable:!1,writable:!1,value:!0}),e}async function Jn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!kt(e)).map(async e=>await Kn(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Yn(t){return(await Promise.all(t.map(async e=>Xn(e)?null:Rt(await Kn(e))))).filter(e=>!!e)}function Qn(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new A(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return t}var us=class extends ls{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=Rt(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=Oe.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Qn(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(i=>{this._alias[i]=t.name}),this._loadedLanguagesCache=null,e.size)for(const i of e)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const r of t)this.resolveEmbeddedLanguages(r);const e=Array.from(this._langGraph.entries()),n=e.filter(([r,i])=>!i);if(n.length){const r=e.filter(([i,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(o=>n.map(([l])=>l).includes(o)):!1).filter(i=>!n.includes(i));throw new A(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of e)this._resolver.addLanguage(i);for(const[r,i]of e)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},hs=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let r=1;r<=e.length;r++){const i=e.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let se=0;function ds(t){se+=1,t.warnings!==!1&&se>=10&&se%10===0&&console.warn(`[Shiki] ${se} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new A("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(Rt),i=new us(new hs(t.engine,n),r,n,t.langAlias);let s;function o(_){return Qn(_,t.langAlias)}function l(_){y();const v=i.getGrammar(typeof _=="string"?_:_.name);if(!v)throw new A(`Language \`${_}\` not found, you may need to load it first`);return v}function a(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const v=i.getTheme(_);if(!v)throw new A(`Theme \`${_}\` not found, you may need to load it first`);return v}function c(_){y();const v=a(_);return s!==_&&(i.setTheme(v),s=_),{theme:v,colorMap:i.getColorMap()}}function u(){return y(),i.getLoadedThemes()}function h(){return y(),i.getLoadedLanguages()}function p(..._){y(),i.loadLanguages(_.flat(1))}async function f(..._){return p(await Jn(_))}function m(..._){y();for(const v of _.flat(1))i.loadTheme(v)}async function E(..._){return y(),m(await Yn(_))}function y(){if(e)throw new A("Shiki instance has been disposed")}function b(){e||(e=!0,i.dispose(),se-=1)}return{setTheme:c,getTheme:a,getLanguage:l,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:f,loadLanguageSync:p,loadTheme:E,loadThemeSync:m,dispose:b,[Symbol.dispose]:b}}async function fs(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([Yn(t.themes||[]),Jn(t.langs||[]),t.engine]);return ds({...t,themes:e,langs:n,engine:r})}const Zn=new WeakMap;function Ke(t,e){Zn.set(t,e)}function fe(t){return Zn.get(t)}var Xe=class er{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new er(Object.fromEntries(cs(n).map(r=>[r,bt])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,i]=e;this.lang=r,this._stacks={[i]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return ps(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ps(t){const e=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const s=i?.nameScopesList?.scopeName;s&&e.push(s),i.parent&&r(i.parent)}return r(t),e}function ms(t,e){if(!(t instanceof Xe))throw new A("Invalid grammar state");return t.getInternalStack(e)}function tr(t,e,n={}){const{theme:r=t.getLoadedThemes()[0]}=n;if(ze(t.resolveLangAlias(n.lang||"text"))||We(r))return qe(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:i,colorMap:s}=t.setTheme(r),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new A(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new A(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return _s(e,o,i,s,n)}function gs(...t){if(t.length===2)return fe(t[1]);const[e,n,r={}]=t,{lang:i="text",theme:s=e.getLoadedThemes()[0]}=r;if(ze(i)||We(s))throw new A("Plain language does not have grammar state");if(i==="ansi")throw new A("ANSI language does not have grammar state");const{theme:o,colorMap:l}=e.setTheme(s),a=e.getLanguage(i);return new Xe(At(n,a,o,l,r).stateStack,a.name,o.name)}function _s(t,e,n,r,i){const s=At(t,e,n,r,i),o=new Xe(s.stateStack,e.name,n.name);return Ke(s.tokens,o),s.tokens}function At(t,e,n,r,i){const s=Ge(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:l=500}=i,a=qe(t);let c=i.grammarState?ms(i.grammarState,n.name)??bt:i.grammarContextCode!=null?At(i.grammarContextCode,e,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:bt,u=[];const h=[];for(let p=0,f=a.length;p<f;p++){const[m,E]=a[p];if(m===""){u=[],h.push([]);continue}if(o>0&&m.length>=o){u=[],h.push([{content:m,offset:E,color:"",fontStyle:0}]);continue}let y,b,_;i.includeExplanation&&(y=e.tokenizeLine(m,c,l),b=y.tokens,_=0);const v=e.tokenizeLine2(m,c,l),L=v.tokens.length/2;for(let x=0;x<L;x++){const P=v.tokens[2*x],V=x+1<L?v.tokens[2*x+2]:m.length;if(P===V)continue;const F=v.tokens[2*x+1],Se=q(r[te.getForeground(F)],s),Ee=te.getFontStyle(F),Y={content:m.substring(P,V),offset:E+P,color:Se,fontStyle:Ee};if(i.includeExplanation){const we=[];if(i.includeExplanation!=="scopeName")for(const T of n.settings){let w;switch(typeof T.scope){case"string":w=T.scope.split(/,/).map(B=>B.trim());break;case"object":w=T.scope;break;default:continue}we.push({settings:T,selectors:w.map(B=>B.split(/ /))})}Y.explanation=[];let Ce=0;for(;P+Ce<V;){const T=b[_],w=m.substring(T.startIndex,T.endIndex);Ce+=w.length,Y.explanation.push({content:w,scopes:i.includeExplanation==="scopeName"?ys(T.scopes):bs(we,T.scopes)}),_+=1}}u.push(Y)}h.push(u),u=[],c=v.ruleStack}return{tokens:h,stateStack:c}}function ys(t){return t.map(e=>({scopeName:e}))}function bs(t,e){const n=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];n[r]={scopeName:s,themeMatches:Ss(t,s,e.slice(0,r))}}return n}function tn(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function vs(t,e,n){if(!tn(t[t.length-1],e))return!1;let r=t.length-2,i=n.length-1;for(;r>=0&&i>=0;)tn(t[r],n[i])&&(r-=1),i-=1;return r===-1}function Ss(t,e,n){const r=[];for(const{selectors:i,settings:s}of t)for(const o of i)if(vs(o,e,n)){r.push(s);break}return r}function nr(t,e,n,r=tr){const i=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=i.map(c=>{const u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:fe(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),o=Es(...s.map(c=>c.tokens)),l=o[0].map((c,u)=>c.map((h,p)=>{const f={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=h.explanation),o.forEach((m,E)=>{const{content:y,explanation:b,offset:_,...v}=m[u][p];f.variants[i[E].color]=v}),f})),a=s[0].state?new Xe(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return a&&Ke(l,a),l}function Es(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const i=t.map(a=>a[r]),s=e.map(()=>[]);e.forEach((a,c)=>a.push(s[c]));const o=i.map(()=>0),l=i.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(s[c].push(u),o[c]+=1,l[c]=i[c][o[c]]):(s[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}const ws=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],nn={}.hasOwnProperty;function Cs(t,e){const n=e||{};function r(i,...s){let o=r.invalid;const l=r.handlers;if(i&&nn.call(i,t)){const a=String(i[t]);o=nn.call(l,a)?l[a]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ts=/["&'<>`]/g,xs=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ls=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ks=/[|\\{}()[\]^$+*?.]/g,rn=new WeakMap;function Rs(t,e){if(t=t.replace(e.subset?As(e.subset):Ts,r),e.subset||e.escapeOnly)return t;return t.replace(xs,n).replace(Ls,r);function n(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function As(t){let e=rn.get(t);return e||(e=Ps(t),rn.set(t,e)),e}function Ps(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(ks,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Ns=/[\dA-Fa-f]/;function Is(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Ns.test(String.fromCharCode(e))?r:r+";"}const Os=/\d/;function Ds(t,e,n){const r="&#"+String(t);return n&&e&&!Os.test(String.fromCharCode(e))?r:r+";"}const js=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],rt={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Ms=["cent","copy","divide","gt","lt","not","para","times"],rr={}.hasOwnProperty,vt={};let ke;for(ke in rt)rr.call(rt,ke)&&(vt[rt[ke]]=ke);const Bs=/[^\dA-Za-z]/;function Gs(t,e,n,r){const i=String.fromCharCode(t);if(rr.call(vt,i)){const s=vt[i],o="&"+s;return n&&js.includes(s)&&!Ms.includes(s)&&(!r||e&&e!==61&&Bs.test(String.fromCharCode(e)))?o:o+";"}return""}function Vs(t,e,n){let r=Is(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Gs(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=Ds(t,e,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function ee(t,e){return Rs(t,Object.assign({format:Vs},e))}const $s=/^>|^->|<!--|-->|--!>|<!-$/g,Us=[">"],Hs=["<",">"];function Fs(t,e,n,r){return r.settings.bogusComments?"<?"+ee(t.value,Object.assign({},r.settings.characterReferences,{subset:Us}))+">":"<!--"+t.value.replace($s,i)+"-->";function i(s){return ee(s,Object.assign({},r.settings.characterReferences,{subset:Hs}))}}function zs(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function sn(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}const O=sr(1),ir=sr(-1),Ws=[];function sr(t){return e;function e(n,r,i){const s=n?n.children:Ws;let o=(r||0)+t,l=s[o];if(!i)for(;l&&Fe(l);)o+=t,l=s[o];return l}}const qs={}.hasOwnProperty;function or(t){return e;function e(n,r,i){return qs.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const Pt=or({body:Xs,caption:it,colgroup:it,dd:Zs,dt:Qs,head:it,html:Ks,li:Ys,optgroup:eo,option:to,p:Js,rp:on,rt:on,tbody:ro,td:an,tfoot:io,th:an,thead:no,tr:so});function it(t,e,n){const r=O(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Fe(r.value.charAt(0)))}function Ks(t,e,n){const r=O(n,e);return!r||r.type!=="comment"}function Xs(t,e,n){const r=O(n,e);return!r||r.type!=="comment"}function Js(t,e,n){const r=O(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Ys(t,e,n){const r=O(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Qs(t,e,n){const r=O(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Zs(t,e,n){const r=O(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function on(t,e,n){const r=O(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function eo(t,e,n){const r=O(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function to(t,e,n){const r=O(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function no(t,e,n){const r=O(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ro(t,e,n){const r=O(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function io(t,e,n){return!O(n,e)}function so(t,e,n){const r=O(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function an(t,e,n){const r=O(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const oo=or({body:co,colgroup:uo,head:lo,html:ao,tbody:ho});function ao(t){const e=O(t,-1);return!e||e.type!=="comment"}function lo(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function co(t){const e=O(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Fe(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function uo(t,e,n){const r=ir(n,e),i=O(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Pt(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ho(t,e,n){const r=ir(n,e),i=O(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Pt(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Re={name:[[`
6
+ \f\r &/=>`.split(""),`
7
+ \f\r "&'/=>\``.split("")],[`\0
8
+ \f\r "&'/<=>`.split(""),`\0
9
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
10
+ \f\r &>`.split(""),`\0
11
+ \f\r "&'<=>\``.split("")],[`\0
12
+ \f\r "&'<=>\``.split(""),`\0
13
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function fo(t,e,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let o=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;i.space==="html"&&t.tagName==="svg"&&(r.schema=be);const c=po(r,t.properties),u=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,u&&(o=!1),(c||!s||!oo(t,e,n))&&(l.push("<",t.tagName,c?" "+c:""),o&&(i.space==="svg"||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!o&&(!s||!Pt(t,e,n))&&l.push("</"+t.tagName+">"),l.join("")}function po(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const s=mo(t,i,e[i]);s&&n.push(s)}}for(;++r<n.length;){const s=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function mo(t,e,n){const r=xn(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1;let o=t.quote,l;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=ee(r.attribute,Object.assign({},t.settings.characterReferences,{subset:Re.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?yn:kn)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?a:(t.settings.preferUnquoted&&(l=ee(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Re.unquoted[i][s]}))),l!==n&&(t.settings.quoteSmart&&sn(n,o)>sn(n,t.alternative)&&(o=t.alternative),l=o+ee(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?Re.single:Re.double)[i][s],attribute:!0}))+o),a+(l&&"="+l))}const go=["<","&"];function ar(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:ee(t.value,Object.assign({},r.settings.characterReferences,{subset:go}))}function _o(t,e,n,r){return r.settings.allowDangerousHtml?t.value:ar(t,e,n,r)}function yo(t,e,n,r){return r.all(t)}const bo=Cs("type",{invalid:vo,unknown:So,handlers:{comment:Fs,doctype:zs,element:fo,raw:_o,root:yo,text:ar}});function vo(t){throw new Error("Expected node, not `"+t+"`")}function So(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Eo={},wo={},Co=[];function To(t,e){const n=e||Eo,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:xo,all:Lo,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ws,characterReferences:n.characterReferences||wo,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?be:Ln,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function xo(t,e,n){return bo(t,e,n,this)}function Lo(t){const e=[],n=t&&t.children||Co;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}function lr(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function ko(t){const e=qe(t,!0).map(([i])=>i);function n(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let s=i,o=0;for(const l of e){if(s<l.length)break;s-=l.length,o++}return{line:o,character:s}}function r(i,s){let o=0;for(let l=0;l<i;l++)o+=e[l].length;return o+=s,o}return{lines:e,indexToPos:n,posToIndex:r}}function cr(t,e,n){const r=new Set;for(const s of t.matchAll(/:?lang=["']([^"']+)["']/g)){const o=s[1].toLowerCase().trim();o&&r.add(o)}for(const s of t.matchAll(/(?:```|~~~)([\w-]+)/g)){const o=s[1].toLowerCase().trim();o&&r.add(o)}for(const s of t.matchAll(/\\begin\{([\w-]+)\}/g)){const o=s[1].toLowerCase().trim();o&&r.add(o)}for(const s of t.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const o=s[1].toLowerCase().trim(),l=o.includes("/")?o.split("/").pop():o;l&&r.add(l)}if(!n)return Array.from(r);const i=n.getBundledLanguages();return Array.from(r).filter(s=>s&&i[s])}const Nt="light-dark()",Ro=["color","background-color"];function Ao(t,e){let n=0;const r=[];for(const i of e)i>n&&r.push({...t,content:t.content.slice(n,i),offset:t.offset+n}),n=i;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function Po(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((r,i)=>r-i);return n.length?t.map(r=>r.flatMap(i=>{const s=n.filter(o=>i.offset<o&&o<i.offset+i.content.length).map(o=>o-i.offset).sort((o,l)=>o-l);return s.length?Ao(i,s):i})):t}function No(t,e,n,r,i="css-vars"){const s={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(u=>Ve(t.variants[u])),l=new Set(o.flatMap(u=>Object.keys(u))),a={},c=(u,h)=>{const p=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+e[u]+(h==="color"?"":p)};return o.forEach((u,h)=>{for(const p of l){const f=u[p]||"inherit";if(h===0&&r&&Ro.includes(p))if(r===Nt&&o.length>1){const m=e.findIndex(y=>y==="light"),E=e.findIndex(y=>y==="dark");if(m===-1||E===-1)throw new A('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');a[p]=`light-dark(${o[m][p]||"inherit"}, ${o[E][p]||"inherit"})`,i==="css-vars"&&(a[c(h,p)]=f)}else a[p]=f;else i==="css-vars"&&(a[c(h,p)]=f)}}),s.htmlStyle=a,s}function Ve(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&M.Italic&&(e["font-style"]="italic"),t.fontStyle&M.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&M.Underline&&n.push("underline"),t.fontStyle&M.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function St(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function Io(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let i=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new A(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{const l=r.lines[o.line];if(l===void 0)throw new A(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let a=o.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new A(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${l.length}`);return{...o,character:a,offset:r.posToIndex(o.line,a)}}};const r=ko(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:i(o.start),end:i(o.end)}));Oo(s),t.set(n.meta,{decorations:s,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return Po(n,e(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=e(this),i=Array.from(n.children).filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==r.converter.lines.length)throw new A(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(u,h,p,f){const m=i[u];let E="",y=-1,b=-1;if(h===0&&(y=0),p===0&&(b=0),p===Number.POSITIVE_INFINITY&&(b=m.children.length),y===-1||b===-1)for(let v=0;v<m.children.length;v++)E+=ur(m.children[v]),y===-1&&E.length===h&&(y=v+1),b===-1&&E.length===p&&(b=v+1);if(y===-1)throw new A(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(b===-1)throw new A(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const _=m.children.slice(y,b);if(!f.alwaysWrap&&_.length===m.children.length)l(m,f,"line");else if(!f.alwaysWrap&&_.length===1&&_[0].type==="element")l(_[0],f,"token");else{const v={type:"element",tagName:"span",properties:{},children:_};l(v,f,"wrapper"),m.children.splice(y,_.length,v)}}function o(u,h){i[u]=l(i[u],h,"line")}function l(u,h,p){const f=h.properties||{},m=h.transform||(E=>E);return u.tagName=h.tagName||"span",u.properties={...u.properties,...f,class:u.properties.class},h.properties?.class&&lr(u,h.properties.class),u=m(u,p)||u,u}const a=[],c=r.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(const u of c){const{start:h,end:p}=u;if(h.line===p.line)s(h.line,h.character,p.character,u);else if(h.line<p.line){s(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let f=h.line+1;f<p.line;f++)a.unshift(()=>o(f,u));s(p.line,0,p.character,u)}}a.forEach(u=>u())}}}function Oo(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new A(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const i=t[r],s=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,o=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,l=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,a=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(s||o||l||a){if(s&&o||l&&a||l&&n.start.offset===n.end.offset||o&&i.start.offset===i.end.offset)continue;throw new A(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function ur(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(ur).join(""):""}const Do=[Io()];function $e(t){const e=jo(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...Do]}function jo(t){const e=[],n=[],r=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:e,post:n,normal:r}}var X=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],st={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Mo(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function ln(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Bo(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)st[r]&&e.push({type:"setDecoration",value:st[r]});else if(r<=29){const i=st[r-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:X[r-30]}});else if(r===38){const i=ln(t);i&&e.push({type:"setForegroundColor",value:i})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:X[r-40]}});else if(r===48){const i=ln(t);i&&e.push({type:"setBackgroundColor",value:i})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:X[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:X[r-100+8]}})}return e}function Go(){let t=null,e=null,n=new Set;return{parse(r){const i=[];let s=0;do{const o=Mo(r,s),l=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(l.length>0&&i.push({value:l,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const a=Bo(o.sequence);for(const c of a)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}s=o.position}while(s<r.length);return i}}}var Vo={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 $o(t=Vo){function e(l){return t[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c<X.length;c++)r.push(e(X[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)r.push(n([l[c],l[u],l[h]]));let a=8;for(let c=0;c<24;c++,a+=10)r.push(n([a,a,a]));return r}function s(l){return i()[l]}function o(l){switch(l.type){case"named":return e(l.name);case"rgb":return n(l.rgb);case"table":return s(l.index)}}return{value:o}}const Uo={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Ho(t,e,n){const r=Ge(t,n),i=qe(e),s=$o(Object.fromEntries(X.map(l=>{const a=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`;return[l,t.colors?.[a]||Uo[l]]}))),o=Go();return i.map(l=>o.parse(l[0]).map(a=>{let c,u;a.decorations.has("reverse")?(c=a.background?s.value(a.background):t.bg,u=a.foreground?s.value(a.foreground):t.fg):(c=a.foreground?s.value(a.foreground):t.fg,u=a.background?s.value(a.background):void 0),c=q(c,r),u=q(u,r),a.decorations.has("dim")&&(c=Fo(c));let h=M.None;return a.decorations.has("bold")&&(h|=M.Bold),a.decorations.has("italic")&&(h|=M.Italic),a.decorations.has("underline")&&(h|=M.Underline),a.decorations.has("strikethrough")&&(h|=M.Strikethrough),{content:a.value,offset:l[1],color:c,bgColor:u,fontStyle:h}}))}function Fo(t){const e=t.match(/#([0-9a-f]{3,8})/i);if(e){const r=e[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],s=r[1],o=r[2],l=r[3];return`#${i}${i}${s}${s}${o}${o}${Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const i=r[0],s=r[1],o=r[2];return`#${i}${i}${s}${s}${o}${o}80`}}}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function Et(t,e,n={}){const r=t.resolveLangAlias(n.lang||"text"),{theme:i=t.getLoadedThemes()[0]}=n;if(!ze(r)&&!We(i)&&r==="ansi"){const{theme:s}=t.setTheme(i);return Ho(s,e,n)}return tr(t,e,n)}function Ue(t,e,n){let r,i,s,o,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,p=Object.entries(n.themes).filter(b=>b[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,_)=>b.color===c?-1:_.color===c?1:0);if(p.length===0)throw new A("`themes` option must not be empty");const f=nr(t,e,n,Et);if(a=fe(f),c&&Nt!==c&&!p.find(b=>b.color===c))throw new A(`\`themes\` option must contain the defaultColor key \`${c}\``);const m=p.map(b=>t.getTheme(b.theme)),E=p.map(b=>b.color);s=f.map(b=>b.map(_=>No(_,E,u,c,h))),a&&Ke(s,a);const y=p.map(b=>Ge(b.theme,n));i=cn(p,m,y,u,c,"fg",h),r=cn(p,m,y,u,c,"bg",h),o=`shiki-themes ${m.map(b=>b.name).join(" ")}`,l=c?void 0:[i,r].join(";")}else if("theme"in n){const c=Ge(n.theme,n);s=Et(t,e,n);const u=t.getTheme(n.theme);r=q(u.bg,c),i=q(u.fg,c),o=u.name,a=fe(s)}else throw new A("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:l,grammarState:a}}function cn(t,e,n,r,i,s,o){return t.map((l,a)=>{const c=q(e[a][s],n[a])||"inherit",u=`${r+l.color}${s==="bg"?"-bg":""}:${c}`;if(a===0&&i){if(i===Nt&&t.length>1){const h=t.findIndex(f=>f.color==="light"),p=t.findIndex(f=>f.color==="dark");if(h===-1||p===-1)throw new A('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${q(e[h][s],n[h])||"inherit"}, ${q(e[p][s],n[p])||"inherit"});${u}`}return c}return o==="css-vars"?u:null}).filter(l=>!!l).join(";")}function He(t,e,n,r={meta:{},options:n,codeToHast:(i,s)=>He(t,i,s),codeToTokens:(i,s)=>Ue(t,i,s)}){let i=e;for(const m of $e(n))i=m.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:l,themeName:a,rootStyle:c,grammarState:u}=Ue(t,i,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:p=!1}=n;h===!0?s=Wo(s):h==="never"&&(s=qo(s)),p&&(s=Ko(s));const f={...r,get source(){return i}};for(const m of $e(n))s=m.tokens?.call(f,s)||s;return zo(s,{...n,fg:o,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},f,u)}function zo(t,e,n,r=fe(t)){const i=$e(e),s=[],o={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[E,y]of Object.entries(e.meta||{}))E.startsWith("_")||(c[E]=y);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:s};const p=[],f={...n,structure:l,addClassToHast:lr,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return h},get lines(){return p}};if(t.forEach((E,y)=>{y&&(l==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&s.push({type:"text",value:`
14
+ `}));let b={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const v of E){let L={type:"element",tagName:"span",properties:{...v.htmlAttrs},children:[{type:"text",value:v.content}]};const x=St(v.htmlStyle||Ve(v));x&&(L.properties.style=x);for(const P of i)L=P?.span?.call(f,L,y+1,_,b,v)||L;l==="inline"?o.children.push(L):l==="classic"&&b.children.push(L),_+=v.content.length}if(l==="classic"){for(const v of i)b=v?.line?.call(f,b,y+1)||b;p.push(b),s.push(b)}else l==="inline"&&p.push(b)}),l==="classic"){for(const E of i)h=E?.code?.call(f,h)||h;u.children.push(h);for(const E of i)u=E?.pre?.call(f,u)||u;o.children.push(u)}else if(l==="inline"){const E=[];let y={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of o.children)_.type==="element"&&_.tagName==="br"?(E.push(y),y={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&y.children.push(_);E.push(y);let b={type:"element",tagName:"code",properties:{},children:E};for(const _ of i)b=_?.code?.call(f,b)||b;o.children=[];for(let _=0;_<b.children.length;_++){_>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const v=b.children[_];v.type==="element"&&o.children.push(...v.children)}}let m=o;for(const E of i)m=E?.root?.call(f,m)||m;return r&&Ke(m,r),m}function Wo(t){return t.map(e=>{const n=[];let r="",i;return e.forEach((s,o)=>{const l=!(s.fontStyle&&(s.fontStyle&M.Underline||s.fontStyle&M.Strikethrough));l&&s.content.match(/^\s+$/)&&e[o+1]?(i===void 0&&(i=s.offset),r+=s.content):r?(l?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=void 0,r=""):n.push(s)}),n})}function qo(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,s,o]=r;if(!i&&!o)return n;const l=[{...n,offset:n.offset+i.length,content:s}];return i&&l.unshift({content:i,offset:n.offset}),o&&l.push({content:o,offset:n.offset+i.length+s.length}),l}))}function Ko(t){return t.map(e=>{const n=[];for(const r of e){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],s=St(i.htmlStyle||Ve(i)),o=St(r.htmlStyle||Ve(r)),l=i.fontStyle&&(i.fontStyle&M.Underline||i.fontStyle&M.Strikethrough),a=r.fontStyle&&(r.fontStyle&M.Underline||r.fontStyle&M.Strikethrough);!l&&!a&&s===o?i.content+=r.content:n.push({...r})}return n})}const Xo=To;function Jo(t,e,n){const r={meta:{},options:n,codeToHast:(s,o)=>He(t,s,o),codeToTokens:(s,o)=>Ue(t,s,o)};let i=Xo(He(t,e,n,r));for(const s of $e(n))i=s.postprocess?.call(r,i,n)||i;return i}async function Yo(t){const e=await fs(t);return{getLastGrammarState:(...n)=>gs(e,...n),codeToTokensBase:(n,r)=>Et(e,n,r),codeToTokensWithThemes:(n,r)=>nr(e,n,r),codeToTokens:(n,r)=>Ue(e,n,r),codeToHast:(n,r)=>He(e,n,r),codeToHtml:(n,r)=>Jo(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Qo(t){const e=t.langs,n=t.themes,r=t.engine;async function i(s){function o(h){if(typeof h=="string"){if(h=s.langAlias?.[h]||h,kt(h))return[];const p=e[h];if(!p)throw new A(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return p}return h}function l(h){if(Xn(h))return"none";if(typeof h=="string"){const p=n[h];if(!p)throw new A(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return p}return h}const a=(s.themes??[]).map(h=>l(h)),c=(s.langs??[]).map(h=>o(h)),u=await Yo({engine:s.engine??r(),...s,themes:a,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(o))},loadTheme(...h){return u.loadTheme(...h.map(l))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return i}function Zo(t){let e;async function n(r={}){if(e){const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{e=t({...r,themes:[],langs:[]});const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function ea(t,e){const n=Zo(t);async function r(i,s){const o=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),l=await e?.guessEmbeddedLanguages?.(i,s.lang,o);return l&&await o.loadLanguage(...l),o}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,s){return(await r(i,s)).codeToHtml(i,s)},async codeToHast(i,s){return(await r(i,s)).codeToHast(i,s)},async codeToTokens(i,s){return(await r(i,s)).codeToTokens(i,s)},async codeToTokensBase(i,s){return(await r(i,s)).codeToTokensBase(i,s)},async codeToTokensWithThemes(i,s){return(await r(i,s)).codeToTokensWithThemes(i,s)},async getLastGrammarState(i,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(i,s)}}}var un=Object.prototype.hasOwnProperty;function hn(t,e,n){for(n of t.keys())if(le(n,e))return n}function le(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&le(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(i=r,i&&typeof i=="object"&&(i=hn(e,i),!i)||!e.has(i))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(i=r[0],i&&typeof i=="object"&&(i=hn(e,i),!i)||!le(r[1],e.get(i)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(un.call(t,n)&&++r&&!un.call(e,n)||!(n in e)||!le(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function hr(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=hr(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function dn(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=hr(t))&&(r&&(r+=" "),r+=e);return r}var ot=t=>{const e=k.useRef(t);return t!==e.current&&!le(t,e.current)&&(e.current=t),e.current},ta=(t,e,n)=>{const r=Date.now();clearTimeout(e.current.timeoutId);const i=Math.max(0,e.current.nextAllowedTime-r);e.current.timeoutId=setTimeout(()=>{t().catch(console.error),e.current.nextAllowedTime=r+n},i)},dr="plaintext",fn=t=>t==null?[]:Array.isArray(t)?t:[t],na=t=>t==null?null:typeof t=="string"?`s:${t}`:`o:${t.name}::${t.scopeName}`,pn=t=>{const e=new Set,n=[];for(const r of t){const i=na(r);i==null||e.has(i)||(e.add(i),n.push(r))}return n},ra=(t,e)=>t==null?!1:typeof t=="string"?t in e:typeof t.name=="string"&&typeof t.scopeName=="string",ia=(t,e)=>kt(t)||e.includes(t)?t:dr,sa=(t,e,n,r)=>{const i=fn(e),s=fn(r),o=[...i,...s];let l=dr,a;if(t==null||typeof t=="string"&&!t.trim())return{languageId:l,langsToLoad:pn([...s,...i])};if(typeof t=="object")l=t.name,a=t;else{const c=t.toLowerCase(),u=p=>p?.toLowerCase()===c,h=o.find(p=>typeof p=="object"&&p!=null&&!!(u(p.name)||u(p.scopeName)||u(p.scopeName?.split(".").pop())||p.aliases?.some(u)||p.fileTypes?.some(u)));h?(l=h.name||t,a=h):n?.[t]?(l=n[t],a=n[t]):(l=t,a=t)}return{languageId:l,langsToLoad:pn([a,...s,...i])}},mn=t=>typeof t=="object"&&t!==null&&"tokenColors"in t&&Array.isArray(t.tokenColors);function oa(t){const e=mn(t),n=typeof t=="object"&&t!==null&&!e,r=typeof t=="object"&&t!==null&&!e&&Object.entries(t).some(([i,s])=>i.trim()!==""&&(typeof s=="string"&&s.trim()!==""||mn(s)));return n?{isMultiTheme:!0,themeId:r?`multi-${Object.values(t).map(s=>(typeof s=="string"?s:s?.name)||"custom").sort().join("-")}`:"multi-default",multiTheme:r?t:null,themesToLoad:r?Object.values(t):[]}:{isMultiTheme:!1,themeId:typeof t=="string"?t:t?.name||"custom",singleTheme:t,themesToLoad:[t]}}function aa(t=1){return{name:"react-shiki:line-numbers",code(e){if(this.addClassToHast(e,"has-line-numbers"),t!==1){const n=e.properties?.style||"",r=n?`${n}; --line-start: ${t}`:`--line-start: ${t}`;e.properties={...e.properties,style:r}}},line(e){return this.addClassToHast(e,"line-numbers"),e}}}var gn={light:"github-light",dark:"github-dark"},la=(t,e)=>t.isMultiTheme?{themes:t.multiTheme??gn,defaultColor:e.defaultColor,cssVariablePrefix:e.cssVariablePrefix}:{theme:t.singleTheme??gn.dark},ca=t=>{const e=[...t.transformers||[]];return t.showLineNumbers&&e.push(aa(t.startingLineNumber)),e},ua=({languageId:t,resolvedTheme:e,options:n})=>{const{defaultColor:r,cssVariablePrefix:i,showLineNumbers:s,startingLineNumber:o,transformers:l,...a}=n;return{lang:t,...la(e,n),...a,transformers:ca(n)}},ha=(t,e,n)=>{const r=n.getBundledLanguages();return cr(t).flatMap(i=>r[i]??[])},da=(t,e,n,r={},i)=>{const[s,o]=k.useState(null),l=ot(e),a=ot(n),c=ot(r),{languageId:u,langsToLoad:h}=k.useMemo(()=>sa(l,c.customLanguages,c.langAlias,c.preloadLanguages),[l,c.customLanguages,c.preloadLanguages,c.langAlias]),p=k.useMemo(()=>oa(a),[a]),{themesToLoad:f}=p,m=k.useRef({nextAllowedTime:0,timeoutId:void 0}),E=k.useMemo(()=>ua({languageId:u,resolvedTheme:p,options:c}),[u,p,c]);return k.useEffect(()=>{let y=!0;const b=async()=>{if(!u)return;const v=c.highlighter?c.highlighter:await i(h,f,c.engine);if(!c.highlighter){const P=ha(t,u,v);P.length>0&&await v.loadLanguage(...P)}const L=ia(u,v.getLoadedLanguages()),x={...E,lang:L};if(y){const P=c.outputFormat==="html"?v.codeToHtml(t,x):ti(v.codeToHast(t,x),{jsx:S.jsx,jsxs:S.jsxs,Fragment:S.Fragment});o(P)}},{delay:_}=c;return _?ta(b,m,_):b().catch(console.error),()=>{y=!1,clearTimeout(m.current.timeoutId)}},[t,E,c.delay,c.highlighter,h,f]),s};function fa(t,{insertAt:e}={}){if(typeof document>"u")return;const n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}fa(`.relative {
15
+ position: relative;
16
+ }
17
+ .defaultStyles pre {
18
+ overflow: auto;
19
+ border-radius: 0.5rem;
20
+ padding-left: 1.5rem;
21
+ padding-right: 1.5rem;
22
+ padding-top: 1.25rem;
23
+ padding-bottom: 1.25rem;
24
+ }
25
+ .languageLabel {
26
+ position: absolute;
27
+ right: 0.75rem;
28
+ top: 0.5rem;
29
+ font-family: monospace;
30
+ font-size: 0.75rem;
31
+ letter-spacing: -0.05em;
32
+ color: rgba(107, 114, 128, 0.85);
33
+ }
34
+ .line-numbers::before {
35
+ counter-increment: line-number;
36
+ content: counter(line-number);
37
+ display: inline-flex;
38
+ justify-content: flex-end;
39
+ align-items: flex-start;
40
+ box-sizing: content-box;
41
+ min-width: var(--line-numbers-width, 2ch);
42
+ padding-left: var(--line-numbers-padding-left, 2ch);
43
+ padding-right: var(--line-numbers-padding-right, 2ch);
44
+ color: var(--line-numbers-foreground, rgba(107, 114, 128, 0.6));
45
+ font-size: var(--line-numbers-font-size, inherit);
46
+ font-weight: var(--line-numbers-font-weight, inherit);
47
+ line-height: var(--line-numbers-line-height, inherit);
48
+ font-family: var(--line-numbers-font-family, inherit);
49
+ opacity: var(--line-numbers-opacity, 1);
50
+ user-select: none;
51
+ pointer-events: none;
52
+ }
53
+ .has-line-numbers {
54
+ counter-reset: line-number calc(var(--line-start, 1) - 1);
55
+ --line-numbers-foreground: rgba(107, 114, 128, 0.5);
56
+ --line-numbers-width: 2ch;
57
+ --line-numbers-padding-left: 0ch;
58
+ --line-numbers-padding-right: 2ch;
59
+ --line-numbers-font-size: inherit;
60
+ --line-numbers-font-weight: inherit;
61
+ --line-numbers-line-height: inherit;
62
+ --line-numbers-font-family: inherit;
63
+ --line-numbers-opacity: 1;
64
+ }
65
+ `);var pa=t=>k.forwardRef(({language:e,theme:n,delay:r,transformers:i,defaultColor:s,cssVariablePrefix:o,addDefaultStyles:l=!0,style:a,langStyle:c,className:u,langClassName:h,showLanguage:p=!0,showLineNumbers:f=!1,startingLineNumber:m=1,children:E,as:y="pre",customLanguages:b,preloadLanguages:_,...v},L)=>{const x={delay:r,transformers:i,customLanguages:b,preloadLanguages:_,showLineNumbers:f,defaultColor:s,cssVariablePrefix:o,startingLineNumber:m,...v},P=typeof e=="object"?e.name||null:e?.trim()||null,V=t(E,e,n,x),F=typeof V=="string";return S.jsxs(y,{ref:L,"data-testid":"shiki-container",className:dn("relative","not-prose",l&&"defaultStyles",u),style:a,id:"shiki-container",children:[p&&P?S.jsx("span",{className:dn("languageLabel",h),style:c,id:"language-label",children:P}):null,F?S.jsx("div",{dangerouslySetInnerHTML:{__html:V}}):V]})}),It=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function ma(){return 2147483648}function ga(){return typeof performance<"u"?performance.now():Date.now()}const _a=(t,e)=>t+(e-t%e)%e;async function ya(t){let e,n;const r={};function i(f){n=f,r.HEAPU8=new Uint8Array(f),r.HEAPU32=new Uint32Array(f)}function s(f,m,E){r.HEAPU8.copyWithin(f,m,m+E)}function o(f){try{return e.grow(f-n.byteLength+65535>>>16),i(e.buffer),1}catch{}}function l(f){const m=r.HEAPU8.length;f=f>>>0;const E=ma();if(f>E)return!1;for(let y=1;y<=4;y*=2){let b=m*(1+.2/y);b=Math.min(b,f+100663296);const _=Math.min(E,_a(Math.max(f,b),65536));if(o(_))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(f,m,E=1024){const y=m+E;let b=m;for(;f[b]&&!(b>=y);)++b;if(b-m>16&&f.buffer&&a)return a.decode(f.subarray(m,b));let _="";for(;m<b;){let v=f[m++];if(!(v&128)){_+=String.fromCharCode(v);continue}const L=f[m++]&63;if((v&224)===192){_+=String.fromCharCode((v&31)<<6|L);continue}const x=f[m++]&63;if((v&240)===224?v=(v&15)<<12|L<<6|x:v=(v&7)<<18|L<<12|x<<6|f[m++]&63,v<65536)_+=String.fromCharCode(v);else{const P=v-65536;_+=String.fromCharCode(55296|P>>10,56320|P&1023)}}return _}function u(f,m){return f?c(r.HEAPU8,f,m):""}const h={emscripten_get_now:ga,emscripten_memcpy_big:s,emscripten_resize_heap:l,fd_write:()=>0};async function p(){const m=await t({env:h,wasi_snapshot_preview1:h});e=m.memory,i(e.buffer),Object.assign(r,m),r.UTF8ToString=u}return await p(),r}var ba=Object.defineProperty,va=(t,e,n)=>e in t?ba(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I=(t,e,n)=>va(t,typeof e!="symbol"?e+"":e,n);let D=null;function Sa(t){throw new It(t.UTF8ToString(t.getLastOnigError()))}class Je{constructor(e){I(this,"utf16Length"),I(this,"utf8Length"),I(this,"utf16Value"),I(this,"utf8Value"),I(this,"utf16OffsetToUtf8"),I(this,"utf8OffsetToUtf16");const n=e.length,r=Je._utf8ByteLength(e),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const l=new Uint8Array(r);let a=0;for(let c=0;c<n;c++){const u=e.charCodeAt(c);let h=u,p=!1;if(u>=55296&&u<=56319&&c+1<n){const f=e.charCodeAt(c+1);f>=56320&&f<=57343&&(h=(u-55296<<10)+65536|f-56320,p=!0)}i&&(s[c]=a,p&&(s[c+1]=a),h<=127?o[a+0]=c:h<=2047?(o[a+0]=c,o[a+1]=c):h<=65535?(o[a+0]=c,o[a+1]=c,o[a+2]=c):(o[a+0]=c,o[a+1]=c,o[a+2]=c,o[a+3]=c)),h<=127?l[a++]=h:h<=2047?(l[a++]=192|(h&1984)>>>6,l[a++]=128|(h&63)>>>0):h<=65535?(l[a++]=224|(h&61440)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0):(l[a++]=240|(h&1835008)>>>18,l[a++]=128|(h&258048)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0),p&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let r=0,i=e.length;r<i;r++){const s=e.charCodeAt(r);let o=s,l=!1;if(s>=55296&&s<=56319&&r+1<i){const a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(o=(s-55296<<10)+65536|a-56320,l=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,l&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const Ye=class W{constructor(e){if(I(this,"id",++W.LAST_ID),I(this,"_onigBinding"),I(this,"content"),I(this,"utf16Length"),I(this,"utf8Length"),I(this,"utf16OffsetToUtf8"),I(this,"utf8OffsetToUtf16"),I(this,"ptr"),!D)throw new It("Must invoke loadWasm first.");this._onigBinding=D,this.content=e;const n=new Je(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!W._sharedPtrInUse?(W._sharedPtr||(W._sharedPtr=D.omalloc(1e4)),W._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,W._sharedPtr),this.ptr=W._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===W._sharedPtr?W._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};I(Ye,"LAST_ID",0);I(Ye,"_sharedPtr",0);I(Ye,"_sharedPtrInUse",!1);let fr=Ye;class Ea{constructor(e){if(I(this,"_onigBinding"),I(this,"_ptr"),!D)throw new It("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,a=e.length;l<a;l++){const c=new Je(e[l]);n[l]=c.createString(D),r[l]=c.utf8Length}const i=D.omalloc(4*e.length);D.HEAPU32.set(n,i/4);const s=D.omalloc(4*e.length);D.HEAPU32.set(r,s/4);const o=D.createOnigScanner(i,s,e.length);for(let l=0,a=e.length;l<a;l++)D.ofree(n[l]);D.ofree(s),D.ofree(i),o===0&&Sa(D),this._onigBinding=D,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new fr(e);const s=this._findNextMatchSync(e,n,!1,i);return e.dispose(),s}return this._findNextMatchSync(e,n,!1,i)}_findNextMatchSync(e,n,r,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),i);if(o===0)return null;const l=s.HEAPU32;let a=o/4;const c=l[a++],u=l[a++],h=[];for(let p=0;p<u;p++){const f=e.convertUtf8OffsetToUtf16(l[a++]),m=e.convertUtf8OffsetToUtf16(l[a++]);h[p]={start:f,end:m,length:m-f}}return{index:c,captureIndices:h}}}function wa(t){return typeof t.instantiator=="function"}function Ca(t){return typeof t.default=="function"}function Ta(t){return typeof t.data<"u"}function xa(t){return typeof Response<"u"&&t instanceof Response}function La(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let Ae;function pr(t){if(Ae)return Ae;async function e(){D=await ya(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),wa(r)?r=await r.instantiator(n):Ca(r)?r=await r.default(n):(Ta(r)&&(r=r.data),xa(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await ka(r)(n):r=await Ra(r)(n):La(r)?r=await at(r)(n):r instanceof WebAssembly.Module?r=await at(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await at(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ae=e(),Ae}function at(t){return e=>WebAssembly.instantiate(t,e)}function ka(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Ra(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}let mr;function Aa(t){mr=t}function Pa(){return mr}async function gr(t){return t&&await pr(t),{createScanner(e){return new Ea(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new fr(e)}}}const Na=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:gr,getDefaultWasmLoader:Pa,loadWasm:pr,setDefaultWasmLoader:Aa},Symbol.toStringTag,{value:"Module"}));var _r=vi({});Ei(_r,Na);const Ia=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>d(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>d(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>d(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>d(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>d(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>d(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>d(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>d(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>d(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>d(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>d(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>d(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>d(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>d(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>d(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>d(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>d(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>d(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>d(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>d(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>d(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>d(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>d(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>d(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>d(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>d(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>d(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>d(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>d(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>d(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>d(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>d(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>d(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>d(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>d(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>d(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>d(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>d(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>d(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>d(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>d(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>d(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>d(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>d(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>d(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>d(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>d(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>d(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>d(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>d(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>d(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>d(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>d(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>d(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>d(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>d(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>d(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>d(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>d(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>d(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>d(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>d(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>d(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>d(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>d(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Oa=Object.fromEntries(Ia.map(t=>[t.id,t.import])),yr=[{id:"angular-html",name:"Angular HTML",import:(()=>d(()=>import("./angular-html-DA-rfuFy.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>d(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"astro",name:"Astro",import:(()=>d(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([6,7,2,8,3,9,10])))},{id:"blade",name:"Blade",import:(()=>d(()=>import("./blade-BjGOyj-B.js"),__vite__mapDeps([11,12,1,2,3,13,14,15,7])))},{id:"c",name:"C",import:(()=>d(()=>import("./c-BIGW1oBm.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>d(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([16,2])))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>d(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([17,18,19,20,15])))},{id:"css",name:"CSS",import:(()=>d(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>d(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"glsl",name:"GLSL",import:(()=>d(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([19,20])))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>d(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([21,2,8,22,10])))},{id:"haml",name:"Ruby Haml",import:(()=>d(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([23,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>d(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([24,1,2,3,25])))},{id:"html",name:"HTML",import:(()=>d(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>d(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([12,1,2,3])))},{id:"http",name:"HTTP",import:(()=>d(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([26,27,7,13,14,21,2,8,22,10])))},{id:"hurl",name:"Hurl",import:(()=>d(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([28,21,2,8,22,10,13,14,29])))},{id:"imba",name:"Imba",import:(()=>d(()=>import("./imba-DGztddWO.js"),[]))},{id:"java",name:"Java",import:(()=>d(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>d(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>d(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([30,1,2,3])))},{id:"jison",name:"Jison",import:(()=>d(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([31,2])))},{id:"json",name:"JSON",import:(()=>d(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>d(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>d(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>d(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>d(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>d(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([32,17,18,19,20,15,33,2,34])))},{id:"less",name:"Less",import:(()=>d(()=>import("./less-B1dDrJ26.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>d(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>d(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([35,3,36,5,8])))},{id:"mdc",name:"MDC",import:(()=>d(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([37,38,25,12,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>d(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"php",name:"PHP",import:(()=>d(()=>import("./php-R6g_5hLQ.js"),__vite__mapDeps([39,1,2,3,13,14,15,7])))},{id:"postcss",name:"PostCSS",import:(()=>d(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>d(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([40,2,3,1])))},{id:"python",name:"Python",aliases:["py"],import:(()=>d(()=>import("./python-B6aJPvgy.js"),[]))},{id:"r",name:"R",import:(()=>d(()=>import("./r-Dspwwk_N.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>d(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"sass",name:"Sass",import:(()=>d(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scss",name:"SCSS",import:(()=>d(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>d(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"sql",name:"SQL",import:(()=>d(()=>import("./sql-BLtJtn59.js"),[]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>d(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"svelte",name:"Svelte",import:(()=>d(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([41,2,8,3,9])))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>d(()=>import("./ts-tags-DQrlYJgV.js"),__vite__mapDeps([42,8,3,2,19,20,1,15,13,14])))},{id:"tsx",name:"TSX",import:(()=>d(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>d(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"vue",name:"Vue",import:(()=>d(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([43,3,2,8,7,1,12])))},{id:"vue-html",name:"Vue HTML",import:(()=>d(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([44,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>d(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([45,3,5,36,46,9,2])))},{id:"wasm",name:"WebAssembly",import:(()=>d(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>d(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>d(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"xml",name:"XML",import:(()=>d(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([13,14])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>d(()=>import("./yaml-Buea-lGh.js"),[]))}],Da=Object.fromEntries(yr.map(t=>[t.id,t.import])),ja=Object.fromEntries(yr.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),br={...Da,...ja},Ma=Qo({langs:br,themes:Oa,engine:()=>(0,_r.createOnigurumaEngine)(d(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{getSingletonHighlighter:Ba}=ea(Ma,{guessEmbeddedLanguages:cr});async function Ga(t,e,n){const r=t.filter(i=>ra(i,br));return await Ba({langs:r,themes:e,engine:n??gr(d(()=>import("./wasm-CG6Dc4jp.js"),[]))})}var Va=(t,e,n,r={})=>da(t,e,n,r,Ga),$a=pa(Va),Ua=$a;const Ha={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",go:"go",rs:"rust",java:"java",kt:"kotlin",rb:"ruby",php:"php",cs:"csharp",cpp:"cpp",c:"c",h:"c",swift:"swift",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",xml:"xml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",dockerfile:"dockerfile"};function Fa(t){if(!t)return"plaintext";const e=t.split(".").pop()?.toLowerCase();return e?Ha[e]??"plaintext":"plaintext"}function za({code:t,language:e,sourcePath:n}){const r=Er(l=>l.theme),s=(r==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":r)==="dark"?"github-dark":"github-light",o=e??Fa(n);return S.jsx("div",{className:"rounded border border-c4a-border-subtle overflow-auto max-h-[600px]",children:S.jsx(Ua,{language:o,theme:s,children:t})})}const Wa={Component:"🏗",SoR:"📋",Product:"📦",Container:"📂",Contract:"📝",Epic:"🎯"};function qa({entity:t}){const e=wr(),n=Wa[t.type]??"🔹";return S.jsx("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-3 cursor-pointer hover:border-c4a-accent transition-colors",onClick:()=>e(Lr.entity(t.id)),children:S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"shrink-0",children:n}),S.jsx("span",{className:"font-mono text-sm text-c4a-text-primary truncate",children:t.name}),t.kind&&S.jsx(Ie,{variant:"muted",children:t.kind})]})})}function Ka(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function Xa(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return t}}function il(){const{t}=pe(),{hashId:e}=Cr(),[n,r]=k.useState(null),[i,s]=k.useState(null),[o,l]=k.useState("raw");if(k.useEffect(()=>{e&&(s(null),me.get(`/contents/${e}`).then(r).catch(c=>{c instanceof ge&&c.status===404?s("not_found"):s("load_failed")}))},[e]),i)return S.jsx("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:S.jsx(_e,{title:t(`common.error.${i}`),description:t(`common.error.${i}_description`)})});if(!n)return S.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:S.jsx("p",{className:"text-sm text-c4a-text-muted",children:t("common.loading")})});const a=n.hash_id.length>16?n.hash_id.slice(0,16)+"…":n.hash_id;return S.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[S.jsx(kr,{icon:S.jsx("span",{children:"📄"}),title:`Content: ${a}`,meta:[{label:t("content.detail.size"),value:Ka(n.byte_size)},{label:t("content.detail.created_at"),value:Xa(n.created_at)}]}),n.references.sources.length>0&&S.jsxs("div",{className:"mt-3",children:[S.jsx("p",{className:"text-xs font-mono uppercase text-c4a-text-muted mb-1.5",children:t("content.detail.sources")}),S.jsx("div",{className:"space-y-1",children:n.references.sources.map(c=>S.jsxs("div",{className:"text-xs text-c4a-text-secondary font-mono",children:["📁 ",c.library_name," / ",c.source_path]},c.source_id))})]}),S.jsxs(Tr,{value:o,onChange:c=>l(c),children:[S.jsx("div",{className:"mt-3",children:S.jsxs(xr,{children:[S.jsx(Te,{value:"raw",children:t("content.detail.tab.raw")}),S.jsx(Te,{value:"digest",children:t("content.detail.tab.digest")}),S.jsx(Te,{value:"extraction",children:t("content.detail.tab.extraction")}),S.jsx(Te,{value:"entities",children:t("content.detail.tab.entities")})]})}),S.jsxs("div",{className:"mt-4 flex-1",children:[S.jsx(xe,{value:"raw",children:S.jsx(Ja,{hashId:n.hash_id})}),S.jsx(xe,{value:"digest",children:S.jsx(Ya,{hashId:n.hash_id})}),S.jsx(xe,{value:"extraction",children:S.jsx(Qa,{hashId:n.hash_id})}),S.jsx(xe,{value:"entities",children:S.jsx(Za,{hashId:n.hash_id})})]})]})]})}function Ja({hashId:t}){const{t:e}=pe(),[n,r]=k.useState(null),[i,s]=k.useState(!1),[o,l]=k.useState(!1);return k.useEffect(()=>{me.get(`/contents/${t}/raw`).then(a=>{r(a),s(!0)}).catch(a=>{a instanceof ge&&a.status===404&&l(!0),s(!0)})},[t]),i?o||!n||n.source==="unavailable"?S.jsx(_e,{title:e("common.empty.content_raw.title"),description:e("common.empty.content_raw.description")}):S.jsx(za,{code:n.content}):S.jsx("p",{className:"text-sm text-c4a-text-muted",children:e("common.loading")})}function Ya({hashId:t}){const{t:e}=pe(),[n,r]=k.useState(null),[i,s]=k.useState(!1),[o,l]=k.useState(!1);return k.useEffect(()=>{me.get(`/contents/${t}/digest`).then(a=>{r(a),s(!0)}).catch(a=>{a instanceof ge&&a.status===404&&l(!0),s(!0)})},[t]),i?o||!n?S.jsx(_e,{title:e("common.empty.content_digest.title"),description:e("common.empty.content_digest.description")}):S.jsxs("div",{className:"space-y-3",children:[n.digest_data.language&&S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsxs("span",{className:"text-xs text-c4a-text-muted",children:[e("content.detail.language"),":"]}),S.jsx(Ie,{children:n.digest_data.language})]}),S.jsx(_n,{data:n.digest_data,defaultExpanded:2})]}):S.jsx("p",{className:"text-sm text-c4a-text-muted",children:e("common.loading")})}function Qa({hashId:t}){const{t:e}=pe(),[n,r]=k.useState(null),[i,s]=k.useState(!1),[o,l]=k.useState(!1);return k.useEffect(()=>{me.get(`/contents/${t}/extractions`).then(a=>{!a.extractions||a.extractions.length===0?l(!0):r(a),s(!0)}).catch(a=>{a instanceof ge&&a.status===404&&l(!0),s(!0)})},[t]),i?o||!n?S.jsx(_e,{title:e("common.empty.content_extraction.title"),description:e("common.empty.content_extraction.description")}):S.jsx("div",{className:"space-y-4",children:n.extractions.map(a=>{const c=Rr(a.extraction_confidence);return S.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.model&&S.jsx(Ie,{variant:"muted",children:a.model}),c&&S.jsx(Ie,{variant:c.variant,tooltip:`confidence: ${c.value}`,children:e(c.labelKey)})]}),S.jsx(_n,{data:{atoms:a.atoms,candidate_entities:a.candidate_entities},defaultExpanded:2})]},a.id)})}):S.jsx("p",{className:"text-sm text-c4a-text-muted",children:e("common.loading")})}function Za({hashId:t}){const{t:e}=pe(),[n,r]=k.useState([]),[i,s]=k.useState(!1),[o,l]=k.useState(!1);return k.useEffect(()=>{me.get(`/contents/${t}/entities`).then(a=>{!a.entities||a.entities.length===0?l(!0):r(a.entities),s(!0)}).catch(a=>{a instanceof ge&&a.status===404&&l(!0),s(!0)})},[t]),i?o||n.length===0?S.jsx(_e,{title:e("common.empty.content_entities.title"),description:e("common.empty.content_entities.description")}):S.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:n.map(a=>S.jsx(qa,{entity:a},a.id))}):S.jsx("p",{className:"text-sm text-c4a-text-muted",children:e("common.loading")})}export{il as ContentDetail};
@@ -0,0 +1 @@
1
+ import{c as o,u as m,a as c,j as e,b as d,C as h}from"./index-BLskFmu3.js";const p=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],f=o("arrow-left",p);function j({icon:a,title:t,badges:s,meta:l}){const i=m(),{t:r}=c();return e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"shrink-0",children:a}),e.jsx("h1",{className:"min-w-0 break-all font-mono text-xl font-bold leading-none text-c4a-text-primary",children:t}),s&&s.length>0&&e.jsx("div",{className:"flex items-center gap-1.5 ml-2",children:s.map((n,x)=>e.jsx("span",{children:n},x))})]}),e.jsxs("button",{onClick:()=>i(-1),className:"flex items-center gap-1 text-c4a-text-muted hover:text-c4a-text-primary cursor-pointer transition-colors text-xs font-mono shrink-0 ml-4",children:[e.jsx(f,{size:14}),r("common.back")]})]}),l&&l.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap items-baseline gap-4 text-xs",children:l.map(n=>e.jsxs("span",{className:"text-c4a-text-muted",children:[n.label,":",e.jsx("span",{className:"text-c4a-text-secondary",children:n.value})]},n.label))})]})}function N(){const{t:a}=c(),{hashId:t}=d();if(!t)return e.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:e.jsx("p",{className:"text-sm text-c4a-text-muted",children:a("common.loading")})});const s=t.length>16?t.slice(0,16)+"…":t;return e.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[e.jsx(j,{icon:e.jsx("span",{children:"📄"}),title:`Content: ${s}`}),e.jsx(h,{hashId:t})]})}export{N as ContentDetail};