@waq666/pneuma 0.8.0 → 0.8.1

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 (84) hide show
  1. package/README.md +10 -5
  2. package/lib/adapter/transcript.js +12 -1
  3. package/lib/app/Composer.js +14 -2
  4. package/lib/contract/plugin.d.ts +8 -0
  5. package/lib/contract/session.d.ts +8 -0
  6. package/lib/contract/snapshot.d.ts +5 -0
  7. package/lib/core/agent-roles.js +3 -2
  8. package/lib/core/commands-completion.d.ts +17 -0
  9. package/lib/core/commands-completion.js +56 -3
  10. package/lib/core/compact.d.ts +36 -6
  11. package/lib/core/compact.js +89 -17
  12. package/lib/core/events.d.ts +5 -0
  13. package/lib/core/git-info.d.ts +127 -15
  14. package/lib/core/git-info.js +307 -32
  15. package/lib/core/host-methods.d.ts +1 -1
  16. package/lib/core/host-methods.js +1 -0
  17. package/lib/core/llm.d.ts +9 -0
  18. package/lib/core/llm.js +1 -0
  19. package/lib/core/loop.js +8 -2
  20. package/lib/core/permission-scope.d.ts +12 -1
  21. package/lib/core/permission-scope.js +26 -1
  22. package/lib/core/presets.js +30 -2
  23. package/lib/core/session.d.ts +48 -7
  24. package/lib/core/session.js +263 -9
  25. package/lib/core/ui-methods.d.ts +1 -1
  26. package/lib/core/ui-methods.js +6 -0
  27. package/lib/plugins/agent.js +47 -6
  28. package/lib/plugins/commands.js +118 -14
  29. package/lib/plugins/compact.d.ts +2 -2
  30. package/lib/plugins/compact.js +150 -22
  31. package/lib/plugins/git.js +15 -1
  32. package/lib/plugins/goal.js +8 -4
  33. package/lib/plugins/host-stdio.js +11 -1
  34. package/lib/plugins/microcompact.d.ts +3 -0
  35. package/lib/plugins/microcompact.js +26 -0
  36. package/lib/plugins/remote.js +7 -1
  37. package/lib/plugins/runtime.js +5 -0
  38. package/lib/plugins/session.js +81 -7
  39. package/lib/plugins/skills.js +16 -0
  40. package/lib/plugins/subagent.js +47 -11
  41. package/lib/services/types.d.ts +66 -8
  42. package/lib/ui/assets/{app-MhfBFsp-.js → app-B-Jx5dnh.js} +60 -59
  43. package/lib/ui/assets/{chunk-Cq7xGE-D.js → chunk-Bfdlo8Me.js} +1 -1
  44. package/lib/ui/assets/{chunk-CA5f1pGf.js → chunk-DGX-i4eb.js} +1 -1
  45. package/lib/ui/assets/index.html +2 -2
  46. package/lib/ui/assets/style-WzxwEPaE.css +1 -0
  47. package/lib/ui/plugins/actions/bundle.json +2 -2
  48. package/lib/ui/plugins/ask/bundle.json +2 -2
  49. package/lib/ui/plugins/browser/bundle.json +2 -2
  50. package/lib/ui/plugins/composer/bundle.json +2 -2
  51. package/lib/ui/plugins/composer/client.js +57 -4
  52. package/lib/ui/plugins/files/bundle.json +2 -2
  53. package/lib/ui/plugins/manifest.json +1 -1
  54. package/lib/ui/plugins/palette/bundle.json +2 -2
  55. package/lib/ui/plugins/plugins/bundle.json +2 -2
  56. package/lib/ui/plugins/preview/bundle.json +2 -2
  57. package/lib/ui/plugins/prompt/bundle.json +2 -2
  58. package/lib/ui/plugins/sessions/bundle.json +2 -2
  59. package/lib/ui/plugins/sessions/client.js +41 -13
  60. package/lib/ui/plugins/settings/bundle.json +2 -2
  61. package/lib/ui/plugins/skills/bundle.json +2 -2
  62. package/lib/ui/plugins/status/bundle.json +2 -2
  63. package/lib/ui/plugins/status/client.js +162 -9
  64. package/lib/ui/plugins/statusbar/bundle.json +2 -2
  65. package/lib/ui/plugins/tasks/bundle.json +2 -2
  66. package/lib/ui/plugins/team/bundle.json +2 -2
  67. package/lib/ui/plugins/terminal/bundle.json +2 -2
  68. package/lib/ui/plugins/trace/bundle.json +2 -2
  69. package/lib/ui/plugins/transcript/bundle.json +2 -2
  70. package/lib/ui/plugins/transcript/client.js +156 -96
  71. package/lib/ui/sdk/@dsc/ui/package.json +1 -1
  72. package/lib/ui/sdk/@dsc/ui-core/package.json +1 -1
  73. package/lib/ui/sdk/@dsc/ui-dockkit/package.json +1 -1
  74. package/lib/ui/sdk/@dsc/ui-layout/package.json +1 -1
  75. package/lib/ui/sdk/@dsc/ui-primitives/icons.d.ts +13 -2
  76. package/lib/ui/sdk/@dsc/ui-primitives/image-lightbox.d.ts +21 -0
  77. package/lib/ui/sdk/@dsc/ui-primitives/index.d.ts +3 -0
  78. package/lib/ui/sdk/@dsc/ui-primitives/package.json +1 -1
  79. package/lib/ui/sdk/@dsc/ui-primitives/review-findings-card.d.ts +25 -0
  80. package/lib/ui/sdk/@dsc/ui-primitives/review-findings.d.ts +64 -0
  81. package/lib/ui/sdk/@dsc/ui-renderer/package.json +1 -1
  82. package/lib/ui/sdk/@dsc/ui-slots/package.json +1 -1
  83. package/package.json +1 -1
  84. package/lib/ui/assets/style-CIJVQKkj.css +0 -1
