diffhub 0.1.2 → 0.1.3
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.
- package/.next/standalone/apps/web/.next/BUILD_ID +1 -1
- package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
- package/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
- package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +11 -11
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/api/comments/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/comments/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/diff/route.js +3 -2
- package/.next/standalone/apps/web/.next/server/app/api/diff/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/discard/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/discard/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/file/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/file/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/files/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/open/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/open/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/index.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +6 -6
- package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/page/react-loadable-manifest.json +1 -2
- package/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/[externals]_shiki_wasm_0~fgmgp._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__01.zj5h._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0tbrp5x._.js +13 -0
- package/.next/standalone/apps/web/.next/server/chunks/_0r24f4c._.js +69 -0
- package/.next/standalone/apps/web/.next/server/chunks/node_modules_@pierre_theme_dist_pierre-dark_mjs_0ojo3_n._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/node_modules_@pierre_theme_dist_pierre-light_mjs_0pw9wwg._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/0fuv_@swc_helpers_cjs__interop_require_default_cjs_0ghzfn9._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0bit3~x._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{_0qo42r0._.js → _0m1v4-9._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_0oc3qg_._.js +3 -3
- package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
- package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
- package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/apps/web/.next/static/chunks/01f1ms~jsc5vh.js +138 -0
- package/.next/standalone/apps/web/.next/static/chunks/0c7yx0ttmhb4s.js +63 -0
- package/.next/standalone/apps/web/.next/static/chunks/0ogqv_xj2r0c6.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/0qp8t.3t~v6um.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/130i667qy-j80.css +3 -0
- package/.next/standalone/apps/web/.next/static/chunks/15uwrard~z-l5.js +16 -0
- package/.next/standalone/apps/web/package.json +1 -1
- package/bin/diffhub.mjs +25 -1
- package/package.json +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0gf_xk6._.js +0 -13
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0t.tl18._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0jit913._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0v19a7g._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_0f40lcw._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/node_modules_0v8w2j~._.js +0 -70
- package/.next/standalone/apps/web/.next/static/chunks/00zp83w4g1v1r.js +0 -16
- package/.next/standalone/apps/web/.next/static/chunks/042ip11u2i2z6.js +0 -138
- package/.next/standalone/apps/web/.next/static/chunks/07ndp5x2cvqo..css +0 -3
- package/.next/standalone/apps/web/.next/static/chunks/085s9eg867ha-.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0_vmme_k_ff_u.js +0 -67
- package/.next/standalone/apps/web/.next/static/chunks/0ap~_hc7r17_6.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0nt5-rwas5thn.js +0 -67
- package/.next/standalone/apps/web/.next/static/chunks/0p~3-4_.v0cft.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0wx-2dr44ql-g.js +0 -1
- /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → C1Ggd_ITpnb7yBHrIOODV}/_buildManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → C1Ggd_ITpnb7yBHrIOODV}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → C1Ggd_ITpnb7yBHrIOODV}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94197,(e,t,n)=>{var r={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,a=l(e),o=a[0],s=a[1],u=new i((o+s)*3/4-s),c=0,h=s>0?o-4:o;for(n=0;n<h;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(function(e,t,r){for(var i,a=[],o=t;o<r;o+=3)i=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(n[i>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===i?a.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&a.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),a.join("")};for(var n=[],r=[],i="u">typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o<s;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r[45]=62,r[95]=63},72:function(e,t,n){"use strict";var r=n(675),i=n(783),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e){var r=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);var a=0|p(r,i),l=o(a),u=l.write(r,i);return u!==a&&(l=l.slice(0,u)),l}if(ArrayBuffer.isView(e))return h(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(I(e,SharedArrayBuffer)||e&&I(e.buffer,SharedArrayBuffer)))return function(e,t,n){var r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),s.prototype),r}(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var c=e.valueOf&&e.valueOf();if(null!=c&&c!==e)return s.from(c,t,n);var f=function(e){if(s.isBuffer(e)){var t=0|d(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(f)return f;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|d(e))}function h(e){for(var t=e.length<0?0:0|d(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return(u(e),e<=0)?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)};function d(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||I(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return _(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return E(e).length;default:if(i)return r?-1:_(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,n){var i,a,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=N[e[a]];return i}(this,t,n);case"utf8":case"utf-8":return b(this,t,n);case"ascii":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}(this,t,n);case"base64":return i=this,a=t,o=n,0===a&&o===i.length?r.fromByteArray(i):r.fromByteArray(i.slice(a,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}(this,t,n);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){var a;if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>0x7fffffff?n=0x7fffffff:n<-0x80000000&&(n=-0x80000000),(a=n*=1)!=a&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length)if(i)return -1;else n=e.length-1;else if(n<0)if(!i)return -1;else n=0;if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,n);else return Uint8Array.prototype.lastIndexOf.call(e,t,n);return y(e,[t],n,r,i)}throw TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else -1!==c&&(a-=a-c),c=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var h=!0,d=0;d<l;d++)if(u(e,a+d)!==u(t,d)){h=!1;break}if(h)return a}return -1}s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(I(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),I(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;var n,r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(I(a,Uint8Array)&&(a=s.from(a)),!s.isBuffer(a))throw TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):f.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(I(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,l=Math.min(a,o),u=this.slice(r,i),c=e.slice(t,n),h=0;h<l;++h)if(u[h]!==c[h]){a=u[h],o=c[h];break}return a<o?-1:+(o<a)},s.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)};function b(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:(192&(a=e[i+1]))==128&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[i+1],o=e[i+2],(192&a)==128&&(192&o)==128&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}var d=r,p=d.length;if(p<=4096)return String.fromCharCode.apply(String,d);for(var f="",g=0;g<p;)f+=String.fromCharCode.apply(String,d.slice(g,g+=4096));return f}function k(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function v(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function w(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function A(e,t,n,r,a){return t*=1,n>>>=0,a||w(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,a){return t*=1,n>>>=0,a||w(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,a,o,s,l,u,c,h,d=this.length-t;if((void 0===n||n>d)&&(n=d),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var p=!1;;)switch(r){case"hex":return function(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s,l=parseInt(t.substr(2*o,2),16);if((s=l)!=s)break;e[n+o]=l}return o}(this,e,t,n);case"utf8":case"utf-8":return i=t,a=n,L(_(e,this.length-i),this,i,a);case"ascii":return o=t,s=n,L(x(e),this,o,s);case"latin1":case"binary":return function(e,t,n,r){return L(x(t),e,n,r)}(this,e,t,n);case"base64":return l=t,u=n,L(E(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,h=n,L(function(e,t){for(var n,r,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i.push(n%256),i.push(r);return i}(e,this.length-c),this,c,h);default:if(p)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return(e>>>=0,t||k(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?0xffff0000|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?0xffff0000|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){if(e*=1,t>>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;v(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=255&e;++o<n&&(a*=256);)this[t+o]=e/a&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){if(e*=1,t>>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;v(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e*=1,t>>>=0,!r){var i=Math.pow(2,8*n-1);v(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e*=1,t>>>=0,!r){var i=Math.pow(2,8*n-1);v(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e*=1,t>>>=0,n||v(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return A(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return A(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var a=i-1;a>=0;--a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var i,a=e.charCodeAt(0);("utf8"===r&&a<128||"latin1"===r)&&(e=a)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var o=s.isBuffer(e)?e:s.from(e,r),l=o.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%l]}return this};var S=/[^+/0-9A-Za-z-_]/g;function _(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return a}function x(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function E(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(S,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function I(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var N=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},783:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+e[t+h],h+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=u}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,h=c>>1,d=5960464477539062e-23*(23===i),p=r?0:a-1,f=r?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&s,p+=f,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+p]=255&o,p+=f,o/=256,u-=8);e[n+p-f]|=128*g}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}},o=!0;try{r[e](n,n.exports,a),o=!1}finally{o&&delete i[e]}return n.exports}a.ab="/ROOT/apps/web/node_modules/next/dist/compiled/buffer/",t.exports=a(72)},35356,(e,t,n)=>{e.e,function(e){let t=Symbol("newer"),n=Symbol("older");class r{constructor(e,t){"number"!=typeof e&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,0==a--)throw Error("overflow")}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a)):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift()),this}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){"object"!=typeof n&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e="",n=this.oldest;n;)e+=String(n.key)+":"+n.value,(n=n[t])&&(e+=" < ");return e}}function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}function o(e){this.entry=e}function s(e){this.entry=e}e.LRUMap=r,a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}},o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}},s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}}(n)},2540,27101,86309,22256,27118,30891,51045,16049,8456,35864,82189,6609,17443,6104,59390,16876,60166,19013,84036,89107,24315,10906,e=>{"use strict";let t,n,r,i,a,o,s,l=/(?<=\n)/,u={dark:"pierre-dark",light:"pierre-light"},c=Object.freeze({fromStart:0,fromEnd:0});e.s(["ALTERNATE_FILE_NAMES_GIT",0,/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,"COMMIT_METADATA_SPLIT",0,/(?=^From [a-f0-9]+ .+$)/m,"CUSTOM_HEADER_SLOT_ID",0,"header-custom","DEFAULT_COLLAPSED_CONTEXT_THRESHOLD",0,1,"DEFAULT_EXPANDED_REGION",0,c,"DEFAULT_RENDER_RANGE",0,{startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},"DEFAULT_THEMES",0,u,"DEFAULT_VIRTUAL_FILE_METRICS",0,{hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},"DIFFS_TAG_NAME",0,"diffs-container","EMPTY_RENDER_RANGE",0,{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},"FILENAME_HEADER_REGEX",0,/^(---|\+\+\+)\s+([^\t\r\n]+)/,"FILENAME_HEADER_REGEX_GIT",0,/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,"FILE_CONTEXT_BLOB",0,/(?=^@@ )/gm,"GIT_DIFF_FILE_BREAK_REGEX",0,/(?=^diff --git)/gm,"HEADER_METADATA_SLOT_ID",0,"header-metadata","HEADER_PREFIX_SLOT_ID",0,"header-prefix","HUNK_HEADER",0,/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,"INDEX_LINE_METADATA",0,/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,"SPLIT_WITH_NEWLINES",0,l,"THEME_CSS_ATTRIBUTE",0,"data-theme-css","UNIFIED_DIFF_FILE_BREAK_REGEX",0,/(?=^---\s+\S)/gm,"UNSAFE_CSS_ATTRIBUTE",0,"data-unsafe-css"],27101);let h=new Map,d=new Map,p=new Map,f=new Set;function g(e,t){for(let n of e=Array.isArray(e)?e:[e]){let e;if("string"==typeof n){if(null==(e=h.get(n)))throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,h.has(n)||h.set(n,e);f.has(n)||(f.add(n),t.loadThemeSync(e))}}e.s(["AttachedThemes",0,f,"RegisteredCustomThemes",0,p,"ResolvedThemes",0,h,"ResolvingThemes",0,d],86309);let m=new Map,y=new Map,b=new Map,k=new Set;function v(e,t){for(let n of e=Array.isArray(e)?e:[e]){if(k.has(n.name))continue;let e=m.get(n.name);null==e&&(e=n,m.set(n.name,e)),k.add(e.name),t.loadLanguageSync(e.data)}}function w(){return"u">typeof WorkerGlobalScope&&"u">typeof self&&self instanceof WorkerGlobalScope}e.s(["AttachedLanguages",0,k,"RegisteredCustomLanguages",0,b,"ResolvedLanguages",0,m,"ResolvingLanguages",0,y],22256);let A=[{id:"abap",name:"ABAP",import:()=>e.A(16690)},{id:"actionscript-3",name:"ActionScript",import:()=>e.A(74435)},{id:"ada",name:"Ada",import:()=>e.A(96339)},{id:"angular-html",name:"Angular HTML",import:()=>e.A(96546)},{id:"angular-ts",name:"Angular TypeScript",import:()=>e.A(60308)},{id:"apache",name:"Apache Conf",import:()=>e.A(8734)},{id:"apex",name:"Apex",import:()=>e.A(2952)},{id:"apl",name:"APL",import:()=>e.A(14026)},{id:"applescript",name:"AppleScript",import:()=>e.A(10042)},{id:"ara",name:"Ara",import:()=>e.A(27701)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>e.A(64940)},{id:"asm",name:"Assembly",import:()=>e.A(81996)},{id:"astro",name:"Astro",import:()=>e.A(85223)},{id:"awk",name:"AWK",import:()=>e.A(77689)},{id:"ballerina",name:"Ballerina",import:()=>e.A(87861)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>e.A(69047)},{id:"beancount",name:"Beancount",import:()=>e.A(66005)},{id:"berry",name:"Berry",aliases:["be"],import:()=>e.A(64129)},{id:"bibtex",name:"BibTeX",import:()=>e.A(86785)},{id:"bicep",name:"Bicep",import:()=>e.A(34475)},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>e.A(73197)},{id:"blade",name:"Blade",import:()=>e.A(84291)},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>e.A(54810)},{id:"c",name:"C",import:()=>e.A(15630)},{id:"c3",name:"C3",import:()=>e.A(21406)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>e.A(28418)},{id:"cairo",name:"Cairo",import:()=>e.A(96018)},{id:"clarity",name:"Clarity",import:()=>e.A(68805)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>e.A(85670)},{id:"cmake",name:"CMake",import:()=>e.A(50277)},{id:"cobol",name:"COBOL",import:()=>e.A(8435)},{id:"codeowners",name:"CODEOWNERS",import:()=>e.A(77655)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>e.A(93919)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>e.A(99510)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>e.A(14583)},{id:"coq",name:"Coq",import:()=>e.A(38305)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>e.A(62895)},{id:"crystal",name:"Crystal",import:()=>e.A(15822)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>e.A(56548)},{id:"css",name:"CSS",import:()=>e.A(68853)},{id:"csv",name:"CSV",import:()=>e.A(8072)},{id:"cue",name:"CUE",import:()=>e.A(79420)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>e.A(1081)},{id:"d",name:"D",import:()=>e.A(32086)},{id:"dart",name:"Dart",import:()=>e.A(8814)},{id:"dax",name:"DAX",import:()=>e.A(6010)},{id:"desktop",name:"Desktop",import:()=>e.A(11671)},{id:"diff",name:"Diff",import:()=>e.A(99264)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>e.A(64927)},{id:"dotenv",name:"dotEnv",import:()=>e.A(86855)},{id:"dream-maker",name:"Dream Maker",import:()=>e.A(55357)},{id:"edge",name:"Edge",import:()=>e.A(40814)},{id:"elixir",name:"Elixir",import:()=>e.A(34593)},{id:"elm",name:"Elm",import:()=>e.A(80402)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>e.A(59962)},{id:"erb",name:"ERB",import:()=>e.A(55306)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>e.A(79291)},{id:"fennel",name:"Fennel",import:()=>e.A(56334)},{id:"fish",name:"Fish",import:()=>e.A(55953)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>e.A(72286)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>e.A(9599)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>e.A(17187)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>e.A(6583)},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>e.A(350)},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>e.A(18592)},{id:"gdshader",name:"GDShader",import:()=>e.A(64292)},{id:"genie",name:"Genie",import:()=>e.A(51227)},{id:"gherkin",name:"Gherkin",import:()=>e.A(81674)},{id:"git-commit",name:"Git Commit Message",import:()=>e.A(65886)},{id:"git-rebase",name:"Git Rebase Message",import:()=>e.A(43635)},{id:"gleam",name:"Gleam",import:()=>e.A(69752)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>e.A(20210)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>e.A(52204)},{id:"glsl",name:"GLSL",import:()=>e.A(15932)},{id:"gn",name:"GN",import:()=>e.A(46517)},{id:"gnuplot",name:"Gnuplot",import:()=>e.A(34810)},{id:"go",name:"Go",import:()=>e.A(18233)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>e.A(27502)},{id:"groovy",name:"Groovy",import:()=>e.A(83131)},{id:"hack",name:"Hack",import:()=>e.A(66363)},{id:"haml",name:"Ruby Haml",import:()=>e.A(36482)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>e.A(19104)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>e.A(82274)},{id:"haxe",name:"Haxe",import:()=>e.A(43593)},{id:"hcl",name:"HashiCorp HCL",import:()=>e.A(92582)},{id:"hjson",name:"Hjson",import:()=>e.A(32395)},{id:"hlsl",name:"HLSL",import:()=>e.A(36975)},{id:"html",name:"HTML",import:()=>e.A(15475)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>e.A(36812)},{id:"http",name:"HTTP",import:()=>e.A(22332)},{id:"hurl",name:"Hurl",import:()=>e.A(77996)},{id:"hxml",name:"HXML",import:()=>e.A(12671)},{id:"hy",name:"Hy",import:()=>e.A(98975)},{id:"imba",name:"Imba",import:()=>e.A(21794)},{id:"ini",name:"INI",aliases:["properties"],import:()=>e.A(12237)},{id:"java",name:"Java",import:()=>e.A(28056)},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>e.A(92799)},{id:"jinja",name:"Jinja",import:()=>e.A(535)},{id:"jison",name:"Jison",import:()=>e.A(99868)},{id:"json",name:"JSON",import:()=>e.A(92658)},{id:"json5",name:"JSON5",import:()=>e.A(45390)},{id:"jsonc",name:"JSON with Comments",import:()=>e.A(59901)},{id:"jsonl",name:"JSON Lines",import:()=>e.A(44018)},{id:"jsonnet",name:"Jsonnet",import:()=>e.A(32597)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>e.A(86493)},{id:"jsx",name:"JSX",import:()=>e.A(87672)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>e.A(48045)},{id:"just",name:"Just",import:()=>e.A(4538)},{id:"kdl",name:"KDL",import:()=>e.A(22051)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>e.A(78014)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>e.A(11938)},{id:"latex",name:"LaTeX",import:()=>e.A(82697)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>e.A(6774)},{id:"less",name:"Less",import:()=>e.A(57069)},{id:"liquid",name:"Liquid",import:()=>e.A(33954)},{id:"llvm",name:"LLVM IR",import:()=>e.A(69445)},{id:"log",name:"Log file",import:()=>e.A(32210)},{id:"logo",name:"Logo",import:()=>e.A(17136)},{id:"lua",name:"Lua",import:()=>e.A(47287)},{id:"luau",name:"Luau",import:()=>e.A(98173)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>e.A(18877)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>e.A(59142)},{id:"marko",name:"Marko",import:()=>e.A(44609)},{id:"matlab",name:"MATLAB",import:()=>e.A(23845)},{id:"mdc",name:"MDC",import:()=>e.A(67535)},{id:"mdx",name:"MDX",import:()=>e.A(59189)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>e.A(57619)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>e.A(1626)},{id:"mojo",name:"Mojo",import:()=>e.A(24176)},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>e.A(5353)},{id:"move",name:"Move",import:()=>e.A(47969)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>e.A(55902)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>e.A(57638)},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>e.A(72194)},{id:"nginx",name:"Nginx",import:()=>e.A(47723)},{id:"nim",name:"Nim",import:()=>e.A(46820)},{id:"nix",name:"Nix",import:()=>e.A(65220)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>e.A(21908)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>e.A(98543)},{id:"objective-cpp",name:"Objective-C++",import:()=>e.A(53213)},{id:"ocaml",name:"OCaml",import:()=>e.A(57016)},{id:"odin",name:"Odin",import:()=>e.A(144)},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>e.A(89188)},{id:"pascal",name:"Pascal",import:()=>e.A(94584)},{id:"perl",name:"Perl",import:()=>e.A(90087)},{id:"php",name:"PHP",import:()=>e.A(53525)},{id:"pkl",name:"Pkl",import:()=>e.A(6695)},{id:"plsql",name:"PL/SQL",import:()=>e.A(85641)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>e.A(15520)},{id:"polar",name:"Polar",import:()=>e.A(79736)},{id:"postcss",name:"PostCSS",import:()=>e.A(44743)},{id:"powerquery",name:"PowerQuery",import:()=>e.A(69901)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>e.A(49765)},{id:"prisma",name:"Prisma",import:()=>e.A(25840)},{id:"prolog",name:"Prolog",import:()=>e.A(78110)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>e.A(10002)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>e.A(53456)},{id:"puppet",name:"Puppet",import:()=>e.A(28116)},{id:"purescript",name:"PureScript",import:()=>e.A(62792)},{id:"python",name:"Python",aliases:["py"],import:()=>e.A(48436)},{id:"qml",name:"QML",import:()=>e.A(85774)},{id:"qmldir",name:"QML Directory",import:()=>e.A(22682)},{id:"qss",name:"Qt Style Sheets",import:()=>e.A(29273)},{id:"r",name:"R",import:()=>e.A(17431)},{id:"racket",name:"Racket",import:()=>e.A(27184)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>e.A(2999)},{id:"razor",name:"ASP.NET Razor",import:()=>e.A(22510)},{id:"reg",name:"Windows Registry Script",import:()=>e.A(92914)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>e.A(64980)},{id:"rel",name:"Rel",import:()=>e.A(62249)},{id:"riscv",name:"RISC-V",import:()=>e.A(19686)},{id:"ron",name:"RON",import:()=>e.A(23169)},{id:"rosmsg",name:"ROS Interface",import:()=>e.A(66973)},{id:"rst",name:"reStructuredText",import:()=>e.A(80357)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>e.A(60137)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>e.A(25837)},{id:"sas",name:"SAS",import:()=>e.A(59154)},{id:"sass",name:"Sass",import:()=>e.A(28160)},{id:"scala",name:"Scala",import:()=>e.A(79226)},{id:"scheme",name:"Scheme",import:()=>e.A(95554)},{id:"scss",name:"SCSS",import:()=>e.A(56229)},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>e.A(57294)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>e.A(87646)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>e.A(77876)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>e.A(2789)},{id:"smalltalk",name:"Smalltalk",import:()=>e.A(5404)},{id:"solidity",name:"Solidity",import:()=>e.A(64050)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>e.A(23766)},{id:"sparql",name:"SPARQL",import:()=>e.A(71095)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>e.A(13125)},{id:"sql",name:"SQL",import:()=>e.A(47760)},{id:"ssh-config",name:"SSH Config",import:()=>e.A(25380)},{id:"stata",name:"Stata",import:()=>e.A(27772)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>e.A(31592)},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>e.A(42509)},{id:"svelte",name:"Svelte",import:()=>e.A(9551)},{id:"swift",name:"Swift",import:()=>e.A(74099)},{id:"system-verilog",name:"SystemVerilog",import:()=>e.A(1250)},{id:"systemd",name:"Systemd Units",import:()=>e.A(44475)},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>e.A(538)},{id:"tasl",name:"Tasl",import:()=>e.A(36651)},{id:"tcl",name:"Tcl",import:()=>e.A(9948)},{id:"templ",name:"Templ",import:()=>e.A(40336)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>e.A(8436)},{id:"tex",name:"TeX",import:()=>e.A(55636)},{id:"toml",name:"TOML",import:()=>e.A(51979)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>e.A(65678)},{id:"tsv",name:"TSV",import:()=>e.A(41727)},{id:"tsx",name:"TSX",import:()=>e.A(57754)},{id:"turtle",name:"Turtle",import:()=>e.A(70454)},{id:"twig",name:"Twig",import:()=>e.A(24586)},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>e.A(48460)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>e.A(44538)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>e.A(63321)},{id:"v",name:"V",import:()=>e.A(43837)},{id:"vala",name:"Vala",import:()=>e.A(30536)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>e.A(85051)},{id:"verilog",name:"Verilog",import:()=>e.A(86017)},{id:"vhdl",name:"VHDL",import:()=>e.A(95694)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>e.A(4547)},{id:"vue",name:"Vue",import:()=>e.A(34329)},{id:"vue-html",name:"Vue HTML",import:()=>e.A(60550)},{id:"vue-vine",name:"Vue Vine",import:()=>e.A(109)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>e.A(34235)},{id:"wasm",name:"WebAssembly",import:()=>e.A(79931)},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>e.A(38463)},{id:"wgsl",name:"WGSL",import:()=>e.A(64547)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>e.A(74196)},{id:"wit",name:"WebAssembly Interface Types",import:()=>e.A(26245)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>e.A(98654)},{id:"xml",name:"XML",import:()=>e.A(60115)},{id:"xsl",name:"XSL",import:()=>e.A(56841)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>e.A(91412)},{id:"zenscript",name:"ZenScript",import:()=>e.A(41270)},{id:"zig",name:"Zig",import:()=>e.A(32344)}],C=Object.fromEntries(A.map(e=>[e.id,e.import])),S=Object.fromEntries(A.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),_={...C,...S};async function x(e){if(w())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=y.get(e);if(null!=t)return t;try{let t=b.get(e);if(null==t&&Object.prototype.hasOwnProperty.call(_,e)&&(t=_[e]),null==t)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return m.has(e)||m.set(e,n),n});return y.set(e,n),await n}finally{y.delete(e)}}function E(e){return m.get(e)??x(e)}let L=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>e.A(52913)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>e.A(95208)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>e.A(52844)},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>e.A(76488)},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>e.A(36002)},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>e.A(72934)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>e.A(31036)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>e.A(23803)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>e.A(86330)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>e.A(81001)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>e.A(95735)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>e.A(2100)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>e.A(58172)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>e.A(75274)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>e.A(57811)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>e.A(14214)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>e.A(48353)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>e.A(40920)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>e.A(79755)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>e.A(5550)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>e.A(60233)},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>e.A(80721)},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>e.A(27266)},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>e.A(31214)},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>e.A(81110)},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>e.A(37683)},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>e.A(28130)},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>e.A(70579)},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>e.A(87165)},{id:"houston",displayName:"Houston",type:"dark",import:()=>e.A(77856)},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>e.A(94363)},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>e.A(48953)},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>e.A(11812)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>e.A(9732)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>e.A(43993)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>e.A(11374)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>e.A(69460)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>e.A(74478)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>e.A(49008)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>e.A(77952)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>e.A(20463)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>e.A(30169)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>e.A(77035)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>e.A(61439)},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>e.A(28589)},{id:"nord",displayName:"Nord",type:"dark",import:()=>e.A(67304)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>e.A(94497)},{id:"one-light",displayName:"One Light",type:"light",import:()=>e.A(53619)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>e.A(41717)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>e.A(3232)},{id:"red",displayName:"Red",type:"dark",import:()=>e.A(69411)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>e.A(53065)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>e.A(81356)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>e.A(91336)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>e.A(58732)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>e.A(5358)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>e.A(53493)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>e.A(67374)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>e.A(61630)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>e.A(35353)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>e.A(29817)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>e.A(66144)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>e.A(96740)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>e.A(96290)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>e.A(61379)}].map(e=>[e.id,e.import]));class I extends Error{constructor(e){super(e),this.name="ShikiError"}}var N,T,P,R=e.i(24062);function M(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var O=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,$=class{static hasCaptures(e){return null!==e&&(O.lastIndex=0,O.test(e))}static replaceCaptures(e,t,n){return e.replace(O,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function B(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){var i,a;let n=(i=e[r],i<(a=t[r])?-1:+(i>a));if(0!==n)return n}return 0}return n-r}function D(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function U(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var F=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},j=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(a.scope)?a.scope:[""];let o=-1;if("string"==typeof a.settings.fontStyle){o=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let s=null;"string"==typeof a.settings.foreground&&D(a.settings.foreground)&&(s=a.settings.foreground);let l=null;"string"==typeof a.settings.background&&D(a.settings.background)&&(l=a.settings.background);for(let t=0,a=i.length;t<a;t++){let a=i[t].trim().split(" "),u=a[a.length-1],c=null;a.length>1&&(c=a.slice(0,a.length-1)).reverse(),n[r++]=new q(u,c,e,o,s,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,r;let i=(n=e.scope,n<(r=t.scope)?-1:+(n>r));return 0!==i||0!==(i=B(e.parentScopes,t.parentScopes))?i:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let a=new H(t),o=new z(n,a.getId(r),a.getId(i)),s=new K(new X(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new j(a,o,s)}(e,t)}_cachedMatchRoot=new F(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var n,r;let a=t[i],o=!1;if(">"===a){if(i===t.length-1)return!1;a=t[++i],o=!0}for(;e&&(n=e.scopeName,!((r=a)===n||n.startsWith(r)&&"."===n[r.length]));){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new z(n.fontStyle,n.foreground,n.background):null}},G=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},z=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},q=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},W=((N=W||{})[N.NotSet=-1]="NotSet",N[N.None=0]="None",N[N.Italic=1]="Italic",N[N.Bold=2]="Bold",N[N.Underline=4]="Underline",N[N.Strikethrough=8]="Strikethrough",N),H=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},V=Object.freeze([]),X=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||V,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},K=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){let s,l,u;if(""===n)return void this._doInsertHere(t,r,i,a,o);let c=n.indexOf(".");-1===c?(s=n,l=""):(s=n.substring(0,c),l=n.substring(c+1)),this._children.hasOwnProperty(s)?u=this._children[s]:(u=new e(this._mainRule.clone(),X.cloneArr(this._rulesWithParentScopes)),this._children[s]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(0===B(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new X(e,t,n,r,i))}},Q=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,a,o,s){let l=e.getLanguageId(t),u=e.getTokenType(t),c=+!!e.containsBalancedBrackets(t),h=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(u=r),null!==i&&(c=+!!i),-1!==a&&(h=a),0!==o&&(d=o),0!==s&&(p=s),(l|u<<8|c<<10|h<<11|d<<15|p<<24)>>>0}};function J(e,t){var n;let r,i,a=[],o=(n=e,i=(r=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!i)return null;let e=i[0];return i=r.exec(n),e}}),s=o.next();for(;null!==s;){let e=0;if(2===s.length&&":"===s.charAt(1)){switch(s.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=o.next()}let t=u();if(a.push({matcher:t,priority:e}),","!==s)break;s=o.next()}return a;function l(){if("-"===s){s=o.next();let e=l();return t=>!!e&&!e(t)}if("("===s){s=o.next();let e=function(){let e=[],t=u();for(;t&&(e.push(t),"|"===s||","===s);){do s=o.next();while("|"===s||","===s)t=u()}return t=>e.some(e=>e(t))}();return")"===s&&(s=o.next()),e}if(Y(s)){let e=[];do e.push(s),s=o.next();while(Y(s))return n=>t(e,n)}return null}function u(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function Y(e){return!!e&&!!e.match(/[\w\.:]+/)}var Z=((T=Z||{})[T.None=0]="None",T[T.NotBeginString=1]="NotBeginString",T[T.NotEndString=2]="NotEndString",T[T.NotBeginPosition=4]="NotBeginPosition",T[T.DebugCall=8]="DebugCall",T);function ee(e){"function"==typeof e.dispose&&e.dispose()}var et=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},en=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},er=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ei=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new et(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new er;for(let n of e)!function(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof et?eo({baseGrammar:a,selfGrammar:i},r):ea(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new et(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof et){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ea(e,t,n){t.repository&&t.repository[e]&&es([t.repository[e]],t,n)}function eo(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&es(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&es(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function es(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?M({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&es(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ep(i);switch(a.kind){case 0:eo({...t,selfGrammar:t.baseGrammar},n);break;case 1:eo(t,n);break;case 2:ea(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let r={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===a.kind?ea(a.ruleName,r,n):eo(r,n)}else 4===a.kind?n.add(new en(a.scopeName,a.ruleName)):n.add(new et(a.scopeName))}}}var el=class{kind=0},eu=class{kind=1},ec=class{constructor(e){this.ruleName=e}kind=2},eh=class{constructor(e){this.scopeName=e}kind=3},ed=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ep(e){if("$base"===e)return new el;if("$self"===e)return new eu;let t=e.indexOf("#");return -1===t?new eh(e):0===t?new ec(e.substring(1)):new ed(e.substring(0,t),e.substring(t+1))}var ef=/\\(\d+)/,eg=/\\(\d+)/g;Symbol("RuleId");var em=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=$.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=$.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?$.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?$.replaceCaptures(this._contentName,e,t):this._contentName}},ey=class extends em{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},eb=class extends em{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new eC(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eS,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ek=class extends em{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eS,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ev=class extends em{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,l,u){super(e,t,n,r),this._begin=new eC(i,this.id),this.beginCaptures=a,this._end=new eC(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new eS,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ew=class extends em{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,l){super(e,t,n,r),this._begin=new eC(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new eC(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new eS,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new eS,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},eA=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ey(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new eb(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=M({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new ek(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new ew(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new ev(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if("$vscodeTextmateLocation"===a)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=ep(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,l=4===t.kind?t.ruleName:null,u=n.getExternalGrammar(a,r);if(u)if(l){let t=u.repository[l];t&&(s=e.getCompiledRuleId(t,n,u.repository))}else s=e.getCompiledRuleId(u.repository.$self,n,u.repository)}}else s=e.getCompiledRuleId(o,n,r);if(-1!==s){let e=n.getRule(s),t=!1;if((e instanceof ek||e instanceof ev||e instanceof ew)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},eC=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(r.push(e.substring(n,a)),r.push("$(?!\\n)(?<!\\n)"),n=a+2):("A"===t||"G"===t)&&(i=!0),a++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=ef.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return eg.lastIndex=0,this.source.replace(eg,(e,t)=>U(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],a=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,a[e]=n,o[e]=n,s[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="",a[e+1]="",o[e+1]="A",s[e+1]="A"):"G"===r?(i[e+1]="",a[e+1]="G",o[e+1]="",s[e+1]="G"):(i[e+1]=r,a[e+1]=r,o[e+1]=r,s[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},eS=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(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new e_(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new e_(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},e_=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ex=class{constructor(e,t){this.languageId=e,this.tokenType=t}},eE=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ex(e,8),this._embeddedLanguagesMatcher=new eL(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ex(0,0);_getBasicScopeAttributes=new F(e=>new ex(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.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 Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eL=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>U(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==R.default&&R.default.env.VSCODE_TEXTMATE_DEBUG;var eI=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function eN(e,t,n,r,i,a,o,s){let l=t.content.length,u=!1,c=-1;if(o){let o=function(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof ew&&s.push({rule:n,stack:t})}for(let p=s.pop();p;p=s.pop()){var l,u,c,h,d;let{ruleScanner:s,findOptions:f}=(l=p.rule,u=e,c=p.stack.endRule,h=n,d=r===o,{ruleScanner:l.compileWhileAG(u,c,h,d),findOptions:0}),g=s.findNextMatchSync(t,r,f);if(g){if(-2!==g.ruleId){i=p.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(a.produce(p.stack,g.captureIndices[0].start),eP(e,t,n,p.stack,a,p.rule.whileCaptures,g.captureIndices),a.produce(p.stack,g.captureIndices[0].end),o=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{i=p.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,c=o.anchorPosition}let h=Date.now();for(;!u;){if(0!==s&&Date.now()-h>s)return new eI(i,!0);!function(){let o=function(e,t,n,r,i,a){let o=function(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=eT(i.getRule(e),e,i.endRule,n,r===a),l=o.findNextMatchSync(t,r,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,r,i,a),s=e.getInjections();if(0===s.length)return o;let l=function(e,t,n,r,i,a,o){let s,l=Number.MAX_VALUE,u=null,c=0,h=a.contentNameScopesList.getScopeNames();for(let a=0,d=e.length;a<d;a++){let d=e[a];if(!d.matcher(h))continue;let{ruleScanner:p,findOptions:f}=eT(t.getRule(d.ruleId),t,null,r,i===o),g=p.findNextMatchSync(n,i,f);if(!g)continue;let m=g.captureIndices[0].start;if(!(m>=l)&&(l=m,u=g.captureIndices,s=g.ruleId,c=d.priority,l===i))break}return u?{priorityMatch:-1===c,captureIndices:u,matchedRuleId:s}:null}(s,e,t,n,r,i,a);if(!l)return o;if(!o)return l;let u=o.captureIndices[0].start,c=l.captureIndices[0].start;return c<u||l.priorityMatch&&c===u?l:o}(e,t,n,r,i,c);if(!o){a.produce(i,l),u=!0;return}let s=o.captureIndices,h=o.matchedRuleId,d=!!s&&s.length>0&&s[0].end>r;if(-1===h){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),eP(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let h=i;if(i=i.parent,c=h.getAnchorPos(),!d&&h.getEnterPos()===r){i=h,a.produce(i,l),u=!0;return}}else{let o=e.getRule(h);a.produce(i,s[0].start);let p=i,f=o.getName(t.content,s),g=i.contentNameScopesList.pushAttributed(f,e);if(i=i.push(h,r,c,s[0].end===l,null,g,g),o instanceof ev){eP(e,t,n,i,a,o.beginCaptures,s),a.produce(i,s[0].end),c=s[0].end;let r=o.getContentName(t.content,s),h=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(h),o.endHasBackReferences&&(i=i.withEndRule(o.getEndWithResolvedBackReferences(t.content,s))),!d&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),u=!0;return}}else if(o instanceof ew){eP(e,t,n,i,a,o.beginCaptures,s),a.produce(i,s[0].end),c=s[0].end;let r=o.getContentName(t.content,s),h=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(h),o.whileHasBackReferences&&(i=i.withEndRule(o.getWhileWithResolvedBackReferences(t.content,s))),!d&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),u=!0;return}}else if(eP(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!d){i=i.safePop(),a.produce(i,l),u=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}()}return new eI(i,!1)}function eT(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function eP(e,t,n,r,i,a,o){if(0===a.length)return;let s=t.content,l=Math.min(a.length,o.length),u=[],c=o[0].end;for(let t=0;t<l;t++){let l=a[t];if(null===l)continue;let h=o[t];if(0===h.length)continue;if(h.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),l.retokenizeCapturedWithRuleId){let t=l.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),u=l.getContentName(s,o),c=a.pushAttributed(u,e),d=r.push(l.retokenizeCapturedWithRuleId,h.start,-1,!1,null,a,c),p=e.createOnigString(s.substring(0,h.end));eN(e,p,n&&0===h.start,h.start,d,i,!1,0),ee(p);continue}let d=l.getName(s,o);if(null!==d){let t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);u.push(new eR(t,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var eR=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eM(e,t,n,r,i){let a=J(t,eO),o=eA.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function eO(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var e$=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new eE(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=eB(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of J(e,eO))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)eM(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&eM(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eB(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=eA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==eU.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),a=Q.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?eD.createRootAndLookUpScopeName(o,a,this):eD.createRoot("unknown",a),t=new eU(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let a=this.createOnigString(e),o=a.content.length,s=new ej(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=eN(this,a,i,0,t,s,!0,r);return ee(a),{lineLength:o,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eB(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=e(t[r]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let r in t)n[r]=e(t[r]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var eD=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=G.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new G(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new G(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Q.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},eU=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&eD.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=eD.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,eD.fromExtension(r,n.contentNameScopesList))}},eF=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):J(e,eO).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>J(e,eO).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ej=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Q.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Q.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eG=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,new e$(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ez=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eG(j.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(j.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new eF(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new ei(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},eq=eU.NULL;let eW=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class eH{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function eV(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new eH(n,r,t)}function eX(e){return e.toLowerCase()}eH.prototype.normal={},eH.prototype.property={},eH.prototype.space=void 0;class eK{constructor(e,t){this.attribute=t,this.property=e}}eK.prototype.attribute="",eK.prototype.booleanish=!1,eK.prototype.boolean=!1,eK.prototype.commaOrSpaceSeparated=!1,eK.prototype.commaSeparated=!1,eK.prototype.defined=!1,eK.prototype.mustUseProperty=!1,eK.prototype.number=!1,eK.prototype.overloadedBoolean=!1,eK.prototype.property="",eK.prototype.spaceSeparated=!1,eK.prototype.space=void 0;let eQ=0,eJ=e6(),eY=e6(),eZ=e6(),e0=e6(),e1=e6(),e2=e6(),e5=e6();function e6(){return 2**++eQ}e.s(["boolean",0,eJ,"booleanish",0,eY,"commaOrSpaceSeparated",0,e5,"commaSeparated",0,e2,"number",0,e0,"overloadedBoolean",0,eZ,"spaceSeparated",0,e1],744);var e8=e.i(744);let e3=Object.keys(e8);class e4 extends eK{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<e3.length;){const e=e3[i];!function(e,t,n){n&&(e[t]=n)}(this,e3[i],(n&e8[e])===e8[e])}}}function e9(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new e4(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[eX(r)]=r,n[eX(a.attribute)]=r}return new eH(t,n,e.space)}e4.prototype.defined=!0;let e7=e9({properties:{ariaActiveDescendant:null,ariaAtomic:eY,ariaAutoComplete:null,ariaBusy:eY,ariaChecked:eY,ariaColCount:e0,ariaColIndex:e0,ariaColSpan:e0,ariaControls:e1,ariaCurrent:null,ariaDescribedBy:e1,ariaDetails:null,ariaDisabled:eY,ariaDropEffect:e1,ariaErrorMessage:null,ariaExpanded:eY,ariaFlowTo:e1,ariaGrabbed:eY,ariaHasPopup:null,ariaHidden:eY,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:e1,ariaLevel:e0,ariaLive:null,ariaModal:eY,ariaMultiLine:eY,ariaMultiSelectable:eY,ariaOrientation:null,ariaOwns:e1,ariaPlaceholder:null,ariaPosInSet:e0,ariaPressed:eY,ariaReadOnly:eY,ariaRelevant:null,ariaRequired:eY,ariaRoleDescription:e1,ariaRowCount:e0,ariaRowIndex:e0,ariaRowSpan:e0,ariaSelected:eY,ariaSetSize:e0,ariaSort:null,ariaValueMax:e0,ariaValueMin:e0,ariaValueNow:e0,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function te(e,t){return t in e?e[t]:t}function tt(e,t){return te(e,t.toLowerCase())}let tn=e9({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:e2,acceptCharset:e1,accessKey:e1,action:null,allow:null,allowFullScreen:eJ,allowPaymentRequest:eJ,allowUserMedia:eJ,alt:null,as:null,async:eJ,autoCapitalize:null,autoComplete:e1,autoFocus:eJ,autoPlay:eJ,blocking:e1,capture:null,charSet:null,checked:eJ,cite:null,className:e1,cols:e0,colSpan:null,content:null,contentEditable:eY,controls:eJ,controlsList:e1,coords:e0|e2,crossOrigin:null,data:null,dateTime:null,decoding:null,default:eJ,defer:eJ,dir:null,dirName:null,disabled:eJ,download:eZ,draggable:eY,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:eJ,formTarget:null,headers:e1,height:e0,hidden:eZ,high:e0,href:null,hrefLang:null,htmlFor:e1,httpEquiv:e1,id:null,imageSizes:null,imageSrcSet:null,inert:eJ,inputMode:null,integrity:null,is:null,isMap:eJ,itemId:null,itemProp:e1,itemRef:e1,itemScope:eJ,itemType:e1,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:eJ,low:e0,manifest:null,max:null,maxLength:e0,media:null,method:null,min:null,minLength:e0,multiple:eJ,muted:eJ,name:null,nonce:null,noModule:eJ,noValidate:eJ,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:eJ,optimum:e0,pattern:null,ping:e1,placeholder:null,playsInline:eJ,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:eJ,referrerPolicy:null,rel:e1,required:eJ,reversed:eJ,rows:e0,rowSpan:e0,sandbox:e1,scope:null,scoped:eJ,seamless:eJ,selected:eJ,shadowRootClonable:eJ,shadowRootDelegatesFocus:eJ,shadowRootMode:null,shape:null,size:e0,sizes:null,slot:null,span:e0,spellCheck:eY,src:null,srcDoc:null,srcLang:null,srcSet:null,start:e0,step:null,style:null,tabIndex:e0,target:null,title:null,translate:null,type:null,typeMustMatch:eJ,useMap:null,value:eY,width:e0,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:e1,axis:null,background:null,bgColor:null,border:e0,borderColor:null,bottomMargin:e0,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:eJ,declare:eJ,event:null,face:null,frame:null,frameBorder:null,hSpace:e0,leftMargin:e0,link:null,longDesc:null,lowSrc:null,marginHeight:e0,marginWidth:e0,noResize:eJ,noHref:eJ,noShade:eJ,noWrap:eJ,object:null,profile:null,prompt:null,rev:null,rightMargin:e0,rules:null,scheme:null,scrolling:eY,standby:null,summary:null,text:null,topMargin:e0,valueType:null,version:null,vAlign:null,vLink:null,vSpace:e0,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:eJ,disableRemotePlayback:eJ,prefix:null,property:null,results:e0,security:null,unselectable:null},space:"html",transform:tt}),tr=e9({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:e5,accentHeight:e0,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:e0,amplitude:e0,arabicForm:null,ascent:e0,attributeName:null,attributeType:null,azimuth:e0,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:e0,by:null,calcMode:null,capHeight:e0,className:e1,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:e0,diffuseConstant:e0,direction:null,display:null,dur:null,divisor:e0,dominantBaseline:null,download:eJ,dx:null,dy:null,edgeMode:null,editable:null,elevation:e0,enableBackground:null,end:null,event:null,exponent:e0,externalResourcesRequired:null,fill:null,fillOpacity:e0,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:e2,g2:e2,glyphName:e2,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:e0,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:e0,horizOriginX:e0,horizOriginY:e0,id:null,ideographic:e0,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:e0,k:e0,k1:e0,k2:e0,k3:e0,k4:e0,kernelMatrix:e5,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:e0,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:e0,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:e0,overlineThickness:e0,paintOrder:null,panose1:null,path:null,pathLength:e0,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:e1,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:e0,pointsAtY:e0,pointsAtZ:e0,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:e5,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:e5,rev:e5,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:e5,requiredFeatures:e5,requiredFonts:e5,requiredFormats:e5,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:e0,specularExponent:e0,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:e0,strikethroughThickness:e0,string:null,stroke:null,strokeDashArray:e5,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:e0,strokeOpacity:e0,strokeWidth:null,style:null,surfaceScale:e0,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:e5,tabIndex:e0,tableValues:null,target:null,targetX:e0,targetY:e0,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:e5,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:e0,underlineThickness:e0,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:e0,values:null,vAlphabetic:e0,vMathematical:e0,vectorEffect:null,vHanging:e0,vIdeographic:e0,version:null,vertAdvY:e0,vertOriginX:e0,vertOriginY:e0,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:e0,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:te}),ti=e9({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),ta=e9({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tt}),to=e9({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),ts=eV([e7,tn,ti,ta,to],"html"),tl=eV([e7,tr,ti,ta,to],"svg"),tu={}.hasOwnProperty,tc=/["&'<>`]/g,th=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,td=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tp=/[|\\{}()[\]^$+*?.]/g,tf=new WeakMap,tg=/[\dA-Fa-f]/,tm=/\d/,ty=["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"],tb={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:"€"},tk=["cent","copy","divide","gt","lt","not","para","times"],tv={}.hasOwnProperty,tw={};for(t in tb)tv.call(tb,t)&&(tw[tb[t]]=t);let tA=/[^\dA-Za-z]/;function tC(e,t,n){var r,i;let a,o,s=(r=n.omitOptionalSemicolons,a="&#x"+e.toString(16).toUpperCase(),r&&t&&!tg.test(String.fromCharCode(t))?a:a+";");if((n.useNamedReferences||n.useShortestReferences)&&(o=function(e,t,n,r){let i=String.fromCharCode(e);if(tv.call(tw,i)){let e=tw[i],a="&"+e;return n&&ty.includes(e)&&!tk.includes(e)&&(!r||t&&61!==t&&tA.test(String.fromCharCode(t)))?a:a+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let r,a=(i=n.omitOptionalSemicolons,r="&#"+String(e),i&&t&&!tm.test(String.fromCharCode(t))?r:r+";");a.length<s.length&&(s=a)}return o&&(!n.useShortestReferences||o.length<s.length)?o:s}function tS(e,t){let n;var r,i=e,a=Object.assign({format:tC},t);if(i=i.replace(a.subset?(r=a.subset,(n=tf.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(tp,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),tf.set(r,n)),n):tc,o),a.subset||a.escapeOnly)return i;return i.replace(th,function(e,t,n){return a.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),a)}).replace(td,o);function o(e,t,n){return a.format(e.charCodeAt(0),n.charCodeAt(t+1),a)}}let t_=/^>|^->|<!--|-->|--!>|<!-$/g,tx=[">"],tE=["<",">"];function tL(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let tI=/[A-Z]/g,tN=/-[a-z]/g,tT=/^data[-\w.:]+$/i;function tP(e){return"-"+e.toLowerCase()}function tR(e){return e.charAt(1).toUpperCase()}let tM=/[ \t\n\f\r]/g;function tO(e){return"object"==typeof e?"text"===e.type&&t$(e.value):t$(e)}function t$(e){return""===e.replace(tM,"")}let tB=tF(1),tD=tF(-1),tU=[];function tF(e){return function(t,n,r){let i=t?t.children:tU,a=(n||0)+e,o=i[a];if(!r)for(;o&&tO(o);)a+=e,o=i[a];return o}}let tj={}.hasOwnProperty;function tG(e){return function(t,n,r){return tj.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let tz=tG({body:function(e,t,n){let r=tB(n,t);return!r||"comment"!==r.type},caption:tq,colgroup:tq,dd:function(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=tB(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:tq,html:function(e,t,n){let r=tB(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=tB(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:tW,rt:tW,tbody:function(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:tH,tfoot:function(e,t,n){return!tB(n,t)},th:tH,thead:function(e,t,n){let r=tB(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function tq(e,t,n){let r=tB(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&tO(r.value.charAt(0)))}function tW(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function tH(e,t,n){let r=tB(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let tV=tG({body:function(e){let t=tB(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&tO(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=tD(n,t),i=tB(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&tz(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=tB(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=tD(n,t),i=tB(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&tz(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),tX={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},tK=["<","&"];function tQ(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:tS(e.value,Object.assign({},r.settings.characterReferences,{subset:tK}))}let tJ=function(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&tu.call(t,e)){let n=String(t[e]);i=tu.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+tS(e.value,Object.assign({},r.settings.characterReferences,{subset:tx}))+">":"<!--"+e.value.replace(t_,function(e){return tS(e,Object.assign({},r.settings.characterReferences,{subset:tE}))})+"-->"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let i,a=r.schema,o="svg"!==a.space&&r.settings.omitOptionalTags,s="svg"===a.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===a.space&&"svg"===e.tagName&&(r.schema=tl);let u=function(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r,i=function(e,t){let n=eX(t),r=t,i=eK;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&tT.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(tN,tR);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!tN.test(e)){let n=e.replace(tI,tP);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=e4}return new i(r,t)}(e.schema,t),a=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,s=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=tS(i.attribute,Object.assign({},e.settings.characterReferences,{subset:tX.name[a][o]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?function(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}:function(e){return e.join(" ").trim()})(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=tS(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tX.unquoted[a][o]}))),r!==n&&(e.settings.quoteSmart&&tL(n,s)>tL(n,e.alternative)&&(s=e.alternative),r=s+tS(n,Object.assign({},e.settings.characterReferences,{subset:("'"===s?tX.single:tX.double)[a][o],attribute:!0}))+s),l+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(r,e.properties),c=r.all("html"===a.space&&"template"===e.tagName?e.content:e);return r.schema=a,c&&(s=!1),!u&&o&&tV(e,t,n)||(l.push("<",e.tagName,u?" "+u:""),s&&("svg"===a.space||r.settings.closeSelfClosing)&&(i=u.charAt(u.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),s||o&&tz(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tQ(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:tQ}}),tY={},tZ={},t0=[];function t1(e,t){let n=t||tY,r=n.quote||'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:t2,all:t5,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||eW,characterReferences:n.characterReferences||tZ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?tl:ts,quote:r,alternative:'"'===r?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function t2(e,t,n){return tJ(e,t,n,this)}function t5(e){let t=[],n=e&&e.children||t0,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function t6(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function t8(e,t){return e&&t?.[e?.toLowerCase()]||e}async function t3(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function t4(e){return!e||["plaintext","txt","text","plain"].includes(e)}function t9(e){return"ansi"===e||t4(e)}function t7(e){return"none"===e}e.s(["toHtml",0,t1],27118);function ne(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function nt(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||""):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}let nn="light-dark()",nr=["color","background-color"];function ni(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&W.Italic&&(t["font-style"]="italic"),e.fontStyle&W.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&W.Underline&&n.push("underline"),e.fontStyle&W.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function na(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let no=new WeakMap;function ns(e,t){no.set(e,t)}function nl(e){return no.get(e)}class nu{_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,t){return new nu(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,eq])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let n,r;return t=this._stacks[e],n=[],r=new Set,!function e(t){if(r.has(t))return;r.add(t);let i=t?.nameScopesList?.scopeName;i&&n.push(i),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let nc=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){var n;let r,i=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new I(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...a.indexToPos(e),offset:e}}{let t=a.lines[e.line];if(void 0===t)throw new I(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${a.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new I(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:a.posToIndex(e.line,n)}}},a={lines:r=nt(n=t.source,!0).map(([e])=>e),indexToPos:function(e){if(e===n.length)return{line:r.length-1,character:r[r.length-1].length};let t=e,i=0;for(let e of r){if(t<e.length)break;t-=e.length,i++}return{line:i,character:t}},posToIndex:function(e,t){let n=0;for(let t=0;t<e;t++)n+=r[t].length;return n+t}},o=(t.options.decorations||[]).map(e=>({...e,start:i(e.start),end:i(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new I(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new I(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(o),e.set(t.meta,{decorations:o,converter:a,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){let n;if(!this.options.decorations?.length)return;let r=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);return(n=Array.from(r instanceof Set?r:new Set(r)).sort((e,t)=>e-t)).length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let r=0,i=[];for(let n of t)n>r&&i.push({...e,content:e.content.slice(r,n),offset:e.offset+r}),r=n;return r<e.content.length&&i.push({...e,content:e.content.slice(r),offset:e.offset+r}),i})):e},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new I(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let o=r[e],s="",l=-1,u=-1;if(0===t&&(l=0),0===n&&(u=0),n===1/0&&(u=o.children.length),-1===l||-1===u)for(let e=0;e<o.children.length;e++)s+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(o.children[e]),-1===l&&s.length===t&&(l=e+1),-1===u&&s.length===n&&(u=e+1);if(-1===l)throw new I(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===u)throw new I(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let c=o.children.slice(l,u);if(i.alwaysWrap||c.length!==o.children.length)if(i.alwaysWrap||1!==c.length||"element"!==c[0].type){let e={type:"element",tagName:"span",properties:{},children:c};a(e,i,"wrapper"),o.children.splice(l,c.length,e)}else a(c[0],i,"token");else a(o,i,"line")}function a(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&ne(e,t.properties.class),e=i(e,n)||e}let o=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<n.line;i++)o.unshift(()=>{var t;r[t=i]=a(r[t],e,"line")});i(n.line,0,n.character,e)}}o.forEach(e=>e())}}}()];function nh(e){let t=function(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nc]}var nd=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],np={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nf(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var ng={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};let nm={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function ny(e,t,n={}){var r,i;let a,o,{theme:s=e.getLoadedThemes()[0]}=n,l=e.resolveLangAlias(n.lang||"text");if(t4(l)||t7(s))return nt(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:u,colorMap:c}=e.setTheme(s);if("ansi"===l){let e,r,i,a,o,s,l;return e=t6(u,n),r=nt(t),i=function(e=ng){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(r){switch(r.type){case"named":return e[r.name];case"rgb":return n(r.rgb);case"table":var i;return i=r.index,function(){if(t)return t;t=[];for(let n=0;n<nd.length;n++)t.push(e[nd[n]]);let r=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)t.push(n([r[e],r[i],r[a]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(n([i,i,i]));return t}()[i]}}}}(Object.fromEntries(nd.map(e=>{let t=`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`;return[e,u.colors?.[t]||nm[e]]}))),a=null,o=null,s=new Set,l={parse(e){let t=[],n=0;do{let r=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),i=r.sequence?e.substring(n,r.startPosition):e.substring(n);if(i.length>0&&t.push({value:i,foreground:a,background:o,decorations:new Set(s)}),r.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)np[r]&&t.push({type:"setDecoration",value:np[r]});else if(r<=29){let e=np[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:nd[r-30]}});else if(38===r){let n=nf(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:nd[r-40]}});else if(48===r){let n=nf(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:nd[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:nd[r-100+8]}})}return t}(r.sequence);for(let t of e)"resetAll"===t.type?(a=null,o=null,s.clear()):"resetForegroundColor"===t.type?a=null:"resetBackgroundColor"===t.type?o=null:"resetDecoration"===t.type&&s.delete(t.value);for(let t of e)"setForegroundColor"===t.type?a=t.value:"setBackgroundColor"===t.type?o=t.value:"setDecoration"===t.type&&s.add(t.value)}n=r.position}while(n<e.length)return t}},r.map(t=>l.parse(t[0]).map(n=>{let r,a;n.decorations.has("reverse")?(r=n.background?i.value(n.background):u.bg,a=n.foreground?i.value(n.foreground):u.fg):(r=n.foreground?i.value(n.foreground):u.fg,a=n.background?i.value(n.background):void 0),r=t8(r,e),a=t8(a,e),n.decorations.has("dim")&&(r=function(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],i=e[3],a=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${n}${n}${r}${r}${a}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(r));let o=W.None;return n.decorations.has("bold")&&(o|=W.Bold),n.decorations.has("italic")&&(o|=W.Italic),n.decorations.has("underline")&&(o|=W.Underline),n.decorations.has("strikethrough")&&(o|=W.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:a,fontStyle:o}}))}let h=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==h.name)throw new I(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${h.name}"`);if(!n.grammarState.themes.includes(u.name))throw new I(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${u.name}"`)}return o=new nu((a=nb(t,r=h,i=u,c,n)).stateStack,r.name,i.name),ns(a.tokens,o),a.tokens}function nb(e,t,n,r,i){let a=t6(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,l=nt(e),u=i.grammarState?function(e,t){if(!(e instanceof nu))throw new I("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,n.name)??eq:null!=i.grammarContextCode?nb(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:eq,c=[],h=[];for(let e=0,d=l.length;e<d;e++){let d,p,[f,g]=l[e];if(""===f){c=[],h.push([]);continue}if(o>0&&f.length>=o){c=[],h.push([{content:f,offset:g,color:"",fontStyle:0}]);continue}i.includeExplanation&&(d=t.tokenizeLine(f,u,s).tokens,p=0);let m=t.tokenizeLine2(f,u,s),y=m.tokens.length/2;for(let e=0;e<y;e++){let t=m.tokens[2*e],o=e+1<y?m.tokens[2*e+2]:f.length;if(t===o)continue;let s=m.tokens[2*e+1],l=t8(r[Q.getForeground(s)],a),u=Q.getFontStyle(s),h={content:f.substring(t,o),offset:g+t,color:l,fontStyle:u};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}h.explanation=[];let r=0;for(;t+r<o;){let t=d[p],n=f.substring(t.startIndex,t.endIndex);r+=n.length,h.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:function(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(function(e,t,n){if(!nk(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)nk(e[r],n[i])&&(r-=1),i-=1;return -1===r}(e,t,n)){r.push(a);break}return r}(e,i,t.slice(0,r))}}return n}(e,t.scopes)}),p+=1}}c.push(h)}h.push(c),c=[],u=m.ruleStack}return{tokens:h,stateStack:u}}function nk(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function nv(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=ny(e,t,{...n,theme:r.theme}),a=nl(i);return{tokens:i,state:a,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),a=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:l,...u}=e[t][i];o.variants[r[n].color]=u}),o})),s=i[0].state?new nu(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&ns(o,s),o}function nw(e,t,n){let r,i,a,o,s,l;if("themes"in n){let{defaultColor:u="light",cssVariablePrefix:c="--shiki-",colorsRendering:h="css-vars"}=n,d=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:+(t.color===u));if(0===d.length)throw new I("`themes` option must not be empty");let p=nv(e,t,n);if(l=nl(p),u&&nn!==u&&!d.find(e=>e.color===u))throw new I(`\`themes\` option must contain the defaultColor key \`${u}\``);let f=d.map(t=>e.getTheme(t.theme)),g=d.map(e=>e.color);a=p.map(e=>e.map(e=>(function(e,t,n,r,i="css-vars"){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>ni(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),l={},u=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||"inherit";if(0===n&&r&&nr.includes(a))if(r===nn&&o.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let c=o[e][a]||"inherit",h=o[r][a]||"inherit";l[a]=`light-dark(${c}, ${h})`,"css-vars"===i&&(l[u(n,a)]=s)}else l[a]=s;else"css-vars"===i&&(l[u(n,a)]=s)}}),a.htmlStyle=l,a})(e,g,c,u,h))),l&&ns(a,l);let m=d.map(e=>t6(e.theme,n));i=nA(d,f,m,c,u,"fg",h),r=nA(d,f,m,c,u,"bg",h),o=`shiki-themes ${f.map(e=>e.name).join(" ")}`,s=u?void 0:[i,r].join(";")}else if("theme"in n){let s=t6(n.theme,n);a=ny(e,t,n);let u=e.getTheme(n.theme);r=t8(u.bg,s),i=t8(u.fg,s),o=u.name,l=nl(a)}else throw new I("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:l}}function nA(e,t,n,r,i,a,o){return e.map((s,l)=>{let u=t8(t[l][a],n[l])||"inherit",c=`${r+s.color}${"bg"===a?"-bg":""}:${u}`;if(0===l&&i){if(i===nn&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=t8(t[r][a],n[r])||"inherit",s=t8(t[i][a],n[i])||"inherit";return`light-dark(${o}, ${s});${c}`}return u}return"css-vars"===o?c:null}).filter(e=>!!e).join(";")}function nC(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nC(e,t,n),codeToTokens:(t,n)=>nw(e,t,n)}){let i=t;for(let e of nh(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:l,rootStyle:u,grammarState:c}=nw(e,i,n),{mergeWhitespaces:h=!0,mergeSameStyleTokens:d=!1}=n;!0===h?a=a.map(e=>{let t,n=[],r="";return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&W.Underline||i.fontStyle&W.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(void 0===t&&(t=i.offset),r+=i.content):r?(o?n.push({...i,offset:t,content:r+i.content}):n.push({content:r,offset:t},i),t=void 0,r=""):n.push(i)}),n}):"never"===h&&(a=a.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))),d&&(a=a.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=na(e.htmlStyle||ni(e)),i=na(n.htmlStyle||ni(n)),a=e.fontStyle&&(e.fontStyle&W.Underline||e.fontStyle&W.Strikethrough),o=n.fontStyle&&(n.fontStyle&W.Underline||n.fontStyle&W.Strikethrough);a||o||r!==i?t.push({...n}):e.content+=n.content}return t}));let p={...r,get source(){return i}};for(let e of nh(n))a=e.tokens?.call(p,a)||a;return function(e,t,n,r=nl(e)){let i=nh(t),a=[],o={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,u={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(u.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(u[e]=n);let c={type:"element",tagName:"pre",properties:u,children:[],data:t.data},h={type:"element",tagName:"code",properties:{},children:a},d=[],p={...n,structure:s,addClassToHast:ne,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return h},get lines(){return d}};if(e.forEach((e,t)=>{t&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&a.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let a of e){let e={type:"element",tagName:"span",properties:{...a.htmlAttrs},children:[{type:"text",value:a.content}]},l=na(a.htmlStyle||ni(a));for(let o of(l&&(e.properties.style=l),i))e=o?.span?.call(p,e,t+1,r,n,a)||e;"inline"===s?o.children.push(e):"classic"===s&&n.children.push(e),r+=a.content.length}if("classic"===s){for(let e of i)n=e?.line?.call(p,n,t+1)||n;d.push(n),a.push(n)}else"inline"===s&&d.push(n)}),"classic"===s){for(let e of i)h=e?.code?.call(p,h)||h;for(let e of(c.children.push(h),i))c=e?.pre?.call(p,c)||c;o.children.push(c)}else if("inline"===s){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of o.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&o.children.push(...t.children)}}let f=o;for(let e of i)f=e?.root?.call(p,f)||f;return r&&ns(f,r),f}(a,{...n,fg:o,bg:s,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??u)},p,c)}let nS="__shiki_resolved";function n_(e){if(e?.[nS])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,nS,{enumerable:!1,writable:!1,value:!0}),t}async function nx(e){return Array.from(new Set((await Promise.all(e.filter(e=>!t9(e)).map(async e=>await t3(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function nE(e){return(await Promise.all(e.map(async e=>t7(e)?null:n_(await t3(e))))).filter(e=>!!e)}class nL extends Error{constructor(e){super(e),this.name="ShikiError"}}function nI(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new nL(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class nN extends ez{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=n_(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=j.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=nI(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>{if(!t)return!1;let r=t.embeddedLanguages||t.embeddedLangs;return r?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new nL(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}}class nT{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let nP=0;async function nR(e){e.engine||function(e,t=3){if(!(t>3))if(1)console.trace(`[SHIKI DEPRECATE]: ${e}`);else throw Error(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([nE(e.themes||[]),nx(e.langs||[]),e.engine]);return function(e){let t;nP+=1,!1!==e.warnings&&nP>=10&&nP%10==0&&console.warn(`[Shiki] ${nP} 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 n=!1;if(!e.engine)throw new nL("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(n_),a=new nN(new nT(e.engine,r),i,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};u();let t=a.getTheme(e);if(!t)throw new nL(`Theme \`${e}\` not found, you may need to load it first`);return t}function s(...e){u(),a.loadLanguages(e.flat(1))}function l(...e){for(let t of(u(),e.flat(1)))a.loadTheme(t)}function u(){if(n)throw new nL("Shiki instance has been disposed")}function c(){n||(n=!0,a.dispose(),nP-=1)}return{setTheme:function(e){u();let n=o(e);return t!==e&&(a.setTheme(n),t=e),{theme:n,colorMap:a.getColorMap()}},getTheme:o,getLanguage:function(e){u();let t=a.getGrammar("string"==typeof e?e:e.name);if(!t)throw new nL(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return u(),a.getLoadedThemes()},getLoadedLanguages:function(){return u(),a.getLoadedLanguages()},resolveLangAlias:function(t){return nI(t,e.langAlias)},loadLanguage:async function(...e){return s(await nx(e))},loadLanguageSync:s,loadTheme:async function(...e){return u(),l(await nE(e))},loadThemeSync:l,dispose:c,[Symbol.dispose]:c}}({...e,themes:t,langs:n,engine:r})}async function nM(e){let t=await nR(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return nl(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=r;if(t4(i)||t7(a))throw new I("Plain language does not have grammar state");if("ansi"===i)throw new I("ANSI language does not have grammar state");let{theme:o,colorMap:s}=t.setTheme(a),l=t.getLanguage(i);return new nu(nb(n,l,o,s,r).stateStack,l.name,o.name)})(t,...e),codeToTokensBase:(e,n)=>ny(t,e,n),codeToTokensWithThemes:(e,n)=>nv(t,e,n),codeToTokens:(e,n)=>nw(t,e,n),codeToHast:(e,n)=>nC(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nC(e,t,n),codeToTokens:(t,n)=>nw(e,t,n)},i=t1(nC(e,t,n,r));for(let e of nh(n))i=e.postprocess?.call(r,i,n)||i;return i})(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}async function nO(e){if(w())throw Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=d.get(e);if(null!=t)return t;try{let t=p.get(e)??L[e];if(null==t)throw Error(`resolveTheme: No valid loader for ${e}`);let n=t().then(t=>{var n,r;let i;return n=e,r="default"in t?t.default:t,i=h.get(n),null!=i?i:(r=n_(r),h.set(n,r),r)});d.set(e,n);let r=await n;if(r.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${r.name}`);return h.set(r.name,r),r}finally{d.delete(e)}}function n$(e){return h.get(e)??nO(e)}function nB(e,t){p.has(e)?console.error("SharedHighlight.registerCustomTheme: theme name already registered",e):p.set(e,t)}var nD=e.i(94197);class nU extends Error{constructor(e){super(e),this.name="ShikiError"}}function nF(){return"u">typeof performance?performance.now():Date.now()}let nj=(e,t)=>e+(t-e%t)%t;async function nG(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let a="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function o(e,t){return e?function(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&a)return a.decode(e.subarray(t,i));let o="";for(;t<i;){let n=e[t++];if(!(128&n)){o+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){o+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)o+=String.fromCharCode(n);else{let e=n-65536;o+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return o}(r.HEAPU8,e,t):""}let s={emscripten_get_now:nF,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let a=r.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let r=1;r<=4;r*=2){let o=a*(1+.2/r);if(o=Math.min(o,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,nj(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:s,wasi_snapshot_preview1:s});i((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=o}return await l(),r}var nz=Object.defineProperty,nq=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?nz(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n};let nW=null;class nH{constructor(e){nq(this,"utf16Length"),nq(this,"utf8Length"),nq(this,"utf16Value"),nq(this,"utf8Value"),nq(this,"utf16OffsetToUtf8"),nq(this,"utf8OffsetToUtf16");const t=e.length,n=nH._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const a=r?new Uint32Array(n+1):null;r&&(a[n]=t);const o=new Uint8Array(n);let s=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let u=l,c=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(u=(l-55296<<10)+65536|t-56320,c=!0)}r&&(i[n]=s,c&&(i[n+1]=s),u<=127?a[s+0]=n:u<=2047?(a[s+0]=n,a[s+1]=n):u<=65535?(a[s+0]=n,a[s+1]=n,a[s+2]=n):(a[s+0]=n,a[s+1]=n,a[s+2]=n,a[s+3]=n)),u<=127?o[s++]=u:(u<=2047?o[s++]=192|(1984&u)>>>6:(u<=65535?o[s++]=224|(61440&u)>>>12:(o[s++]=240|(1835008&u)>>>18,o[s++]=128|(258048&u)>>>12),o[s++]=128|(4032&u)>>>6),o[s++]=128|(63&u)>>>0),c&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let nV=class e{constructor(t){if(nq(this,"id",++e.LAST_ID),nq(this,"_onigBinding"),nq(this,"content"),nq(this,"utf16Length"),nq(this,"utf8Length"),nq(this,"utf16OffsetToUtf8"),nq(this,"utf8OffsetToUtf16"),nq(this,"ptr"),!nW)throw new nU("Must invoke loadWasm first.");this._onigBinding=nW,this.content=t;const n=new nH(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=nW.omalloc(1e4)),e._sharedPtrInUse=!0,nW.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(nW)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};nq(nV,"LAST_ID",0),nq(nV,"_sharedPtr",0),nq(nV,"_sharedPtrInUse",!1);class nX{constructor(e){if(nq(this,"_onigBinding"),nq(this,"_ptr"),!nW)throw new nU("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new nH(e[r]);t[r]=i.createString(nW),n[r]=i.utf8Length}const r=nW.omalloc(4*e.length);nW.HEAPU32.set(t,r/4);const i=nW.omalloc(4*e.length);nW.HEAPU32.set(n,i/4);const a=nW.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)nW.ofree(t[n]);nW.ofree(i),nW.ofree(r),0===a&&function(e){throw new nU(e.UTF8ToString(e.getLastOnigError()))}(nW),this._onigBinding=nW,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new nV(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===a)return null;let o=i.HEAPU32,s=a/4,l=o[s++],u=o[s++],c=[];for(let t=0;t<u;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);c[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:c}}}function nK(e){return t=>WebAssembly.instantiate(e,t)}async function nQ(e){return e&&await (n||(n=async function(){nW=await nG(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var r,i,a,o;if(void 0!==n.data&&(n=n.data),r=n,"u">typeof Response&&r instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (a=n,e=>WebAssembly.instantiateStreaming(a,e))(t):await (o=n,async e=>{let t=await o.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=n,"u">typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==nD.Buffer&&nD.Buffer.isBuffer?.(i)||"u">typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"u">typeof Uint32Array&&i instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await nK(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await nK(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())),{createScanner:e=>new nX(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new nV(e)}}let nJ=(a=(P={langs:_,themes:L,engine:()=>nQ(e.A(14467))}).langs,o=P.themes,s=P.engine,async function(e){function t(t){if("string"==typeof t){if(t9(t=e.langAlias?.[t]||t))return[];let n=a[t];if(!n)throw new I(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return n}return t}function n(e){if(t7(e))return"none";if("string"==typeof e){let t=o[e];if(!t)throw new I(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let r=(e.themes??[]).map(e=>n(e)),i=(e.langs??[]).map(e=>t(e)),l=await nM({engine:e.engine??s(),...e,themes:r,langs:i});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(t)),loadTheme:(...e)=>l.loadTheme(...e.map(n)),getBundledLanguages:()=>a,getBundledThemes:()=>o}});function nY(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let nZ=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),n0=String.raw;function n1(e,t){if(null==e)throw Error(t??"Value expected");return e}let n2=n0`\[\^?`,n5=`c.? | C(?:-.?)?|${n0`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${n0`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${n0`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${n0`o\{[^\}]*\}?`}|${n0`\d{1,3}`}`,n6=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,n8=RegExp(n0`
|
|
2
|
+
\\ (?:
|
|
3
|
+
${n5}
|
|
4
|
+
| [gk]<[^>]*>?
|
|
5
|
+
| [gk]'[^']*'?
|
|
6
|
+
| .
|
|
7
|
+
)
|
|
8
|
+
| \( (?:
|
|
9
|
+
\? (?:
|
|
10
|
+
[:=!>({]
|
|
11
|
+
| <[=!]
|
|
12
|
+
| <[^>]*>
|
|
13
|
+
| '[^']*'
|
|
14
|
+
| ~\|?
|
|
15
|
+
| #(?:[^)\\]|\\.?)*
|
|
16
|
+
| [^:)]*[:)]
|
|
17
|
+
)?
|
|
18
|
+
| \*[^\)]*\)?
|
|
19
|
+
)?
|
|
20
|
+
| (?:${n6.source})+
|
|
21
|
+
| ${n2}
|
|
22
|
+
| .
|
|
23
|
+
`.replace(/\s+/g,""),"gsu"),n3=RegExp(n0`
|
|
24
|
+
\\ (?:
|
|
25
|
+
${n5}
|
|
26
|
+
| .
|
|
27
|
+
)
|
|
28
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
29
|
+
| ${n2}
|
|
30
|
+
| &&
|
|
31
|
+
| .
|
|
32
|
+
`.replace(/\s+/g,""),"gsu");function n4(e,{inCharClass:t}){let n=e[1];if("c"===n||"C"===n){var r,i=e;let t="c"===i[1]?i[2]:i[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${i}"`);return re(nY(t.toUpperCase())-64,i)}if("dDhHsSwW".includes(n)){let t;return rn({d:"digit",h:"hex",s:"space",w:"word"}[t=(r=e)[1].toLowerCase()],r,{negate:r[1]!==t})}if(e.startsWith(n0`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(3===e.length)throw Error(`Incomplete or invalid Unicode property "${e}"`);return function(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return rn("property",e,{value:r,negate:"P"===t&&!n||"p"===t&&!!n})}(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join("");return re(nY(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if("u"===n||"x"===n)return re(function(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);return parseInt("{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2),16)}(e),e);if(ro.has(n))return re(ro.get(n),e);if(/\d/.test(n))return{type:"EscapedNumber",inCharClass:t,raw:e};if("\\"===e)throw Error(n0`Incomplete escape "\"`);if("M"===n)throw Error(`Unsupported meta "${e}"`);if(2==[...e].length)return re(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function n9(e,t){return{type:"Assertion",kind:e,raw:t}}function n7(e){return{type:"Backreference",raw:e}}function re(e,t){return{type:"Character",value:e,raw:t}}function rt(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function rn(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function rr(e,t,n={}){return"keep"===e?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:n1(n.flags),raw:t}}function ri(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}let ra=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ro=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function rs(e){let t=null,n,r;if("{"===e[0]){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+i>1e5||a&&+a>1e5)throw Error("Quantifier value unsupported in Oniguruma");if((n=+i)>(r=void 0===a?+i:""===a?1/0:+a)&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if("possessive"===t)throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=+("+"===e[0]),r="?"===e[0]?1:1/0,t="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return{type:"Quantifier",kind:t,min:n,max:r,raw:e}}function rl(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function ru(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(1!==e.body.length)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}let rc=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function rh(e,t={}){var n;let r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=function(e,t={}){let n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if("string"!=typeof e)throw Error("String expected as pattern");let r=function(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!"imxDPSWy".includes(r))throw Error(`Invalid flag "${r}"`);if("y"===r){if(!/^y{[gw]}/.test(e.slice(n)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[n+2]?"grapheme":"word",n+=3;continue}t[({i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"})[r]]=!0}return t}(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX:()=>i.at(-1),numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(n8.lastIndex=0;s=n8.exec(e);){let t=function(e,t,n,r){let[i,a]=n;if("["===n||"[^"===n){let e=function(e,t,n){let r=[rt("^"===t[1],t)],i=1,a;for(n3.lastIndex=n;a=n3.exec(e);){let e=a[0];if("["===e[0]&&":"!==e[1])i++,r.push(rt("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===r.at(-1).type)r.push(re(93,e));else if(i--,r.push({type:"CharacterClassClose",raw:e}),!i)break}else{let t=function(e){if("\\"===e[0])return n4(e,{inCharClass:!0});if("["===e[0]){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!nZ.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return rn("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return"-"===e?{type:"CharacterClassHyphen",raw:e}:"&&"===e?{type:"CharacterClassIntersector",raw:e}:re(nY(e),e)}(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:n3.lastIndex||e.length}}(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===i){if("AbBGyYzZ".includes(a))return{token:n9(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:{type:"Subroutine",raw:n}}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:n7(n)}}if("K"===a)return{token:rr("keep",n)};if("N"===a||"R"===a)return{token:rn("newline",n,{negate:"N"===a})};if("O"===a)return{token:rn("any",n)};if("X"===a)return{token:rn("text_segment",n)};let e=n4(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===i){if("*"===a)return{token:function(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(""===r)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,l]=a,u=ra.has(n)?n.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case"error":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if("string"==typeof o)throw Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(2===a.length&&("number"==typeof s||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case"count":case"total_count":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(1===a.length&&("number"==typeof o||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(3!==a.length)throw Error(`Named callout must have three arguments "${a}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if("number"==typeof s||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if("string"==typeof l&&!/^[A-Za-z_]\w*$/.test(l))throw Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${u}"`)}return{type:"NamedCallout",kind:u,tag:r??null,arguments:i?.split(",")??null,raw:e}}(n)};if("(?{"===n)throw Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(")"!==t[r])throw Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:function(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";let i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),a=rl(n),o=rl(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(")"))return t.replaceCurrentModX(i),rr("flags",e,{flags:s});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,ri("group",e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,"("===n&&!e.captureGroup||"(?:"===n)return{token:ri("group",n)};if("(?>"===n)return{token:ri("atomic",n)};if("(?="===n||"(?!"===n||"(?<="===n||"(?<!"===n)return{token:ri("<"===n[2]?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if("("===n&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:ri("capturing",n,{..."("!==n&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if("(?~|"===n)throw Error(`Unsupported absence function kind "${n}"`);return{token:ri("absence_repeater",n)}}throw"(?("===n?Error(`Unsupported conditional "${n}"`):Error(`Invalid or unsupported group option "${n}"`)}if(")"===n){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:{type:"GroupClose",raw:n}}}if(e.getCurrentModX()){if("#"===n){let e=t.indexOf(`
|
|
33
|
+
`,r);return{lastIndex:-1===e?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return"."===n?{token:rn("dot",n)}:"^"===n||"$"===n?{token:n9(e.singleline?({"^":n0`\A`,$:n0`\Z`})[n]:n,n)}:"|"===n?{token:{type:"Alternator",raw:n}}:n6.test(n)?{tokens:function(e){let t,n=[],r=RegExp(n6,"gy");for(;t=r.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:i,max:a}=t.groups;if(+i>+a&&e.endsWith("?")){r.lastIndex--,n.push(rs(e.slice(0,-1)));continue}}}n.push(rs(e))}return n}(n)}:{token:re(nY(n),n)}}(a,e,s[0],n8.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),void 0!==t.lastIndex&&(n8.lastIndex=t.lastIndex)}let l=[],u=0;o.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++u:"("===e.raw&&l.push(e)}),u||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let c=u||l.length;return{tokens:o.map(e=>"EscapedNumber"===e.type?function(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&("0"!==i&&1===i.length||"0"!==i[0]&&+i<=t))return[n7(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t,r=o[e];if(0===e&&"8"!==r&&"9"!==r){if((t=parseInt(r,8))>127)throw Error(n0`Octal encoded byte above 177 unsupported "${n}"`)}else t=nY(r);a.push(re(t,(0===e?"\\":"")+r))}return a}(e,c):e).flat(),flags:r}}(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),a=(e,t)=>{let n=i.tokens[o.nextIndex];switch(o.parent=e,o.nextIndex++,n.type){case"Alternator":return rd();case"Assertion":return function({kind:e}){return rp(n1({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===n0`\B`||e===n0`\Y`})}(n);case"Backreference":return function({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,rf(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return rf(r)}return i(+r)}(n,o);case"Character":return rm(n.value,{useLastValid:!!t.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,t){let{tokens:n,walk:r}=e,i=e.parent,a=i.body.at(-1),o=n[e.nextIndex];if(!t.isCheckingRangeEnd&&a&&"CharacterClass"!==a.type&&"CharacterClassRange"!==a.type&&o&&"CharacterClassOpen"!==o.type&&"CharacterClassClose"!==o.type&&"CharacterClassIntersector"!==o.type){let e=r(i,{...t,isCheckingRangeEnd:!0});if("Character"===a.type&&"Character"===e.type)return i.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(a,e);throw Error("Invalid character class range")}return rm(nY("-"))}(o,t);case"CharacterClassOpen":return function({negate:e},t,n){let{tokens:r,walk:i}=t,a=r[t.nextIndex],o=[ry()],s=rI(a);for(;"CharacterClassClose"!==s.type;){if("CharacterClassIntersector"===s.type)o.push(ry()),t.nextIndex++;else{let e=o.at(-1);e.body.push(i(e,n))}s=rI(r[t.nextIndex],a)}let l=ry({negate:e});return 1===o.length?l.body=o[0].body:(l.kind="intersection",l.body=o.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(n,o,t);case"CharacterSet":return function({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if("property"===e){let r=rL(n);if(!nZ.has(r)||o?.has(r))return rC(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o});e="posix",n=r}return"posix"===e?function(e,t){let n=!!t?.negate;if(!nZ.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}(n,{negate:t}):rb(e,{negate:t})}(n,o);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:n1(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(n.kind,{flags:n.flags});case"GroupOpen":return function(e,t,n){var r,i;let{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:u}=t,c=function({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":var a="repeater";!1;return{type:"AbsenceFunction",kind:a,body:rS(void 0)};case"atomic":return rk({atomic:!0});case"capturing":return rg(i,{name:n});case"group":return rk({flags:e});case"lookahead":case"lookbehind":return rv({behind:"lookbehind"===t,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}(e),h="AbsenceFunction"===c.type,d=rE(c),p=d&&c.negate;if("CapturingGroup"===c.type&&(o.push(c),c.name&&(r=c.name,i=[],s.has(r)||s.set(r,i),s.get(r)).push(c)),h&&n.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let f=rN(a[t.nextIndex]);for(;"GroupClose"!==f.type;){if("Alternator"===f.type)c.body.push(rd()),t.nextIndex++;else{let e=c.body.at(-1),t=u(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||d,isInNegLookbehind:n.isInNegLookbehind||p});if(e.body.push(t),(d||n.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(rx(t)||"CapturingGroup"===t.type)throw Error(e)}else if(rx(t)||rE(t)&&t.negate)throw Error(e)}}f=rN(a[t.nextIndex])}return t.nextIndex++,c}(n,o,t);case"NamedCallout":var r,a;return r=n.kind,a=n.tag,{type:"NamedCallout",kind:r,tag:a,arguments:n.arguments};case"Quantifier":return function({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!rc.has(a.type))throw Error("Quantifier requires a repeatable token");let o=rw(e,t,n,a);return i.body.pop(),o}(n,o);case"Subroutine":return function({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,(i=({"":e,"+":r+e,"-":r+1-e})[a.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===i&&(i=0);let o=rA(i);return r.push(o),o}(n,o);default:throw Error(`Unexpected token type "${n.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:a},s=(n={type:"Flags",...i.flags},{type:"Regex",body:rS(void 0),flags:n}),l=s.body[0];for(;o.nextIndex<i.tokens.length;){let e=a(l,{});"Alternative"===e.type?(s.body.push(e),l=e):l.body.push(e)}let{capturingGroups:u,hasNumberedRef:c,namedGroupsByName:h,subroutines:d}=o;if(c&&h.size&&!r.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of d)if("number"==typeof e){if(e>u.length)throw Error("Subroutine uses a group number that's not defined");e&&(u[e-1].isSubroutined=!0)}else if(h.has(e)){if(h.get(e).length>1)throw Error(n0`Subroutine uses a duplicate group name "\g<${e}>"`);h.get(e)[0].isSubroutined=!0}else throw Error(n0`Subroutine uses a group name that's not defined "\g<${e}>"`);return s}function rd(e){return{type:"Alternative",body:r_(e?.body)}}function rp(e,t){let n={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(n.negate=!!t?.negate),n}function rf(e,t){let n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function rg(e,t){var n;let r={name:void 0,isSubroutined:!1,...t};if(void 0!==r.name&&(n=r.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(n)))throw Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:rS(t?.body)}}function rm(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function ry(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:r_(e?.body)}}function rb(e,t){let n=!!t?.negate,r={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(r.negate=n),"text_segment"!==e&&("newline"!==e||n)||(r.variableLength=!0),r}function rk(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:rS(e?.body)}}function rv(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:rS(e?.body)}}function rw(e,t,n,r){if(t>n)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function rA(e){return{type:"Subroutine",ref:e}}function rC(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(rL(e));if(!r){if(n.normalizeUnknownPropertyNames)r=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(n0`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function rS(e){if(void 0===e)e=[rd()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function r_(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function rx(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function rE(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function rL(e){return e.replace(/[- _]+/g,"").toLowerCase()}function rI(e,t){return n1(e,`${t?.type==="Character"&&93===t.value?"Empty":"Unclosed"} character class`)}function rN(e){return n1(e,"Unclosed group")}function rT(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,l=null){let u=0,c=!1,h={node:a,parent:o,key:s,container:l,root:e,remove(){rP(l).splice(Math.max(0,rR(s)+u),1),u--,c=!0},removeAllNextSiblings:()=>rP(l).splice(rR(s)+1),removeAllPrevSiblings(){let e=rR(s)+u;return u-=e,rP(l).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;l?l[Math.max(0,rR(s)+u)]=e:n1(o,"Can't replace root node")[s]=e,n&&i(e,o,s,l),c=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(rP(l).splice(Math.max(0,rR(s)+u),1,...e),u+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,rR(s)+n+t,l)}c=!0},skip(){c=!0}},{type:d}=a,p=t["*"],f=t[d],g="function"==typeof p?p:p?.enter,m="function"==typeof f?f:f?.enter;if(g?.(h,n),m?.(h,n),!c)switch(d){case"AbsenceFunction":case"CapturingGroup":case"Group":case"Alternative":case"CharacterClass":case"LookaroundAssertion":r(a.body,a);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(a.min,a,"min"),i(a.max,a,"max");break;case"Quantifier":i(a.body,a,"body");break;case"Regex":r(a.body,a),i(a.flags,a,"flags");break;default:throw Error(`Unexpected node type "${d}"`)}return f?.exit?.(h,n),p?.exit?.(h,n),u}return i(e),e}function rP(e){if(!Array.isArray(e))throw Error("Container expected");return e}function rR(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let rM=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,rO=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function r$(e,t,n,r){let i=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1],o=0,s="";for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===rO.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?rO.CHAR_CLASS:rO.DEFAULT,negated:a[a.length-1]}):s+=n;continue}"["===e[0]?(o++,a.push("^"===e[1])):"]"===e&&o&&(o--,a.pop()),s+=e}return s}function rB(e,t,n){return!!function(e,t,n=0,r){let i;if(!RegExp(t,"su").test(e))return null;let a=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let o=0;for(;i=a.exec(e);){let{0:e,groups:{$skip:t}}=i;if(!t&&(!r||r===rO.DEFAULT==!o))return i;"["===e?o++:"]"===e&&o&&o--,a.lastIndex==i.index&&a.lastIndex++}return null}(e,t,0,n)}let rD=RegExp(String.raw`(?<noncapturingStart>${rM})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),rU=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,rF=RegExp(String.raw`
|
|
34
|
+
\\(?: \d+
|
|
35
|
+
| c[A-Za-z]
|
|
36
|
+
| [gk]<[^>]+>
|
|
37
|
+
| [pPu]\{[^\}]+\}
|
|
38
|
+
| u[A-Fa-f\d]{4}
|
|
39
|
+
| x[A-Fa-f\d]{2}
|
|
40
|
+
)
|
|
41
|
+
| \((?: \? (?: [:=!>]
|
|
42
|
+
| <(?:[=!]|[^>]+>)
|
|
43
|
+
| [A-Za-z\-]+:
|
|
44
|
+
| \(DEFINE\)
|
|
45
|
+
))?
|
|
46
|
+
| (?<qBase>${rU})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
47
|
+
| \\?.
|
|
48
|
+
`.replace(/\s+/g,""),"gsu"),rj=String.raw,rG=rj`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,rz=rj`\(\?R=(?<rDepth>[^\)]+)\)|${rG}`,rq=rj`\(\?<(?![=!])(?<captureName>[^>]+)>`,rW=rj`${rq}|(?<unnamed>\()(?!\?)`,rH=RegExp(rj`${rq}|${rz}|\(\?|\\?.`,"gsu"),rV="Cannot use multiple overlapping recursions";function rX(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e*=1)<2||e>100)throw Error(t)}function rK(e,t,n,r,i,a,o){let s=new Set;r&&r$(e+t,rq,({groups:{captureName:e}})=>{s.add(e)},rO.DEFAULT);let l=[n,r?s:null,i,a,o];return`${e}${rQ(`(?:${e}`,"forward",...l)}(?:)${rQ(`${t})`,"backward",...l)}${t}`}function rQ(e,t,n,r,i,a,o){let s=e=>"forward"===t?e+2:n-e+2-1,l="";for(let t=0;t<n;t++){let n=s(t);l+=r$(e,rj`${rW}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:l}})=>{if(l&&r&&!r.has(l))return e;let u=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),function(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}(i,n),s?e:`(?<${t}${u}>`}return rj`\k<${l}${u}>`},rO.DEFAULT)}return l}function rJ(e,t,n,r,i,a){if(e.size&&r){let o=0;r$(t,rW,()=>o++,rO.DEFAULT);let s=a-o+i,l=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,u=t>s+o?t+r:t,c=[];for(let t of e)if(t<=s)c.push(t);else if(t>s+o+i)c.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)c.push(t+o*e);else for(let e=0;e<=n;e++)c.push(t+a+i*e);l.set(u,c)}),l}return e}var rY=String.fromCodePoint,rZ=String.raw,r0={},r1=globalThis.RegExp;function r2(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function r5(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}r0.flagGroups=(()=>{try{new r1("(?i:)")}catch{return!1}return!0})(),r0.unicodeSets=(()=>{try{new r1("[[]]","v")}catch{return!1}return!0})(),r0.bugFlagVLiteralHyphenIsRange=!!r0.unicodeSets&&(()=>{try{new r1(rZ`[\d\-a]`,"v")}catch{return!0}return!1})(),r0.bugNestedClassIgnoresNegation=r0.unicodeSets&&new r1("[[^a]]","v").test("a");var r6={ES2025:2025,ES2024:2024,ES2018:2018},r8={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function r3(e={}){if("[object Object]"!==({}).toString.call(e))throw Error("Unexpected options");if(void 0!==e.target&&!r8[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return"auto"===t.target&&(t.target=r0.flagGroups?"ES2025":r0.unicodeSets?"ES2024":"ES2018"),t}var r4=new Set([rY(304),rY(305)]),r9=rZ`[\p{L}\p{M}\p{N}\p{Pc}]`;function r7(e){if(r4.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=ii.get(n),a=it.get(n),o=ir.get(n);return 1==[...r].length&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var ie=new Map(`C Other
|
|
49
|
+
Cc Control cntrl
|
|
50
|
+
Cf Format
|
|
51
|
+
Cn Unassigned
|
|
52
|
+
Co Private_Use
|
|
53
|
+
Cs Surrogate
|
|
54
|
+
L Letter
|
|
55
|
+
LC Cased_Letter
|
|
56
|
+
Ll Lowercase_Letter
|
|
57
|
+
Lm Modifier_Letter
|
|
58
|
+
Lo Other_Letter
|
|
59
|
+
Lt Titlecase_Letter
|
|
60
|
+
Lu Uppercase_Letter
|
|
61
|
+
M Mark Combining_Mark
|
|
62
|
+
Mc Spacing_Mark
|
|
63
|
+
Me Enclosing_Mark
|
|
64
|
+
Mn Nonspacing_Mark
|
|
65
|
+
N Number
|
|
66
|
+
Nd Decimal_Number digit
|
|
67
|
+
Nl Letter_Number
|
|
68
|
+
No Other_Number
|
|
69
|
+
P Punctuation punct
|
|
70
|
+
Pc Connector_Punctuation
|
|
71
|
+
Pd Dash_Punctuation
|
|
72
|
+
Pe Close_Punctuation
|
|
73
|
+
Pf Final_Punctuation
|
|
74
|
+
Pi Initial_Punctuation
|
|
75
|
+
Po Other_Punctuation
|
|
76
|
+
Ps Open_Punctuation
|
|
77
|
+
S Symbol
|
|
78
|
+
Sc Currency_Symbol
|
|
79
|
+
Sk Modifier_Symbol
|
|
80
|
+
Sm Math_Symbol
|
|
81
|
+
So Other_Symbol
|
|
82
|
+
Z Separator
|
|
83
|
+
Zl Line_Separator
|
|
84
|
+
Zp Paragraph_Separator
|
|
85
|
+
Zs Space_Separator
|
|
86
|
+
ASCII
|
|
87
|
+
ASCII_Hex_Digit AHex
|
|
88
|
+
Alphabetic Alpha
|
|
89
|
+
Any
|
|
90
|
+
Assigned
|
|
91
|
+
Bidi_Control Bidi_C
|
|
92
|
+
Bidi_Mirrored Bidi_M
|
|
93
|
+
Case_Ignorable CI
|
|
94
|
+
Cased
|
|
95
|
+
Changes_When_Casefolded CWCF
|
|
96
|
+
Changes_When_Casemapped CWCM
|
|
97
|
+
Changes_When_Lowercased CWL
|
|
98
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
99
|
+
Changes_When_Titlecased CWT
|
|
100
|
+
Changes_When_Uppercased CWU
|
|
101
|
+
Dash
|
|
102
|
+
Default_Ignorable_Code_Point DI
|
|
103
|
+
Deprecated Dep
|
|
104
|
+
Diacritic Dia
|
|
105
|
+
Emoji
|
|
106
|
+
Emoji_Component EComp
|
|
107
|
+
Emoji_Modifier EMod
|
|
108
|
+
Emoji_Modifier_Base EBase
|
|
109
|
+
Emoji_Presentation EPres
|
|
110
|
+
Extended_Pictographic ExtPict
|
|
111
|
+
Extender Ext
|
|
112
|
+
Grapheme_Base Gr_Base
|
|
113
|
+
Grapheme_Extend Gr_Ext
|
|
114
|
+
Hex_Digit Hex
|
|
115
|
+
IDS_Binary_Operator IDSB
|
|
116
|
+
IDS_Trinary_Operator IDST
|
|
117
|
+
ID_Continue IDC
|
|
118
|
+
ID_Start IDS
|
|
119
|
+
Ideographic Ideo
|
|
120
|
+
Join_Control Join_C
|
|
121
|
+
Logical_Order_Exception LOE
|
|
122
|
+
Lowercase Lower
|
|
123
|
+
Math
|
|
124
|
+
Noncharacter_Code_Point NChar
|
|
125
|
+
Pattern_Syntax Pat_Syn
|
|
126
|
+
Pattern_White_Space Pat_WS
|
|
127
|
+
Quotation_Mark QMark
|
|
128
|
+
Radical
|
|
129
|
+
Regional_Indicator RI
|
|
130
|
+
Sentence_Terminal STerm
|
|
131
|
+
Soft_Dotted SD
|
|
132
|
+
Terminal_Punctuation Term
|
|
133
|
+
Unified_Ideograph UIdeo
|
|
134
|
+
Uppercase Upper
|
|
135
|
+
Variation_Selector VS
|
|
136
|
+
White_Space space
|
|
137
|
+
XID_Continue XIDC
|
|
138
|
+
XID_Start XIDS`.split(/\s/).map(e=>[rL(e),e])),it=new Map([["s",rY(383)],[rY(383),"s"]]),ir=new Map([[rY(223),rY(7838)],[rY(107),rY(8490)],[rY(229),rY(8491)],[rY(969),rY(8486)]]),ii=new Map([io(453),io(456),io(459),io(498),...is(8072,8079),...is(8088,8095),...is(8104,8111),io(8124),io(8140),io(8188)]),ia=new Map([["alnum",rZ`[\p{Alpha}\p{Nd}]`],["alpha",rZ`\p{Alpha}`],["ascii",rZ`\p{ASCII}`],["blank",rZ`[\p{Zs}\t]`],["cntrl",rZ`\p{Cc}`],["digit",rZ`\p{Nd}`],["graph",rZ`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",rZ`\p{Lower}`],["print",rZ`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",rZ`[\p{P}\p{S}]`],["space",rZ`\p{space}`],["upper",rZ`\p{Upper}`],["word",rZ`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",rZ`\p{AHex}`]]);function io(e){let t=rY(e);return[t.toLowerCase(),t]}function is(e,t){return(function(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n})(e,t).map(e=>io(e))}var il=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),iu={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if("repeater"===i){let e=rk();e.body[0].body.push(rv({negate:!0,body:r}),rC("Any"));let i=rk();i.body[0].body.push(rw("greedy",0,1/0,e)),n(iA(i,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>"flags"===e.kind);for(let e=n+1;e<t.body.length;e++)r5(r,t.body[e],[]).push(...i)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=im(t.get(e));if(n){let t=rk({flags:n});t.body[0].body=e.body,e.body=[iA(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:l,negate:u}=e,{asciiWordBoundaries:c,avoidSubclass:h,supportedGNodes:d,wordIsAscii:p}=s;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if("line_end"===l)o(iA(rv({body:[rd({body:[rp("string_end")]}),rd({body:[rm(10)]})]}),t));else if("line_start"===l)o(iA(ik(rZ`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(d.has(e))i.flags.sticky=!0,a();else{var f;let e,i=r[n-1];if(i&&((e=["Character","CharacterClass","CharacterSet"]).includes((f=i).type)||"Quantifier"===f.type&&f.min&&e.includes(f.body.type)))o(iA(rv({negate:!0}),t));else if(h)throw Error(rZ`Uses "\G" in a way that requires a subclass`);else o(iw(rp("string_start"),t)),s.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)o(iA(ik(rZ`(?=\n?\z)`),t));else if("word_boundary"===l){if(!p&&!c){let e=`(?:(?<=${r9})(?!${r9})|(?<!${r9})(?=${r9}))`,n=`(?:(?<=${r9})(?=${r9})|(?<!${r9})(?!${r9}))`;o(iA(ik(u?n:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||ib(n)||(e.ref=n=ig(n,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!ib(r)&&(e.name=r=ig(r,t)),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){"intersection"===t.kind&&n(iA(ry({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:l,negate:u,value:c}=e;if(a&&("digit"===l||"digit"===c))return void n(iw(rb("digit",{negate:u}),t));if(o&&("space"===l||"space"===c))return void n(iA(iv(ik("[ -\r ]"),u),t));if(s&&("word"===l||"word"===c))return void n(iw(rb("word",{negate:u}),t));if("any"===l)n(iw(rC("Any"),t));else if("digit"===l)n(iw(rC("Nd",{negate:u}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===r)throw Error(rZ`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",a=rZ`\p{RI}{2}|${e}(?:\u200D${e})*`;n(iA(ik(rZ`(?>\r\n|${i?rZ`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)n(iw(rC("AHex",{negate:u}),t));else if("newline"===l)n(iA(ik(u?"[^\n]":"(?>\r\n?|[\n\v\f
\u2028\u2029])"),t));else if("posix"===l)if(i||"graph"!==c&&"print"!==c)n(iA(iv(ik(ia.get(c)),u),t));else{if("strict"===r)throw Error(`POSIX class "${c}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[c];u&&(e=`\0-${rY(e.codePointAt(0)-1)}${rY(e.codePointAt(2)+1)}-\u{10FFFF}`),n(iA(ik(`[${e}]`),t))}else if("property"===l)ie.has(rL(c))||(e.key="sc");else if("space"===l)n(iw(rC("space",{negate:u}),t));else if("word"===l)n(iA(iv(ik(r9),u),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:l}=e;if("flags"===s)if(l.enable||l.disable){let e=rk({flags:l});e.body[0].body=o(),i(iA(e,t),{traverse:!0})}else r();else if("keep"===s){let e=n.body[0],r=1===n.body.length&&ru(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(rZ`Uses "\K" in a way that's unsupported`);let o=rv({behind:!0});o.body[0].body=a(),i(iA(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;"lookbehind"===n&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if("fail"===r)n(iA(rv({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=rk();t.body[0].body.push(e.body),e.body=iA(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let n=t.find(e=>"search_start"===e.kind||function(e,t){let n={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===n.negate||e.negate===n.negate)&&1===e.body.length&&ru(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!n)return null;if("search_start"===n.kind)return n;if("LookaroundAssertion"===n.type)return n.body[0].body[0];if("CapturingGroup"===n.type||"Group"===n.type){let t=[];for(let r of n.body){let n=e(r.body);if(!n)return null;Array.isArray(n)?t.push(...n):t.push(n)}return t}return null}(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if("strict"===t&&n&&r)throw Error(rZ`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||ib(n)||(e.ref=n=ig(n,t))}},ic={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:l}){let u=i.get(e);if(u&&s.has(e.number)){let r=iw(ip(e.number),t);l.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&r5(o,e.name,[]);let c=o.get(e.name??e.number);for(let t=0;t<c.length;t++){let n=c[t];if(u===n.node||u&&u===n.origin||e===n.origin){c.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:u}),e.name&&o.get(e.name).push({node:e,origin:u}),e.name){let t=r5(a,e.name,new Map),n=!1;if(u)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=r2(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&("CapturingGroup"!==n.type||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=0===a,l=s?ip(0):function e(t,n,r,i){let a=Array.isArray(t)?[]:{};for(let[o,s]of Object.entries(t))"parent"===o?a.parent=Array.isArray(r)?i:r:s&&"object"==typeof s?a[o]=e(s,n,a,r):("type"===o&&"CapturingGroup"===s&&n.set(a,n.get(t)??t),a[o]=s);return a}(o,r.groupOriginByCopy,null),u=l;if(!s){var c,h;let e=im(function(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}(o,e=>"Group"===e.type&&!!e.flags)),t=e?r2(r.globalFlags,e):r.globalFlags;c=t,h=r.currentFlags,(c.dotAll!==h.dotAll||c.ignoreCase!==h.ignoreCase)&&(u=rk({flags:function({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),e&&t||(n.disable={},e||(n.disable.dotAll=!0),t||(n.disable.ignoreCase=!0)),n}(t)})).body[0].body.push(l)}n(iA(u,t),{traverse:!s})}},ih={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let n=t;do{if("Regex"===n.type)return!1;if("Alternative"===n.type)continue;if(n===e)return!1;for(let t of iy(n.parent)){if(t===n)break;if(t===e||function e(t,n){for(let r of iy(t)??[])if(r===n||e(r,n))return!0;return!1}(t,e))return!0}}while(n=n.parent)throw Error("Unexpected path")})(t,e));i.length?i.length>1?n(iA(rk({atomic:!0,body:i.reverse().map(e=>rd({body:[rf(e.number)]}))}),t)):e.ref=i[0].number:n(iA(rv({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=rg();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function id(e){rT(e,{"*"({node:e,parent:t}){e.parent=t}})}function ip(e){let t=rA(e);return t.isRecursive=!0,t}function ig(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function im(e){let t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable)?n:null}function iy(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function ib(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ik(e,t){let n=rh(e,{...t,unicodePropertyMap:ie}).body;return n.length>1||n[0].body.length>1?rk({body:n}):n[0].body[0]}function iv(e,t){return e.negate=t,e}function iw(e,t){return e.parent=t,e}function iA(e,t){return id(e),e.parent=t,e}var iC={"*":{enter({node:e},t){if(iR(e)){let n=t.getCurrentModI();t.pushModI(e.flags?r2({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){iR(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){iN(rY(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),iT(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&il.has(e.value)&&t.setHasCasedChar()}},iS={Alternative:({body:e},t,n)=>e.map(n).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?rZ`\B`:rZ`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){let n=rY(e),r=iP(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&iN(n)){let e=r7(n);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if("intersection"===r&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");r0.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(iM)&&(o=[rm(45),...o.filter(e=>!iM(e))]);let s=()=>`[${i?"^":""}${o.map(n).join("intersection"===r?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||r0.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let r=rk(),i=r.body[0];return r.parent=a,i.parent=r,e.body=o=o.filter(e=>!t.includes(e)),o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=rd({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let l=o[0];if("union"===r&&!i&&l&&((!t.useFlagV||!t.verbose)&&"union"===a.kind&&!(r0.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===a.kind&&1===o.length&&"CharacterClassRange"!==l.type))return o.map(n).join("");if(!t.useFlagV&&"CharacterClass"===a.type)throw Error("Uses nested character class in a way that requires min target ES2024");return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=iP(n,i),o=iP(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:null===r?n.push(t[e]):(n.push([r,t[e]]),r=null);return n})(iT(e)).forEach(e=>{s.add(Array.isArray(e)?`${iP(e[0],i)}-${iP(e[1],i)}`:iP(e,i))}),`${a}-${o}${[...s].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if("dot"===e)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":rZ`[^\n]`;if("digit"===e)return t?rZ`\D`:rZ`\d`;if("property"===e){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&il.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?rZ`\P`:rZ`\p`}{${r?`${r}=`:""}${n}}`}if("word"===e)return t?rZ`\W`:rZ`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=r2(o,n));let s=t.map(a).join("|"),l=i.verbose||1!==t.length||"Quantifier"===r.type||e||i.useFlagMods&&n?`(?${function(e,t,n){if(e)return">";let r="";if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(n?"-":"")+(n?.ignoreCase?"i":"")+(n?.dotAll?"s":"")}return`${r}:`}(e,n,i.useFlagMods)}${s})`:s;return i.currentFlags=o,l},LookaroundAssertion({body:e,kind:t,negate:n},r,i){let a=`${"lookahead"===t?"":"<"}${n?"!":"="}`;return`(?${a}${e.map(i).join("|")})`},Quantifier:(e,t,n)=>n(e.body)+function({kind:e,max:t,min:n}){return(n||1!==t?n||t!==1/0?1===n&&t===1/0?"+":n===t?`{${n}}`:`{${n},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return 0===t?`(?R=${r})`:rZ`\g<${t}&R=${r}>`}},i_=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),ix=new Set(["-","\\","]","^","["]),iE=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),iL=new Map([[9,rZ`\t`],[10,rZ`\n`],[11,rZ`\v`],[12,rZ`\f`],[13,rZ`\r`],[8232,rZ`\u2028`],[8233,rZ`\u2029`],[65279,rZ`\uFEFF`]]),iI=/^\p{Cased}$/u;function iN(e){return iI.test(e)}function iT(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(65535===i||i>=131071)||65536===r&&i>=131071)return a;for(let e=r;e<=i;e++){let t=rY(e);if(!iN(t))continue;let o=r7(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function iP(e,{escDigit:t,inCharClass:n,useFlagV:r}){var i;if(iL.has(e))return iL.get(e);if(e<32||e>126&&e<160||e>262143||t&&(i=e)>47&&i<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let a=rY(e);return((n?r?iE:ix:i_).has(a)?"\\":"")+a}function iR({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function iM({type:e,value:t}){return"Character"===e&&45===t}var iO=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error("Cannot provide options when copying a regexp");super(t,n),this.#n=t.source,t instanceof e&&(this.#e=t.#e,this.#r=t.#r,this.#i=t.#i,this.rawOptions=t.rawOptions)}else{const e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#n=t,this.#e=function(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)r5(n,t,{}).transferTo=e;return n}(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if("clip_search"===this.#i&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(function(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){let t;this.#t.lastIndex=this.lastIndex;let n=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;let r=[...n];n.length=1,this.hasIndices&&(t=[...n.indices],n.indices.length=1);let i=[0];for(let e=1;e<r.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(n.length),n.push(r[e]),this.hasIndices&&n.indices.push(t[e])),o&&void 0!==r[e]){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(n[a]=r[e],this.hasIndices&&(n.indices[a]=t[e]),n.groups){this.#r||(this.#r=function(e){let t,n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map,i=0,a=0;for(;t=n.exec(e);){let{0:e,groups:{capture:n,name:o}}=t;"["===e?i++:i?"]"===e&&i--:n&&(a++,o&&r.set(a,o))}return r}(this.source));let i=this.#r.get(o);i&&(n.groups[i]=r[e],this.hasIndices&&(n.indices.groups[i]=t[e]))}}}return n}};class i${constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r="string"==typeof e?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}}async function iB({themes:t,langs:n,preferredHighlighter:i="shiki-js"}){let a=!function(e=r){return null!=e&&"then"in e}(r??=nJ({themes:[],langs:["text"],engine:"shiki-wasm"===i?nQ(e.A(14467)):function(e={}){let t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=e=>{let n;return(n=function(e,t){var n;let r,i,a,o,s=r3(t),l=(n=rh(e,{flags:s.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:s.rules.captureGroup,singleline:s.rules.singleline},skipBackrefValidation:s.rules.allowOrphanBackrefs,unicodePropertyMap:ie}),r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...{accuracy:s.accuracy,asciiWordBoundaries:s.rules.asciiWordBoundaries,avoidSubclass:s.avoidSubclass,bestEffortTarget:s.target}},id(n),i={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:r6[r.bestEffortTarget]>=r6.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:n.flags.digitIsAscii,spaceIsAscii:n.flags.spaceIsAscii,wordIsAscii:n.flags.wordIsAscii},rT(n,iu,i),o={currentFlags:a={dotAll:n.flags.dotAll,ignoreCase:n.flags.ignoreCase},prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:i.subroutineRefMap},rT(n,ic,o),rT(n,ih,{groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer}),n._originMap=o.groupOriginByCopy,n._strategy=i.strategy,n),u=function(e,t){let n=r3(t),r=r6[n.target]>=r6.ES2024,i=r6[n.target]>=r6.ES2025,a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error("Invalid recursionLimit; use 2-20");let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];rT(e,iC,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},u=e,c={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function h(e){return c.lastNode=u,u=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(iS[e.type],`Unexpected node type "${e.type}"`)(e,c,h)}let d={pattern:e.body.map(h).join("|"),flags:h(e.flags),options:{...e.options}};return r||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],c.captureMap.forEach((e,t)=>{e.hidden&&d._hiddenCaptures.push(t),e.transferTo&&r5(d._captureTransfers,e.transferTo,[]).push(t)}),d}(l,s),c=function(e,t){let n,{hiddenCaptures:r,mode:i}={hiddenCaptures:[],mode:"plugin",...t},a=t?.captureTransfers??new Map;if(!RegExp(rz,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:r};if("plugin"===i&&rB(e,rj`\(\?\(DEFINE\)`,rO.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let o=[],s=rB(e,rj`\\[1-9]`,rO.DEFAULT),l=new Map,u=[],c=!1,h=0,d=0;for(rH.lastIndex=0;n=rH.exec(e);){let{0:t,groups:{captureName:p,rDepth:f,gRNameOrNum:g,gRDepth:m}}=n;if("["===t)h++;else if(h)"]"===t&&h--;else if(f){if(rX(f),c)throw Error(rV);if(s)throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,n.index),l=e.slice(rH.lastIndex);if(rB(l,rz,rO.DEFAULT))throw Error(rV);let u=f-1;e=rK(t,l,u,!1,r,o,d),a=rJ(a,t,u,o.length,0,d);break}else if(g){rX(m);let h=!1;for(let e of u)if(e.name===g||e.num===+g){if(h=!0,e.hasRecursedWithin)throw Error(rV);break}if(!h)throw Error(rj`Recursive \g cannot be used outside the referenced group "${"external"===i?g:rj`\g<${g}&R=${m}>`}"`);let p=l.get(g),f=function(e,t){let n,r=/\\?./gsu;r.lastIndex=t;let i=e.length,a=0,o=1;for(;n=r.exec(e);){let[e]=n;if("["===e)a++;else if(a)"]"===e&&a--;else if("("===e)o++;else if(")"===e&&!--o){i=n.index;break}}return e.slice(t,i)}(e,p);if(s&&rB(f,rj`${rq}|\((?!\?)`,rO.DEFAULT))throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let y=e.slice(p,n.index),b=f.slice(y.length+t.length),k=o.length,v=m-1,w=rK(y,b,v,!0,r,o,d);a=rJ(a,y,v,o.length-k,k,d);let A=e.slice(0,p),C=e.slice(p+f.length);e=`${A}${w}${C}`,rH.lastIndex+=w.length-t.length-y.length-b.length,u.forEach(e=>e.hasRecursedWithin=!0),c=!0}else if(p)d++,l.set(String(d),rH.lastIndex),l.set(p,rH.lastIndex),u.push({num:d,name:p});else if("("===t[0]){let e="("===t;e&&(d++,l.set(String(d),rH.lastIndex)),u.push(e?{num:d}:{})}else")"===t&&u.pop()}return r.push(...o),{pattern:e,captureTransfers:a,hiddenCaptures:r}}(u.pattern,{captureTransfers:u._captureTransfers,hiddenCaptures:u._hiddenCaptures,mode:"external"}),h=function(e,t){let n,r=t?.hiddenCaptures??[],i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:r};let a="(?:(?=(",o=[0],s=[],l=0,u=0,c=NaN;do{let t;n=!1;let h=0,d=0,p=!1;for(rD.lastIndex=Number.isNaN(c)?0:c+a.length;t=rD.exec(e);){let{0:f,index:g,groups:{capturingStart:m,noncapturingStart:y}}=t;if("["===f)h++;else if(h)"]"===f&&h--;else if("(?>"!==f||p){if(p&&y)d++;else if(m)p?d++:(l++,o.push(l+u));else if(")"===f&&p){if(!d){let t=l+ ++u;e=`${e.slice(0,c)}${a}${e.slice(c+3,g)}))<$$${t}>)${e.slice(g+1)}`,n=!0,s.push(t);for(let e=0;e<r.length;e++)r[e]>=t&&r[e]++;if(i.size){let e=new Map;i.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),i=e}break}d--}}else c=g,p=!0}}while(n)return r.push(...s),{pattern:e=r$(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>o.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${o[n]}`}return`\\${n}`},rO.DEFAULT),captureTransfers:i,hiddenCaptures:r}}(function(e){let t;if(!RegExp(`${rU}\\+`).test(e))return{pattern:e};let n=[],r=null,i=null,a="",o=0;for(rF.lastIndex=0;t=rF.exec(e);){let{0:u,index:c,groups:{qBase:h,qMod:d,invalidQ:p}}=t;if("["===u)o||(i=c),o++;else if("]"===u)o?o--:i=null;else if(!o)if("+"===d&&a&&!a.startsWith("(")){if(p)throw Error(`Invalid quantifier "${u}"`);let t=-1;if(/^\{\d+\}$/.test(h)){var s,l;s=e,l=c+h.length,e=s.slice(0,l)+""+s.slice(l+d.length)}else{if(")"===a||"]"===a){let t=")"===a?r:i;if(null===t)throw Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${h})${e.slice(c+u.length)}`}else e=`${e.slice(0,c-a.length)}(?>${a}${h})${e.slice(c+u.length)}`;t+=4}rF.lastIndex+=t}else"("===u[0]?n.push(c):")"===u&&(r=n.length?n.pop():null);a=u}return{pattern:e}}(c.pattern).pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),d={pattern:h.pattern,flags:`${s.hasIndices?"d":""}${s.global?"g":""}${u.flags}${u.options.disable.v?"u":"v"}`};if(s.avoidSubclass){if(s.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=h.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(h.captureTransfers),n=l._strategy,r=d.pattern.length>=s.lazyCompileLength;(e.length||t.length||n||r)&&(d.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...n&&{strategy:n},...r&&{lazyCompile:r}})}return d}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...{target:t.target}})).options?new iO(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)},{createScanner:e=>new i$(e,t),createString:e=>({content:e})}}()}))?r:await r;r=a;let o=[];for(let e of n){if("text"===e||"ansi"===e)continue;let t=E(e);"then"in t?o.push(t):v(t,a)}let s=[];for(let e of t){let t=n$(e);"then"in t?s.push(t):g(t,r)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(e=>{v(e,a)}),Promise.all(s).then(e=>{g(e,a)})]),a}function iD(e=u){let t=[];return"string"==typeof e?t.push(e):(t.push(e.dark),t.push(e.light)),t}function iU(e){for(let t of e)if(!h.has(t))return!1;return!0}function iF(e,t){return null==e||null==t||"string"==typeof e||"string"==typeof t?e===t:e.dark===t.dark&&e.light===t.light}nB("pierre-dark",async()=>{let{default:t}=await e.A(2414);return{...t,name:"pierre-dark"}}),nB("pierre-light",async()=>{let{default:t}=await e.A(88273);return{...t,name:"pierre-light"}}),e.s(["getHighlighterIfLoaded",0,function(){if(null!=r&&!("then"in r))return r},"getSharedHighlighter",0,iB],30891),e.s(["getThemes",0,iD],51045),e.s(["hasResolvedThemes",0,iU],16049),e.s(["areThemesEqual",0,iF],8456);let ij=new Map,iG={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function iz(e){if(ij.has(e))return ij.get(e)??"text";if(null!=iG[e])return iG[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(null!=t){if(ij.has(t[1]))return ij.get(t[1])??"text";if(null!=iG[t[1]])return iG[t[1]]??"text"}let n=e.match(/\.([^.]+)$/)?.[1]??"";return ij.has(n)?ij.get(n)??"text":iG[n]??"text"}function iq(){return 0}function iW(){return Object.fromEntries(ij)}function iH(e){return(e.lang??iz(e.name))==="text"}function iV({lines:e,startingLine:t=0,totalLines:n=1/0,callback:r}){let i,a=Math.min(t+n,e.length),o=""===(i=e.at(-1))||"\n"===i||"\r\n"===i||"\r"===i?Math.max(0,e.length-2):e.length-1;for(let n=t;n<a;n++){let t=n===o;if(!0===r({lineIndex:n,lineNumber:n+1,content:e[n],isLastLine:t})||t)break}}function iX(e){return e.replace(/\n$|\r\n$/,"")}function iK(e){return{type:"text",value:e}}function iQ({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function iJ(e){let t=e.children[0];for(;null!=t;){if("element"===t.type&&"code"===t.tagName)return t;t="children"in t?t.children[0]:null}}e.s(["getCustomExtensionsMap",0,iW,"getCustomExtensionsVersion",0,iq,"getFiletypeFromFileName",0,iz],35864),e.s(["isFilePlainText",0,iH],82189),e.s(["iterateOverFile",0,iV],6609),e.s(["cleanLastNewline",0,iX],17443),e.s(["createGutterGap",0,function(e,t,n){return iQ({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":"annotation"===t?void 0:e,style:"annotation"===t?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})},"createGutterItem",0,function(e,t,n,r={}){return iQ({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:null!=t?[iQ({tagName:"span",properties:{"data-line-number-content":""},children:[iK(`${t}`)]})]:void 0})},"createGutterWrapper",0,function(e){return iQ({tagName:"div",properties:{"data-gutter":""},children:e})},"createHastElement",0,iQ,"createIconElement",0,function({name:e,width:t=16,height:n=16,properties:r}){return iQ({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...r},children:[iQ({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})},"createTextNodeElement",0,iK,"findCodeElement",0,iJ],6104);let iY=Symbol("no-token"),iZ=Symbol("multiple-tokens");function i0(e){if("element"===e.type)for(let t of(e.properties["data-char"]=void 0,e.children))i0(t)}function i1(e=!1,t=!1){let n={lineInfo:[]},r=[{line:e=>(delete e.properties.class,e),pre(t){let r=iJ(t),i=[];if(null!=r){let t=1;for(let a of r.children)"element"===a.type&&(e&&function e(t){let n,r=function(e){let t=e.properties["data-char"];if("number"==typeof t)return t}(t);if(null!=r)return r;let i=iY,a=[],o=[],s=()=>{if(0===o.length||null==n){o=[],n=void 0;return}if(1===o.length){let r=o[0];if(r?.type==="element"){var e,t;for(let i of(e=r,t=n,e.properties["data-char"]=t,r.children))i0(i)}else i0(r);a.push(r),o=[],n=void 0;return}for(let e of o)i0(e);a.push(iQ({tagName:"span",properties:{"data-char":n},children:o})),o=[],n=void 0},l=e=>{if(e!==iY){if(e===iZ){i=iZ;return}if(i===iY){i=e;return}i!==e&&(i=iZ)}};for(let r of t.children){let t="element"===r.type?e(r):iY;if(l(t),"number"!=typeof t){s(),a.push(r);continue}null!=n&&n!==t&&s(),n??=t,o.push(r)}return s(),t.children=a,i}(a),i.push(function(e,t,n){let r="function"==typeof n.lineInfo?n.lineInfo(t):n.lineInfo[t-1];if(null==r){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName="div",e.properties["data-line"]=r.lineNumber,e.properties["data-alt-line"]=r.altLineNumber,e.properties["data-line-type"]=r.type,e.properties["data-line-index"]=r.lineIndex,0===e.children.length&&e.children.push(iK("\n")),e}(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t)n.__lineChar??=e,e+=n.content.length}},preprocess(e,t){t.mergeWhitespaces="never"},span(e,t,n,r,i){if(i?.offset!=null&&null!=i.content){let t=i.__lineChar;null!=t&&(e.properties["data-char"]=t)}return e}}:null}];return t&&r.push(i5,i2),{state:n,transformers:r,toClass:i2}}let i2=function(e={}){let{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}function o(e){let o=t+function(e,t=0){let n=0xdeadbeef^t,r=0x41c6ce57^t;for(let t=0,i;t<e.length;t++)n=Math.imul(n^(i=e.charCodeAt(t)),0x9e3779b1),r=Math.imul(r^i,0x5f356495);return n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(r^r>>>13,0xc2b2ae35),(0x100000000*(2097151&(r=Math.imul(r^r>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35)))+(n>>>0)).toString(36).slice(0,6)}("string"==typeof e?e:a(e))+n;return o=r(o),i.has(o)||i.set(o,"string"==typeof e?e:{...e}),o}return{name:"@shikijs/transformers:style-to-class",pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry:()=>i,getCSS(){let e="";for(let[t,n]of i.entries())e+=`.${t}{${"string"==typeof n?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}({classPrefix:"hl-"}),i5={name:"token-style-normalizer",tokens(e){for(let t of e)for(let e of t){if(null!=e.htmlStyle)continue;let t={};null!=e.color&&(t.color=e.color),null!=e.bgColor&&(t["background-color"]=e.bgColor),null!=e.fontStyle&&0!==e.fontStyle&&((1&e.fontStyle)!=0&&(t["font-style"]="italic"),(2&e.fontStyle)!=0&&(t["font-weight"]="bold"),(4&e.fontStyle)!=0&&(t["text-decoration"]="underline")),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function i6(e){return`--${"token"===e?"diffs-token":"diffs"}-`}function i8({theme:e=u,highlighter:t,prefix:n}){let r="";if("string"==typeof e){let i=t.getTheme(e);r+=`color:${i.fg};`,r+=`background-color:${i.bg};`,r+=`${i6("global")}fg:${i.fg};`,r+=`${i6("global")}bg:${i.bg};`,r+=i3(i,n)}else{let n=t.getTheme(e.dark);r+=`${i6("global")}dark:${n.fg};`,r+=`${i6("global")}dark-bg:${n.bg};`,r+=i3(n,"dark"),n=t.getTheme(e.light),r+=`${i6("global")}light:${n.fg};`,r+=`${i6("global")}light-bg:${n.bg};`,r+=i3(n,"light")}return r}function i3(e,t){t=null!=t?`${t}-`:"";let n="",r=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];null!=r&&(n+=`${i6("global")}${t}addition-color:${r};`);let i=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];null!=i&&(n+=`${i6("global")}${t}deletion-color:${i};`);let a=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return null!=a&&(n+=`${i6("global")}${t}modified-color:${a};`),n}function i4(e){let t=e.children[0];for(;null!=t;){if("element"===t.type&&"code"===t.tagName)return t.children;t="children"in t?t.children[0]:null}throw console.error(e),Error("getLineNodes: Unable to find children")}function i9(e){return""!==e?e.split(l):[]}e.s(["splitFileContents",0,i9],59390);let i7={forcePlainText:!1};function ae(e,t,{theme:n=u,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:l}=i7){var c,h;let d;a?(o??=0,s??=1/0):(o=0,s=1/0);let p=o>0||s<1/0,{state:f,transformers:g}=i1(i),m=a?"text":e.lang??iz(e.name),y="string"==typeof n?t.getTheme(n).type:void 0,b=i8({theme:n,highlighter:t});f.lineInfo=e=>({type:"context",lineIndex:e-1+o,lineNumber:e+o});let k="string"==typeof n?{lang:m,theme:n,transformers:g,defaultColor:!1,cssVariablePrefix:i6("token"),tokenizeMaxLineLength:r}:{lang:m,themes:n,transformers:g,defaultColor:!1,cssVariablePrefix:i6("token"),tokenizeMaxLineLength:r},v=i4(t.codeToHast(p?(c=l??i9(e.contents),h=o,d="",iV({lines:c,startingLine:h,totalLines:s,callback({content:e}){d+=e}}),d):iX(e.contents),k)),w=p?Array(o):v;return p&&w.push(...v),{code:w,themeStyles:b,baseThemeType:y}}function at(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function an(e,t){return iF(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function ar(e){let t=e.lang??iz(e.name),n=e.lang??(null!=e.prevName?iz(e.prevName):"text");return"text"===t&&"text"===n}function ai({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s={finalHunk:e.hunks.at(-1),viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!s.isWindowedHighlight)return!1;let e=s.unifiedCount>=n+r,i=s.splitCount>=n+r;return"unified"===t?e:"split"===t?i:e&&i},shouldSkip(e,r){if(!s.isWindowedHighlight)return!1;let i=s.unifiedCount+e<n,a=s.splitCount+r<n;return"unified"===t?i:"split"===t?a:i&&a},incrementCounts(e,n){("unified"===t||"both"===t)&&(s.unifiedCount+=e),("split"===t||"both"===t)&&(s.splitCount+=n)},isInWindow(e,n){if(!s.isWindowedHighlight)return!0;let r=s.isInUnifiedWindow(e),i=s.isInSplitWindow(n);return"unified"===t?r:"split"===t?i:r||i},isInUnifiedWindow:e=>!s.isWindowedHighlight||s.unifiedCount>=n-e&&s.unifiedCount<n+r,isInSplitWindow:e=>!s.isWindowedHighlight||s.splitCount>=n-e&&s.splitCount<n+r,emit:(e,n=!1)=>(n||("unified"===t?s.incrementCounts(1,0):"split"===t?s.incrementCounts(0,1):s.incrementCounts(1,1)),o(e)??!1)};e:for(let[n,r]of e.hunks.entries()){if(s.shouldBreak())break;let o=aa(e.isPartial,r.collapsedBefore,i,n,a),c=(()=>{if(r!==s.finalHunk||!function(e){let t=e.hunks.at(-1);return null!=t&&!e.isPartial&&0!==e.additionLines.length&&0!==e.deletionLines.length&&(t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length)}(e))return;let t=e.additionLines.length-(r.additionLineIndex+r.additionCount),n=e.deletionLines.length-(r.deletionLineIndex+r.deletionCount);if(t!==n)throw Error(`iterateOverDiff: trailing context mismatch (additions=${t}, deletions=${n}) for ${e.name}`);let o=Math.min(t,n);return aa(e.isPartial,o,i,e.hunks.length,a)})(),h=o.fromStart+o.fromEnd;function l(e,n){return null==c||c.collapsedLines<=0||c.fromStart+c.fromEnd>0?0:"unified"===t?e===r.unifiedLineStart+r.unifiedLineCount-1?c.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?c.collapsedLines:0}function u(){if(0===o.collapsedLines)return 0;let e=o.collapsedLines;return o.collapsedLines=0,e}if(s.shouldSkip(h,h))s.incrementCounts(h,h),u();else{let e=r.unifiedLineStart-o.rangeSize,t=r.splitLineStart-o.rangeSize,i=r.deletionLineIndex-o.rangeSize,a=r.additionLineIndex-o.rangeSize,l=r.deletionStart-o.rangeSize,c=r.additionStart-o.rangeSize,h=0;for(;h<o.fromStart;){if(s.isInWindow(0,0)){if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:l+h,lineIndex:i+h,noEOFCR:!1,unifiedLineIndex:e+h,splitLineIndex:t+h},additionLine:{unifiedLineIndex:e+h,splitLineIndex:t+h,lineIndex:a+h,lineNumber:c+h,noEOFCR:!1}}))break e}else s.incrementCounts(1,1);h++}for(e=r.unifiedLineStart-o.fromEnd,t=r.splitLineStart-o.fromEnd,i=r.deletionLineIndex-o.fromEnd,a=r.additionLineIndex-o.fromEnd,l=r.deletionStart-o.fromEnd,c=r.additionStart-o.fromEnd,h=0;h<o.fromEnd;){if(s.isInWindow(0,0)){if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:u(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:l+h,lineIndex:i+h,noEOFCR:!1,unifiedLineIndex:e+h,splitLineIndex:t+h},additionLine:{unifiedLineIndex:e+h,splitLineIndex:t+h,lineIndex:a+h,lineNumber:c+h,noEOFCR:!1}}))break e}else s.incrementCounts(1,1);h++}}let d=r.unifiedLineStart,p=r.splitLineStart,f=r.deletionLineIndex,g=r.additionLineIndex,m=r.deletionStart,y=r.additionStart,b=r.hunkContent.at(-1);for(let e of r.hunkContent){if(s.shouldBreak())break e;let i=e===b;if("context"===e.type){if(s.shouldSkip(e.lines,e.lines))s.incrementCounts(e.lines,e.lines),u();else{let t=0;for(;t<e.lines;){if(s.isInWindow(0,0)){let a=i&&t===e.lines-1,o=d+t,c=p+t;if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:u(),collapsedAfter:l(o,c),type:"context",deletionLine:{lineNumber:m+t,lineIndex:f+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:c},additionLine:{unifiedLineIndex:o,splitLineIndex:c,lineIndex:g+t,lineNumber:y+t,noEOFCR:a&&r.noEOFCRAdditions}}))break e}else s.incrementCounts(1,1);t++}}d+=e.lines,p+=e.lines,f+=e.lines,g+=e.lines,m+=e.lines,y+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!s.shouldSkip(o,a))for(let[c,h]of function(e,t,n){if(!e.isWindowedHighlight)return[[0,"unified"===n?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r="unified"===n?"unified":"split",i=[];function a(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function o(e,n){if(null==e)return;let[a,o]="split"===r?e:"additions"===n?[e[0]+t.deletions,e[1]+t.deletions]:e;o>a&&i.push([a,o])}if("split"!==n&&(o(a(e.unifiedCount,t.deletions),"deletions"),o(a(e.unifiedCount+t.deletions,t.additions),"additions")),"unified"!==n&&(o(a(e.splitCount,t.deletions),"deletions"),o(a(e.splitCount,t.additions),"additions")),0===i.length)return i;i.sort((e,t)=>e[0]-t[0]);let s=[i[0]];for(let[e,t]of i.slice(1)){let n=s[s.length-1];e<=n[1]?n[1]=Math.max(n[1],t):s.push([e,t])}return s}(s,e,t))for(let b=c;b<h;b++){let c=l(d+b,"unified"===t?p+(b<e.deletions?b:b-e.deletions):p+b);if(s.emit(function({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:l,deletionLineIndex:u,additionLineNumber:c,deletionLineNumber:h,content:d,isLastContent:p,unifiedCount:f,splitCount:g}){let m=a<d.deletions?o+a:void 0,y="unified"===i?a>=d.deletions?o+a:void 0:a<d.additions?o+d.deletions+a:void 0,b="unified"===i?s+(a<d.deletions?a:a-d.deletions):s+a,k=a<d.deletions?u+a:void 0,v=a<d.deletions?h+a:void 0,w="unified"===i?a>=d.deletions?l+(a-d.deletions):void 0:a<d.additions?l+a:void 0,A="unified"===i?a>=d.deletions?c+(a-d.deletions):void 0:a<d.additions?c+a:void 0,C="unified"===i?p&&a===d.deletions-1&&t.noEOFCRDeletions:p&&a===g-1&&t.noEOFCRDeletions,S="unified"===i?p&&a===f-1&&t.noEOFCRAdditions:p&&a===g-1&&t.noEOFCRAdditions,_=null!=k&&null!=v&&null!=m?{lineNumber:v,lineIndex:k,noEOFCR:C,unifiedLineIndex:m,splitLineIndex:b}:void 0,x=null!=w&&null!=A&&null!=y?{unifiedLineIndex:y,splitLineIndex:b,lineIndex:w,lineNumber:A,noEOFCR:S}:void 0;if(null==_&&null!=x)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:x};if(null!=_&&null==x)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:_,additionLine:void 0};if(null==_||null==x)throw Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:_,additionLine:x}}({hunkIndex:n,hunk:r,collapsedBefore:u(),collapsedAfter:c,diffStyle:t,index:b,unifiedLineIndex:d,splitLineIndex:p,additionLineIndex:g,deletionLineIndex:f,additionLineNumber:y,deletionLineNumber:m,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break e}u(),s.incrementCounts(o,a),d+=o,p+=a,f+=e.deletions,g+=e.additions,m+=e.deletions,y+=e.additions}}if(null!=c){let{collapsedLines:t,fromStart:n,fromEnd:r}=c,i=n+r,a=0;for(;a<i;){if(s.shouldBreak())break e;if(s.isInWindow(0,0)){let n=a===i-1;if(s.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:n?t:0,type:"context-expanded",deletionLine:{lineNumber:m+a,lineIndex:f+a,noEOFCR:!1,unifiedLineIndex:d+a,splitLineIndex:p+a},additionLine:{unifiedLineIndex:d+a,splitLineIndex:p+a,lineIndex:g+a,lineNumber:y+a,noEOFCR:!1}}))break e}else s.incrementCounts(1,1);a++}}}}function aa(e,t,n,r,i){if(0===(t=Math.max(t,0))||e)return{fromStart:0,fromEnd:0,rangeSize:t,collapsedLines:Math.max(t,0)};if(!0===n||t<=i)return{fromStart:t,fromEnd:0,rangeSize:t,collapsedLines:0};let a=n?.get(r),o=Math.min(Math.max(a?.fromStart??0,0),t),s=Math.min(Math.max(a?.fromEnd??0,0),t),l=o+s,u=l>=t;return{fromStart:u?t:o,fromEnd:u?0:s,rangeSize:t,collapsedLines:Math.max(t-l,0)}}function ao({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function as({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(null==a||i||!n)return void t.push([+!r,e.value]);let o=0===a[0];if(r===o||r&&1===e.value.length&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}e.s(["renderFileWithHighlighter",0,ae],16876),e.s(["areFilesEqual",0,at],60166),e.s(["areDiffRenderOptionsEqual",0,an],19013),e.s(["isDiffPlainText",0,ar],84036),e.s(["iterateOverDiff",0,ai],89107);class al{diff(e,t,n={}){let r;"function"==typeof n?(r=n,n={}):"callback"in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){var i;let a=e=>(e=this.postProcess(e,n),r)?void setTimeout(function(){r(e)},0):e,o=t.length,s=e.length,l=1,u=o+s;null!=n.maxEditLength&&(u=Math.min(u,n.maxEditLength));let c=null!=(i=n.timeout)?i:1/0,h=Date.now()+c,d=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=s&&p+1>=o)return a(this.buildValues(d[0].lastComponent,t,e));let f=-1/0,g=1/0,m=()=>{for(let r=Math.max(f,-l);r<=Math.min(g,l);r+=2){let i,l=d[r-1],u=d[r+1];l&&(d[r-1]=void 0);let c=!1;if(u){let e=u.oldPos-r;c=u&&0<=e&&e<o}let h=l&&l.oldPos+1<s;if(!c&&!h){d[r]=void 0;continue}if(i=!h||c&&l.oldPos<u.oldPos?this.addToPath(u,!0,!1,0,n):this.addToPath(l,!1,!0,1,n),p=this.extractCommon(i,t,e,r,n),i.oldPos+1>=s&&p+1>=o)return a(this.buildValues(i.lastComponent,t,e))||!0;d[r]=i,i.oldPos+1>=s&&(g=Math.min(g,r-1)),p+1>=o&&(f=Math.max(f,r+1))}l++};if(r)!function e(){setTimeout(function(){if(l>u||Date.now()>h)return r(void 0);m()||e()},0)}();else for(;l<=u&&Date.now()<=h;){let e=m();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,l=s-r,u=0;for(;l+1<a&&s+1<o&&this.equals(n[s+1],t[l+1],i);)l++,s++,u++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!i.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r,i=[];for(;e;)i.push(e),r=e.previousComponent,delete e.previousComponent,e=r;i.reverse();let a=i.length,o=0,s=0,l=0;for(;o<a;o++){let e=i[o];if(e.removed)e.value=this.join(n.slice(l,l+e.count)),l+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[l+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(l+=e.count)}}return i}}e.s(["default",()=>al],24315);let au=new class extends al{};function ac(e,t){let n;for(n=0;n<e.length&&n<t.length&&e[n]==t[n];n++);return e.slice(0,n)}function ah(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length&&e[e.length-(n+1)]==t[t.length-(n+1)];n++);return e.slice(-n)}function ad(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function ap(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function af(e,t){return ad(e,t,"")}function ag(e,t){return t.slice(0,function(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}(e,t))}function am(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function ay(e){let t=e.match(/^\s*/);return t?t[0]:""}let ab="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",ak=RegExp(`[${ab}]+|\\s+|[^${ab}]`,"ug");function av(e,t,n,r){var i,a,o,s;if(t&&n){let o=ay(t.value),s=am(t.value),l=ay(n.value),u=am(n.value);if(e){let r=ac(o,l);e.value=ap(e.value,l,r),t.value=af(t.value,r),n.value=af(n.value,r)}if(r){let e=ah(s,u);r.value=ad(r.value,u,e),i=t.value,t.value=ap(i,e,""),a=n.value,n.value=ap(a,e,"")}}else if(n){if(e){let e=ay(n.value);n.value=n.value.substring(e.length)}if(r){let e=ay(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=ay(r.value),i=ay(t.value),a=am(t.value),s=ac(n,i);t.value=af(t.value,s);let l=ah(af(n,s),a);o=t.value,t.value=ap(o,l,""),r.value=ad(r.value,n,l),e.value=ap(e.value,n,n.slice(0,n.length-l.length))}else if(r){let e=ay(r.value),n=ag(am(t.value),e);s=t.value,t.value=ap(s,n,"")}else if(e){let n=ag(am(e.value),ay(t.value));t.value=af(t.value,n)}}new class extends al{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if("word"!=r.resolvedOptions().granularity)throw Error('The segmenter passed must have a granularity of "word"');for(let t of(n=[],Array.from(r.segment(e)))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(ak)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?null==i?r.push(e):r.push(r.pop()+e):null!=i&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>0==t?e:e.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&av(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&av(n,i,r,null),e}};let aw=new class extends al{tokenize(e){let t=RegExp(`(\\r?\\n)|[${ab}]+|[^\\S\\n\\r]+|[^${ab}]`,"ug");return e.match(t)||[]}},aA={forcePlainText:!1};function aC(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=aA){r?(i??=0,a??=1/0):(i=0,a=1/0);let l=i>0||a<1/0,c="string"==typeof n.theme?t.getTheme(n.theme).type:void 0,h=i8({theme:n.theme,highlighter:t}),d=r&&!l&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,p={deletionLines:[],additionLines:[]},{maxLineDiffLength:f}=n,g=!r&&!e.isPartial,m=new Map;function y(e,t,n,r){if(l){let e=n.at(-1);(null==e||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}for(let c of(ai({diff:e,diffStyle:"both",startingLine:i,totalLines:a,expandedHunks:!l||(r?o:void 0),collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a,o,s=(a=g?0:t,o=m.get(a)??{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]},m.set(a,o),o),l=null!=n?n.splitLineIndex:r.splitLineIndex;"change"===i&&null!=n&&null!=r&&function({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){var l,u,c,h;if(null==e||null==t||"none"===o||(e=iX(e),t=iX(t),e.length>s||t.length>s))return;let d="char"===o?(l=e,u=t,au.diff(l,u,void 0)):(c=e,h=t,aw.diff(c,h,void 0)),p=[],f=[],g="word-alt"===o,m=d.at(-1);for(let e of d){let t=e===m;e.added||e.removed?e.removed?as({item:e,arr:p,enableJoin:g,isLastItem:t}):as({item:e,arr:f,enableJoin:g,isLastItem:t}):(as({item:e,arr:p,enableJoin:g,isNeutral:!0,isLastItem:t}),as({item:e,arr:f,enableJoin:g,isNeutral:!0,isLastItem:t}))}let y=0;for(let e of p)1===e[0]&&i.push(ao({line:n,spanStart:y,spanLength:e[1].length})),y+=e[1].length;for(let e of(y=0,f))1===e[0]&&a.push(ao({line:r,spanStart:y,spanLength:e[1].length})),y+=e[1].length}({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:s.deletionContent.length,additionLineIndex:s.additionContent.length,deletionDecorations:s.deletionDecorations,additionDecorations:s.additionDecorations,lineDiffType:d,maxLineDiffLength:f}),null!=r&&(y(e.deletionLines[r.lineIndex],r.lineIndex,s.deletionSegments,s.deletionContent),s.deletionInfo.push({type:"change"===i?"change-deletion":i,lineNumber:r.lineNumber,altLineNumber:"change"===i?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${l}`})),null!=n&&(y(e.additionLines[n.lineIndex],n.lineIndex,s.additionSegments,s.additionContent),s.additionInfo.push({type:"change"===i?"change-addition":i,lineNumber:n.lineNumber,altLineNumber:"change"===i?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${l}`}))}}),m.values())){if(0===c.deletionContent.length&&0===c.additionContent.length)continue;let i={name:e.prevName??e.name,contents:c.deletionContent.value},a={name:e.name,contents:c.additionContent.value},{deletionLines:o,additionLines:s}=function({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:l=u,...c}}){let h=s??iz(e.name),d=s??iz(t.name),{state:p,transformers:f}=i1(c.useTokenTransformer),g="string"==typeof l?{...c,lang:"text",theme:l,transformers:f,decorations:void 0,defaultColor:!1,cssVariablePrefix:i6("token")}:{...c,lang:"text",themes:l,transformers:f,decorations:void 0,defaultColor:!1,cssVariablePrefix:i6("token")};return{deletionLines:""===e.contents?[]:(g.lang=h,p.lineInfo=n,g.decorations=a,i4(i.codeToHast(iX(e.contents),g))),additionLines:""===t.contents?[]:(g.lang=d,g.decorations=o,p.lineInfo=r,i4(i.codeToHast(iX(t.contents),g)))}}({deletionFile:i,deletionInfo:c.deletionInfo,deletionDecorations:c.deletionDecorations,additionFile:a,additionInfo:c.additionInfo,additionDecorations:c.additionDecorations,highlighter:t,options:n,languageOverride:r?"text":e.lang});if(g){p.deletionLines=o,p.additionLines=s;continue}if(c.deletionSegments.length>0)for(let e of c.deletionSegments)for(let t=0;t<e.count;t++)p.deletionLines[e.targetIndex+t]=o[e.originalOffset+t];else p.deletionLines.push(...o);if(c.additionSegments.length>0)for(let e of c.additionSegments)for(let t=0;t<e.count;t++)p.additionLines[e.targetIndex+t]=s[e.originalOffset+t];else p.additionLines.push(...s)}return{code:p,themeStyles:h,baseThemeType:c}}function aS(e){let t=[];for(let n of e){let e=m.get(n);if(null==e)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function a_(e){for(let t of Array.isArray(e)?e:[e])if(!m.has(t))return!1;return!0}async function ax(e){let t=[],n=[];for(let r of e){if("text"===r||"ansi"===r)continue;let e=E(r)??x(r);"then"in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(null==n)throw Error("resolvedLanguages: unable to resolve language");t.push(n)}}),t}function aE(e){let t=[];for(let n of e){let e=h.get(n);if(null==e)throw Error(`getAllResolvedThemes: ${n} is unresolved, you must resolve all necessary themes before calling this function`);t.push(e)}return t}async function aL(e){let t=[],n=[];for(let r of e){let e=n$(r)??nO(r);"then"in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e)null!=n&&t.push(n)}),t}e.s(["renderDiffWithHighlighter",0,aC],10906);var aI=e.i(35356);let aN=Symbol("IGNORE_RESPONSE");var aT=class{highlighter;preferredHighlighter;renderOptions;initialized=!1;workers=[];taskQueue=new Map;pendingTasks=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;instanceRequestMap=new Map;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;constructor(e,{langs:t,theme:n=u,useTokenTransformer:r=!1,lineDiffType:i="word-alt",maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s="shiki-js"}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new aI.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new aI.default.LRUMap(e.totalASTLRUCacheSize??100),this.initialize(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return null!=e.cacheKey?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return null!=e.cacheKey?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return void 0!==this.fileCache.delete(e)}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return void 0!==this.diffCache.delete(e)}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=u,useTokenTransformer:t=!1,lineDiffType:n="word-alt",maxLineDiffLength:r=1e3,tokenizeMaxLineLength:i=1e3}){let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),an(a,this.renderOptions))return;let o=iD(e),s=[];if(iF(a.theme,this.renderOptions.theme)||(s=iU(o)?aE(o):await aL(o)),null!=this.highlighter)g(s,this.highlighter),await this.setRenderOptionsOnWorkers(a,s);else{let[e]=await Promise.all([iB({themes:o,langs:["text"],preferredHighlighter:this.preferredHighlighter}),this.setRenderOptionsOnWorkers(a,s)]);this.highlighter=e}for(let e of(this.renderOptions=a,this.diffCache.clear(),this.fileCache.clear(),this.themeSubscribers))e.rerender()}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:"set-render-options",id:a,request:{type:"set-render-options",id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.pendingTasks.set(a,o),r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){null==this._queuedBroadcast&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{null!=this._queuedBroadcast&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpPendingTasks(e){this.taskQueue.delete(e);let t=this.instanceRequestMap.get(e);null!=t&&(this.pendingTasks.delete(t),this.instanceRequestMap.delete(e)),this.queueBroadcastStateChanges()}isInitialized(){return!0===this.initialized}async initialize(e=[]){return!0===this.initialized?void 0:!1!==this.initialized?this.initialized:void(this.initialized=new Promise((t,n)=>{(async()=>{try{let n=iD(this.renderOptions.theme),r=[];r=iU(n)?aE(n):await aL(n);let i=[];i=a_(e)?aS(e):await ax(e);let[a]=await Promise.all([iB({themes:n,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(r,i)]);if(!1===this.initialized)throw this.terminateWorkers(),Error("WorkerPoolManager: workers failed to initialize");this.highlighter=a,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),t()}catch(e){this.initialized=!1,this.workersFailed=!0,this.queueBroadcastStateChanges(),n(e)}})()}),this.queueBroadcastStateChanges())}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=iq(),i=r>0?iW():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,request_id:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener("message",e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener("error",e=>console.error("Worker error:",e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),l={type:"initialize",id:s,request:{type:"initialize",id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:null!=i?r:void 0,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.pendingTasks.set(s,l),this.executeTask(o,l)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!0===this.initialized&&0!==this.taskQueue.size){for(let[e,t]of this.taskQueue){if(this.instanceRequestMap.has(e))continue;let n=aP(t),r=this.getAvailableWorker(n);if(null==r)break;this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){if(!iH(t)){for(let n of[this.taskQueue,this.pendingTasks.values()])for(let r of n)if("instance"in r&&r.instance===e&&"file"===r.request.type&&at(t,r.request.file))return;this.submitTask(e,{type:"file",file:t})}}getPlainFileAST(e,t,n,r){return null==this.highlighter?void this.initialize():ae(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){if(!ar(t)){for(let n of[this.taskQueue,this.pendingTasks.values()])for(let r of n)if("instance"in r&&r.instance===e&&"diff"===r.request.type&&r.request.diff===t)return;this.submitTask(e,{type:"diff",diff:t})}}getPlainDiffAST(e,t,n,r,i){return null!=this.highlighter?aC(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i}):void 0}terminate(){this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.instanceRequestMap.clear(),this.taskQueue.clear(),this.pendingTasks.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:!1===this.initialized?"waiting":!0!==this.initialized?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>null!=e.request_id).length,queuedTasks:this.taskQueue.size,pendingTasks:this.pendingTasks.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){!1===this.initialized&&this.initialize();let n=this.generateRequestId(),r=Date.now(),i=(()=>{switch(t.type){case"file":return{type:"file",id:n,request:{...t,id:n},instance:e,requestStart:r};case"diff":return{type:"diff",id:n,request:{...t,id:n},instance:e,requestStart:r}}})();this.taskQueue.set(e,i),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));r.length>0&&(a_(r)?t.request.resolvedLanguages=aS(r):t.request.resolvedLanguages=await ax(r)),this.executeTask(e,t)}catch{this.cleanWorkerAndTask(e,t)}}handleWorkerMessage(e,t){let n=this.pendingTasks.get(t.id);try{if(null==n)throw aN;if("error"===t.type){let e=Error(t.error);throw t.stack&&(e.stack=t.stack),"reject"in n?n.reject(e):n.instance.onHighlightError(e),e}if("instance"in n&&this.instanceRequestMap.get(n.instance)!==t.id)throw aN;switch(t.requestType){case"initialize":if("initialize"!==n.type)throw Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case"set-render-options":if("set-render-options"!==n.type)throw Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"file":{if("file"!==n.type)throw Error("handleWorkerMessage: task/response dont match");let{result:r,options:i}=t,{instance:a,request:o}=n;this.syncCustomExtensionVersion(e,o),null!=o.file.cacheKey&&this.fileCache.set(o.file.cacheKey,{result:r,options:i}),a.onHighlightSuccess(o.file,r,i);break}case"diff":{if("diff"!==n.type)throw Error("handleWorkerMessage: task/response dont match");let{result:r,options:i}=t,{instance:a,request:o}=n;this.syncCustomExtensionVersion(e,o),null!=o.diff.cacheKey&&this.diffCache.set(o.diff.cacheKey,{result:r,options:i}),a.onHighlightSuccess(o.diff,r,i)}}}catch(e){e!==aN&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n),this.queueBroadcastStateChanges(),this.taskQueue.size>0&&this.queueDrain()}_queuedDrain;queueDrain(){null==this._queuedDrain&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.request_id=e.id,"instance"in e&&(this.taskQueue.delete(e.instance),this.instanceRequestMap.set(e.instance,e.id)),this.pendingTasks.set(e.id,e)}cleanWorkerAndTask(e,t){e.request_id=void 0,null!=t&&("instance"in t&&this.instanceRequestMap.delete(t.instance),this.pendingTasks.delete(t.id))}executeTask(e,t){var n;for(let r of(("initialize"===(n=t.request).type||"file"===n.type||"diff"===n.type)&&this.maybeAttachCustomExtensions(e,t.request),this.assignWorkerToTask(t,e),aP(t)))e.langs.add(r);try{e.worker.postMessage(t.request)}catch(n){this.cleanWorkerAndTask(e,t),console.error("Failed to post message to worker:",n),"instance"in t?t.instance.onHighlightError(n):"reject"in t&&t.reject(n)}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(null!=t.customExtensionsVersion)return;let n=iq();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=iW())}syncCustomExtensionVersion(e,t){null!=t.customExtensionsVersion&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(null!=n.request_id||!n.initialized)continue;if(t=n,0===e.length)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}generateRequestId(){return`req_${++this.nextRequestId}`}};function aP(e){let t=new Set;if("initialize"===e.type||"set-render-options"===e.type)return[];switch(e.type){case"file":t.add(e.request.file.lang??iz(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??iz(e.request.diff.name)),t.add(e.request.diff.lang??iz(e.request.diff.prevName??"-"))}return t.delete("text"),Array.from(t)}var aR=e.i(14499),aM=e.i(81099);let aO=(0,aR.createContext)(void 0),a$=0;e.s(["WorkerPoolContext",0,aO,"WorkerPoolContextProvider",0,function({children:e,poolOptions:t,highlighterOptions:n}){let[r]=(0,aR.useState)(()=>{if("u">typeof window)return function({poolOptions:e,highlighterOptions:t}){return null==i&&(i=new aT(e,t)).initialize(),i}({poolOptions:t,highlighterOptions:n})});return(0,aR.useInsertionEffect)(()=>{if(null!=r)return a$++,()=>{a$--}},[r]),(0,aR.useEffect)(()=>()=>{0===a$&&null!=i&&(i.terminate(),i=void 0)},[]),(0,aM.jsx)(aO.Provider,{value:r,children:e})},"useWorkerPool",0,function(){return(0,aR.useContext)(aO)}],2540)}]);
|