@@ -1,4 +1,4 @@
1
- import{g as we}from"./app-MhfBFsp-.js";function ve(G,ae){for(var Q=0;Q<ae.length;Q++){const y=ae[Q];if(typeof y!="string"&&!Array.isArray(y)){for(const F in y)if(F!=="default"&&!(F in G)){const H=Object.getOwnPropertyDescriptor(y,F);H&&Object.defineProperty(G,F,H.get?H:{enumerable:!0,get:()=>y[F]})}}}return Object.freeze(Object.defineProperty(G,Symbol.toStringTag,{value:"Module"}))}var se={exports:{}};var be=se.exports,_e;function Ee(){return _e||(_e=1,(function(G,ae){((Q,y)=>{G.exports=y()})(be,function Q(){var y=typeof self<"u"?self:typeof window<"u"?window:y!==void 0?y:{},F=!y.document&&!!y.postMessage,H=y.IS_PAPA_WORKER||!1,te={},ye=0,o={};function de(t){return t.charCodeAt(0)===65279?t.slice(1):t}function N(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var r=ue(e);r.chunkSize=parseInt(r.chunkSize),e.step||e.chunk||(r.chunkSize=null),this._handle=new le(r),(this._handle.streamer=this)._config=r}.call(this,t),this.parseChunk=function(e,r){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let g=this._config.newline;g||(i=this._config.quoteChar||'"',g=this._handle.guessLineEndings(e,i)),e=[...e.split(g).slice(s)].join(g)}this.isFirstChunk&&E(this._config.beforeFirstChunk)&&(i=this._config.beforeFirstChunk(e))!==void 0&&(e=i),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e,i=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=i.meta.cursor,s=(this._finished||(this._partialLine=s.substring(e-this._baseIndex),this._baseIndex=e),i&&i.data&&(this._rowCount+=i.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),H)y.postMessage({results:i,workerId:o.WORKER_ID,finished:s});else if(E(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!s||!E(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):H&&this._config.error&&y.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function re(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),N.call(this,t),this._nextChunk=F?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),F||(e.onload=B(this._chunkLoaded,this),e.onerror=B(this._chunkError,this)),e.ontimeout=B(this._chunkTimeout,this),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!F),this._config.downloadTimeout&&!F&&(e.timeout=this._config.downloadTimeout),this._config.downloadRequestHeaders){var r,s=this._config.downloadRequestHeaders;for(r in s)e.setRequestHeader(r,s[r])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+i));try{e.send(this._config.downloadRequestBody)}catch(g){this._chunkError(g.message)}F&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(r){r=e.statusText||r,this._sendError(new Error(r))},this._chunkTimeout=function(){this._chunkError("Request timed out after "+this._config.downloadTimeout+"ms")}}function ie(t){(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),N.call(this,t);var e,r,s=typeof FileReader<"u";this.stream=function(i){this._input=i,r=i.slice||i.webkitSlice||i.mozSlice,s?((e=new FileReader).onload=B(this._chunkLoaded,this),e.onerror=B(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var i=this._input,g=(this._config.chunkSize&&(g=Math.min(this._start+this._config.chunkSize,this._input.size),i=r.call(i,this._start,g)),e.readAsText(i,this._config.encoding));s||this._chunkLoaded({target:{result:g}})},this._chunkLoaded=function(i){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(i.target.result)},this._chunkError=function(){this._sendError(e.error)}}function Y(t){var e;N.call(this,t=t||{}),this.stream=function(r){return e=r,this._nextChunk()},this._nextChunk=function(){var r,s;if(!this._finished)return r=this._config.chunkSize,e=r?(s=e.substring(0,r),e.substring(r)):(s=e,""),this._finished=!e,this.parseChunk(s)}}function ne(t){N.call(this,t=t||{});var e=[],r=!0,s=!1;this.pause=function(){N.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){N.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(i){this._input=i,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):r=!0},this._streamData=B(function(i){try{e.push(typeof i=="string"?i:i.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(g){this._streamError(g)}},this),this._streamError=B(function(i){this._streamCleanUp(),this._sendError(i)},this),this._streamEnd=B(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=B(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function le(t){var e,r,s,i,g=Math.pow(2,53),T=-g,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,K=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,w=this,I=0,u=0,A=!1,d=!1,l=[],n={data:[],errors:[],meta:{}};function L(p){return t.skipEmptyLines==="greedy"?p.join("").trim()==="":p.length===1&&p[0].length===0}function k(){if(n&&s&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),t.skipEmptyLines&&(n.data=n.data.filter(function(a){return!L(a)})),R()){let a=function(O){l.push(O)};if(n)if(Array.isArray(n.data[0])){for(var p=0;R()&&p<n.data.length;p++)n.data[p].forEach(a);n.data.splice(0,1)}else n.data.forEach(a)}function f(a,O){for(var x=t.header?{}:[],_=0;_<a.length;_++){var m=_,c=a[_],c=((z,h)=>(v=>(t.dynamicTypingFunction&&t.dynamicTyping[v]===void 0&&(t.dynamicTyping[v]=t.dynamicTypingFunction(v)),(t.dynamicTyping[v]||t.dynamicTyping)===!0))(z)?h==="true"||h==="TRUE"||h!=="false"&&h!=="FALSE"&&((v=>{if(M.test(v)&&(v=parseFloat(v),T<v&&v<g))return 1})(h)?parseFloat(h):K.test(h)?new Date(h):h===""?null:h):h)(m=t.header?_>=l.length?"__parsed_extra":l[_]:m,c=t.transform?t.transform(c,m):c);m==="__parsed_extra"?(x[m]=x[m]||[],x[m].push(c)):x[m]=c}return t.header&&(_>l.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+_,u+O):_<l.length&&j("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+_,u+O)),x}var b;n&&(t.header||t.dynamicTyping||t.transform)&&(b=1,!n.data.length||Array.isArray(n.data[0])?(n.data=n.data.map(f),b=n.data.length):n.data=f(n.data,0),t.header&&n.meta&&(n.meta.fields=l),u+=b)}function R(){return t.header&&l.length===0}function j(p,f,b,a){p={type:p,code:f,message:b},a!==void 0&&(p.row=a),n.errors.push(p)}E(t.step)&&(i=t.step,t.step=function(p){n=p,R()?k():(k(),n.data.length!==0&&(I+=p.data.length,t.preview&&I>t.preview?r.abort():(n.data=n.data[0],i(n,w))))}),this.parse=function(p,f,b){var a=t.quoteChar||'"',a=(t.newline||(t.newline=this.guessLineEndings(p,a)),s=!1,t.delimiter?E(t.delimiter)&&(t.delimiter=t.delimiter(p),n.meta.delimiter=t.delimiter):((a=((O,x,_,m,c)=>{var z,h,v,$;c=c||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var J=0;J<c.length;J++){for(var P,V=c[J],C=0,q=0,S=0,D=(v=void 0,new oe({comments:m,delimiter:V,newline:x,preview:10}).parse(O)),W=0;W<D.data.length;W++)_&&L(D.data[W])?S++:(P=D.data[W].length,q+=P,v===void 0?v=P:0<P&&(C+=Math.abs(P-v),v=P));0<D.data.length&&(q/=D.data.length-S),1.99<q&&(h===void 0||C<h||C===h&&$<q)&&(h=C,z=V,$=q)}return{successful:!!(t.delimiter=z),bestDelimiter:z}})(p,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=a.bestDelimiter:(s=!0,t.delimiter=o.DefaultDelimiter),n.meta.delimiter=t.delimiter),ue(t));return a.header=R(),t.preview&&t.header&&a.preview++,e=p,r=new oe(a),n=r.parse(e,f,b),k(),A?{meta:{paused:!0}}:n||{meta:{paused:!1}}},this.paused=function(){return A},this.pause=function(){A=!0,r.abort(),e=E(t.chunk)?"":e.substring(r.getCharIndex())},this.resume=function(){w.streamer._halted?(A=!1,w.streamer.parseChunk(e,!0)):setTimeout(w.resume,3)},this.aborted=function(){return d},this.abort=function(){d=!0,r.abort(),n.meta.aborted=!0,E(t.complete)&&t.complete(n),e=""},this.guessLineEndings=function(O,a){O=O.substring(0,1048576);var a=new RegExp(X(a)+"([^]*?)"+X(a),"gm"),b=(O=O.replace(a,"")).split("\r"),a=O.split(`
1
+ import{g as we}from"./app-B-Jx5dnh.js";function ve(G,ae){for(var Q=0;Q<ae.length;Q++){const y=ae[Q];if(typeof y!="string"&&!Array.isArray(y)){for(const F in y)if(F!=="default"&&!(F in G)){const H=Object.getOwnPropertyDescriptor(y,F);H&&Object.defineProperty(G,F,H.get?H:{enumerable:!0,get:()=>y[F]})}}}return Object.freeze(Object.defineProperty(G,Symbol.toStringTag,{value:"Module"}))}var se={exports:{}};var be=se.exports,_e;function Ee(){return _e||(_e=1,(function(G,ae){((Q,y)=>{G.exports=y()})(be,function Q(){var y=typeof self<"u"?self:typeof window<"u"?window:y!==void 0?y:{},F=!y.document&&!!y.postMessage,H=y.IS_PAPA_WORKER||!1,te={},ye=0,o={};function de(t){return t.charCodeAt(0)===65279?t.slice(1):t}function N(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var r=ue(e);r.chunkSize=parseInt(r.chunkSize),e.step||e.chunk||(r.chunkSize=null),this._handle=new le(r),(this._handle.streamer=this)._config=r}.call(this,t),this.parseChunk=function(e,r){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let g=this._config.newline;g||(i=this._config.quoteChar||'"',g=this._handle.guessLineEndings(e,i)),e=[...e.split(g).slice(s)].join(g)}this.isFirstChunk&&E(this._config.beforeFirstChunk)&&(i=this._config.beforeFirstChunk(e))!==void 0&&(e=i),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e,i=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=i.meta.cursor,s=(this._finished||(this._partialLine=s.substring(e-this._baseIndex),this._baseIndex=e),i&&i.data&&(this._rowCount+=i.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),H)y.postMessage({results:i,workerId:o.WORKER_ID,finished:s});else if(E(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!s||!E(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):H&&this._config.error&&y.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function re(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),N.call(this,t),this._nextChunk=F?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),F||(e.onload=B(this._chunkLoaded,this),e.onerror=B(this._chunkError,this)),e.ontimeout=B(this._chunkTimeout,this),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!F),this._config.downloadTimeout&&!F&&(e.timeout=this._config.downloadTimeout),this._config.downloadRequestHeaders){var r,s=this._config.downloadRequestHeaders;for(r in s)e.setRequestHeader(r,s[r])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+i));try{e.send(this._config.downloadRequestBody)}catch(g){this._chunkError(g.message)}F&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(r){r=e.statusText||r,this._sendError(new Error(r))},this._chunkTimeout=function(){this._chunkError("Request timed out after "+this._config.downloadTimeout+"ms")}}function ie(t){(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),N.call(this,t);var e,r,s=typeof FileReader<"u";this.stream=function(i){this._input=i,r=i.slice||i.webkitSlice||i.mozSlice,s?((e=new FileReader).onload=B(this._chunkLoaded,this),e.onerror=B(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var i=this._input,g=(this._config.chunkSize&&(g=Math.min(this._start+this._config.chunkSize,this._input.size),i=r.call(i,this._start,g)),e.readAsText(i,this._config.encoding));s||this._chunkLoaded({target:{result:g}})},this._chunkLoaded=function(i){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(i.target.result)},this._chunkError=function(){this._sendError(e.error)}}function Y(t){var e;N.call(this,t=t||{}),this.stream=function(r){return e=r,this._nextChunk()},this._nextChunk=function(){var r,s;if(!this._finished)return r=this._config.chunkSize,e=r?(s=e.substring(0,r),e.substring(r)):(s=e,""),this._finished=!e,this.parseChunk(s)}}function ne(t){N.call(this,t=t||{});var e=[],r=!0,s=!1;this.pause=function(){N.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){N.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(i){this._input=i,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):r=!0},this._streamData=B(function(i){try{e.push(typeof i=="string"?i:i.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(g){this._streamError(g)}},this),this._streamError=B(function(i){this._streamCleanUp(),this._sendError(i)},this),this._streamEnd=B(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=B(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function le(t){var e,r,s,i,g=Math.pow(2,53),T=-g,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,K=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,w=this,I=0,u=0,A=!1,d=!1,l=[],n={data:[],errors:[],meta:{}};function L(p){return t.skipEmptyLines==="greedy"?p.join("").trim()==="":p.length===1&&p[0].length===0}function k(){if(n&&s&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),t.skipEmptyLines&&(n.data=n.data.filter(function(a){return!L(a)})),R()){let a=function(O){l.push(O)};if(n)if(Array.isArray(n.data[0])){for(var p=0;R()&&p<n.data.length;p++)n.data[p].forEach(a);n.data.splice(0,1)}else n.data.forEach(a)}function f(a,O){for(var x=t.header?{}:[],_=0;_<a.length;_++){var m=_,c=a[_],c=((z,h)=>(v=>(t.dynamicTypingFunction&&t.dynamicTyping[v]===void 0&&(t.dynamicTyping[v]=t.dynamicTypingFunction(v)),(t.dynamicTyping[v]||t.dynamicTyping)===!0))(z)?h==="true"||h==="TRUE"||h!=="false"&&h!=="FALSE"&&((v=>{if(M.test(v)&&(v=parseFloat(v),T<v&&v<g))return 1})(h)?parseFloat(h):K.test(h)?new Date(h):h===""?null:h):h)(m=t.header?_>=l.length?"__parsed_extra":l[_]:m,c=t.transform?t.transform(c,m):c);m==="__parsed_extra"?(x[m]=x[m]||[],x[m].push(c)):x[m]=c}return t.header&&(_>l.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+_,u+O):_<l.length&&j("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+_,u+O)),x}var b;n&&(t.header||t.dynamicTyping||t.transform)&&(b=1,!n.data.length||Array.isArray(n.data[0])?(n.data=n.data.map(f),b=n.data.length):n.data=f(n.data,0),t.header&&n.meta&&(n.meta.fields=l),u+=b)}function R(){return t.header&&l.length===0}function j(p,f,b,a){p={type:p,code:f,message:b},a!==void 0&&(p.row=a),n.errors.push(p)}E(t.step)&&(i=t.step,t.step=function(p){n=p,R()?k():(k(),n.data.length!==0&&(I+=p.data.length,t.preview&&I>t.preview?r.abort():(n.data=n.data[0],i(n,w))))}),this.parse=function(p,f,b){var a=t.quoteChar||'"',a=(t.newline||(t.newline=this.guessLineEndings(p,a)),s=!1,t.delimiter?E(t.delimiter)&&(t.delimiter=t.delimiter(p),n.meta.delimiter=t.delimiter):((a=((O,x,_,m,c)=>{var z,h,v,$;c=c||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var J=0;J<c.length;J++){for(var P,V=c[J],C=0,q=0,S=0,D=(v=void 0,new oe({comments:m,delimiter:V,newline:x,preview:10}).parse(O)),W=0;W<D.data.length;W++)_&&L(D.data[W])?S++:(P=D.data[W].length,q+=P,v===void 0?v=P:0<P&&(C+=Math.abs(P-v),v=P));0<D.data.length&&(q/=D.data.length-S),1.99<q&&(h===void 0||C<h||C===h&&$<q)&&(h=C,z=V,$=q)}return{successful:!!(t.delimiter=z),bestDelimiter:z}})(p,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=a.bestDelimiter:(s=!0,t.delimiter=o.DefaultDelimiter),n.meta.delimiter=t.delimiter),ue(t));return a.header=R(),t.preview&&t.header&&a.preview++,e=p,r=new oe(a),n=r.parse(e,f,b),k(),A?{meta:{paused:!0}}:n||{meta:{paused:!1}}},this.paused=function(){return A},this.pause=function(){A=!0,r.abort(),e=E(t.chunk)?"":e.substring(r.getCharIndex())},this.resume=function(){w.streamer._halted?(A=!1,w.streamer.parseChunk(e,!0)):setTimeout(w.resume,3)},this.aborted=function(){return d},this.abort=function(){d=!0,r.abort(),n.meta.aborted=!0,E(t.complete)&&t.complete(n),e=""},this.guessLineEndings=function(O,a){O=O.substring(0,1048576);var a=new RegExp(X(a)+"([^]*?)"+X(a),"gm"),b=(O=O.replace(a,"")).split("\r"),a=O.split(`
2
2
  `),O=1<a.length&&a[0].length<b[0].length;if(b.length===1||O)return`
3
3
  `;for(var x=0,_=0;_<b.length;_++)b[_][0]===`
4
4
  `&&x++;return x>=b.length/2?`\r
@@ -1,4 +1,4 @@
1
- import{w as Le,s as ot,f as zt,a as Ut,b as Kt,c as We,h as Yt}from"./app-MhfBFsp-.js";const De={}.hasOwnProperty;function Vt(t,e){const n=e||{};function s(r,...i){let o=s.invalid;const a=s.handlers;if(r&&De.call(r,t)){const c=String(r[t]);o=De.call(a,c)?a[c]:s.unknown}if(o)return o.call(this,r,...i)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}var S=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Jt(t){return xe(t)}function xe(t){return Array.isArray(t)?Qt(t):t instanceof RegExp?t:typeof t=="object"?Xt(t):t}function Qt(t){let e=[];for(let n=0,s=t.length;n<s;n++)e[n]=xe(t[n]);return e}function Xt(t){let e={};for(let n in t)e[n]=xe(t[n]);return e}function at(t,...e){return e.forEach(n=>{for(let s in n)t[s]=n[s]}),t}function ct(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?ct(t.substring(0,t.length-1)):t.substr(~e+1)}var pe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Y=class{static hasCaptures(t){return t===null?!1:(pe.lastIndex=0,pe.test(t))}static replaceCaptures(t,e,n){return t.replace(pe,(s,r,i,o)=>{let a=n[parseInt(r||i,10)];if(a){let c=e.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return s})}};function lt(t,e){return t<e?-1:t>e?1:0}function ut(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,s=e.length;if(n===s){for(let r=0;r<n;r++){let i=lt(t[r],e[r]);if(i!==0)return i}return 0}return n-s}function Fe(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 ht(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ft=class{constructor(t){this.fn=t}fn;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}},Z=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}_colorMap;_defaults;_root;static createFromRawTheme(t,e){return this.createFromParsedTheme(tn(t),e)}static createFromParsedTheme(t,e){return sn(t,e)}_cachedMatchRoot=new ft(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,s=this._cachedMatchRoot.get(e).find(r=>Zt(t.parent,r.parentScopes));return s?new dt(s.fontStyle,s.foreground,s.background):null}},_e=class Q{constructor(e,n){this.parent=e,this.scopeName=n}parent;scopeName;static push(e,n){for(const s of n)e=new Q(e,s);return e}static from(...e){let n=null;for(let s=0;s<e.length;s++)n=new Q(n,e[s]);return n}push(e){return new Q(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 s=this;for(;s&&s!==e;)n.push(s.scopeName),s=s.parent;return s===e?n.reverse():void 0}};function Zt(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let s=e[n],r=!1;if(s===">"){if(n===e.length-1)return!1;s=e[++n],r=!0}for(;t&&!en(t.scopeName,s);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function en(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var dt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}fontStyle;foregroundId;backgroundId};function tn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],s=0;for(let r=0,i=e.length;r<i;r++){let o=e[r];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&Fe(o.settings.foreground)&&(l=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&Fe(o.settings.background)&&(u=o.settings.background);for(let h=0,f=a.length;h<f;h++){let g=a[h].trim().split(" "),y=g[g.length-1],_=null;g.length>1&&(_=g.slice(0,g.length-1),_.reverse()),n[s++]=new nn(y,_,r,c,l,u)}}return n}var nn=class{constructor(t,e,n,s,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=s,this.foreground=r,this.background=i}scope;parentScopes;index;fontStyle;foreground;background},N=(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))(N||{});function sn(t,e){t.sort((c,l)=>{let u=lt(c.scope,l.scope);return u!==0||(u=ut(c.parentScopes,l.parentScopes),u!==0)?u:c.index-l.index});let n=0,s="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(s=c.foreground),c.background!==null&&(r=c.background)}let i=new rn(e),o=new dt(n,i.getId(s),i.getId(r)),a=new an(new Ce(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new Z(i,o,a)}var rn=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)}},on=Object.freeze([]),Ce=class gt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,s,r,i){this.scopeDepth=e,this.parentScopes=n||on,this.fontStyle=s,this.foreground=r,this.background=i}clone(){return new gt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let s=0,r=e.length;s<r;s++)n[s]=e[s].clone();return n}acceptOverwrite(e,n,s,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},an=class ke{constructor(e,n=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=n}_mainRule;_children;_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let s=0,r=0;for(;e.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[s].length;if(i!==0)return i;s++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let s=e.indexOf("."),r,i;if(s===-1?(r=e,i=""):(r=e.substring(0,s),i=e.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(ke._cmpBySpecificity),n}insert(e,n,s,r,i,o){if(n===""){this._doInsertHere(e,s,r,i,o);return}let a=n.indexOf("."),c,l;a===-1?(c=n,l=""):(c=n.substring(0,a),l=n.substring(a+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new ke(this._mainRule.clone(),Ce.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(e+1,l,s,r,i,o)}_doInsertHere(e,n,s,r,i){if(n===null){this._mainRule.acceptOverwrite(e,s,r,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(ut(c.parentScopes,n)===0){c.acceptOverwrite(e,s,r,i);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ce(e,n,s,r,i))}},G=class v{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=v.getLanguageId(e),s=v.getTokenType(e),r=v.getFontStyle(e),i=v.getForeground(e),o=v.getBackground(e);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:i,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,s,r,i,o,a){let c=v.getLanguageId(e),l=v.getTokenType(e),u=v.containsBalancedBrackets(e)?1:0,h=v.getFontStyle(e),f=v.getForeground(e),d=v.getBackground(e);return n!==0&&(c=n),s!==8&&(l=s),r!==null&&(u=r?1:0),i!==-1&&(h=i),o!==0&&(f=o),a!==0&&(d=a),(c<<0|l<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function ee(t,e){const n=[],s=cn(t);let r=s.next();for(;r!==null;){let c=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let l=o();if(n.push({matcher:l,priority:c}),r!==",")break;r=s.next()}return n;function i(){if(r==="-"){r=s.next();const c=i();return l=>!!c&&!c(l)}if(r==="("){r=s.next();const c=a();return r===")"&&(r=s.next()),c}if(qe(r)){const c=[];do c.push(r),r=s.next();while(qe(r));return l=>e(c,l)}return null}function o(){const c=[];let l=i();for(;l;)c.push(l),l=i();return u=>c.every(h=>h(u))}function a(){const c=[];let l=o();for(;l&&(c.push(l),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");l=o()}return u=>c.some(h=>h(u))}}function qe(t){return!!t&&!!t.match(/[\w\.:]+/)}function cn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const s=n[0];return n=e.exec(t),s}}}function mt(t){typeof t.dispose=="function"&&t.dispose()}var W=class{constructor(t){this.scopeName=t}scopeName;toKey(){return this.scopeName}},ln=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;toKey(){return`${this.scopeName}#${this.ruleName}`}},un=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))}},hn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new W(this.initialScopeName)]}repo;initialScopeName;seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new un;for(const n of t)fn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof W){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 fn(t,e,n,s){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof W?X({baseGrammar:i,selfGrammar:r},s):Re(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},s);const o=n.injections(t.scopeName);if(o)for(const a of o)s.add(new W(a))}function Re(t,e,n){if(e.repository&&e.repository[t]){const s=e.repository[t];te([s],e,n)}}function X(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&te(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&te(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function te(t,e,n){for(const s of t){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?at({},e.repository,s.repository):e.repository;Array.isArray(s.patterns)&&te(s.patterns,{...e,repository:r},n);const i=s.include;if(!i)continue;const o=pt(i);switch(o.kind){case 0:X({...e,selfGrammar:e.baseGrammar},n);break;case 1:X(e,n);break;case 2:Re(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:r};o.kind===4?Re(o.ruleName,c,n):X(c,n)}else o.kind===4?n.add(new ln(o.scopeName,o.ruleName)):n.add(new W(o.scopeName));break}}}var dn=class{kind=0},gn=class{kind=1},mn=class{constructor(t){this.ruleName=t}ruleName;kind=2},pn=class{constructor(t){this.scopeName=t}scopeName;kind=3},_n=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;kind=4};function pt(t){if(t==="$base")return new dn;if(t==="$self")return new gn;const e=t.indexOf("#");if(e===-1)return new pn(t);if(e===0)return new mn(t.substring(1));{const n=t.substring(0,e),s=t.substring(e+1);return new _n(n,s)}}var yn=/\\(\d+)/,He=/\\(\d+)/g,bn=-1,_t=-2;var U=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,s){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Y.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Y.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${ct(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:Y.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Y.replaceCaptures(this._contentName,t,e)}},Sn=class extends U{retokenizeCapturedWithRuleId;constructor(t,e,n,s,r){super(t,e,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,s){throw new Error("Not supported!")}},wn=class extends U{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,null),this._match=new D(s,this.id),this.captures=r,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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ze=class extends U{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ne=class extends U{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r,i,o,a,c,l){super(t,e,n,s),this._begin=new D(r,this.id),this.beginCaptures=i,this._end=new D(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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,s){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,s)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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}},ne=class extends U{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,s,r,i,o,a,c){super(t,e,n,s),this._begin=new D(r,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new D(o,_t),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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,s){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,s)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new F,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},yt=class R{static createCaptureRule(e,n,s,r,i){return e.registerRule(o=>new Sn(n,o,s,r,i))}static getCompiledRuleId(e,n,s){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new wn(e.$vscodeTextmateLocation,e.id,e.name,e.match,R._compileCaptures(e.captures,n,s));if(typeof e.begin>"u"){e.repository&&(s=at({},s,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new ze(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,R._compilePatterns(i,n,s))}return e.while?new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,n,s),e.while,R._compileCaptures(e.whileCaptures||e.captures,n,s),R._compilePatterns(e.patterns,n,s)):new Ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,n,s),e.end,R._compileCaptures(e.endCaptures||e.captures,n,s),e.applyEndPatternLast,R._compilePatterns(e.patterns,n,s))}),e.id}static _compileCaptures(e,n,s){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>i&&(i=a)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;e[o].patterns&&(c=R.getCompiledRuleId(e[o],n,s)),r[a]=R.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,n,s){let r=[];if(e)for(let i=0,o=e.length;i<o;i++){const a=e[i];let c=-1;if(a.include){const l=pt(a.include);switch(l.kind){case 0:case 1:c=R.getCompiledRuleId(s[a.include],n,s);break;case 2:let u=s[l.ruleName];u&&(c=R.getCompiledRuleId(u,n,s));break;case 3:case 4:const h=l.scopeName,f=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(h,s);if(d)if(f){let g=d.repository[f];g&&(c=R.getCompiledRuleId(g,n,d.repository))}else c=R.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else c=R.getCompiledRuleId(a,n,s);if(c!==-1){const l=n.getRule(c);let u=!1;if((l instanceof ze||l instanceof Ne||l instanceof ne)&&l.hasMissingPatterns&&l.patterns.length===0&&(u=!0),u)continue;r.push(c)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},D=class bt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const s=e.length;let r=0,i=[],o=!1;for(let a=0;a<s;a++)if(e.charAt(a)==="\\"&&a+1<s){const l=e.charAt(a+1);l==="z"?(i.push(e.substring(r,a)),i.push("$(?!\\n)(?<!\\n)"),r=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,r===0?this.source=e:(i.push(e.substring(r,s)),this.source=i.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=yn.test(this.source):this.hasBackReferences=!1}clone(){return new bt(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 s=n.map(r=>e.substring(r.start,r.end));return He.lastIndex=0,this.source.replace(He,(r,i)=>ht(s[parseInt(i,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=[],s=[],r=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)a=this.source.charAt(i),e[i]=a,n[i]=a,s[i]=a,r[i]=a,a==="\\"&&i+1<o&&(c=this.source.charAt(i+1),c==="A"?(e[i+1]="￿",n[i+1]="￿",s[i+1]="A",r[i+1]="A"):c==="G"?(e[i+1]="￿",n[i+1]="G",s[i+1]="￿",r[i+1]="G"):(e[i+1]=c,n[i+1]=c,s[i+1]=c,r[i+1]=c),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.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}},F=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 Ue(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 s=this._items.map(r=>r.resolveAnchors(e,n));return new Ue(t,s,this._items.map(r=>r.ruleId))}},Ue=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}regExps;rules;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(`
1
+ import{w as Le,s as ot,f as zt,a as Ut,b as Kt,c as We,h as Yt}from"./app-B-Jx5dnh.js";const De={}.hasOwnProperty;function Vt(t,e){const n=e||{};function s(r,...i){let o=s.invalid;const a=s.handlers;if(r&&De.call(r,t)){const c=String(r[t]);o=De.call(a,c)?a[c]:s.unknown}if(o)return o.call(this,r,...i)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}var S=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Jt(t){return xe(t)}function xe(t){return Array.isArray(t)?Qt(t):t instanceof RegExp?t:typeof t=="object"?Xt(t):t}function Qt(t){let e=[];for(let n=0,s=t.length;n<s;n++)e[n]=xe(t[n]);return e}function Xt(t){let e={};for(let n in t)e[n]=xe(t[n]);return e}function at(t,...e){return e.forEach(n=>{for(let s in n)t[s]=n[s]}),t}function ct(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?ct(t.substring(0,t.length-1)):t.substr(~e+1)}var pe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Y=class{static hasCaptures(t){return t===null?!1:(pe.lastIndex=0,pe.test(t))}static replaceCaptures(t,e,n){return t.replace(pe,(s,r,i,o)=>{let a=n[parseInt(r||i,10)];if(a){let c=e.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return s})}};function lt(t,e){return t<e?-1:t>e?1:0}function ut(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,s=e.length;if(n===s){for(let r=0;r<n;r++){let i=lt(t[r],e[r]);if(i!==0)return i}return 0}return n-s}function Fe(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 ht(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ft=class{constructor(t){this.fn=t}fn;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}},Z=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}_colorMap;_defaults;_root;static createFromRawTheme(t,e){return this.createFromParsedTheme(tn(t),e)}static createFromParsedTheme(t,e){return sn(t,e)}_cachedMatchRoot=new ft(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,s=this._cachedMatchRoot.get(e).find(r=>Zt(t.parent,r.parentScopes));return s?new dt(s.fontStyle,s.foreground,s.background):null}},_e=class Q{constructor(e,n){this.parent=e,this.scopeName=n}parent;scopeName;static push(e,n){for(const s of n)e=new Q(e,s);return e}static from(...e){let n=null;for(let s=0;s<e.length;s++)n=new Q(n,e[s]);return n}push(e){return new Q(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 s=this;for(;s&&s!==e;)n.push(s.scopeName),s=s.parent;return s===e?n.reverse():void 0}};function Zt(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let s=e[n],r=!1;if(s===">"){if(n===e.length-1)return!1;s=e[++n],r=!0}for(;t&&!en(t.scopeName,s);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function en(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var dt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}fontStyle;foregroundId;backgroundId};function tn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],s=0;for(let r=0,i=e.length;r<i;r++){let o=e[r];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&Fe(o.settings.foreground)&&(l=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&Fe(o.settings.background)&&(u=o.settings.background);for(let h=0,f=a.length;h<f;h++){let g=a[h].trim().split(" "),y=g[g.length-1],_=null;g.length>1&&(_=g.slice(0,g.length-1),_.reverse()),n[s++]=new nn(y,_,r,c,l,u)}}return n}var nn=class{constructor(t,e,n,s,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=s,this.foreground=r,this.background=i}scope;parentScopes;index;fontStyle;foreground;background},N=(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))(N||{});function sn(t,e){t.sort((c,l)=>{let u=lt(c.scope,l.scope);return u!==0||(u=ut(c.parentScopes,l.parentScopes),u!==0)?u:c.index-l.index});let n=0,s="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(s=c.foreground),c.background!==null&&(r=c.background)}let i=new rn(e),o=new dt(n,i.getId(s),i.getId(r)),a=new an(new Ce(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new Z(i,o,a)}var rn=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)}},on=Object.freeze([]),Ce=class gt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,s,r,i){this.scopeDepth=e,this.parentScopes=n||on,this.fontStyle=s,this.foreground=r,this.background=i}clone(){return new gt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let s=0,r=e.length;s<r;s++)n[s]=e[s].clone();return n}acceptOverwrite(e,n,s,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},an=class ke{constructor(e,n=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=n}_mainRule;_children;_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let s=0,r=0;for(;e.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[s].length;if(i!==0)return i;s++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let s=e.indexOf("."),r,i;if(s===-1?(r=e,i=""):(r=e.substring(0,s),i=e.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(ke._cmpBySpecificity),n}insert(e,n,s,r,i,o){if(n===""){this._doInsertHere(e,s,r,i,o);return}let a=n.indexOf("."),c,l;a===-1?(c=n,l=""):(c=n.substring(0,a),l=n.substring(a+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new ke(this._mainRule.clone(),Ce.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(e+1,l,s,r,i,o)}_doInsertHere(e,n,s,r,i){if(n===null){this._mainRule.acceptOverwrite(e,s,r,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(ut(c.parentScopes,n)===0){c.acceptOverwrite(e,s,r,i);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ce(e,n,s,r,i))}},G=class v{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=v.getLanguageId(e),s=v.getTokenType(e),r=v.getFontStyle(e),i=v.getForeground(e),o=v.getBackground(e);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:i,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,s,r,i,o,a){let c=v.getLanguageId(e),l=v.getTokenType(e),u=v.containsBalancedBrackets(e)?1:0,h=v.getFontStyle(e),f=v.getForeground(e),d=v.getBackground(e);return n!==0&&(c=n),s!==8&&(l=s),r!==null&&(u=r?1:0),i!==-1&&(h=i),o!==0&&(f=o),a!==0&&(d=a),(c<<0|l<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function ee(t,e){const n=[],s=cn(t);let r=s.next();for(;r!==null;){let c=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let l=o();if(n.push({matcher:l,priority:c}),r!==",")break;r=s.next()}return n;function i(){if(r==="-"){r=s.next();const c=i();return l=>!!c&&!c(l)}if(r==="("){r=s.next();const c=a();return r===")"&&(r=s.next()),c}if(qe(r)){const c=[];do c.push(r),r=s.next();while(qe(r));return l=>e(c,l)}return null}function o(){const c=[];let l=i();for(;l;)c.push(l),l=i();return u=>c.every(h=>h(u))}function a(){const c=[];let l=o();for(;l&&(c.push(l),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");l=o()}return u=>c.some(h=>h(u))}}function qe(t){return!!t&&!!t.match(/[\w\.:]+/)}function cn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const s=n[0];return n=e.exec(t),s}}}function mt(t){typeof t.dispose=="function"&&t.dispose()}var W=class{constructor(t){this.scopeName=t}scopeName;toKey(){return this.scopeName}},ln=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;toKey(){return`${this.scopeName}#${this.ruleName}`}},un=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))}},hn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new W(this.initialScopeName)]}repo;initialScopeName;seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new un;for(const n of t)fn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof W){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 fn(t,e,n,s){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof W?X({baseGrammar:i,selfGrammar:r},s):Re(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},s);const o=n.injections(t.scopeName);if(o)for(const a of o)s.add(new W(a))}function Re(t,e,n){if(e.repository&&e.repository[t]){const s=e.repository[t];te([s],e,n)}}function X(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&te(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&te(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function te(t,e,n){for(const s of t){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?at({},e.repository,s.repository):e.repository;Array.isArray(s.patterns)&&te(s.patterns,{...e,repository:r},n);const i=s.include;if(!i)continue;const o=pt(i);switch(o.kind){case 0:X({...e,selfGrammar:e.baseGrammar},n);break;case 1:X(e,n);break;case 2:Re(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:r};o.kind===4?Re(o.ruleName,c,n):X(c,n)}else o.kind===4?n.add(new ln(o.scopeName,o.ruleName)):n.add(new W(o.scopeName));break}}}var dn=class{kind=0},gn=class{kind=1},mn=class{constructor(t){this.ruleName=t}ruleName;kind=2},pn=class{constructor(t){this.scopeName=t}scopeName;kind=3},_n=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;kind=4};function pt(t){if(t==="$base")return new dn;if(t==="$self")return new gn;const e=t.indexOf("#");if(e===-1)return new pn(t);if(e===0)return new mn(t.substring(1));{const n=t.substring(0,e),s=t.substring(e+1);return new _n(n,s)}}var yn=/\\(\d+)/,He=/\\(\d+)/g,bn=-1,_t=-2;var U=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,s){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Y.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Y.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${ct(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:Y.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Y.replaceCaptures(this._contentName,t,e)}},Sn=class extends U{retokenizeCapturedWithRuleId;constructor(t,e,n,s,r){super(t,e,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,s){throw new Error("Not supported!")}},wn=class extends U{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,null),this._match=new D(s,this.id),this.captures=r,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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ze=class extends U{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ne=class extends U{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r,i,o,a,c,l){super(t,e,n,s),this._begin=new D(r,this.id),this.beginCaptures=i,this._end=new D(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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,s){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,s)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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}},ne=class extends U{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,s,r,i,o,a,c){super(t,e,n,s),this._begin=new D(r,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new D(o,_t),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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,s){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,s)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new F,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},yt=class R{static createCaptureRule(e,n,s,r,i){return e.registerRule(o=>new Sn(n,o,s,r,i))}static getCompiledRuleId(e,n,s){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new wn(e.$vscodeTextmateLocation,e.id,e.name,e.match,R._compileCaptures(e.captures,n,s));if(typeof e.begin>"u"){e.repository&&(s=at({},s,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new ze(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,R._compilePatterns(i,n,s))}return e.while?new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,n,s),e.while,R._compileCaptures(e.whileCaptures||e.captures,n,s),R._compilePatterns(e.patterns,n,s)):new Ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,n,s),e.end,R._compileCaptures(e.endCaptures||e.captures,n,s),e.applyEndPatternLast,R._compilePatterns(e.patterns,n,s))}),e.id}static _compileCaptures(e,n,s){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>i&&(i=a)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;e[o].patterns&&(c=R.getCompiledRuleId(e[o],n,s)),r[a]=R.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,n,s){let r=[];if(e)for(let i=0,o=e.length;i<o;i++){const a=e[i];let c=-1;if(a.include){const l=pt(a.include);switch(l.kind){case 0:case 1:c=R.getCompiledRuleId(s[a.include],n,s);break;case 2:let u=s[l.ruleName];u&&(c=R.getCompiledRuleId(u,n,s));break;case 3:case 4:const h=l.scopeName,f=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(h,s);if(d)if(f){let g=d.repository[f];g&&(c=R.getCompiledRuleId(g,n,d.repository))}else c=R.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else c=R.getCompiledRuleId(a,n,s);if(c!==-1){const l=n.getRule(c);let u=!1;if((l instanceof ze||l instanceof Ne||l instanceof ne)&&l.hasMissingPatterns&&l.patterns.length===0&&(u=!0),u)continue;r.push(c)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},D=class bt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const s=e.length;let r=0,i=[],o=!1;for(let a=0;a<s;a++)if(e.charAt(a)==="\\"&&a+1<s){const l=e.charAt(a+1);l==="z"?(i.push(e.substring(r,a)),i.push("$(?!\\n)(?<!\\n)"),r=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,r===0?this.source=e:(i.push(e.substring(r,s)),this.source=i.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=yn.test(this.source):this.hasBackReferences=!1}clone(){return new bt(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 s=n.map(r=>e.substring(r.start,r.end));return He.lastIndex=0,this.source.replace(He,(r,i)=>ht(s[parseInt(i,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=[],s=[],r=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)a=this.source.charAt(i),e[i]=a,n[i]=a,s[i]=a,r[i]=a,a==="\\"&&i+1<o&&(c=this.source.charAt(i+1),c==="A"?(e[i+1]="￿",n[i+1]="￿",s[i+1]="A",r[i+1]="A"):c==="G"?(e[i+1]="￿",n[i+1]="G",s[i+1]="￿",r[i+1]="G"):(e[i+1]=c,n[i+1]=c,s[i+1]=c,r[i+1]=c),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.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}},F=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 Ue(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 s=this._items.map(r=>r.resolveAnchors(e,n));return new Ue(t,s,this._items.map(r=>r.ruleId))}},Ue=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}regExps;rules;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(`
2
2
  `)}findNextMatchSync(t,e,n){const s=this.scanner.findNextMatchSync(t,e,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},ye=class{constructor(t,e){this.languageId=t,this.tokenType=e}languageId;tokenType},Cn=class Te{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new ye(e,8),this._embeddedLanguagesMatcher=new kn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Te._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new ye(0,0);_getBasicScopeAttributes=new ft(e=>{const n=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new ye(n,s)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Te.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/},kn=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,s])=>ht(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])}},Ke=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}stack;stoppedEarly};function St(t,e,n,s,r,i,o,a){const c=e.content.length;let l=!1,u=-1;if(o){const d=Rn(t,e,n,s,r,i);r=d.stack,s=d.linePos,n=d.isFirstLine,u=d.anchorPosition}const h=Date.now();for(;!l;){if(a!==0&&Date.now()-h>a)return new Ke(r,!0);f()}return new Ke(r,!1);function f(){const d=Nn(t,e,n,s,r,u);if(!d){i.produce(r,c),l=!0;return}const g=d.captureIndices,y=d.matchedRuleId,_=g&&g.length>0?g[0].end>s:!1;if(y===bn){const p=r.getRule(t);i.produce(r,g[0].start),r=r.withContentNameScopesList(r.nameScopesList),M(t,e,n,r,i,p.endCaptures,g),i.produce(r,g[0].end);const m=r;if(r=r.parent,u=m.getAnchorPos(),!_&&m.getEnterPos()===s){r=m,i.produce(r,c),l=!0;return}}else{const p=t.getRule(y);i.produce(r,g[0].start);const m=r,b=p.getName(e.content,g),w=r.contentNameScopesList.pushAttributed(b,t);if(r=r.push(y,s,u,g[0].end===c,null,w,w),p instanceof Ne){const k=p;M(t,e,n,r,i,k.beginCaptures,g),i.produce(r,g[0].end),u=g[0].end;const T=k.getContentName(e.content,g),E=w.pushAttributed(T,t);if(r=r.withContentNameScopesList(E),k.endHasBackReferences&&(r=r.withEndRule(k.getEndWithResolvedBackReferences(e.content,g))),!_&&m.hasSameRuleAs(r)){r=r.pop(),i.produce(r,c),l=!0;return}}else if(p instanceof ne){const k=p;M(t,e,n,r,i,k.beginCaptures,g),i.produce(r,g[0].end),u=g[0].end;const T=k.getContentName(e.content,g),E=w.pushAttributed(T,t);if(r=r.withContentNameScopesList(E),k.whileHasBackReferences&&(r=r.withEndRule(k.getWhileWithResolvedBackReferences(e.content,g))),!_&&m.hasSameRuleAs(r)){r=r.pop(),i.produce(r,c),l=!0;return}}else if(M(t,e,n,r,i,p.captures,g),i.produce(r,g[0].end),r=r.pop(),!_){r=r.safePop(),i.produce(r,c),l=!0;return}}g[0].end>s&&(s=g[0].end,n=!1)}}function Rn(t,e,n,s,r,i){let o=r.beginRuleCapturedEOL?0:-1;const a=[];for(let c=r;c;c=c.pop()){const l=c.getRule(t);l instanceof ne&&a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:l,findOptions:u}=An(c.rule,t,c.stack.endRule,n,s===o),h=l.findNextMatchSync(e,s,u);if(h){if(h.ruleId!==_t){r=c.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(i.produce(c.stack,h.captureIndices[0].start),M(t,e,n,c.stack,i,c.rule.whileCaptures,h.captureIndices),i.produce(c.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>s&&(s=h.captureIndices[0].end,n=!1))}else{r=c.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:o,isFirstLine:n}}function Nn(t,e,n,s,r,i){const o=Tn(t,e,n,s,r,i),a=t.getInjections();if(a.length===0)return o;const c=vn(a,t,e,n,s,r,i);if(!c)return o;if(!o)return c;const l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Tn(t,e,n,s,r,i){const o=r.getRule(t),{ruleScanner:a,findOptions:c}=wt(o,t,r.endRule,n,s===i),l=a.findNextMatchSync(e,s,c);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function vn(t,e,n,s,r,i,o){let a=Number.MAX_VALUE,c=null,l,u=0;const h=i.contentNameScopesList.getScopeNames();for(let f=0,d=t.length;f<d;f++){const g=t[f];if(!g.matcher(h))continue;const y=e.getRule(g.ruleId),{ruleScanner:_,findOptions:p}=wt(y,e,null,s,r===o),m=_.findNextMatchSync(n,r,p);if(!m)continue;const b=m.captureIndices[0].start;if(!(b>=a)&&(a=b,c=m.captureIndices,l=m.ruleId,u=g.priority,a===r))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function wt(t,e,n,s,r){return{ruleScanner:t.compileAG(e,n,s,r),findOptions:0}}function An(t,e,n,s,r){return{ruleScanner:t.compileWhileAG(e,n,s,r),findOptions:0}}function M(t,e,n,s,r,i,o){if(i.length===0)return;const a=e.content,c=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<c;h++){const f=i[h];if(f===null)continue;const d=o[h];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,d.start):r.produce(s,d.start),f.retokenizeCapturedWithRuleId){const y=f.getName(a,o),_=s.contentNameScopesList.pushAttributed(y,t),p=f.getContentName(a,o),m=_.pushAttributed(p,t),b=s.push(f.retokenizeCapturedWithRuleId,d.start,-1,!1,null,_,m),w=t.createOnigString(a.substring(0,d.end));St(t,w,n&&d.start===0,d.start,b,r,!1,0),mt(w);continue}const g=f.getName(a,o);if(g!==null){const _=(l.length>0?l[l.length-1].scopes:s.contentNameScopesList).pushAttributed(g,t);l.push(new In(_,d.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var In=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function En(t,e,n,s,r,i,o,a){return new xn(t,e,n,s,r,i,o,a)}function Ye(t,e,n,s,r){const i=ee(e,se),o=yt.getCompiledRuleId(n,s,r.repository);for(const a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:r,priority:a.priority})}function se(t,e){if(e.length<t.length)return!1;let n=0;return t.every(s=>{for(let r=n;r<e.length;r++)if(Ln(e[r],s))return n=r+1,!0;return!1})}function Ln(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 xn=class{constructor(t,e,n,s,r,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new Cn(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ve(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const l=ee(c,se);for(const u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[c]})}}_rootScopeName;balancedBracketSelectors;_onigLib;_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:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},e=[],n=this._rootScopeName,s=t.lookup(n);if(s){const r=s.injections;if(r)for(let o in r)Ye(e,o,r[o],this,s);const i=this._grammarRepository.injections(n);i&&i.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const c=a.injectionSelector;c&&Ye(e,c,a,this,a)}})}return e.sort((r,i)=>r.priority-i.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]=Ve(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const s=this._tokenize(t,e,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(t,e,n=0){const s=this._tokenize(t,e,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(t,e,n,s){this._rootId===-1&&(this._rootId=yt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!e||e===ve.NULL){r=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=G.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let d;f?d=j.createRootAndLookUpScopeName(f,h,this):d=j.createRoot("unknown",h),e=new ve(null,this._rootId,-1,-1,!1,null,d,d)}else r=!1,e.reset();t=t+`
3
3
  `;const i=this.createOnigString(t),o=i.content.length,a=new Gn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=St(this,i,r,0,e,a,!0,s);return mt(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ve(t,e){return t=Jt(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 j=class A{constructor(e,n,s){this.parent=e,this.scopePath=n,this.tokenAttributes=s}parent;scopePath;tokenAttributes;static fromExtension(e,n){let s=e,r=e?.scopePath??null;for(const i of n)r=_e.push(r,i.scopeNames),s=new A(s,r,i.encodedTokenAttributes);return s}static createRoot(e,n){return new A(null,new _e(null,e),n)}static createRootAndLookUpScopeName(e,n,s){const r=s.getMetadataForScope(e),i=new _e(null,e),o=s.themeProvider.themeMatch(i),a=A.mergeAttributes(n,r,o);return new A(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return A.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,s){let r=-1,i=0,o=0;return s!==null&&(r=s.fontStyle,i=s.foregroundId,o=s.backgroundId),G.set(e,n.languageId,n.tokenType,null,r,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return A._pushAttributed(this,e,n);const s=e.split(/ /g);let r=this;for(const i of s)r=A._pushAttributed(r,i,n);return r}static _pushAttributed(e,n,s){const r=s.getMetadataForScope(n),i=e.scopePath.push(n),o=s.themeProvider.themeMatch(i),a=A.mergeAttributes(e.tokenAttributes,r,o);return new A(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let s=this;for(;s&&s!==e;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?n.reverse():void 0}},ve=class x{constructor(e,n,s,r,i,o,a,c){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new x(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:x._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?j.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(){x._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,s,r,i,o,a){return new x(this,e,n,s,r,i,o,a)}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 x(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 s=j.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new x(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,j.fromExtension(s,n.contentNameScopesList))}},Pn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ee(n,se).map(s=>s.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ee(n,se).map(s=>s.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}},Gn=class{constructor(t,e,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}balancedBracketSelectors;_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 s=t?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=t?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(i)&&(s=G.set(s,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(i))}if(r&&(s=G.set(s,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),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 s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},Bn=class{constructor(t,e){this._onigLib=e,this._theme=t}_onigLib;_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,s,r){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,En(t,i,e,n,s,r,this,this._onigLib))}return this._grammars.get(t)}},On=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Bn(Z.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(Z.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,s){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(e,n,s){return this._loadGrammar(e,n,s.embeddedLanguages,s.tokenTypes,new Pn(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,s,r,i){const o=new hn(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,s,r,i)}_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 s=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(e,n=[],s=0,r=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,s,r)}_grammarForScopeName(e,n=0,s=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,n,s,r,i)}},Ae=ve.NULL;function re(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},s=typeof t=="string"?t:t.name;for(const[r,i]of Object.entries(e?.colorReplacements||{}))typeof i=="string"?n[r]=i:r===s&&Object.assign(n,i);return n}function L(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function $n(t){return Array.isArray(t)?t:[t]}async function Ct(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ce(t){return!t||["plaintext","txt","text","plain"].includes(t)}function kt(t){return t==="ansi"||ce(t)}function le(t){return t==="none"}function Rt(t){return le(t)}const Mn=/(\r?\n)/g;function ue(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(Mn);let s=0;const r=[];for(let i=0;i<n.length;i+=2){const o=e?n[i]+(n[i+1]||""):n[i];r.push([o,s]),s+=n[i].length,s+=n[i+1]?.length||0}return r}const Je={light:"#333333",dark:"#bbbbbb"},Qe={light:"#fffffe",dark:"#1e1e1e"},Xe="__shiki_resolved";function Pe(t){if(t?.[Xe])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:s}=e;if(!n||!s){const a=e.settings?e.settings.find(c=>!c.name&&!c.scope):void 0;a?.settings?.foreground&&(s=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!s&&e?.colors?.["editor.foreground"]&&(s=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),s||(s=e.type==="light"?Je.light:Je.dark),n||(n=e.type==="light"?Qe.light:Qe.dark),e.fg=s,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 r=0;const i=new Map;function o(a){if(i.has(a))return i.get(a);r+=1;const c=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${c}`]?o(a):(i.set(a,c),c)}e.settings=e.settings.map(a=>{const c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;const u={...a,settings:{...a.settings}};if(c){const h=o(a.settings.foreground);e.colorReplacements[h]=a.settings.foreground,u.settings.foreground=h}if(l){const h=o(a.settings.background);e.colorReplacements[h]=a.settings.background,u.settings.background=h}return u});for(const a of Object.keys(e.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!e.colors[a]?.startsWith("#")){const c=o(e.colors[a]);e.colorReplacements[c]=e.colors[a],e.colors[a]=c}return Object.defineProperty(e,Xe,{enumerable:!1,writable:!1,value:!0}),e}async function Nt(t){return[...new Set((await Promise.all(t.filter(e=>!kt(e)).map(async e=>await Ct(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Tt(t){return(await Promise.all(t.map(async e=>Rt(e)?null:Pe(await Ct(e))))).filter(e=>!!e)}function vt(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 S(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var jn=class extends On{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,s={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=s,this._themes.map(r=>this.loadTheme(r)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=Pe(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=Z.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=vt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(r=>r.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(r=>{this._alias[r]=t.name}),this._loadedLanguagesCache=null,e.size)for(const r of e)this._syncRegistry?._grammars?.get(r.scopeName)?.dispose(),this._resolvedGrammars.delete(r.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(r.scopeName),this._syncRegistry?._grammars?.delete(r.scopeName),this.loadLanguage(this._langMap.get(r.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const e=[...this._langGraph.entries()],n=e.filter(([s,r])=>!r);if(n.length){const s=e.filter(([r,i])=>i?(i.embeddedLanguages||i.embeddedLangs)?.some(o=>n.map(([a])=>a).includes(o)):!1).filter(r=>!n.includes(r));throw new S(`Missing languages ${n.map(([r])=>`\`${r}\``).join(", ")}, required by ${s.map(([r])=>`\`${r}\``).join(", ")}`)}for(const[s,r]of e)this._resolver.addLanguage(r);for(const[s,r]of e)this.loadLanguage(r)}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))}},Wn=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).includes(t.scopeName)||this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let s=1;s<=e.length;s++){const r=e.slice(0,s).join(".");n=[...n,...this._injections.get(r)||[]]}return n}};let $=0;function Ge(t){$+=1,t.warnings!==!1&&$>=10&&$%10===0&&console.warn(`[Shiki] ${$} 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 S("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),s=(t.themes||[]).flat(1).map(Pe),r=new jn(new Wn(t.engine,n),s,n,t.langAlias);let i;function o(m){return vt(m,t.langAlias)}function a(m){_();const b=r.getGrammar(typeof m=="string"?m:m.name);if(!b)throw new S(`Language \`${m}\` not found, you may need to load it first`);return b}function c(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();const b=r.getTheme(m);if(!b)throw new S(`Theme \`${m}\` not found, you may need to load it first`);return b}function l(m){_();const b=c(m);return i!==m&&(r.setTheme(b),i=m),{theme:b,colorMap:r.getColorMap()}}function u(){return _(),r.getLoadedThemes()}function h(){return _(),r.getLoadedLanguages()}function f(...m){_(),r.loadLanguages(m.flat(1))}async function d(...m){return f(await Nt(m))}function g(...m){_();for(const b of m.flat(1))r.loadTheme(b)}async function y(...m){return _(),g(await Tt(m))}function _(){if(e)throw new S("Shiki instance has been disposed")}function p(){e||(e=!0,r.dispose(),$-=1)}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:d,loadLanguageSync:f,loadTheme:y,loadThemeSync:g,dispose:p,[Symbol.dispose]:p}}const Br=Ge;async function At(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,s]=await Promise.all([Tt(t.themes||[]),Nt(t.langs||[]),t.engine]);return Ge({...t,themes:e,langs:n,engine:s})}const Or=At,It=new WeakMap;function he(t,e){It.set(t,e)}function q(t){return It.get(t)}var fe=class Et{_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 Et(Object.fromEntries($n(n).map(s=>[s,Ae])),e)}constructor(...e){if(e.length===2){const[n,s]=e;this.lang=s,this._stacks=n}else{const[n,s,r]=e;this.lang=s,this._stacks={[r]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Dn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Dn(t){const e=[],n=new Set;function s(r){if(n.has(r))return;n.add(r);const i=r?.nameScopesList?.scopeName;i&&e.push(i),r.parent&&s(r.parent)}return s(t),e}function Fn(t,e){if(!(t instanceof fe))throw new S("Invalid grammar state");return t.getInternalStack(e)}const qn=/,/,Hn=/ /;function Lt(t,e,n={}){const{theme:s=t.getLoadedThemes()[0]}=n;if(ce(t.resolveLangAlias(n.lang||"text"))||le(s))return ue(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:r,colorMap:i}=t.setTheme(s),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(r.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${r.name}"`)}return zn(e,o,r,i,n)}function xt(...t){if(t.length===2)return q(t[1]);const[e,n,s={}]=t,{lang:r="text",theme:i=e.getLoadedThemes()[0]}=s;if(ce(r)||le(i))throw new S("Plain language does not have grammar state");if(r==="ansi")throw new S("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(i),c=e.getLanguage(r);return new fe(Be(n,c,o,a,s).stateStack,c.name,o.name)}function zn(t,e,n,s,r){const i=Be(t,e,n,s,r),o=new fe(i.stateStack,e.name,n.name);return he(i.tokens,o),i.tokens}function Be(t,e,n,s,r){const i=re(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=r,l=ue(t);let u=r.grammarState?Fn(r.grammarState,n.name)??Ae:r.grammarContextCode!=null?Be(r.grammarContextCode,e,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ae,h=[];const f=[];for(let d=0,g=l.length;d<g;d++){const[y,_]=l[d];if(y===""){h=[],f.push([]);continue}if(o>0&&y.length>=o){h=[],f.push([{content:y,offset:_,color:"",fontStyle:0}]);continue}let p,m,b;c&&c!=="tokenType"&&(p=e.tokenizeLine(y,u,a),m=p.tokens,b=0);const w=e.tokenizeLine2(y,u,a),k=w.tokens.length/2;for(let T=0;T<k;T++){const E=w.tokens[2*T],de=T+1<k?w.tokens[2*T+2]:y.length;if(E===de)continue;const ge=w.tokens[2*T+1],qt=L(s[G.getForeground(ge)],i),Ht=G.getFontStyle(ge),K={content:y.substring(E,de),offset:_+E,color:qt,fontStyle:Ht};if(c==="tokenType")K.type=G.getTokenType(ge);else if(c){const Me=[];if(c!=="scopeName")for(const I of n.settings){let B;switch(typeof I.scope){case"string":B=I.scope.split(qn).map(me=>me.trim());break;case"object":B=I.scope;break;default:continue}Me.push({settings:I,selectors:B.map(me=>me.split(Hn))})}K.explanation=[];let je=0;for(;E+je<de;){const I=m[b],B=y.substring(I.startIndex,I.endIndex);je+=B.length,K.explanation.push({content:B,scopes:c==="scopeName"?Un(I.scopes):Kn(Me,I.scopes)}),b+=1}}h.push(K)}f.push(h),h=[],u=w.ruleStack}return{tokens:f,stateStack:u}}function Un(t){return t.map(e=>({scopeName:e}))}function Kn(t,e){const n=[];for(let s=0,r=e.length;s<r;s++){const i=e[s];n[s]={scopeName:i,themeMatches:Vn(t,i,e.slice(0,s))}}return n}function Ze(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Yn(t,e,n){if(!Ze(t.at(-1),e))return!1;let s=t.length-2,r=n.length-1;for(;s>=0&&r>=0;)Ze(t[s],n[r])&&(s-=1),r-=1;return s===-1}function Vn(t,e,n){const s=[];for(const{selectors:r,settings:i}of t)for(const o of r)if(Yn(o,e,n)){s.push(i);break}return s}function Oe(t,e,n,s=Lt){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=r.map(l=>{const u=s(t,e,{...n,theme:l.theme});return{tokens:u,state:q(u),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),o=Jn(...i.map(l=>l.tokens)),a=o[0].map((l,u)=>l.map((h,f)=>{const d={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=h.explanation),o.forEach((g,y)=>{const{content:_,explanation:p,offset:m,...b}=g[u][f];d.variants[r[y].color]=b}),d})),c=i[0].state?new fe(Object.fromEntries(i.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;return c&&he(a,c),a}function Jn(...t){const e=t.map(()=>[]),n=t.length;for(let s=0;s<t[0].length;s++){const r=t.map(c=>c[s]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));const o=r.map(()=>0),a=r.map(c=>c[0]);for(;a.every(c=>c);){const c=Math.min(...a.map(l=>l.content.length));for(let l=0;l<n;l++){const u=a[l];u.content.length===c?(i[l].push(u),o[l]+=1,a[l]=r[l][o[l]]):(i[l].push({...u,content:u.content.slice(0,c)}),a[l]={...u,content:u.content.slice(c),offset:u.offset+c})}}}return e}const Qn=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Xn=/["&'<>`]/g,Zn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,es=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ts=/[|\\{}()[\]^$+*?.]/g,et=new WeakMap;function ns(t,e){if(t=t.replace(e.subset?ss(e.subset):Xn,s),e.subset||e.escapeOnly)return t;return t.replace(Zn,n).replace(es,s);function n(r,i,o){return e.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function s(r,i,o){return e.format(r.charCodeAt(0),o.charCodeAt(i+1),e)}}function ss(t){let e=et.get(t);return e||(e=rs(t),et.set(t,e)),e}function rs(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(ts,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const is=/[\dA-Fa-f]/;function os(t,e,n){const s="&#x"+t.toString(16).toUpperCase();return n&&e&&!is.test(String.fromCharCode(e))?s:s+";"}const as=/\d/;function cs(t,e,n){const s="&#"+String(t);return n&&e&&!as.test(String.fromCharCode(e))?s:s+";"}const ls=["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"],be={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:"€"},us=["cent","copy","divide","gt","lt","not","para","times"],Pt={}.hasOwnProperty,Ie={};let V;for(V in be)Pt.call(be,V)&&(Ie[be[V]]=V);const hs=/[^\dA-Za-z]/;function fs(t,e,n,s){const r=String.fromCharCode(t);if(Pt.call(Ie,r)){const i=Ie[r],o="&"+i;return n&&ls.includes(i)&&!us.includes(i)&&(!s||e&&e!==61&&hs.test(String.fromCharCode(e)))?o:o+";"}return""}function ds(t,e,n){let s=os(t,e,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=fs(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const i=cs(t,e,n.omitOptionalSemicolons);i.length<s.length&&(s=i)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function O(t,e){return ns(t,Object.assign({format:ds},e))}const gs=/^>|^->|<!--|-->|--!>|<!-$/g,ms=[">"],ps=["<",">"];function _s(t,e,n,s){return s.settings.bogusComments?"<?"+O(t.value,Object.assign({},s.settings.characterReferences,{subset:ms}))+">":"<!--"+t.value.replace(gs,r)+"-->";function r(i){return O(i,Object.assign({},s.settings.characterReferences,{subset:ps}))}}function ys(t,e,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}const C=Bt(1),Gt=Bt(-1),bs=[];function Bt(t){return e;function e(n,s,r){const i=n?n.children:bs;let o=(s||0)+t,a=i[o];if(!r)for(;a&&Le(a);)o+=t,a=i[o];return a}}const Ss={}.hasOwnProperty;function Ot(t){return e;function e(n,s,r){return Ss.call(t,n.tagName)&&t[n.tagName](n,s,r)}}const $e=Ot({body:Cs,caption:Se,colgroup:Se,dd:Ts,dt:Ns,head:Se,html:ws,li:Rs,optgroup:vs,option:As,p:ks,rp:tt,rt:tt,tbody:Es,td:nt,tfoot:Ls,th:nt,thead:Is,tr:xs});function Se(t,e,n){const s=C(n,e,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&Le(s.value.charAt(0)))}function ws(t,e,n){const s=C(n,e);return!s||s.type!=="comment"}function Cs(t,e,n){const s=C(n,e);return!s||s.type!=="comment"}function ks(t,e,n){const s=C(n,e);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.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 Rs(t,e,n){const s=C(n,e);return!s||s.type==="element"&&s.tagName==="li"}function Ns(t,e,n){const s=C(n,e);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function Ts(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function tt(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function vs(t,e,n){const s=C(n,e);return!s||s.type==="element"&&s.tagName==="optgroup"}function As(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function Is(t,e,n){const s=C(n,e);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function Es(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function Ls(t,e,n){return!C(n,e)}function xs(t,e,n){const s=C(n,e);return!s||s.type==="element"&&s.tagName==="tr"}function nt(t,e,n){const s=C(n,e);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const Ps=Ot({body:Os,colgroup:$s,head:Bs,html:Gs,tbody:Ms});function Gs(t){const e=C(t,-1);return!e||e.type!=="comment"}function Bs(t){const e=new Set;for(const s of t.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(e.has(s.tagName))return!1;e.add(s.tagName)}const n=t.children[0];return!n||n.type==="element"}function Os(t){const e=C(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Le(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function $s(t,e,n){const s=Gt(n,e),r=C(t,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&$e(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function Ms(t,e,n){const s=Gt(n,e),r=C(t,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&$e(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const J={name:[[`
4
4
  \f\r &/=>`.split(""),`
@@ -46,8 +46,8 @@
46
46
  @keyframes boot-slide{0%{transform:translateX(-100%)}100%{transform:translateX(360%)}}
47
47
  @media (prefers-reduced-motion: reduce){#boot-splash .track span{animation:none;width:100%;opacity:.5}}
48
48
  </style>
49
- <script type="module" crossorigin src="./app-MhfBFsp-.js"></script>
50
- <link rel="stylesheet" crossorigin href="./style-CIJVQKkj.css">
49
+ <script type="module" crossorigin src="./app-B-Jx5dnh.js"></script>
50
+ <link rel="stylesheet" crossorigin href="./style-WzxwEPaE.css">
51
51
  </head>
52
52
  <body>
53
53
  <!-- 启动清单由宿主以外链 /boot.js 注入(window.__DSC_BOOT__);本地 dev 时 fetch /api/boot 兜底。 -->