@truenine/memory-sync-cli 2026.10318.10339 → 2026.10318.11638

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/dist/index.cjs CHANGED
@@ -1,125 +1,239 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u=require(`node:fs`);u=l(u);let d=require(`node:path`);d=l(d);let f=require(`node:process`);f=l(f);let p=require(`node:child_process`),m=require(`node:os`);m=l(m);let h=require(`node:module`),g=require(`node:url`),_=require(`yaml`);_=l(_);let v=require(`node:buffer`),y=require(`zod/v3`),b=require(`json5`);b=l(b);function x(e,...t){return[e,...t]}function S(e){return e instanceof Error?e.message:String(e)}function C(e){let t=e.split(/\r?\n/u).map(e=>e.trimEnd()).filter(e=>e.length>0);return t.length===0?x(`No diagnostic details were provided.`):x(t[0],...t.slice(1))}function w(e){return e}function T(e){return S(e).toLowerCase()}function E(e){if(e.platform!==`win32`||e.operation!==`delete`||e.targetKind!==`directory`)return!1;let t=T(e.error);return t.includes(`eperm`)||t.includes(`permission denied`)}function ee(e){return E(e)?{exactFix:x(`Close any process that is using "${e.path}", delete the stale directory, and rerun tnmsc.`,`Common lockers on Windows include editors, terminals, antivirus scanners, sync clients, and AI tools watching generated files.`),possibleFixes:[x(`Use Resource Monitor or Process Explorer to find which process holds a handle under "${e.path}".`),x(`Make sure no shell, editor tab, or file watcher is currently opened inside "${e.path}" or one of its children.`),x(`If antivirus or cloud sync is scanning generated outputs, wait for it to release the directory or exclude this output path.`)]}:{exactFix:x(`Verify that "${e.path}" exists, has the expected type, and is accessible to tnmsc.`),possibleFixes:[x(`Check file permissions and ownership for the target path.`),x(`Confirm that another process did not delete, move, or lock the target path.`)]}}function D(e){let{code:t,title:n,operation:r,targetKind:i,path:a,error:o,platform:s,exactFix:c,possibleFixes:l,details:u}=e,d=S(o),p=ee({operation:r,targetKind:i,path:a,error:o,platform:s??f.default.platform});return w({code:t,title:n,rootCause:x(`tnmsc could not ${r} the ${i} at "${a}".`,`Underlying error: ${d}`),exactFix:c??p.exactFix,possibleFixes:l??p.possibleFixes,details:{operation:r,targetKind:i,path:a,errorMessage:d,platform:s??f.default.platform,...u??{}}})}function O(e){let{code:t,title:n,reason:r,configPath:i,exactFix:a,possibleFixes:o,details:s}=e;return w({code:t,title:n,rootCause:i==null?r:x(r[0],...r.slice(1),`Config path: ${i}`),exactFix:a,possibleFixes:o,details:{...i==null?{}:{configPath:i},...s??{}}})}function k(e){return w(e)}function te(e){let{code:t,title:n,path:r,expectedKind:i,actualState:a,exactFix:o,possibleFixes:s,details:c}=e;return w({code:t,title:n,rootCause:x(`tnmsc expected a ${i} at "${r}".`,`Actual state: ${a}`),exactFix:o??x(`Create or replace "${r}" with a valid ${i} before retrying tnmsc.`),possibleFixes:s??[x(`Check whether the path was moved, deleted, or replaced with the wrong file type.`),x(`Update your configuration so tnmsc points to the intended source path.`)],details:{path:r,expectedKind:i,actualState:a,...c??{}}})}function A(e){let{code:t,title:n,diagnosticText:r,exactFix:i,possibleFixes:a,details:o}=e;return w({code:t,title:n,rootCause:C(r),exactFix:i??x(`Fix the referenced prompt source or compiled dist file so the compiler diagnostic no longer triggers.`),possibleFixes:a??[x(`Open the file referenced in the diagnostic and correct the reported syntax or metadata issue.`),x(`Rebuild the prompt output so the dist file matches the current source tree.`)],details:{diagnosticText:r,...o??{}}})}function j(e,t){let n=t[0];return w({code:`PROTECTED_DELETION_GUARD_TRIGGERED`,title:`Protected deletion guard blocked a destructive operation`,rootCause:x(`The "${e}" operation targeted ${t.length} protected path(s).`,n==null?`No violation details were captured.`:`Example protected path: ${n.protectedPath}`),exactFix:x(`Remove protected inputs or reserved workspace paths from the delete plan before running tnmsc again.`),possibleFixes:[x(`Update cleanup declarations so they only target generated output paths.`),x(`Move source inputs outside of the cleanup target set if they are currently overlapping.`)],details:{operation:e,count:t.length,violations:t.map(e=>({targetPath:e.targetPath,protectedPath:e.protectedPath,protectionMode:e.protectionMode,source:e.source,reason:e.reason}))}})}function ne(e,t){let n=S(t);return w({code:`UNHANDLED_EXCEPTION`,title:`Unhandled exception in ${e}`,rootCause:x(`tnmsc terminated because an unhandled exception escaped the ${e} flow.`,`Underlying error: ${n}`),exactFix:x(`Inspect the error context and add the missing guard, validation, or recovery path before retrying the command.`),possibleFixes:[x(`Re-run the command with the same inputs after fixing the referenced file or configuration.`),x(`Add a focused test that reproduces this failure so the regression stays covered.`)],details:{context:e,errorMessage:n}})}function re(e){let t=[],n=[];for(let r of e)r.level===`warn`?t.push(r):n.push(r);return{warnings:t,errors:n}}function ie(e,t){let n=d.join(e,`.git`),r=u.existsSync(n);return r?t?.info(`version control detected`,{path:n}):t?.warn(k({code:`AINDEX_VERSION_CONTROL_MISSING`,title:`Aindex root is not under version control`,rootCause:x(`tnmsc did not find a .git directory under "${e}".`),exactFix:x(`Initialize git in "${e}" or place the aindex inside an existing git repository.`),possibleFixes:[x("Run `git init` in the aindex root if the directory should be versioned.")],details:{rootPath:e,gitPath:n}})),{hasGit:r,gitPath:n}}function ae(e){return d.extname(e).length>0}function oe(e,t={}){let{logger:n,config:r}=t,i=[],a=[],o=[],s=[],c=new Set,l=new Set,f=new Set,p=t=>{if(u.existsSync(t)){l.has(t)||(l.add(t),o.push(t),n?.debug(`directory exists`,{path:t}));return}u.mkdirSync(t,{recursive:!0});let r=t;for(;!c.has(r)&&(c.add(r),i.push(r),n?.info(`created directory`,{path:r}),r!==e);)r=d.dirname(r)},m=(e,t=`# Generated by tnmsc init
2
- `)=>{if(p(d.dirname(e)),u.existsSync(e)){f.has(e)||(f.add(e),s.push(e),n?.debug(`file exists`,{path:e}));return}u.writeFileSync(e,t,`utf8`),a.push(e),n?.info(`created file`,{path:e})};if(p(e),r!=null){for(let[t,n]of Object.entries(r))if(!(t===`dir`||typeof n!=`object`||!n))for(let t of[n.src,n.dist]){let n=d.join(e,t);ae(t)?m(n):p(n)}}return{success:!0,rootPath:e,createdDirs:i,createdFiles:a,existedDirs:o,existedFiles:s}}const se={"win32-x64":{local:`napi-logger.win32-x64-msvc`,suffix:`win32-x64-msvc`},"linux-x64":{local:`napi-logger.linux-x64-gnu`,suffix:`linux-x64-gnu`},"linux-arm64":{local:`napi-logger.linux-arm64-gnu`,suffix:`linux-arm64-gnu`},"darwin-arm64":{local:`napi-logger.darwin-arm64`,suffix:`darwin-arm64`},"darwin-x64":{local:`napi-logger.darwin-x64`,suffix:`darwin-x64`}},ce=[`error`,`warn`,`fatal`],le=[`info`,`debug`,`trace`];let ue,de;function fe(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.createLogger==`function`&&typeof t.setGlobalLogLevel==`function`&&typeof t.getGlobalLogLevel==`function`&&typeof t.clearBufferedDiagnostics==`function`&&typeof t.drainBufferedDiagnostics==`function`}function pe(){let e=se[`${f.default.platform}-${f.default.arch}`];if(e!=null)return e;throw Error(`Unsupported platform for @truenine/logger native binding: ${f.default.platform}-${f.default.arch}`)}function me(e,t,n){let r=e instanceof Error?e.message:String(e),i=t instanceof Error?t.message:String(t);return Error([`Failed to load @truenine/logger native binding.`,`Tried local binary "./${se[`${f.default.platform}-${f.default.arch}`]?.local??`unknown`}.node" and package "@truenine/memory-sync-cli-${n}".`,`Local error: ${r}`,`Package error: ${i}`,"Run `pnpm -F @truenine/logger run build` to build the native module."].join(`
3
- `))}function he(){let e=require(`url`).pathToFileURL(__filename).href,t=(0,h.createRequire)(e),{local:n,suffix:r}=pe();try{return t(`./${n}.node`)}catch(e){try{let e=t(`@truenine/memory-sync-cli-${r}`).logger;if(fe(e))return e;throw Error(`Package "@truenine/memory-sync-cli-${r}" does not export a logger binding`)}catch(t){throw me(e,t,r)}}}function ge(){if(ue!=null)return ue;if(de!=null)throw de;try{return ue=he(),ue}catch(e){throw de=e instanceof Error?e:Error(String(e)),de}}function _e(e){let t={name:e.name,message:e.message,stack:e.stack};for(let n of Object.getOwnPropertyNames(e))n===`name`||n===`message`||n===`stack`||(t[n]=e[n]);return t}function ve(){let e=new WeakSet;return function(t,n){return n instanceof Error?_e(n):typeof n==`bigint`?n.toString():typeof n==`function`?`[Function ${n.name||`anonymous`}]`:typeof n==`symbol`?n.toString():typeof n!=`object`||!n?n:e.has(n)?`[Circular]`:(e.add(n),n)}}function ye(e){return JSON.stringify(e,ve())??`null`}function be(e){try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function xe(e,t){if(typeof e!=`string`)return{message:``,metaJson:ye(e)};let n=t.length===1&&typeof t[0]==`object`&&t[0]!==null?t[0]:t.length>0?{args:t}:void 0;return{message:e,metaJson:n==null?void 0:ye(n)}}function Se(e,t){return(n,...r)=>{let{message:i,metaJson:a}=xe(n,r);e.log(t,i,a)}}function Ce(e,t){return n=>e.logDiagnostic(t,ye(n))}function we(e){let t=le.reduce((t,n)=>(t[n]=Se(e,n),t),{}),n=ce.reduce((t,n)=>(t[n]=Ce(e,n),t),{});return{error:n.error,warn:n.warn,info:t.info,debug:t.debug,trace:t.trace,fatal:n.fatal}}function Te(e){ge().setGlobalLogLevel(e)}function Ee(){ge().clearBufferedDiagnostics()}function De(){return be(ge().drainBufferedDiagnostics())}function M(e,t){return we(ge().createLogger(e,t))}const Oe=Pe(/[A-Za-z]/),N=Pe(/[\dA-Za-z]/),P=Pe(/[#-'*+\--9=?A-Z^-~]/);function ke(e){return e!==null&&(e<32||e===127)}const Ae=Pe(/\d/),je=Pe(/[\dA-Fa-f]/),F=Pe(/[!-/:-@[-`{-~]/);function I(e){return e!==null&&e<-2}function L(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const Me=Pe(/\p{P}|\p{S}/u),Ne=Pe(/\s/);function Pe(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var Fe=l(o(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1);const Ie=Object.assign(Le(Error),{eval:Le(EvalError),range:Le(RangeError),reference:Le(ReferenceError),syntax:Le(SyntaxError),type:Le(TypeError),uri:Le(URIError)});function Le(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,Fe.default)(t,...n))}}const Re={}.hasOwnProperty,z={yaml:`-`,toml:`+`};function ze(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=B(r[n]);return t}function B(e){let t=e;if(typeof t==`string`){if(!Re.call(z,t))throw Ie("Missing matter definition for `%s`",t);t={type:t,marker:z[t]}}else if(typeof t!=`object`)throw Ie("Expected matter to be an object, not `%j`",t);if(!Re.call(t,`type`))throw Ie("Missing `type` in matter `%j`",t);if(!Re.call(t,`fence`)&&!Re.call(t,`marker`))throw Ie("Missing `marker` or `fence` in matter `%j`",t);return t}function Be(e){let t=ze(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=He(e,`open`).charCodeAt(0),a=Ve(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function Ve(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=He(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),R(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return R(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return I(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=He(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||I(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||I(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),R(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return R(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||I(i)?(e.exit(r),t(i)):n(i)}}}function He(e,t){return e.marker?Ue(e.marker,t).repeat(3):Ue(e.fence,t)}function Ue(e,t){return typeof e==`string`?e:e[t]}function We(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Ge(e){let t=ze(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=Ke(e),r[e.type]=qe,r[e.type+`Value`]=Je}return{enter:n,exit:r}}function Ke(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function qe(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function Je(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Ye(e){let t=[],n={},r=ze(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=Xe(e);let a=Ze(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:We(a.charAt(1))})}return{unsafe:t,handlers:n}}function Xe(e){let t=Ze(e,`open`),n=Ze(e,`close`);return r;function r(e){return t+(e.value?`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`node:fs`);l=c(l);let u=require(`node:path`);u=c(u);let d=require(`node:process`);d=c(d);let f=require(`node:child_process`),p=require(`node:os`);p=c(p);let m=require(`node:module`),h=require(`node:url`),g=require(`node:buffer`),_=require(`zod/v3`),v=require(`json5`);v=c(v);function y(e,...t){return[e,...t]}function b(e){return e instanceof Error?e.message:String(e)}function x(e){let t=e.split(/\r?\n/u).map(e=>e.trimEnd()).filter(e=>e.length>0);return t.length===0?y(`No diagnostic details were provided.`):y(t[0],...t.slice(1))}function S(e){return e}function C(e){return b(e).toLowerCase()}function w(e){if(e.platform!==`win32`||e.operation!==`delete`||e.targetKind!==`directory`)return!1;let t=C(e.error);return t.includes(`eperm`)||t.includes(`permission denied`)}function T(e){return w(e)?{exactFix:y(`Close any process that is using "${e.path}", delete the stale directory, and rerun tnmsc.`,`Common lockers on Windows include editors, terminals, antivirus scanners, sync clients, and AI tools watching generated files.`),possibleFixes:[y(`Use Resource Monitor or Process Explorer to find which process holds a handle under "${e.path}".`),y(`Make sure no shell, editor tab, or file watcher is currently opened inside "${e.path}" or one of its children.`),y(`If antivirus or cloud sync is scanning generated outputs, wait for it to release the directory or exclude this output path.`)]}:{exactFix:y(`Verify that "${e.path}" exists, has the expected type, and is accessible to tnmsc.`),possibleFixes:[y(`Check file permissions and ownership for the target path.`),y(`Confirm that another process did not delete, move, or lock the target path.`)]}}function E(e){let{code:t,title:n,operation:r,targetKind:i,path:a,error:o,platform:s,exactFix:c,possibleFixes:l,details:u}=e,f=b(o),p=T({operation:r,targetKind:i,path:a,error:o,platform:s??d.default.platform});return S({code:t,title:n,rootCause:y(`tnmsc could not ${r} the ${i} at "${a}".`,`Underlying error: ${f}`),exactFix:c??p.exactFix,possibleFixes:l??p.possibleFixes,details:{operation:r,targetKind:i,path:a,errorMessage:f,platform:s??d.default.platform,...u??{}}})}function D(e){let{code:t,title:n,reason:r,configPath:i,exactFix:a,possibleFixes:o,details:s}=e;return S({code:t,title:n,rootCause:i==null?r:y(r[0],...r.slice(1),`Config path: ${i}`),exactFix:a,possibleFixes:o,details:{...i==null?{}:{configPath:i},...s??{}}})}function O(e){return S(e)}function ee(e){let{code:t,title:n,path:r,expectedKind:i,actualState:a,exactFix:o,possibleFixes:s,details:c}=e;return S({code:t,title:n,rootCause:y(`tnmsc expected a ${i} at "${r}".`,`Actual state: ${a}`),exactFix:o??y(`Create or replace "${r}" with a valid ${i} before retrying tnmsc.`),possibleFixes:s??[y(`Check whether the path was moved, deleted, or replaced with the wrong file type.`),y(`Update your configuration so tnmsc points to the intended source path.`)],details:{path:r,expectedKind:i,actualState:a,...c??{}}})}function k(e){let{code:t,title:n,diagnosticText:r,exactFix:i,possibleFixes:a,details:o}=e;return S({code:t,title:n,rootCause:x(r),exactFix:i??y(`Fix the referenced prompt source or compiled dist file so the compiler diagnostic no longer triggers.`),possibleFixes:a??[y(`Open the file referenced in the diagnostic and correct the reported syntax or metadata issue.`),y(`Rebuild the prompt output so the dist file matches the current source tree.`)],details:{diagnosticText:r,...o??{}}})}function te(e,t){let n=t[0];return S({code:`PROTECTED_DELETION_GUARD_TRIGGERED`,title:`Protected deletion guard blocked a destructive operation`,rootCause:y(`The "${e}" operation targeted ${t.length} protected path(s).`,n==null?`No violation details were captured.`:`Example protected path: ${n.protectedPath}`),exactFix:y(`Remove protected inputs or reserved workspace paths from the delete plan before running tnmsc again.`),possibleFixes:[y(`Update cleanup declarations so they only target generated output paths.`),y(`Move source inputs outside of the cleanup target set if they are currently overlapping.`)],details:{operation:e,count:t.length,violations:t.map(e=>({targetPath:e.targetPath,protectedPath:e.protectedPath,protectionMode:e.protectionMode,source:e.source,reason:e.reason}))}})}function A(e,t){let n=b(t);return S({code:`UNHANDLED_EXCEPTION`,title:`Unhandled exception in ${e}`,rootCause:y(`tnmsc terminated because an unhandled exception escaped the ${e} flow.`,`Underlying error: ${n}`),exactFix:y(`Inspect the error context and add the missing guard, validation, or recovery path before retrying the command.`),possibleFixes:[y(`Re-run the command with the same inputs after fixing the referenced file or configuration.`),y(`Add a focused test that reproduces this failure so the regression stays covered.`)],details:{context:e,errorMessage:n}})}function j(e){let t=[],n=[];for(let r of e)r.level===`warn`?t.push(r):n.push(r);return{warnings:t,errors:n}}function ne(e,t){let n=u.join(e,`.git`),r=l.existsSync(n);return r?t?.info(`version control detected`,{path:n}):t?.warn(O({code:`AINDEX_VERSION_CONTROL_MISSING`,title:`Aindex root is not under version control`,rootCause:y(`tnmsc did not find a .git directory under "${e}".`),exactFix:y(`Initialize git in "${e}" or place the aindex inside an existing git repository.`),possibleFixes:[y("Run `git init` in the aindex root if the directory should be versioned.")],details:{rootPath:e,gitPath:n}})),{hasGit:r,gitPath:n}}function re(e){return u.extname(e).length>0}function ie(e,t={}){let{logger:n,config:r}=t,i=[],a=[],o=[],s=[],c=new Set,d=new Set,f=new Set,p=t=>{if(l.existsSync(t)){d.has(t)||(d.add(t),o.push(t),n?.debug(`directory exists`,{path:t}));return}l.mkdirSync(t,{recursive:!0});let r=t;for(;!c.has(r)&&(c.add(r),i.push(r),n?.info(`created directory`,{path:r}),r!==e);)r=u.dirname(r)},m=(e,t=`# Generated by tnmsc init
2
+ `)=>{if(p(u.dirname(e)),l.existsSync(e)){f.has(e)||(f.add(e),s.push(e),n?.debug(`file exists`,{path:e}));return}l.writeFileSync(e,t,`utf8`),a.push(e),n?.info(`created file`,{path:e})};if(p(e),r!=null){for(let[t,n]of Object.entries(r))if(!(t===`dir`||typeof n!=`object`||!n))for(let t of[n.src,n.dist]){let n=u.join(e,t);re(t)?m(n):p(n)}}return{success:!0,rootPath:e,createdDirs:i,createdFiles:a,existedDirs:o,existedFiles:s}}const M={"win32-x64":{local:`napi-logger.win32-x64-msvc`,suffix:`win32-x64-msvc`},"linux-x64":{local:`napi-logger.linux-x64-gnu`,suffix:`linux-x64-gnu`},"linux-arm64":{local:`napi-logger.linux-arm64-gnu`,suffix:`linux-arm64-gnu`},"darwin-arm64":{local:`napi-logger.darwin-arm64`,suffix:`darwin-arm64`},"darwin-x64":{local:`napi-logger.darwin-x64`,suffix:`darwin-x64`}},ae=[`error`,`warn`,`fatal`],oe=[`info`,`debug`,`trace`];let se,N;function P(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.createLogger==`function`&&typeof t.setGlobalLogLevel==`function`&&typeof t.getGlobalLogLevel==`function`&&typeof t.clearBufferedDiagnostics==`function`&&typeof t.drainBufferedDiagnostics==`function`}function F(){let e=M[`${d.default.platform}-${d.default.arch}`];if(e!=null)return e;throw Error(`Unsupported platform for @truenine/logger native binding: ${d.default.platform}-${d.default.arch}`)}function ce(e,t,n){let r=e instanceof Error?e.message:String(e),i=t instanceof Error?t.message:String(t);return Error([`Failed to load @truenine/logger native binding.`,`Tried local binary "./${M[`${d.default.platform}-${d.default.arch}`]?.local??`unknown`}.node" and package "@truenine/memory-sync-cli-${n}".`,`Local error: ${r}`,`Package error: ${i}`,"Run `pnpm -F @truenine/logger run build` to build the native module."].join(`
3
+ `))}function le(){let e=require(`url`).pathToFileURL(__filename).href,t=(0,m.createRequire)(e),{local:n,suffix:r}=F();try{return t(`./${n}.node`)}catch(e){try{let e=t(`@truenine/memory-sync-cli-${r}`).logger;if(P(e))return e;throw Error(`Package "@truenine/memory-sync-cli-${r}" does not export a logger binding`)}catch(t){throw ce(e,t,r)}}}function ue(){if(se!=null)return se;if(N!=null)throw N;try{return se=le(),se}catch(e){throw N=e instanceof Error?e:Error(String(e)),N}}function I(e){let t={name:e.name,message:e.message,stack:e.stack};for(let n of Object.getOwnPropertyNames(e))n===`name`||n===`message`||n===`stack`||(t[n]=e[n]);return t}function de(){let e=new WeakSet;return function(t,n){return n instanceof Error?I(n):typeof n==`bigint`?n.toString():typeof n==`function`?`[Function ${n.name||`anonymous`}]`:typeof n==`symbol`?n.toString():typeof n!=`object`||!n?n:e.has(n)?`[Circular]`:(e.add(n),n)}}function fe(e){return JSON.stringify(e,de())??`null`}function pe(e){try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function me(e,t){if(typeof e!=`string`)return{message:``,metaJson:fe(e)};let n=t.length===1&&typeof t[0]==`object`&&t[0]!==null?t[0]:t.length>0?{args:t}:void 0;return{message:e,metaJson:n==null?void 0:fe(n)}}function L(e,t){return(n,...r)=>{let{message:i,metaJson:a}=me(n,r);e.log(t,i,a)}}function he(e,t){return n=>e.logDiagnostic(t,fe(n))}function ge(e){let t=oe.reduce((t,n)=>(t[n]=L(e,n),t),{}),n=ae.reduce((t,n)=>(t[n]=he(e,n),t),{});return{error:n.error,warn:n.warn,info:t.info,debug:t.debug,trace:t.trace,fatal:n.fatal}}function _e(e){ue().setGlobalLogLevel(e)}function ve(){ue().clearBufferedDiagnostics()}function ye(){return pe(ue().drainBufferedDiagnostics())}function be(e,t){return ge(ue().createLogger(e,t))}var xe=Object.create,Se=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,we=Object.getOwnPropertyNames,Te=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty,R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),De=(e,t)=>{let n={};for(var r in e)Se(n,r,{get:e[r],enumerable:!0});return t||Se(n,Symbol.toStringTag,{value:`Module`}),n},z=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=we(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ee.call(e,s)&&s!==n&&Se(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Ce(t,s))||r.enumerable});return e},Oe=(e,t,n)=>(n=e==null?{}:xe(Te(e)),z(t||!e||!e.__esModule?Se(n,`default`,{value:e,enumerable:!0}):n,e)),ke=(0,m.createRequire)(require(`url`).pathToFileURL(__filename).href);const Ae=Re(/[A-Za-z]/),je=Re(/[\dA-Za-z]/),Me=Re(/[#-'*+\--9=?A-Z^-~]/);function Ne(e){return e!==null&&(e<32||e===127)}const Pe=Re(/\d/),Fe=Re(/[\dA-Fa-f]/),Ie=Re(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const U=Re(/\p{P}|\p{S}/u),Le=Re(/\s/);function Re(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var ze=Oe(R(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1);const Be=Object.assign(Ve(Error),{eval:Ve(EvalError),range:Ve(RangeError),reference:Ve(ReferenceError),syntax:Ve(SyntaxError),type:Ve(TypeError),uri:Ve(URIError)});function Ve(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,ze.default)(t,...n))}}const He={}.hasOwnProperty,Ue={yaml:`-`,toml:`+`};function We(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=Ge(r[n]);return t}function Ge(e){let t=e;if(typeof t==`string`){if(!He.call(Ue,t))throw Be("Missing matter definition for `%s`",t);t={type:t,marker:Ue[t]}}else if(typeof t!=`object`)throw Be("Expected matter to be an object, not `%j`",t);if(!He.call(t,`type`))throw Be("Missing `type` in matter `%j`",t);if(!He.call(t,`fence`)&&!He.call(t,`marker`))throw Be("Missing `marker` or `fence` in matter `%j`",t);return t}function Ke(e){let t=We(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=Je(e,`open`).charCodeAt(0),a=qe(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function qe(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=Je(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),H(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return H(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return B(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=Je(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||B(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||B(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),H(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return H(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||B(i)?(e.exit(r),t(i)):n(i)}}}function Je(e,t){return e.marker?Ye(e.marker,t).repeat(3):Ye(e.fence,t)}function Ye(e,t){return typeof e==`string`?e:e[t]}function Xe(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Ze(e){let t=We(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=Qe(e),r[e.type]=$e,r[e.type+`Value`]=et}return{enter:n,exit:r}}function Qe(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function $e(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function et(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function tt(e){let t=[],n={},r=We(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=nt(e);let a=rt(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:Xe(a.charAt(1))})}return{unsafe:t,handlers:n}}function nt(e){let t=rt(e,`open`),n=rt(e,`close`);return r;function r(e){return t+(e.value?`
4
4
  `+e.value:``)+`
5
- `+n}}function Ze(e,t){return e.marker?Qe(e.marker,t).repeat(3):Qe(e.fence,t)}function Qe(e,t){return typeof e==`string`?e:e[t]}function $e(e){let t=this,n=e||`yaml`,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Be(n)),a.push(Ge(n)),o.push(Ye(n))}function et(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const tt=(function(e){if(e==null)return ot;if(typeof e==`function`)return at(e);if(typeof e==`object`)return Array.isArray(e)?nt(e):rt(e);if(typeof e==`string`)return it(e);throw Error(`Expected function, string, or object as test`)});function nt(e){let t=[],n=-1;for(;++n<e.length;)t[n]=tt(e[n]);return at(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function rt(e){let t=e;return at(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function it(e){return at(t);function t(t){return t&&t.type===e}}function at(e){return t;function t(t,n,r){return!!(st(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ot(){return!0}function st(e){return typeof e==`object`&&!!e&&`type`in e}function ct(e){return`\x1B[33m`+e+`\x1B[39m`}const lt=[];function ut(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=tt(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+ct(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=lt,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=dt(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function dt(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?lt:[e]}function ft(e,t,n){let r=tt((n||{}).ignore||[]),i=pt(t),a=-1;for(;++a<i.length;)ut(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function pt(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([mt(e[0]),ht(e[1])])}return t}function mt(e){return typeof e==`string`?new RegExp(We(e),`g`):e}function ht(e){return typeof e==`function`?e:function(){return e}}const gt=`phrasing`,_t=[`autolink`,`link`,`image`,`label`];function V(){return{transforms:[Tt],enter:{literalAutolink:yt,literalAutolinkEmail:bt,literalAutolinkHttp:bt,literalAutolinkWww:bt},exit:{literalAutolink:wt,literalAutolinkEmail:Ct,literalAutolinkHttp:xt,literalAutolinkWww:St}}}function vt(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:gt,notInConstruct:_t},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:gt,notInConstruct:_t},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:gt,notInConstruct:_t}]}}function yt(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function bt(e){this.config.enter.autolinkProtocol.call(this,e)}function xt(e){this.config.exit.autolinkProtocol.call(this,e)}function St(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Ct(e){this.config.exit.autolinkEmail.call(this,e)}function wt(e){this.exit(e)}function Tt(e){ft(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Et],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Dt]],{ignore:[`link`,`linkReference`]})}function Et(e,t,n,r,i){let a=``;if(!At(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Ot(n)))return!1;let o=kt(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Dt(e,t,n,r){return!At(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Ot(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function kt(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=et(e,`(`),a=et(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function At(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Ne(n)||Me(n))&&(!t||n!==47)}function jt(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}H.peek=Bt;function Mt(){this.buffer()}function Nt(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Pt(){this.buffer()}function Ft(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function It(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Lt(e){this.exit(e)}function Rt(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zt(e){this.exit(e)}function Bt(){return`[`}function H(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Vt(){return{enter:{gfmFootnoteCallString:Mt,gfmFootnoteCall:Nt,gfmFootnoteDefinitionLabelString:Pt,gfmFootnoteDefinition:Ft},exit:{gfmFootnoteCallString:It,gfmFootnoteCall:Lt,gfmFootnoteDefinitionLabelString:Rt,gfmFootnoteDefinition:zt}}}function Ht(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:H},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
6
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Wt:Ut))),s(),o}}function Ut(e,t,n){return t===0?e:Wt(e,t,n)}function Wt(e,t,n){return(n?``:` `)+e}const Gt=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Xt.peek=Zt;function Kt(){return{canContainEols:[`delete`],enter:{strikethrough:Jt},exit:{strikethrough:Yt}}}function qt(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Gt}],handlers:{delete:Xt}}}function Jt(e){this.enter({type:`delete`,children:[]},e)}function Yt(e){this.exit(e)}function Xt(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Zt(){return`~`}function Qt(e){return e.length}function $t(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Qt,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=en(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=tn(r[d]);else{let e=tn(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
7
- `)}function en(e){return e==null?``:String(e)}function tn(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const nn={}.hasOwnProperty;function rn(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&nn.call(t,e)){let n=String(t[e]);i=nn.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}const an={}.hasOwnProperty;function on(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)on(e,t.extensions[n]);for(r in t)if(an.call(t,r))switch(r){case`extensions`:break;case`unsafe`:sn(e[r],t[r]);break;case`join`:sn(e[r],t[r]);break;case`handlers`:cn(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function sn(e,t){t&&e.push(...t)}function cn(e,t){t&&Object.assign(e,t)}function ln(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),un);return i(),o}function un(e,t,n){return`>`+(n?``:` `)+e}function dn(e,t){return fn(e,t.inConstruct,!0)&&!fn(e,t.notInConstruct,!1)}function fn(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function pn(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
5
+ `+n}}function rt(e,t){return e.marker?it(e.marker,t).repeat(3):it(e.fence,t)}function it(e,t){return typeof e==`string`?e:e[t]}function at(e){let t=this,n=e||`yaml`,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Ke(n)),a.push(Ze(n)),o.push(tt(n))}function ot(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const st=(function(e){if(e==null)return ft;if(typeof e==`function`)return dt(e);if(typeof e==`object`)return Array.isArray(e)?ct(e):lt(e);if(typeof e==`string`)return ut(e);throw Error(`Expected function, string, or object as test`)});function ct(e){let t=[],n=-1;for(;++n<e.length;)t[n]=st(e[n]);return dt(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function lt(e){let t=e;return dt(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ut(e){return dt(t);function t(t){return t&&t.type===e}}function dt(e){return t;function t(t,n,r){return!!(pt(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ft(){return!0}function pt(e){return typeof e==`object`&&!!e&&`type`in e}function mt(e){return`\x1B[33m`+e+`\x1B[39m`}const W=[];function ht(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=st(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+mt(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=W,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=gt(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function gt(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?W:[e]}function _t(e,t,n){let r=st((n||{}).ignore||[]),i=vt(t),a=-1;for(;++a<i.length;)ht(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function vt(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([yt(e[0]),bt(e[1])])}return t}function yt(e){return typeof e==`string`?new RegExp(Xe(e),`g`):e}function bt(e){return typeof e==`function`?e:function(){return e}}const xt=`phrasing`,St=[`autolink`,`link`,`image`,`label`];function Ct(){return{transforms:[jt],enter:{literalAutolink:Tt,literalAutolinkEmail:Et,literalAutolinkHttp:Et,literalAutolinkWww:Et},exit:{literalAutolink:At,literalAutolinkEmail:kt,literalAutolinkHttp:Dt,literalAutolinkWww:Ot}}}function wt(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:xt,notInConstruct:St},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:xt,notInConstruct:St},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:xt,notInConstruct:St}]}}function Tt(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Et(e){this.config.enter.autolinkProtocol.call(this,e)}function Dt(e){this.config.exit.autolinkProtocol.call(this,e)}function Ot(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function kt(e){this.config.exit.autolinkEmail.call(this,e)}function At(e){this.exit(e)}function jt(e){_t(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Mt],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Nt]],{ignore:[`link`,`linkReference`]})}function Mt(e,t,n,r,i){let a=``;if(!It(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Pt(n)))return!1;let o=Ft(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Nt(e,t,n,r){return!It(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Pt(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Ft(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=ot(e,`(`),a=ot(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function It(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Le(n)||U(n))&&(!t||n!==47)}function Lt(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}Kt.peek=Gt;function G(){this.buffer()}function Rt(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function zt(){this.buffer()}function Bt(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Vt(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ht(e){this.exit(e)}function Ut(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Wt(e){this.exit(e)}function Gt(){return`[`}function Kt(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function qt(){return{enter:{gfmFootnoteCallString:G,gfmFootnoteCall:Rt,gfmFootnoteDefinitionLabelString:zt,gfmFootnoteDefinition:Bt},exit:{gfmFootnoteCallString:Vt,gfmFootnoteCall:Ht,gfmFootnoteDefinitionLabelString:Ut,gfmFootnoteDefinition:Wt}}}function Jt(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Kt},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
6
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Xt:Yt))),s(),o}}function Yt(e,t,n){return t===0?e:Xt(e,t,n)}function Xt(e,t,n){return(n?``:` `)+e}const Zt=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];nn.peek=rn;function Qt(){return{canContainEols:[`delete`],enter:{strikethrough:en},exit:{strikethrough:tn}}}function $t(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Zt}],handlers:{delete:nn}}}function en(e){this.enter({type:`delete`,children:[]},e)}function tn(e){this.exit(e)}function nn(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function rn(){return`~`}function an(e){return e.length}function on(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||an,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=sn(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=cn(r[d]);else{let e=cn(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
7
+ `)}function sn(e){return e==null?``:String(e)}function cn(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ln(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),un);return i(),o}function un(e,t,n){return`>`+(n?``:` `)+e}function dn(e,t){return fn(e,t.inConstruct,!0)&&!fn(e,t.notInConstruct,!1)}function fn(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function pn(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
8
8
  `&&dn(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
9
9
  `}function mn(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function hn(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function gn(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function _n(e,t,n,r){let i=gn(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(hn(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,vn);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(mn(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
10
10
  `,encode:["`"],...s.current()})),t()}return u+=s.move(`
11
11
  `),a&&(u+=s.move(a+`
12
12
  `)),u+=s.move(c),l(),u}function vn(e,t,n){return(n?``:` `)+e}function yn(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function bn(e,t,n,r){let i=yn(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
13
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function xn(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Sn(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Cn(e){if(e===null||L(e)||Ne(e))return 1;if(Me(e))return 2}function wn(e,t,n){let r=Cn(e),i=Cn(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Tn.peek=En;function Tn(e,t,n,r){let i=xn(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=wn(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sn(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=wn(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sn(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function En(e,t,n){return n.options.emphasis||`*`}function Dn(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ut(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}const On={};function kn(e,t){let n=t||On;return An(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function An(e,t,n){if(Mn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return jn(e.children,t,n)}return Array.isArray(e)?jn(e,t,n):``}function jn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=An(e[i],t,n);return r.join(``)}function Mn(e){return!!(e&&typeof e==`object`)}function Nn(e,t){let n=!1;return Dn(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&kn(e)&&(t.options.setext||n))}function Pn(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Nn(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
13
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function xn(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Sn(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Cn(e){if(e===null||V(e)||Le(e))return 1;if(U(e))return 2}function wn(e,t,n){let r=Cn(e),i=Cn(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Tn.peek=En;function Tn(e,t,n,r){let i=xn(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=wn(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sn(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=wn(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sn(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function En(e,t,n){return n.options.emphasis||`*`}function Dn(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ht(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}const On={};function kn(e,t){let n=t||On;return An(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function An(e,t,n){if(Mn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return jn(e.children,t,n)}return Array.isArray(e)?jn(e,t,n):``}function jn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=An(e[i],t,n);return r.join(``)}function Mn(e){return!!(e&&typeof e==`object`)}function Nn(e,t){let n=!1;return Dn(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&kn(e)&&(t.options.setext||n))}function Pn(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Nn(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
14
14
  `,after:`
15
15
  `});return r(),t(),o+`
16
16
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
17
17
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
18
- `,...a.current()});return/^[\t ]/.test(l)&&(l=Sn(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Fn.peek=In;function Fn(e){return e.value||``}function In(){return`<`}Ln.peek=Rn;function Ln(e,t,n,r){let i=yn(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Rn(){return`!`}zn.peek=Bn;function zn(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Bn(){return`!`}Vn.peek=Hn;function Vn(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Hn(){return"`"}function Un(e,t){let n=kn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Wn.peek=Gn;function Wn(e,t,n,r){let i=yn(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Un(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Gn(e,t,n){return Un(e,n)?`<`:`[`}Kn.peek=qn;function Kn(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function qn(){return`[`}function Jn(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Yn(e){let t=Jn(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Xn(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Zn(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Qn(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Xn(n):Jn(n),s=e.ordered?o===`.`?`)`:`.`:Yn(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Zn(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function $n(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function er(e,t,n,r){let i=$n(n),a=n.bulletCurrent||Jn(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function tr(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}const nr=tt([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function rr(e,t,n,r){return(e.children.some(function(e){return nr(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ir(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ar.peek=or;function ar(e,t,n,r){let i=ir(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=wn(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sn(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=wn(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sn(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function or(e,t,n){return n.options.strong||`*`}function sr(e,t,n,r){return n.safe(e.value,r)}function cr(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function lr(e,t,n){let r=(Zn(n)+(n.options.ruleSpaces?` `:``)).repeat(cr(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ur={blockquote:ln,break:pn,code:_n,definition:bn,emphasis:Tn,hardBreak:pn,heading:Pn,html:Fn,image:Ln,imageReference:zn,inlineCode:Vn,link:Wn,linkReference:Kn,list:Qn,listItem:er,paragraph:tr,root:rr,strong:ar,text:sr,thematicBreak:lr},dr=[fr];function fr(e,t,n,r){if(t.type===`code`&&hn(t,r)&&(e.type===`list`||e.type===t.type&&hn(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&Nn(t,r))?void 0:n.spread?1:0}const pr=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],mr=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
19
- `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:pr},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
20
- ]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:pr},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
21
- *])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:pr},{atBreak:!0,character:`+`,after:`(?:[ \r
22
- ])`},{atBreak:!0,character:`-`,after:`(?:[ \r
23
- -])`},{atBreak:!0,before:`\\d+`,character:`.`,after:`(?:[ \r
24
- ]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:pr},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:pr},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:pr},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:pr},{atBreak:!0,character:`~`}],hr={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
25
- `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},gr={}.hasOwnProperty;function _r(e){return gr.call(hr,e)?hr[e]:!1}function vr(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}const yr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function br(e){return e.replace(yr,xr)}function xr(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return vr(n.slice(t?2:1),t?16:10)}return _r(n)||e}function Sr(e){return e.label||!e.identifier?e.label||``:br(e.identifier)}function Cr(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function wr(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
26
- `)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=Sn(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+Sn(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function Tr(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
27
- `,after:`
28
- `,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(Er(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function Er(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
29
- `.repeat(1+a);if(a===!1)return`
30
-
31
- <!---->
32
-
33
- `}return`
34
-
35
- `}const Dr=/\r?\n|\r/g;function Or(e,t){let n=[],r=0,i=0,a;for(;a=Dr.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function kr(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!dn(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(Ar);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(jr(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(Sn(r.charCodeAt(e))),c++))}return a.push(jr(r.slice(c,l),n.after)),a.join(``)}function Ar(e,t){return e-t}function jr(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function Mr(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function Nr(e,t){let n=t||{},r={associationId:Sr,containerPhrasing:Lr,containerFlow:Rr,createTracker:Mr,compilePattern:Cr,enter:a,handlers:{...ur},handle:void 0,indentLines:Or,indexStack:[],join:[...dr],options:{},safe:zr,stack:[],unsafe:[...mr]};on(r,n),r.options.tightDefinitions&&r.join.push(Ir),r.handle=rn(`type`,{invalid:Pr,unknown:Fr,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
36
- `,after:`
37
- `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
38
- `),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function Pr(e){throw Error("Cannot handle value `"+e+"`, expected node")}function Fr(e){let t=e;throw Error("Cannot handle unknown node `"+t.type+"`")}function Ir(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function Lr(e,t){return wr(e,this,t)}function Rr(e,t){return Tr(e,this,t)}function zr(e,t){return kr(this,e,t)}function Br(){return{enter:{table:Vr,tableData:Gr,tableHeader:Gr,tableRow:Ur},exit:{codeText:Kr,table:Hr,tableData:Wr,tableHeader:Wr,tableRow:Wr}}}function Vr(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Hr(e){this.exit(e),this.data.inTable=void 0}function Ur(e){this.enter({type:`tableRow`,children:[]},e)}function Wr(e){this.exit(e)}function Gr(e){this.enter({type:`tableCell`,children:[]},e)}function Kr(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qr));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function qr(e,t){return t===`|`?t:e}function Jr(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
18
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=Sn(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Fn.peek=In;function Fn(e){return e.value||``}function In(){return`<`}Ln.peek=Rn;function Ln(e,t,n,r){let i=yn(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Rn(){return`!`}zn.peek=Bn;function zn(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Bn(){return`!`}Vn.peek=Hn;function Vn(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Hn(){return"`"}function Un(e,t){let n=kn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Wn.peek=Gn;function Wn(e,t,n,r){let i=yn(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Un(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Gn(e,t,n){return Un(e,n)?`<`:`[`}Kn.peek=qn;function Kn(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function qn(){return`[`}function Jn(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Yn(e){let t=Jn(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Xn(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Zn(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Qn(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Xn(n):Jn(n),s=e.ordered?o===`.`?`)`:`.`:Yn(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Zn(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function $n(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function er(e,t,n,r){let i=$n(n),a=n.bulletCurrent||Jn(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function tr(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}const nr=st([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function rr(e,t,n,r){return(e.children.some(function(e){return nr(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ir(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ar.peek=or;function ar(e,t,n,r){let i=ir(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=wn(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sn(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=wn(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sn(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function or(e,t,n){return n.options.strong||`*`}function sr(e,t,n,r){return n.safe(e.value,r)}function cr(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function lr(e,t,n){let r=(Zn(n)+(n.options.ruleSpaces?` `:``)).repeat(cr(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ur={blockquote:ln,break:pn,code:_n,definition:bn,emphasis:Tn,hardBreak:pn,heading:Pn,html:Fn,image:Ln,imageReference:zn,inlineCode:Vn,link:Wn,linkReference:Kn,list:Qn,listItem:er,paragraph:tr,root:rr,strong:ar,text:sr,thematicBreak:lr},dr={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
19
+ `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},fr={}.hasOwnProperty;function pr(e){return fr.call(dr,e)?dr[e]:!1}function mr(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}const hr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gr(e){return e.replace(hr,_r)}function _r(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return mr(n.slice(t?2:1),t?16:10)}return pr(n)||e}function vr(){return{enter:{table:yr,tableData:Cr,tableHeader:Cr,tableRow:xr},exit:{codeText:wr,table:br,tableData:Sr,tableHeader:Sr,tableRow:Sr}}}function yr(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function br(e){this.exit(e),this.data.inTable=void 0}function xr(e){this.enter({type:`tableRow`,children:[]},e)}function Sr(e){this.exit(e)}function Cr(e){this.enter({type:`tableCell`,children:[]},e)}function wr(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Tr));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Tr(e,t){return t===`|`?t:e}function Er(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
39
20
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
40
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return $t(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ur.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Yr(){return{exit:{taskListCheckValueChecked:Zr,taskListCheckValueUnchecked:Zr,paragraph:Qr}}}function Xr(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:$r}}}function Zr(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Qr(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function $r(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=ur.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function ei(){return[V(),Vt(),Kt(),Br(),Yr()]}function ti(e){return{extensions:[vt(),Ht(e),qt(),Jr(e),Xr()]}}function ni(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ri(e,t){return e.length>0?(ni(e,e.length,0,t),e):t}const ii={}.hasOwnProperty;function ai(e){let t={},n=-1;for(;++n<e.length;)oi(t,e[n]);return t}function oi(e,t){let n;for(n in t){let r=(ii.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ii.call(r,a)||(r[a]=[]);let e=i[a];si(r[a],Array.isArray(e)?e:e?[e]:[])}}}function si(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ni(e,0,0,r)}const ci={tokenize:Si,partial:!0},li={tokenize:Ci,partial:!0},ui={tokenize:wi,partial:!0},di={tokenize:Ti,partial:!0},fi={tokenize:Ei,partial:!0},pi={name:`wwwAutolink`,tokenize:bi,previous:Di},mi={name:`protocolAutolink`,tokenize:xi,previous:Oi},hi={name:`emailAutolink`,tokenize:yi,previous:ki},gi={};function _i(){return{text:gi}}let vi=48;for(;vi<123;)gi[vi]=hi,vi++,vi===58?vi=65:vi===91&&(vi=97);gi[43]=hi,gi[45]=hi,gi[46]=hi,gi[95]=hi,gi[72]=[hi,mi],gi[104]=[hi,mi],gi[87]=[hi,pi],gi[119]=[hi,pi];function yi(e,t,n){let r=this,i,a;return o;function o(t){return!Ai(t)||!ki.call(r,r.previous)||ji(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Ai(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(fi,u,l)(t):t===45||t===95||N(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Oe(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function bi(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Di.call(r,r.previous)||ji(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ci,e.attempt(li,e.attempt(ui,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function xi(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Oi.call(r,r.previous)&&!ji(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Oe(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||ke(t)||L(t)||Ne(t)||Me(t)?n(t):e.attempt(li,e.attempt(ui,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Si(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Ci(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(di,c,s)(t):t===null||L(t)||Ne(t)||t!==45&&Me(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function wi(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(di,t,a)(o):o===null||L(o)||Ne(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Ti(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||L(o)||Ne(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||L(e)||Ne(e)?t(e):r(e)}function a(e){return Oe(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Oe(t)?(e.consume(t),o):n(t)}}function Ei(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return N(e)?n(e):t(e)}}function Di(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||L(e)}function Oi(e){return!Oe(e)}function ki(e){return!(e===47||Ai(e))}function Ai(e){return e===43||e===45||e===46||e===95||N(e)}function ji(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Mi(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Ni={name:`attention`,resolveAll:Pi,tokenize:Fi};function Pi(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Ii(d,-c),Ii(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=ri(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=ri(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=ri(l,Mi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ri(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=ri(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ni(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Fi(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Cn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Cn(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Ii(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Li={name:`autolink`,tokenize:Ri};function Ri(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Oe(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||N(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||N(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||ke(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):P(t)?(e.consume(t),l):n(t)}function u(e){return N(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||N(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function U(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return R(r)?(e.enter(n),s(r)):t(r)}function s(r){return R(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}const zi={partial:!0,tokenize:Bi};function Bi(e,t,n){return r;function r(t){return R(t)?U(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||I(e)?t(e):n(e)}}const Vi={continuation:{tokenize:Ui},exit:Wi,name:`blockQuote`,tokenize:Hi};function Hi(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return R(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ui(e,t,n){let r=this;return i;function i(t){return R(t)?U(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Vi,t,n)(r)}}function Wi(e){e.exit(`blockQuote`)}const Gi={name:`characterEscape`,tokenize:Ki};function Ki(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return F(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}const qi={name:`characterReference`,tokenize:Ji};function Ji(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=N,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=je,u):(e.enter(`characterReferenceValue`),a=7,o=Ae,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===N&&!_r(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}const Yi={partial:!0,tokenize:Qi},Xi={concrete:!0,name:`codeFenced`,tokenize:Zi};function Zi(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),R(t)?U(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||I(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Yi,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||I(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):R(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),U(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||I(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||I(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&R(t)?U(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||I(t)?e.check(Yi,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||I(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),R(t)?U(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),R(t)?U(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||I(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Qi(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const $i={name:`codeIndented`,tokenize:ta},ea={partial:!0,tokenize:na};function ta(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),U(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):I(t)?e.attempt(ea,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||I(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function na(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):I(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):U(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):I(e)?i(e):n(e)}}const ra={name:`codeText`,previous:aa,resolve:ia,tokenize:oa};function ia(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function aa(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function oa(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):I(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||I(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var sa=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ca(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ca(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ca(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);ca(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ca(this.left,t.reverse())}}};function ca(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function la(e){let t={},n=-1,r,i,a,o,s,c,l,u=new sa(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,ua(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ni(e,0,1/0,u.slice(0)),!l}function ua(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}const da={resolve:pa,tokenize:ma},fa={partial:!0,tokenize:ha};function pa(e){return la(e),e}function ma(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):I(t)?e.check(fa,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function ha(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,a,`linePrefix`)}function a(i){if(i===null||I(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function ga(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||ke(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||I(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||L(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||ke(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function _a(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):I(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||I(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!R(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function va(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):I(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||I(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ya(e,t){let n;return r;function r(i){return I(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):R(i)?U(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}const ba={name:`definition`,tokenize:Sa},xa={partial:!0,tokenize:Ca};function Sa(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return _a.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return L(t)?ya(e,l)(t):l(t)}function l(t){return ga(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(xa,d,d)(t)}function d(t){return R(t)?U(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||I(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ca(e,t,n){return r;function r(t){return L(t)?ya(e,i)(t):n(t)}function i(t){return va(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return R(t)?U(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||I(e)?t(e):n(e)}}const wa={name:`hardBreakEscape`,tokenize:Ta};function Ta(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return I(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}const Ea={name:`headingAtx`,resolve:Da,tokenize:Oa};function Da(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},ni(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Oa(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||L(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||I(n)?(e.exit(`atxHeading`),t(n)):R(n)?U(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||L(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}const ka=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Aa=[`pre`,`script`,`style`,`textarea`],ja={concrete:!0,name:`htmlFlow`,resolveTo:Pa,tokenize:Fa},Ma={partial:!0,tokenize:La},Na={partial:!0,tokenize:Ia};function Pa(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Fa(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ie):Oe(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Oe(a)?(e.consume(a),i=4,r.interrupt?t:ie):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ie):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return Oe(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||L(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Aa.includes(l)?(i=1,r.interrupt?t(s):D(s)):ka.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||N(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return R(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Oe(t)?(e.consume(t),b):R(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||N(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):R(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):R(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||I(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||L(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||R(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||I(t)?D(t):R(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ae):t===63&&i===3?(e.consume(t),ie):t===93&&i===5?(e.consume(t),re):I(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ma,oe,O)(t)):t===null||I(t)?(e.exit(`htmlFlowData`),O(t)):(e.consume(t),D)}function O(t){return e.check(Na,k,oe)(t)}function k(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||I(t)?O(t):(e.enter(`htmlFlowData`),D(t))}function A(t){return t===45?(e.consume(t),ie):D(t)}function j(t){return t===47?(e.consume(t),o=``,ne):D(t)}function ne(t){if(t===62){let n=o.toLowerCase();return Aa.includes(n)?(e.consume(t),ae):D(t)}return Oe(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):D(t)}function re(t){return t===93?(e.consume(t),ie):D(t)}function ie(t){return t===62?(e.consume(t),ae):t===45&&i===2?(e.consume(t),ie):D(t)}function ae(t){return t===null||I(t)?(e.exit(`htmlFlowData`),oe(t)):(e.consume(t),ae)}function oe(n){return e.exit(`htmlFlow`),t(n)}}function Ia(e,t,n){let r=this;return i;function i(t){return I(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function La(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(zi,t,n)}}const Ra={name:`htmlText`,tokenize:za};function za(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Oe(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Oe(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):I(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):I(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):I(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):I(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return Oe(t)?(e.consume(t),S):n(t)}function S(t){return t===45||N(t)?(e.consume(t),S):C(t)}function C(t){return I(t)?(o=C,j(t)):R(t)?(e.consume(t),C):A(t)}function w(t){return t===45||N(t)?(e.consume(t),w):t===47||t===62||L(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||Oe(t)?(e.consume(t),E):I(t)?(o=T,j(t)):R(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||N(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):I(t)?(o=ee,j(t)):R(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,O):I(t)?(o=D,j(t)):R(t)?(e.consume(t),D):(e.consume(t),k)}function O(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):I(t)?(o=O,j(t)):(e.consume(t),O)}function k(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||L(t)?T(t):(e.consume(t),k)}function te(e){return e===47||e===62||L(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return R(t)?U(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}const Ba={name:`labelEnd`,resolveAll:Wa,resolveTo:Ga,tokenize:Ka},Va={tokenize:qa},Ha={tokenize:Ja},Ua={tokenize:Ya};function Wa(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ni(e,0,e.length,n),e}function Ga(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=ri(s,e.slice(a+1,a+r+3)),s=ri(s,[[`enter`,u,t]]),s=ri(s,Mi(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=ri(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=ri(s,e.slice(o+1)),s=ri(s,[[`exit`,c,t]]),ni(e,a,e.length,s),e}function Ka(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(jt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Va,u,o?u:d)(t):t===91?e.attempt(Ha,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ua,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function qa(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return L(t)?ya(e,a)(t):a(t)}function a(t){return t===41?u(t):ga(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return L(t)?ya(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?va(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return L(t)?ya(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ja(e,t,n){let r=this;return i;function i(t){return _a.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ya(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}const Xa={name:`labelStartImage`,resolveAll:Ba.resolveAll,tokenize:Za};function Za(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const Qa={name:`labelStartLink`,resolveAll:Ba.resolveAll,tokenize:$a};function $a(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const eo={name:`lineEnding`,tokenize:to};function to(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}}const no={name:`thematicBreak`,tokenize:ro};function ro(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||I(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),R(t)?U(e,s,`whitespace`)(t):s(t))}}const io={continuation:{tokenize:co},exit:uo,name:`list`,tokenize:so},ao={partial:!0,tokenize:fo},oo={partial:!0,tokenize:lo};function so(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ae(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(no,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ae(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(zi,r.interrupt?n:u,e.attempt(ao,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return R(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function co(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(zi,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!R(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oo,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(io,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function lo(e,t,n){let r=this;return U(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function uo(e){e.exit(this.containerState.type)}function fo(e,t,n){let r=this;return U(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!R(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}const po={name:`setextUnderline`,resolveTo:mo,tokenize:ho};function mo(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function ho(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),R(t)?U(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||I(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}const go={tokenize:wo,partial:!0};function _o(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:xo,continuation:{tokenize:So},exit:Co}},text:{91:{name:`gfmFootnoteCall`,tokenize:bo},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:vo,resolveTo:yo}}}}function vo(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=jt(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function yo(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function bo(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||L(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(jt(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return L(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function xo(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||L(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=jt(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return L(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),U(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function So(e,t,n){return e.check(zi,t,e.attempt(go,t,n))}function Co(e){e.exit(`gfmFootnoteDefinition`)}function wo(e,t,n){let r=this;return U(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function To(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ni(o,o.length,0,Mi(s,e.slice(r+1,n),t)),ni(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ni(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Cn(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Cn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Eo=class{constructor(){this.map=[]}add(e,t,n){Do(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Do(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Oo(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ko(){return{flow:{null:{name:`table`,tokenize:Ao,resolveAll:jo}}}}function Ao(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):I(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):R(t)?U(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||L(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,R(t)?U(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return R(t)?U(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||I(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return R(t)?U(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||I(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||I(n)?(e.exit(`tableRow`),t(n)):R(n)?U(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||L(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function jo(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Eo;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(No(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Mo(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Mo(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Mo(f,t,o,i,n,d)):(o[0]=o[1],d=Mo(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&No(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Oo(t.events,n))}return e}function Mo(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Po(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Po(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Po(t.events,n[2]),a=Po(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Po(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function No(e,t,n,r,i){let a=[],o=Po(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Po(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const Fo={name:`tasklistCheck`,tokenize:Lo};function Io(){return{text:{91:Fo}}}function Lo(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return L(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return I(r)?t(r):R(r)?e.check({tokenize:Ro},t,n)(r):n(r)}}function Ro(e,t,n){return U(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function zo(e){return ai([_i(),_o(),To(e),ko(),Io()])}const Bo={};function Vo(e){let t=this,n=e||Bo,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(zo(n)),a.push(ei()),o.push(ti(n))}function Ho(){return{enter:{mdxFlowExpression:Wo,mdxTextExpression:Go},exit:{mdxFlowExpression:Ko,mdxFlowExpressionChunk:qo,mdxTextExpression:Ko,mdxTextExpressionChunk:qo}}}function Uo(){return{handlers:{mdxFlowExpression:Jo,mdxTextExpression:Jo},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function Wo(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function Go(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function Ko(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function qo(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Jo(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}const Yo=`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`.split(`.`),Xo={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function Zo(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Qo(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function $o(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function es(e){return $o(e)||Zo(e)}const ts=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function ns(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?es:u===`decimal`?Zo:Qo;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&Yo.includes(y)&&(_=y,v=_r(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?_r(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):es(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(rs(e))h(7,S),C=`�`;else if(e in Xo)h(6,S),C=Xo[e];else{let t=``;is(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,ts[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function rs(e){return e>=55296&&e<=57343||e>1114111}function is(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}const as=/["&'<>`]/g,os=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ss=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,cs=/[|\\{}()[\]^$+*?.]/g,ls=new WeakMap;function us(e,t){if(e=e.replace(t.subset?ds(t.subset):as,r),t.subset||t.escapeOnly)return e;return e.replace(os,n).replace(ss,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function ds(e){let t=ls.get(e);return t||(t=fs(e),ls.set(e,t)),t}function fs(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(cs,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function ps(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function ms(e,t){return us(e,Object.assign({format:ps},t))}function hs(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?_s(e.position):`start`in e||`end`in e?_s(e):`line`in e||`column`in e?gs(e):``}function gs(e){return vs(e&&e.line)+`:`+vs(e&&e.column)}function _s(e){return gs(e&&e.start)+`-`+gs(e&&e.end)}function vs(e){return e&&typeof e==`number`?e:1}var W=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=hs(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};W.prototype.file=``,W.prototype.name=``,W.prototype.reason=``,W.prototype.message=``,W.prototype.stack=``,W.prototype.column=void 0,W.prototype.line=void 0,W.prototype.ancestors=void 0,W.prototype.cause=void 0,W.prototype.fatal=void 0,W.prototype.place=void 0,W.prototype.ruleId=void 0,W.prototype.source=void 0;function ys(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new W("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new W(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new W("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=ns(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new W("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+hs(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new W("Expected a closing tag for `"+S(r)+"` ("+hs({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new W("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+hs(t.end)+") or another opening tag after the start of `"+t.type+"` ("+hs(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function bs(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=ws,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=Cs(Ss(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&et(e,n)>et(e,o)?o:n;s=t+ms(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+` `+m[e];b+=y.move(`
21
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return on(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ur.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Dr(){return{exit:{taskListCheckValueChecked:kr,taskListCheckValueUnchecked:kr,paragraph:Ar}}}function Or(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:jr}}}function kr(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Ar(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function jr(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=ur.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Mr(){return[Ct(),qt(),Qt(),vr(),Dr()]}function Nr(e){return{extensions:[wt(),Jt(e),$t(),Er(e),Or()]}}function Pr(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Fr(e,t){return e.length>0?(Pr(e,e.length,0,t),e):t}const Ir={}.hasOwnProperty;function Lr(e){let t={},n=-1;for(;++n<e.length;)Rr(t,e[n]);return t}function Rr(e,t){let n;for(n in t){let r=(Ir.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ir.call(r,a)||(r[a]=[]);let e=i[a];zr(r[a],Array.isArray(e)?e:e?[e]:[])}}}function zr(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Pr(e,0,0,r)}const Br={tokenize:ei,partial:!0},Vr={tokenize:ti,partial:!0},Hr={tokenize:ni,partial:!0},Ur={tokenize:ri,partial:!0},Wr={tokenize:ii,partial:!0},Gr={name:`wwwAutolink`,tokenize:Qr,previous:ai},Kr={name:`protocolAutolink`,tokenize:$r,previous:oi},qr={name:`emailAutolink`,tokenize:Zr,previous:si},Jr={};function Yr(){return{text:Jr}}let Xr=48;for(;Xr<123;)Jr[Xr]=qr,Xr++,Xr===58?Xr=65:Xr===91&&(Xr=97);Jr[43]=qr,Jr[45]=qr,Jr[46]=qr,Jr[95]=qr,Jr[72]=[qr,Kr],Jr[104]=[qr,Kr],Jr[87]=[qr,Gr],Jr[119]=[qr,Gr];function Zr(e,t,n){let r=this,i,a;return o;function o(t){return!ci(t)||!si.call(r,r.previous)||li(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return ci(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Wr,u,l)(t):t===45||t===95||je(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ae(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Qr(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ai.call(r,r.previous)||li(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Br,e.attempt(Vr,e.attempt(Hr,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function $r(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&oi.call(r,r.previous)&&!li(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ae(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Ne(t)||V(t)||Le(t)||U(t)?n(t):e.attempt(Vr,e.attempt(Hr,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ei(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function ti(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Ur,c,s)(t):t===null||V(t)||Le(t)||t!==45&&U(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function ni(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Ur,t,a)(o):o===null||V(o)||Le(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function ri(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||V(o)||Le(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||V(e)||Le(e)?t(e):r(e)}function a(e){return Ae(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ae(t)?(e.consume(t),o):n(t)}}function ii(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return je(e)?n(e):t(e)}}function ai(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function oi(e){return!Ae(e)}function si(e){return!(e===47||ci(e))}function ci(e){return e===43||e===45||e===46||e===95||je(e)}function li(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function ui(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const di={name:`attention`,resolveAll:fi,tokenize:pi};function fi(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};mi(d,-c),mi(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Fr(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Fr(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Fr(l,ui(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Fr(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Fr(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Pr(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function pi(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Cn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Cn(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function mi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hi={name:`autolink`,tokenize:gi};function gi(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Ae(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||je(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||je(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Ne(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Me(t)?(e.consume(t),l):n(t)}function u(e){return je(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||je(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function K(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return H(r)?(e.enter(n),s(r)):t(r)}function s(r){return H(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}const _i={partial:!0,tokenize:vi};function vi(e,t,n){return r;function r(t){return H(t)?K(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||B(e)?t(e):n(e)}}const yi={continuation:{tokenize:xi},exit:Si,name:`blockQuote`,tokenize:bi};function bi(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return H(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function xi(e,t,n){let r=this;return i;function i(t){return H(t)?K(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(yi,t,n)(r)}}function Si(e){e.exit(`blockQuote`)}const Ci={name:`characterEscape`,tokenize:wi};function wi(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Ie(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}const Ti={name:`characterReference`,tokenize:Ei};function Ei(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=je,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Fe,u):(e.enter(`characterReferenceValue`),a=7,o=Pe,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===je&&!pr(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}const Di={partial:!0,tokenize:Ai},Oi={concrete:!0,name:`codeFenced`,tokenize:ki};function ki(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),H(t)?K(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||B(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Di,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||B(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),K(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||B(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||B(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&H(t)?K(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||B(t)?e.check(Di,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||B(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),H(t)?K(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),H(t)?K(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||B(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Ai(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const ji={name:`codeIndented`,tokenize:Ni},Mi={partial:!0,tokenize:Pi};function Ni(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),K(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):B(t)?e.attempt(Mi,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||B(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Pi(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):K(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):B(e)?i(e):n(e)}}const Fi={name:`codeText`,previous:Li,resolve:Ii,tokenize:Ri};function Ii(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Li(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Ri(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||B(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var zi=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Bi(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Bi(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Bi(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Bi(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Bi(this.left,t.reverse())}}};function Bi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Vi(e){let t={},n=-1,r,i,a,o,s,c,l,u=new zi(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Hi(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Pr(e,0,1/0,u.slice(0)),!l}function Hi(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}const Ui={resolve:Gi,tokenize:Ki},Wi={partial:!0,tokenize:qi};function Gi(e){return Vi(e),e}function Ki(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):B(t)?e.check(Wi,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function qi(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,a,`linePrefix`)}function a(i){if(i===null||B(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ji(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Ne(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||B(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||V(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Ne(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Yi(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):B(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||B(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!H(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Xi(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||B(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Zi(e,t){let n;return r;function r(i){return B(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):H(i)?K(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}const Qi={name:`definition`,tokenize:ea},$i={partial:!0,tokenize:ta};function ea(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Yi.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return V(t)?Zi(e,l)(t):l(t)}function l(t){return Ji(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt($i,d,d)(t)}function d(t){return H(t)?K(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||B(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ta(e,t,n){return r;function r(t){return V(t)?Zi(e,i)(t):n(t)}function i(t){return Xi(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return H(t)?K(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||B(e)?t(e):n(e)}}const na={name:`hardBreakEscape`,tokenize:ra};function ra(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return B(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}const ia={name:`headingAtx`,resolve:aa,tokenize:oa};function aa(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Pr(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function oa(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||V(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||B(n)?(e.exit(`atxHeading`),t(n)):H(n)?K(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||V(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}const sa=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ca=[`pre`,`script`,`style`,`textarea`],la={concrete:!0,name:`htmlFlow`,resolveTo:fa,tokenize:pa},ua={partial:!0,tokenize:ha},da={partial:!0,tokenize:ma};function fa(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function pa(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ie):Ae(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ae(a)?(e.consume(a),i=4,r.interrupt?t:ie):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ie):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Ae(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||V(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ca.includes(l)?(i=1,r.interrupt?t(s):O(s)):sa.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||je(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return H(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Ae(t)?(e.consume(t),b):H(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||je(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):H(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):H(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||B(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||V(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||H(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||B(t)?O(t):H(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),M):t===63&&i===3?(e.consume(t),ie):t===93&&i===5?(e.consume(t),re):B(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(ua,ae,ee)(t)):t===null||B(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(da,k,ae)(t)}function k(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||B(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),ie):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return ca.includes(n)?(e.consume(t),M):O(t)}return Ae(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),ie):O(t)}function ie(t){return t===62?(e.consume(t),M):t===45&&i===2?(e.consume(t),ie):O(t)}function M(t){return t===null||B(t)?(e.exit(`htmlFlowData`),ae(t)):(e.consume(t),M)}function ae(n){return e.exit(`htmlFlow`),t(n)}}function ma(e,t,n){let r=this;return i;function i(t){return B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function ha(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(_i,t,n)}}const ga={name:`htmlText`,tokenize:_a};function _a(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ae(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ae(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):B(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):B(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):B(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):B(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return Ae(t)?(e.consume(t),S):n(t)}function S(t){return t===45||je(t)?(e.consume(t),S):C(t)}function C(t){return B(t)?(o=C,j(t)):H(t)?(e.consume(t),C):A(t)}function w(t){return t===45||je(t)?(e.consume(t),w):t===47||t===62||V(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||Ae(t)?(e.consume(t),E):B(t)?(o=T,j(t)):H(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||je(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):B(t)?(o=D,j(t)):H(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):B(t)?(o=O,j(t)):H(t)?(e.consume(t),O):(e.consume(t),k)}function ee(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):B(t)?(o=ee,j(t)):(e.consume(t),ee)}function k(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||V(t)?T(t):(e.consume(t),k)}function te(e){return e===47||e===62||V(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return H(t)?K(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}const va={name:`labelEnd`,resolveAll:Sa,resolveTo:Ca,tokenize:wa},ya={tokenize:Ta},ba={tokenize:Ea},xa={tokenize:Da};function Sa(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Pr(e,0,e.length,n),e}function Ca(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Fr(s,e.slice(a+1,a+r+3)),s=Fr(s,[[`enter`,u,t]]),s=Fr(s,ui(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Fr(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Fr(s,e.slice(o+1)),s=Fr(s,[[`exit`,c,t]]),Pr(e,a,e.length,s),e}function wa(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Lt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(ya,u,o?u:d)(t):t===91?e.attempt(ba,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(xa,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Ta(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return V(t)?Zi(e,a)(t):a(t)}function a(t){return t===41?u(t):Ji(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return V(t)?Zi(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Xi(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return V(t)?Zi(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ea(e,t,n){let r=this;return i;function i(t){return Yi.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Da(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}const Oa={name:`labelStartImage`,resolveAll:va.resolveAll,tokenize:ka};function ka(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const Aa={name:`labelStartLink`,resolveAll:va.resolveAll,tokenize:ja};function ja(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const Ma={name:`lineEnding`,tokenize:Na};function Na(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}}const Pa={name:`thematicBreak`,tokenize:Fa};function Fa(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||B(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),H(t)?K(e,s,`whitespace`)(t):s(t))}}const Ia={continuation:{tokenize:Ba},exit:Ha,name:`list`,tokenize:za},La={partial:!0,tokenize:Ua},Ra={partial:!0,tokenize:Va};function za(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Pe(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Pa,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Pe(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(_i,r.interrupt?n:u,e.attempt(La,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return H(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ba(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(_i,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!H(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ra,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(Ia,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Va(e,t,n){let r=this;return K(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Ha(e){e.exit(this.containerState.type)}function Ua(e,t,n){let r=this;return K(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!H(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}const Wa={name:`setextUnderline`,resolveTo:Ga,tokenize:Ka};function Ga(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Ka(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),H(t)?K(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||B(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}const qa={tokenize:to,partial:!0};function Ja(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Qa,continuation:{tokenize:$a},exit:eo}},text:{91:{name:`gfmFootnoteCall`,tokenize:Za},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Ya,resolveTo:Xa}}}}function Ya(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Lt(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Xa(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Za(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||V(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Lt(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return V(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Qa(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||V(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Lt(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return V(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function $a(e,t,n){return e.check(_i,t,e.attempt(qa,t,n))}function eo(e){e.exit(`gfmFootnoteDefinition`)}function to(e,t,n){let r=this;return K(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function no(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Pr(o,o.length,0,ui(s,e.slice(r+1,n),t)),Pr(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Pr(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Cn(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Cn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ro=class{constructor(){this.map=[]}add(e,t,n){io(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function io(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function ao(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function oo(){return{flow:{null:{name:`table`,tokenize:so,resolveAll:co}}}}function so(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):B(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?K(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||V(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,H(t)?K(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return H(t)?K(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||B(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return H(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||B(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||B(n)?(e.exit(`tableRow`),t(n)):H(n)?K(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||V(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function co(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ro;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(uo(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=lo(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=lo(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=lo(f,t,o,i,n,d)):(o[0]=o[1],d=lo(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&uo(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=ao(t.events,n))}return e}function lo(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},fo(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=fo(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=fo(t.events,n[2]),a=fo(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},fo(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function uo(e,t,n,r,i){let a=[],o=fo(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function fo(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const po={name:`tasklistCheck`,tokenize:ho};function mo(){return{text:{91:po}}}function ho(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return V(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return B(r)?t(r):H(r)?e.check({tokenize:go},t,n)(r):n(r)}}function go(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function _o(e){return Lr([Yr(),Ja(),no(e),oo(),mo()])}const vo={};function yo(e){let t=this,n=e||vo,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(_o(n)),a.push(Mr()),o.push(Nr(n))}function bo(){return{enter:{mdxFlowExpression:So,mdxTextExpression:Co},exit:{mdxFlowExpression:wo,mdxFlowExpressionChunk:To,mdxTextExpression:wo,mdxTextExpressionChunk:To}}}function xo(){return{handlers:{mdxFlowExpression:Eo,mdxTextExpression:Eo},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function So(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function Co(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function wo(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function To(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Eo(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}const Do=`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`.split(`.`),Oo={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function ko(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Ao(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function jo(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Mo(e){return jo(e)||ko(e)}const No=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function Po(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?Mo:u===`decimal`?ko:Ao;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&Do.includes(y)&&(_=y,v=pr(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?pr(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):Mo(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(Fo(e))h(7,S),C=`�`;else if(e in Oo)h(6,S),C=Oo[e];else{let t=``;Io(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,No[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function Fo(e){return e>=55296&&e<=57343||e>1114111}function Io(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}const Lo=/["&'<>`]/g,Ro=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,zo=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Bo=/[|\\{}()[\]^$+*?.]/g,Vo=new WeakMap;function Ho(e,t){if(e=e.replace(t.subset?Uo(t.subset):Lo,r),t.subset||t.escapeOnly)return e;return e.replace(Ro,n).replace(zo,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Uo(e){let t=Vo.get(e);return t||(t=Wo(e),Vo.set(e,t)),t}function Wo(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Bo,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function Go(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Ko(e,t){return Ho(e,Object.assign({format:Go},t))}function qo(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Yo(e.position):`start`in e||`end`in e?Yo(e):`line`in e||`column`in e?Jo(e):``}function Jo(e){return Xo(e&&e.line)+`:`+Xo(e&&e.column)}function Yo(e){return Jo(e&&e.start)+`-`+Jo(e&&e.end)}function Xo(e){return e&&typeof e==`number`?e:1}var Zo=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=qo(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Zo.prototype.file=``,Zo.prototype.name=``,Zo.prototype.reason=``,Zo.prototype.message=``,Zo.prototype.stack=``,Zo.prototype.column=void 0,Zo.prototype.line=void 0,Zo.prototype.ancestors=void 0,Zo.prototype.cause=void 0,Zo.prototype.fatal=void 0,Zo.prototype.place=void 0,Zo.prototype.ruleId=void 0,Zo.prototype.source=void 0;function Qo(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new Zo("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new Zo(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new Zo("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=Po(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new Zo("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+qo(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new Zo("Expected a closing tag for `"+S(r)+"` ("+qo({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new Zo("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+qo(t.end)+") or another opening tag after the start of `"+t.type+"` ("+qo(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function $o(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=rs,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=ns(ts(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&ot(e,n)>ot(e,o)?o:n;s=t+Ko(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+` `+m[e];b+=y.move(`
41
22
  `+m.join(`
42
23
  `)+`
43
24
  `+d)}else v&&(b+=y.move(` `+v));return u&&(b+=y.move((i||_?``:` `)+`/`)),b+=y.move(`>`),e.children&&e.children.length>0&&(e.type===`mdxJsxTextElement`?b+=y.move(s.containerPhrasing(e,{...y.current(),before:`>`,after:`<`})):(y.shift(2),b+=y.move(`
44
- `),b+=y.move(xs(e,s,y.current())),b+=y.move(`
45
- `))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function xs(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=Cs(Ss(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
25
+ `),b+=y.move(es(e,s,y.current())),b+=y.move(`
26
+ `))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function es(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=ns(ts(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
46
27
  `,after:`
47
28
  `,...a.current()},u=t.handle(n,e,t,l),d=n.type===`mdxJsxFlowElement`?u:t.indentLines(u,function(e,t,n){return(n?``:o)+e});s.push(a.move(d)),n.type!==`list`&&(t.bulletLastUsed=void 0),c<i.length-1&&s.push(a.move(`
48
29
 
49
- `))}return r.pop(),s.join(``)}function Ss(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function Cs(e){return` `.repeat(e)}function ws(){return`<`}function Ts(){return{enter:{mdxjsEsm:Ds},exit:{mdxjsEsm:Os,mdxjsEsmData:ks}}}function Es(){return{handlers:{mdxjsEsm:As}}}function Ds(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function Os(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function ks(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function As(e){return e.value||``}function js(){return[Ho(),ys(),Ts()]}function Ms(e){return{extensions:[Uo(),bs(e),Es()]}}var Ns=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],Ps=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Fs=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,Is=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,Ls={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},Rs=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,zs={5:Rs,"5module":Rs+` export import`,6:Rs+` const class extends export import super`},Bs=/^in(stanceof)?$/,Vs=RegExp(`[`+Is+`]`),Hs=RegExp(`[`+Is+Fs+`]`);function Us(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function Ws(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Vs.test(String.fromCharCode(e)):t===!1?!1:Us(e,Ps)}function Gs(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Hs.test(String.fromCharCode(e)):t===!1?!1:Us(e,Ps)||Us(e,Ns)}var G=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function Ks(e,t){return new G(e,{beforeExpr:!0,binop:t})}var qs={beforeExpr:!0},Js={startsExpr:!0},Ys={};function K(e,t){return t===void 0&&(t={}),t.keyword=e,Ys[e]=new G(e,t)}var q={num:new G(`num`,Js),regexp:new G(`regexp`,Js),string:new G(`string`,Js),name:new G(`name`,Js),privateId:new G(`privateId`,Js),eof:new G(`eof`),bracketL:new G(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new G(`]`),braceL:new G(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new G(`}`),parenL:new G(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new G(`)`),comma:new G(`,`,qs),semi:new G(`;`,qs),colon:new G(`:`,qs),dot:new G(`.`),question:new G(`?`,qs),questionDot:new G(`?.`),arrow:new G(`=>`,qs),template:new G(`template`),invalidTemplate:new G(`invalidTemplate`),ellipsis:new G(`...`,qs),backQuote:new G("`",Js),dollarBraceL:new G("${",{beforeExpr:!0,startsExpr:!0}),eq:new G(`=`,{beforeExpr:!0,isAssign:!0}),assign:new G(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new G(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new G(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ks(`||`,1),logicalAND:Ks(`&&`,2),bitwiseOR:Ks(`|`,3),bitwiseXOR:Ks(`^`,4),bitwiseAND:Ks(`&`,5),equality:Ks(`==/!=/===/!==`,6),relational:Ks(`</>/<=/>=`,7),bitShift:Ks(`<</>>/>>>`,8),plusMin:new G(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ks(`%`,10),star:Ks(`*`,10),slash:Ks(`/`,10),starstar:new G(`**`,{beforeExpr:!0}),coalesce:Ks(`??`,1),_break:K(`break`),_case:K(`case`,qs),_catch:K(`catch`),_continue:K(`continue`),_debugger:K(`debugger`),_default:K(`default`,qs),_do:K(`do`,{isLoop:!0,beforeExpr:!0}),_else:K(`else`,qs),_finally:K(`finally`),_for:K(`for`,{isLoop:!0}),_function:K(`function`,Js),_if:K(`if`),_return:K(`return`,qs),_switch:K(`switch`),_throw:K(`throw`,qs),_try:K(`try`),_var:K(`var`),_const:K(`const`),_while:K(`while`,{isLoop:!0}),_with:K(`with`),_new:K(`new`,{beforeExpr:!0,startsExpr:!0}),_this:K(`this`,Js),_super:K(`super`,Js),_class:K(`class`,Js),_extends:K(`extends`,qs),_export:K(`export`),_import:K(`import`,Js),_null:K(`null`,Js),_true:K(`true`,Js),_false:K(`false`,Js),_in:K(`in`,{beforeExpr:!0,binop:7}),_instanceof:K(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:K(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:K(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:K(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},Xs=/\r\n?|\n|\u2028|\u2029/,Zs=new RegExp(Xs.source,`g`);function Qs(e){return e===10||e===13||e===8232||e===8233}function $s(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(Qs(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var ec=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,tc=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,nc=Object.prototype,rc=nc.hasOwnProperty,ic=nc.toString,ac=Object.hasOwn||(function(e,t){return rc.call(e,t)}),oc=Array.isArray||(function(e){return ic.call(e)===`[object Array]`}),sc=Object.create(null);function cc(e){return sc[e]||(sc[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function lc(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var uc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,dc=function(e,t){this.line=e,this.column=t};dc.prototype.offset=function(e){return new dc(this.line,this.column+e)};var fc=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function pc(e,t){for(var n=1,r=0;;){var i=$s(e,r,t);if(i<0)return new dc(n,t-r);++n,r=i}}var mc={ecmaVersion:null,sourceType:`script`,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},hc=!1;function gc(e){var t={};for(var n in mc)t[n]=e&&ac(e,n)?e[n]:mc[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!hc&&typeof console==`object`&&console.warn&&(hc=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
50
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),oc(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(oc(t.onComment)&&(t.onComment=_c(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function _c(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new fc(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var vc=1,yc=2,bc=4,xc=8,Sc=16,Cc=32,wc=64,Tc=128,Ec=256,Dc=512,Oc=1024,kc=vc|yc|Ec;function Ac(e,t){return yc|(e?bc:0)|(t?xc:0)}var jc=0,Mc=1,Nc=2,Pc=3,Fc=4,Ic=5,Lc=function(e,t,n){this.options=e=gc(e),this.sourceFile=e.sourceFile,this.keywords=cc(zs[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=Ls[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=cc(r);var i=(r?r+` `:``)+Ls.strict;this.reservedWordsStrict=cc(i),this.reservedWordsStrictBind=cc(i+` `+Ls.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
51
- `,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Xs).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=q.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?yc:vc),this.regexpState=null,this.privateNameStack=[]},Rc={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Lc.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Rc.inFunction.get=function(){return(this.currentVarScope().flags&yc)>0},Rc.inGenerator.get=function(){return(this.currentVarScope().flags&xc)>0},Rc.inAsync.get=function(){return(this.currentVarScope().flags&bc)>0},Rc.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(Ec|Dc))return!1;if(t&yc)return(t&bc)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Rc.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&vc)},Rc.allowSuper.get=function(){return(this.currentThisScope().flags&wc)>0||this.options.allowSuperOutsideMethod},Rc.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Tc)>0},Rc.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Rc.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(Ec|Dc)||t&yc&&!(t&Sc))return!0}return!1},Rc.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&Oc||!this.inModule&&e&vc)},Rc.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ec)>0},Lc.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},Lc.parse=function(e,t){return new this(t,e).parse()},Lc.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},Lc.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Lc.prototype,Rc);var zc=Lc.prototype,Bc=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;zc.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){tc.lastIndex=e,e+=tc.exec(this.input)[0].length;var t=Bc.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){tc.lastIndex=e+t[0].length;var n=tc.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||Xs.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,tc.lastIndex=e,e+=tc.exec(this.input)[0].length,this.input[e]===`;`&&e++}},zc.eat=function(e){return this.type===e?(this.next(),!0):!1},zc.isContextual=function(e){return this.type===q.name&&this.value===e&&!this.containsEsc},zc.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},zc.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},zc.canInsertSemicolon=function(){return this.type===q.eof||this.type===q.braceR||Xs.test(this.input.slice(this.lastTokEnd,this.start))},zc.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},zc.semicolon=function(){!this.eat(q.semi)&&!this.insertSemicolon()&&this.unexpected()},zc.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},zc.expect=function(e){this.eat(e)||this.unexpected()},zc.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var Vc=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};zc.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},zc.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},zc.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},zc.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var J=Lc.prototype;J.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==q.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var Hc={kind:`loop`},Uc={kind:`switch`};J.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;tc.lastIndex=this.pos;var t=tc.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(Ws(r)){var i=n;do n+=r<=65535?1:2;while(Gs(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!Bs.test(a))return!0}return!1},J.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;tc.lastIndex=this.pos;var e=tc.exec(this.input),t=this.pos+e[0].length,n;return!Xs.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(Gs(n=this.fullCharCodeAt(t+8))||n===92))},J.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;tc.lastIndex=this.pos;var n=tc.exec(this.input),r=this.pos+n[0].length;if(Xs.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||Gs(a=this.fullCharCodeAt(i))||a===92)return!1;tc.lastIndex=i;var o=tc.exec(this.input);if(r=i+o[0].length,o&&Xs.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!Ws(s)&&s!==92)return!1;var c=r;do r+=s<=65535?1:2;while(Gs(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(c,r);return!(Bs.test(l)||t&&l===`of`)},J.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},J.isUsing=function(e){return this.isUsingKeyword(!1,e)},J.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=q._var,a=`let`),r){case q._break:case q._continue:return this.parseBreakContinueStatement(i,r.keyword);case q._debugger:return this.parseDebuggerStatement(i);case q._do:return this.parseDoStatement(i);case q._for:return this.parseForStatement(i);case q._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case q._class:return e&&this.unexpected(),this.parseClass(i,!0);case q._if:return this.parseIfStatement(i);case q._return:return this.parseReturnStatement(i);case q._switch:return this.parseSwitchStatement(i);case q._throw:return this.parseThrowStatement(i);case q._try:return this.parseTryStatement(i);case q._const:case q._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case q._while:return this.parseWhileStatement(i);case q._with:return this.parseWithStatement(i);case q.braceL:return this.parseBlock(!0,i);case q.semi:return this.parseEmptyStatement(i);case q._export:case q._import:if(this.options.ecmaVersion>10&&r===q._import){tc.lastIndex=this.pos;var o=tc.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===q._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===q.name&&d.type===`Identifier`&&this.eat(q.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},J.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(q.semi)||this.insertSemicolon()?e.label=null:this.type===q.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},J.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},J.parseDoStatement=function(e){return this.next(),this.labels.push(Hc),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(q._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(q.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},J.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(Hc),this.enterScope(0),this.expect(q.parenL),this.type===q.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===q._var||this.type===q._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new Vc,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===q._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===q._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},J.parseForAfterInit=function(e,t,n){return(this.type===q._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===q._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},J.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Gc|(n?0:Kc),!1,t)},J.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(q._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},J.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(q.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},J.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(q.braceL),this.labels.push(Uc),this.enterScope(Oc);for(var t,n=!1;this.type!==q.braceR;)if(this.type===q._case||this.type===q._default){var r=this.type===q._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(q.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},J.parseThrowStatement=function(e){return this.next(),Xs.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var Wc=[];J.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?Cc:0),this.checkLValPattern(e,t?Fc:Nc),this.expect(q.parenR),e},J.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===q._catch){var t=this.startNode();this.next(),this.eat(q.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(q._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},J.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},J.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Hc),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},J.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},J.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},J.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===q._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},J.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},J.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(q.braceL),e&&this.enterScope(0);this.type!==q.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},J.parseFor=function(e,t){return e.init=t,this.expect(q.semi),e.test=this.type===q.semi?null:this.parseExpression(),this.expect(q.semi),e.update=this.type===q.parenR?null:this.parseExpression(),this.expect(q.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},J.parseForIn=function(e,t){var n=this.type===q._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(q.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},J.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(q.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===q._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==q._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&!(t&&(this.type===q._in||this.isContextual(`of`)))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(q.comma))break}return e},J.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?Mc:Nc,!1)};var Gc=1,Kc=2,qc=4;J.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===q.star&&t&Kc&&this.unexpected(),e.generator=this.eat(q.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Gc&&(e.id=t&qc&&this.type!==q.name?null:this.parseIdent(),e.id&&!(t&Kc)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Mc:Nc:Pc));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ac(e.async,e.generator)),t&Gc||(e.id=this.type===q.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&Gc?`FunctionDeclaration`:`FunctionExpression`)},J.parseFunctionParams=function(e){this.expect(q.parenL),e.params=this.parseBindingList(q.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},J.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(q.braceL);this.type!==q.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&Jc(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},J.parseClassElement=function(e){if(this.eat(q.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(q.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===q.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===q.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(q.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===q.parenL||o!==`method`||i||a){var l=!n.static&&Yc(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},J.isClassElementNameStart=function(){return this.type===q.name||this.type===q.privateId||this.type===q.num||this.type===q.string||this.type===q.bracketL||this.type.keyword},J.parseClassElementName=function(e){this.type===q.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},J.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&Yc(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},J.parseClassField=function(e){return Yc(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&Yc(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(q.eq)?(this.enterScope(Dc|wc),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},J.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Ec|wc);this.type!==q.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},J.parseClassId=function(e,t){this.type===q.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Nc,!1)):(t===!0&&this.unexpected(),e.id=null)},J.parseClassSuper=function(e){e.superClass=this.eat(q._extends)?this.parseExprSubscripts(null,!1):null},J.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},J.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];ac(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function Jc(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function Yc(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}J.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==q.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},J.parseExport=function(e,t){if(this.next(),this.eat(q.star))return this.parseExportAllDeclaration(e,t);if(this.eat(q._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==q.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},J.parseExportDeclaration=function(e){return this.parseStatement(null)},J.parseExportDefaultDeclaration=function(){var e;if(this.type===q._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Gc|qc,!1,e)}else if(this.type===q._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}else{var r=this.parseMaybeAssign();return this.semicolon(),r}},J.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),ac(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},J.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},J.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},J.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},J.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},J.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(q.braceL);!this.eat(q.braceR);){if(n)n=!1;else if(this.expect(q.comma),this.afterTrailingComma(q.braceR))break;t.push(this.parseExportSpecifier(e))}return t},J.parseImport=function(e){return this.next(),this.type===q.string?(e.specifiers=Wc,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===q.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},J.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Nc),this.finishNode(e,`ImportSpecifier`)},J.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Nc),this.finishNode(e,`ImportDefaultSpecifier`)},J.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,Nc),this.finishNode(e,`ImportNamespaceSpecifier`)},J.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===q.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(q.comma)))return e;if(this.type===q.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(q.braceL);!this.eat(q.braceR);){if(t)t=!1;else if(this.expect(q.comma),this.afterTrailingComma(q.braceR))break;e.push(this.parseImportSpecifier())}return e},J.parseWithClause=function(){var e=[];if(!this.eat(q._with))return e;this.expect(q.braceL);for(var t={},n=!0;!this.eat(q.braceR);){if(n)n=!1;else if(this.expect(q.comma),this.afterTrailingComma(q.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;ac(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},J.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===q.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(q.colon),this.type!==q.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},J.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===q.string){var e=this.parseLiteral(this.value);return uc.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},J.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},J.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var Xc=Lc.prototype;Xc.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},Xc.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},Xc.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},Xc.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==q.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},Xc.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case q.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(q.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case q.braceL:return this.parseObj(!0)}return this.parseIdent()},Xc.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(q.comma),t&&this.type===q.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===q.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===q.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},Xc.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Xc.parseBindingListItem=function(e){return e},Xc.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(q.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},Xc.checkLValSimple=function(e,t,n){t===void 0&&(t=jc);var r=t!==jc;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===Nc&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(ac(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==Ic&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},Xc.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=jc),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},Xc.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=jc),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Zc=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},Qc={b_stat:new Zc(`{`,!1),b_expr:new Zc(`{`,!0),b_tmpl:new Zc("${",!1),p_stat:new Zc(`(`,!1),p_expr:new Zc(`(`,!0),q_tmpl:new Zc("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Zc(`function`,!1),f_expr:new Zc(`function`,!0),f_expr_gen:new Zc(`function`,!0,!1,null,!0),f_gen:new Zc(`function`,!1,!1,null,!0)},$c=Lc.prototype;$c.initialContext=function(){return[Qc.b_stat]},$c.curContext=function(){return this.context[this.context.length-1]},$c.braceIsBlock=function(e){var t=this.curContext();return t===Qc.f_expr||t===Qc.f_stat?!0:e===q.colon&&(t===Qc.b_stat||t===Qc.b_expr)?!t.isExpr:e===q._return||e===q.name&&this.exprAllowed?Xs.test(this.input.slice(this.lastTokEnd,this.start)):e===q._else||e===q.semi||e===q.eof||e===q.parenR||e===q.arrow?!0:e===q.braceL?t===Qc.b_stat:e===q._var||e===q._const||e===q.name?!1:!this.exprAllowed},$c.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},$c.updateContext=function(e){var t,n=this.type;n.keyword&&e===q.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},$c.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},q.parenR.updateContext=q.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===Qc.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},q.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Qc.b_stat:Qc.b_expr),this.exprAllowed=!0},q.dollarBraceL.updateContext=function(){this.context.push(Qc.b_tmpl),this.exprAllowed=!0},q.parenL.updateContext=function(e){var t=e===q._if||e===q._for||e===q._with||e===q._while;this.context.push(t?Qc.p_stat:Qc.p_expr),this.exprAllowed=!0},q.incDec.updateContext=function(){},q._function.updateContext=q._class.updateContext=function(e){e.beforeExpr&&e!==q._else&&!(e===q.semi&&this.curContext()!==Qc.p_stat)&&!(e===q._return&&Xs.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===q.colon||e===q.braceL)&&this.curContext()===Qc.b_stat)?this.context.push(Qc.f_expr):this.context.push(Qc.f_stat),this.exprAllowed=!1},q.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},q.backQuote.updateContext=function(){this.curContext()===Qc.q_tmpl?this.context.pop():this.context.push(Qc.q_tmpl),this.exprAllowed=!1},q.star.updateContext=function(e){if(e===q._function){var t=this.context.length-1;this.context[t]===Qc.f_expr?this.context[t]=Qc.f_expr_gen:this.context[t]=Qc.f_gen}this.exprAllowed=!0},q.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==q.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Y=Lc.prototype;Y.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);return}i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}},Y.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===q.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(q.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,`SequenceExpression`)}return i},Y.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Vc,r=!0);var s=this.start,c=this.startLoc;(this.type===q.parenL||this.type===q.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===q.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===q.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}else r&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},Y.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(q.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(q.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},Y.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},Y.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==q._in)&&a>r){var o=this.type===q.logicalOR||this.type===q.logicalAND,s=this.type===q.coalesce;s&&(a=q.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===q.coalesce||s&&(this.type===q.logicalOR||this.type===q.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},Y.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},Y.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===q.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&el(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&tl(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===q.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==q._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&this.eat(q.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1);else return o};function el(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&el(e.expression)}function tl(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&tl(e.expression)||e.type===`ParenthesizedExpression`&&tl(e.expression)}Y.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type===`MemberExpression`&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},Y.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},Y.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(q.arrow)},Y.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},Y.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(q.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(q.bracketL);if(l||c&&this.type!==q.parenL&&this.type!==q.backQuote||this.eat(q.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(q.bracketR)):this.type===q.privateId&&e.type!==`Super`?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(q.parenL)){var d=new Vc,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(q.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===q.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},Y.parseExprAtom=function(e,t,n){this.type===q.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case q._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===q.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==q.dot&&this.type!==q.bracketL&&this.type!==q.parenL&&this.unexpected(),this.finishNode(r,`Super`);case q._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case q.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(q._function))return this.overrideContext(Qc.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(q.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===q.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(q.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case q.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case q.num:case q.string:return this.parseLiteral(this.value);case q._null:case q._true:case q._false:return r=this.startNode(),r.value=this.type===q._null?null:this.type===q._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case q.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case q.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(q.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case q.braceL:return this.overrideContext(Qc.b_expr),this.parseObj(!1,e);case q._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case q._class:return this.parseClass(this.startNode(),!1);case q._new:return this.parseNew();case q.backQuote:return this.parseTemplate();case q._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},Y.parseExprAtomDefault=function(){this.unexpected()},Y.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===q.parenL&&!e)return this.parseDynamicImport(t);if(this.type===q.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}else this.unexpected()},Y.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(q.parenR)?e.options=null:(this.expect(q.comma),this.afterTrailingComma(q.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(q.parenR)||(this.expect(q.comma),this.afterTrailingComma(q.parenR)||this.unexpected())));else if(!this.eat(q.parenR)){var t=this.start;this.eat(q.comma)&&this.eat(q.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},Y.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},Y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},Y.parseParenExpression=function(){this.expect(q.parenL);var e=this.parseExpression();return this.expect(q.parenR),e},Y.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Y.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new Vc,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==q.parenR;)if(l?l=!1:this.expect(q.comma),a&&this.afterTrailingComma(q.parenR,!0)){u=!0;break}else if(this.type===q.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===q.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}else c.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(q.parenR),e&&this.shouldParseArrow(c)&&this.eat(q.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}else return i},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var nl=[];Y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===q.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(q.parenL)?e.arguments=this.parseExprList(q.parenR,this.options.ecmaVersion>=8,!1):e.arguments=nl,this.finishNode(e,`NewExpression`)},Y.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===q.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
30
+ `))}return r.pop(),s.join(``)}function ts(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function ns(e){return` `.repeat(e)}function rs(){return`<`}function is(){return{enter:{mdxjsEsm:os},exit:{mdxjsEsm:ss,mdxjsEsmData:cs}}}function as(){return{handlers:{mdxjsEsm:ls}}}function os(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function ss(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function cs(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function ls(e){return e.value||``}function us(){return[bo(),Qo(),is()]}function ds(e){return{extensions:[xo(),$o(e),as()]}}var fs=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],ps=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],ms=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,hs=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,gs={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},_s=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,vs={5:_s,"5module":_s+` export import`,6:_s+` const class extends export import super`},ys=/^in(stanceof)?$/,bs=RegExp(`[`+hs+`]`),xs=RegExp(`[`+hs+ms+`]`);function Ss(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function Cs(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&bs.test(String.fromCharCode(e)):t===!1?!1:Ss(e,ps)}function ws(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&xs.test(String.fromCharCode(e)):t===!1?!1:Ss(e,ps)||Ss(e,fs)}var Ts=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function Es(e,t){return new Ts(e,{beforeExpr:!0,binop:t})}var Ds={beforeExpr:!0},Os={startsExpr:!0},ks={};function q(e,t){return t===void 0&&(t={}),t.keyword=e,ks[e]=new Ts(e,t)}var J={num:new Ts(`num`,Os),regexp:new Ts(`regexp`,Os),string:new Ts(`string`,Os),name:new Ts(`name`,Os),privateId:new Ts(`privateId`,Os),eof:new Ts(`eof`),bracketL:new Ts(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new Ts(`]`),braceL:new Ts(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new Ts(`}`),parenL:new Ts(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new Ts(`)`),comma:new Ts(`,`,Ds),semi:new Ts(`;`,Ds),colon:new Ts(`:`,Ds),dot:new Ts(`.`),question:new Ts(`?`,Ds),questionDot:new Ts(`?.`),arrow:new Ts(`=>`,Ds),template:new Ts(`template`),invalidTemplate:new Ts(`invalidTemplate`),ellipsis:new Ts(`...`,Ds),backQuote:new Ts("`",Os),dollarBraceL:new Ts("${",{beforeExpr:!0,startsExpr:!0}),eq:new Ts(`=`,{beforeExpr:!0,isAssign:!0}),assign:new Ts(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new Ts(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Ts(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Es(`||`,1),logicalAND:Es(`&&`,2),bitwiseOR:Es(`|`,3),bitwiseXOR:Es(`^`,4),bitwiseAND:Es(`&`,5),equality:Es(`==/!=/===/!==`,6),relational:Es(`</>/<=/>=`,7),bitShift:Es(`<</>>/>>>`,8),plusMin:new Ts(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Es(`%`,10),star:Es(`*`,10),slash:Es(`/`,10),starstar:new Ts(`**`,{beforeExpr:!0}),coalesce:Es(`??`,1),_break:q(`break`),_case:q(`case`,Ds),_catch:q(`catch`),_continue:q(`continue`),_debugger:q(`debugger`),_default:q(`default`,Ds),_do:q(`do`,{isLoop:!0,beforeExpr:!0}),_else:q(`else`,Ds),_finally:q(`finally`),_for:q(`for`,{isLoop:!0}),_function:q(`function`,Os),_if:q(`if`),_return:q(`return`,Ds),_switch:q(`switch`),_throw:q(`throw`,Ds),_try:q(`try`),_var:q(`var`),_const:q(`const`),_while:q(`while`,{isLoop:!0}),_with:q(`with`),_new:q(`new`,{beforeExpr:!0,startsExpr:!0}),_this:q(`this`,Os),_super:q(`super`,Os),_class:q(`class`,Os),_extends:q(`extends`,Ds),_export:q(`export`),_import:q(`import`,Os),_null:q(`null`,Os),_true:q(`true`,Os),_false:q(`false`,Os),_in:q(`in`,{beforeExpr:!0,binop:7}),_instanceof:q(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:q(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:q(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:q(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},As=/\r\n?|\n|\u2028|\u2029/,js=new RegExp(As.source,`g`);function Ms(e){return e===10||e===13||e===8232||e===8233}function Ns(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(Ms(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var Ps=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Fs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Is=Object.prototype,Ls=Is.hasOwnProperty,Rs=Is.toString,zs=Object.hasOwn||(function(e,t){return Ls.call(e,t)}),Bs=Array.isArray||(function(e){return Rs.call(e)===`[object Array]`}),Vs=Object.create(null);function Hs(e){return Vs[e]||(Vs[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function Us(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Ws=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Gs=function(e,t){this.line=e,this.column=t};Gs.prototype.offset=function(e){return new Gs(this.line,this.column+e)};var Ks=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function qs(e,t){for(var n=1,r=0;;){var i=Ns(e,r,t);if(i<0)return new Gs(n,t-r);++n,r=i}}var Js={ecmaVersion:null,sourceType:`script`,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ys=!1;function Xs(e){var t={};for(var n in Js)t[n]=e&&zs(e,n)?e[n]:Js[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Ys&&typeof console==`object`&&console.warn&&(Ys=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
31
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Bs(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(Bs(t.onComment)&&(t.onComment=Zs(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function Zs(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new Ks(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var Qs=1,$s=2,ec=4,tc=8,nc=16,rc=32,ic=64,ac=128,oc=256,sc=512,cc=1024,lc=Qs|$s|oc;function uc(e,t){return $s|(e?ec:0)|(t?tc:0)}var dc=0,fc=1,pc=2,mc=3,hc=4,gc=5,_c=function(e,t,n){this.options=e=Xs(e),this.sourceFile=e.sourceFile,this.keywords=Hs(vs[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=gs[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=Hs(r);var i=(r?r+` `:``)+gs.strict;this.reservedWordsStrict=Hs(i),this.reservedWordsStrictBind=Hs(i+` `+gs.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
32
+ `,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(As).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=J.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?$s:Qs),this.regexpState=null,this.privateNameStack=[]},vc={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};_c.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},vc.inFunction.get=function(){return(this.currentVarScope().flags&$s)>0},vc.inGenerator.get=function(){return(this.currentVarScope().flags&tc)>0},vc.inAsync.get=function(){return(this.currentVarScope().flags&ec)>0},vc.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(oc|sc))return!1;if(t&$s)return(t&ec)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},vc.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Qs)},vc.allowSuper.get=function(){return(this.currentThisScope().flags&ic)>0||this.options.allowSuperOutsideMethod},vc.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ac)>0},vc.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},vc.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(oc|sc)||t&$s&&!(t&nc))return!0}return!1},vc.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&cc||!this.inModule&&e&Qs)},vc.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&oc)>0},_c.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},_c.parse=function(e,t){return new this(t,e).parse()},_c.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},_c.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(_c.prototype,vc);var yc=_c.prototype,bc=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;yc.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){Fs.lastIndex=e,e+=Fs.exec(this.input)[0].length;var t=bc.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){Fs.lastIndex=e+t[0].length;var n=Fs.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||As.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,Fs.lastIndex=e,e+=Fs.exec(this.input)[0].length,this.input[e]===`;`&&e++}},yc.eat=function(e){return this.type===e?(this.next(),!0):!1},yc.isContextual=function(e){return this.type===J.name&&this.value===e&&!this.containsEsc},yc.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},yc.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},yc.canInsertSemicolon=function(){return this.type===J.eof||this.type===J.braceR||As.test(this.input.slice(this.lastTokEnd,this.start))},yc.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},yc.semicolon=function(){!this.eat(J.semi)&&!this.insertSemicolon()&&this.unexpected()},yc.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},yc.expect=function(e){this.eat(e)||this.unexpected()},yc.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var xc=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};yc.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},yc.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},yc.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},yc.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var Y=_c.prototype;Y.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==J.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var Sc={kind:`loop`},Cc={kind:`switch`};Y.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;Fs.lastIndex=this.pos;var t=Fs.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(Cs(r)){var i=n;do n+=r<=65535?1:2;while(ws(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!ys.test(a))return!0}return!1},Y.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;Fs.lastIndex=this.pos;var e=Fs.exec(this.input),t=this.pos+e[0].length,n;return!As.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(ws(n=this.fullCharCodeAt(t+8))||n===92))},Y.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;Fs.lastIndex=this.pos;var n=Fs.exec(this.input),r=this.pos+n[0].length;if(As.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||ws(a=this.fullCharCodeAt(i))||a===92)return!1;Fs.lastIndex=i;var o=Fs.exec(this.input);if(r=i+o[0].length,o&&As.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!Cs(s)&&s!==92)return!1;var c=r;do r+=s<=65535?1:2;while(ws(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(c,r);return!(ys.test(l)||t&&l===`of`)},Y.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},Y.isUsing=function(e){return this.isUsingKeyword(!1,e)},Y.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=J._var,a=`let`),r){case J._break:case J._continue:return this.parseBreakContinueStatement(i,r.keyword);case J._debugger:return this.parseDebuggerStatement(i);case J._do:return this.parseDoStatement(i);case J._for:return this.parseForStatement(i);case J._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case J._class:return e&&this.unexpected(),this.parseClass(i,!0);case J._if:return this.parseIfStatement(i);case J._return:return this.parseReturnStatement(i);case J._switch:return this.parseSwitchStatement(i);case J._throw:return this.parseThrowStatement(i);case J._try:return this.parseTryStatement(i);case J._const:case J._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case J._while:return this.parseWhileStatement(i);case J._with:return this.parseWithStatement(i);case J.braceL:return this.parseBlock(!0,i);case J.semi:return this.parseEmptyStatement(i);case J._export:case J._import:if(this.options.ecmaVersion>10&&r===J._import){Fs.lastIndex=this.pos;var o=Fs.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===J._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===J.name&&d.type===`Identifier`&&this.eat(J.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},Y.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(J.semi)||this.insertSemicolon()?e.label=null:this.type===J.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},Y.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},Y.parseDoStatement=function(e){return this.next(),this.labels.push(Sc),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(J._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(J.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},Y.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(Sc),this.enterScope(0),this.expect(J.parenL),this.type===J.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===J._var||this.type===J._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new xc,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===J._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===J._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},Y.parseForAfterInit=function(e,t,n){return(this.type===J._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===J._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},Y.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Tc|(n?0:Ec),!1,t)},Y.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(J._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},Y.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(J.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},Y.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(J.braceL),this.labels.push(Cc),this.enterScope(cc);for(var t,n=!1;this.type!==J.braceR;)if(this.type===J._case||this.type===J._default){var r=this.type===J._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(J.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},Y.parseThrowStatement=function(e){return this.next(),As.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var wc=[];Y.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?rc:0),this.checkLValPattern(e,t?hc:pc),this.expect(J.parenR),e},Y.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===J._catch){var t=this.startNode();this.next(),this.eat(J.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(J._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},Y.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},Y.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Sc),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},Y.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},Y.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},Y.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===J._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},Y.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},Y.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(J.braceL),e&&this.enterScope(0);this.type!==J.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},Y.parseFor=function(e,t){return e.init=t,this.expect(J.semi),e.test=this.type===J.semi?null:this.parseExpression(),this.expect(J.semi),e.update=this.type===J.parenR?null:this.parseExpression(),this.expect(J.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},Y.parseForIn=function(e,t){var n=this.type===J._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(J.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},Y.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(J.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===J._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==J._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&!(t&&(this.type===J._in||this.isContextual(`of`)))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(J.comma))break}return e},Y.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?fc:pc,!1)};var Tc=1,Ec=2,Dc=4;Y.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===J.star&&t&Ec&&this.unexpected(),e.generator=this.eat(J.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Tc&&(e.id=t&Dc&&this.type!==J.name?null:this.parseIdent(),e.id&&!(t&Ec)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?fc:pc:mc));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(uc(e.async,e.generator)),t&Tc||(e.id=this.type===J.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&Tc?`FunctionDeclaration`:`FunctionExpression`)},Y.parseFunctionParams=function(e){this.expect(J.parenL),e.params=this.parseBindingList(J.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Y.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(J.braceL);this.type!==J.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&Oc(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},Y.parseClassElement=function(e){if(this.eat(J.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(J.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===J.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===J.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(J.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===J.parenL||o!==`method`||i||a){var l=!n.static&&kc(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},Y.isClassElementNameStart=function(){return this.type===J.name||this.type===J.privateId||this.type===J.num||this.type===J.string||this.type===J.bracketL||this.type.keyword},Y.parseClassElementName=function(e){this.type===J.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Y.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&kc(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},Y.parseClassField=function(e){return kc(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&kc(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(J.eq)?(this.enterScope(sc|ic),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},Y.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(oc|ic);this.type!==J.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},Y.parseClassId=function(e,t){this.type===J.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,pc,!1)):(t===!0&&this.unexpected(),e.id=null)},Y.parseClassSuper=function(e){e.superClass=this.eat(J._extends)?this.parseExprSubscripts(null,!1):null},Y.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Y.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];zs(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function Oc(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function kc(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}Y.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==J.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},Y.parseExport=function(e,t){if(this.next(),this.eat(J.star))return this.parseExportAllDeclaration(e,t);if(this.eat(J._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==J.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},Y.parseExportDeclaration=function(e){return this.parseStatement(null)},Y.parseExportDefaultDeclaration=function(){var e;if(this.type===J._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Tc|Dc,!1,e)}else if(this.type===J._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}else{var r=this.parseMaybeAssign();return this.semicolon(),r}},Y.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),zs(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},Y.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},Y.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},Y.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},Y.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},Y.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(J.braceL);!this.eat(J.braceR);){if(n)n=!1;else if(this.expect(J.comma),this.afterTrailingComma(J.braceR))break;t.push(this.parseExportSpecifier(e))}return t},Y.parseImport=function(e){return this.next(),this.type===J.string?(e.specifiers=wc,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===J.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},Y.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,pc),this.finishNode(e,`ImportSpecifier`)},Y.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,pc),this.finishNode(e,`ImportDefaultSpecifier`)},Y.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,pc),this.finishNode(e,`ImportNamespaceSpecifier`)},Y.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===J.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(J.comma)))return e;if(this.type===J.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(J.braceL);!this.eat(J.braceR);){if(t)t=!1;else if(this.expect(J.comma),this.afterTrailingComma(J.braceR))break;e.push(this.parseImportSpecifier())}return e},Y.parseWithClause=function(){var e=[];if(!this.eat(J._with))return e;this.expect(J.braceL);for(var t={},n=!0;!this.eat(J.braceR);){if(n)n=!1;else if(this.expect(J.comma),this.afterTrailingComma(J.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;zs(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},Y.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===J.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(J.colon),this.type!==J.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},Y.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===J.string){var e=this.parseLiteral(this.value);return Ws.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},Y.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},Y.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var Ac=_c.prototype;Ac.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},Ac.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},Ac.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},Ac.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==J.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},Ac.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case J.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(J.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case J.braceL:return this.parseObj(!0)}return this.parseIdent()},Ac.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(J.comma),t&&this.type===J.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===J.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===J.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},Ac.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Ac.parseBindingListItem=function(e){return e},Ac.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(J.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},Ac.checkLValSimple=function(e,t,n){t===void 0&&(t=dc);var r=t!==dc;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===pc&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(zs(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==gc&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},Ac.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=dc),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},Ac.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=dc),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var jc=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},Mc={b_stat:new jc(`{`,!1),b_expr:new jc(`{`,!0),b_tmpl:new jc("${",!1),p_stat:new jc(`(`,!1),p_expr:new jc(`(`,!0),q_tmpl:new jc("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new jc(`function`,!1),f_expr:new jc(`function`,!0),f_expr_gen:new jc(`function`,!0,!1,null,!0),f_gen:new jc(`function`,!1,!1,null,!0)},Nc=_c.prototype;Nc.initialContext=function(){return[Mc.b_stat]},Nc.curContext=function(){return this.context[this.context.length-1]},Nc.braceIsBlock=function(e){var t=this.curContext();return t===Mc.f_expr||t===Mc.f_stat?!0:e===J.colon&&(t===Mc.b_stat||t===Mc.b_expr)?!t.isExpr:e===J._return||e===J.name&&this.exprAllowed?As.test(this.input.slice(this.lastTokEnd,this.start)):e===J._else||e===J.semi||e===J.eof||e===J.parenR||e===J.arrow?!0:e===J.braceL?t===Mc.b_stat:e===J._var||e===J._const||e===J.name?!1:!this.exprAllowed},Nc.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},Nc.updateContext=function(e){var t,n=this.type;n.keyword&&e===J.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Nc.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},J.parenR.updateContext=J.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===Mc.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},J.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Mc.b_stat:Mc.b_expr),this.exprAllowed=!0},J.dollarBraceL.updateContext=function(){this.context.push(Mc.b_tmpl),this.exprAllowed=!0},J.parenL.updateContext=function(e){var t=e===J._if||e===J._for||e===J._with||e===J._while;this.context.push(t?Mc.p_stat:Mc.p_expr),this.exprAllowed=!0},J.incDec.updateContext=function(){},J._function.updateContext=J._class.updateContext=function(e){e.beforeExpr&&e!==J._else&&!(e===J.semi&&this.curContext()!==Mc.p_stat)&&!(e===J._return&&As.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===J.colon||e===J.braceL)&&this.curContext()===Mc.b_stat)?this.context.push(Mc.f_expr):this.context.push(Mc.f_stat),this.exprAllowed=!1},J.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},J.backQuote.updateContext=function(){this.curContext()===Mc.q_tmpl?this.context.pop():this.context.push(Mc.q_tmpl),this.exprAllowed=!1},J.star.updateContext=function(e){if(e===J._function){var t=this.context.length-1;this.context[t]===Mc.f_expr?this.context[t]=Mc.f_expr_gen:this.context[t]=Mc.f_gen}this.exprAllowed=!0},J.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==J.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var X=_c.prototype;X.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);return}i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}},X.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===J.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(J.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,`SequenceExpression`)}return i},X.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new xc,r=!0);var s=this.start,c=this.startLoc;(this.type===J.parenL||this.type===J.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===J.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===J.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}else r&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},X.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(J.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(J.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},X.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},X.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==J._in)&&a>r){var o=this.type===J.logicalOR||this.type===J.logicalAND,s=this.type===J.coalesce;s&&(a=J.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===J.coalesce||s&&(this.type===J.logicalOR||this.type===J.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},X.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},X.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===J.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&Pc(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&Fc(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===J.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==J._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&this.eat(J.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1);else return o};function Pc(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&Pc(e.expression)}function Fc(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&Fc(e.expression)||e.type===`ParenthesizedExpression`&&Fc(e.expression)}X.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type===`MemberExpression`&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},X.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},X.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(J.arrow)},X.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},X.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(J.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(J.bracketL);if(l||c&&this.type!==J.parenL&&this.type!==J.backQuote||this.eat(J.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(J.bracketR)):this.type===J.privateId&&e.type!==`Super`?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(J.parenL)){var d=new xc,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(J.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===J.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},X.parseExprAtom=function(e,t,n){this.type===J.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case J._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===J.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==J.dot&&this.type!==J.bracketL&&this.type!==J.parenL&&this.unexpected(),this.finishNode(r,`Super`);case J._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case J.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(J._function))return this.overrideContext(Mc.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(J.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===J.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(J.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case J.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case J.num:case J.string:return this.parseLiteral(this.value);case J._null:case J._true:case J._false:return r=this.startNode(),r.value=this.type===J._null?null:this.type===J._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case J.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case J.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(J.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case J.braceL:return this.overrideContext(Mc.b_expr),this.parseObj(!1,e);case J._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case J._class:return this.parseClass(this.startNode(),!1);case J._new:return this.parseNew();case J.backQuote:return this.parseTemplate();case J._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===J.parenL&&!e)return this.parseDynamicImport(t);if(this.type===J.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}else this.unexpected()},X.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(J.parenR)?e.options=null:(this.expect(J.comma),this.afterTrailingComma(J.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(J.parenR)||(this.expect(J.comma),this.afterTrailingComma(J.parenR)||this.unexpected())));else if(!this.eat(J.parenR)){var t=this.start;this.eat(J.comma)&&this.eat(J.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},X.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},X.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},X.parseParenExpression=function(){this.expect(J.parenL);var e=this.parseExpression();return this.expect(J.parenR),e},X.shouldParseArrow=function(e){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new xc,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==J.parenR;)if(l?l=!1:this.expect(J.comma),a&&this.afterTrailingComma(J.parenR,!0)){u=!0;break}else if(this.type===J.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===J.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}else c.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(J.parenR),e&&this.shouldParseArrow(c)&&this.eat(J.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}else return i},X.parseParenItem=function(e){return e},X.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Ic=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===J.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(J.parenL)?e.arguments=this.parseExprList(J.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ic,this.finishNode(e,`NewExpression`)},X.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===J.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
52
33
  `),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
53
- `),cooked:this.value},this.next(),n.tail=this.type===q.backQuote,this.finishNode(n,`TemplateElement`)},Y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===q.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(q.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(q.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},Y.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===q.name||this.type===q.num||this.type===q.string||this.type===q.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===q.star)&&!Xs.test(this.input.slice(this.lastTokEnd,this.start))},Y.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(q.braceR);){if(r)r=!1;else if(this.expect(q.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(q.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},Y.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(q.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===q.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===q.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(q.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(q.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},Y.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},Y.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===q.colon&&this.unexpected(),this.eat(q.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===q.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==q.comma&&this.type!==q.braceR&&this.type!==q.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===q.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},Y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(q.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(q.bracketR),e.key;e.computed=!1}return e.key=this.type===q.num||this.type===q.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ac(t,r.generator)|wc|(n?Tc:0)),this.expect(q.parenL),r.params=this.parseBindingList(q.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},Y.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Ac(n,!1)|Sc),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},Y.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==q.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Ic),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},Y.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},Y.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,Mc,t?null:n)}},Y.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(q.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===q.comma?o=null:this.type===q.ellipsis?(o=this.parseSpread(r),r&&this.type===q.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},Y.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&kc)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},Y.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},Y.parseIdentNode=function(){var e=this.startNode();return this.type===q.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name===`class`||e.name===`function`)&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=q.name):this.unexpected(),e},Y.parsePrivateIdent=function(){var e=this.startNode();return this.type===q.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},Y.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===q.semi||this.canInsertSemicolon()||this.type!==q.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(q.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},Y.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var rl=Lc.prototype;rl.raise=function(e,t){var n=pc(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},rl.raiseRecoverable=rl.raise,rl.curPosition=function(){if(this.options.locations)return new dc(this.curLine,this.pos-this.lineStart)};var il=Lc.prototype,al=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};il.enterScope=function(e){this.scopeStack.push(new al(e))},il.exitScope=function(){this.scopeStack.pop()},il.treatFunctionsAsVarInScope=function(e){return e.flags&yc||!this.inModule&&e.flags&vc},il.declareName=function(e,t,n){var r=!1;if(t===Nc){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&vc&&delete this.undefinedExports[e]}else if(t===Fc)this.currentScope().lexical.push(e);else if(t===Pc){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&Cc&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&vc&&delete this.undefinedExports[e],s.flags&kc)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},il.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},il.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},il.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(kc|Dc|Ec))return t}},il.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(kc|Dc|Ec)&&!(t.flags&Sc))return t}};var ol=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new fc(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},sl=Lc.prototype;sl.startNode=function(){return new ol(this,this.start,this.startLoc)},sl.startNodeAt=function(e,t){return new ol(this,e,t)};function cl(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}sl.finishNode=function(e,t){return cl.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},sl.finishNodeAt=function(e,t,n,r){return cl.call(this,e,t,n,r)},sl.copyNode=function(e){var t=new ol(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var ll=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,ul=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,dl=ul+` Extended_Pictographic`,fl=dl,pl=fl+` EBase EComp EMod EPres ExtPict`,ml=pl,hl=ml,gl={9:ul,10:dl,11:fl,12:pl,13:ml,14:hl},_l=`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`,vl={9:``,10:``,11:``,12:``,13:``,14:_l},yl=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,bl=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,xl=bl+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,Sl=xl+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,Cl=Sl+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,wl=Cl+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,Tl=wl+` `+ll,El={9:bl,10:xl,11:Sl,12:Cl,13:wl,14:Tl},Dl={};function Ol(e){var t=Dl[e]={binary:cc(gl[e]+` `+yl),binaryOfStrings:cc(vl[e]),nonBinary:{General_Category:cc(yl),Script:cc(El[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var kl=0,Al=[9,10,11,12,13,14];kl<Al.length;kl+=1){var jl=Al[kl];Ol(jl)}var X=Lc.prototype,Ml=function(e,t){this.parent=e,this.base=t||this};Ml.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},Ml.prototype.sibling=function(){return new Ml(this.parent,this.base)};var Nl=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=Dl[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Nl.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},Nl.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},Nl.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},Nl.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},Nl.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},Nl.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Nl.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Nl.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e?(this.advance(t),!0):!1},Nl.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},X.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function Pl(e){for(var t in e)return!0;return!1}X.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Pl(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},X.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},X.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Ml(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},X.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},X.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},X.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},X.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},X.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},X.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},X.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},X.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},X.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},X.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},X.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&Fl(n);)t+=lc(n),e.advance();return t};function Fl(e){return e===105||e===109||e===115}X.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},X.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},X.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Il(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Il(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}X.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!Il(n);)e.advance();return e.pos!==t},X.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1},X.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`);t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},X.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},X.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=lc(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=lc(e.lastIntValue);return!0}return!1},X.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Ll(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Ll(e){return Ws(e,!0)||e===36||e===95}X.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Rl(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Rl(e){return Gs(e,!0)||e===36||e===95||e===8204||e===8205}X.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},X.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},X.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},X.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},X.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},X.regexp_eatZero=function(e){return e.current()===48&&!Xl(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},X.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1},X.regexp_eatControlLetter=function(e){var t=e.current();return zl(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function zl(e){return e>=65&&e<=90||e>=97&&e<=122}X.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Bl(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function Bl(e){return e>=0&&e<=1114111}X.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1},X.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Vl=0,Hl=1,Ul=2;X.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Wl(t))return e.lastIntValue=-1,e.advance(),Hl;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===Ul&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return Vl};function Wl(e){return e===100||e===68||e===115||e===83||e===119||e===87}X.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),Hl}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return Vl},X.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){ac(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},X.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Hl;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ul;e.raise(`Invalid property name`)},X.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;Gl(t=e.current());)e.lastStringValue+=lc(t),e.advance();return e.lastStringValue!==``};function Gl(e){return zl(e)||e===95}X.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;Kl(t=e.current());)e.lastStringValue+=lc(t),e.advance();return e.lastStringValue!==``};function Kl(e){return Gl(e)||Xl(e)}X.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},X.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===Ul&&e.raise(`Negated character class may contain strings`),!0}return!1},X.regexp_classContents=function(e){return e.current()===93?Hl:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Hl)},X.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},X.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||$l(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r===93?!1:(e.lastIntValue=r,e.advance(),!0)},X.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},X.regexp_classSetExpression=function(e){var t=Hl,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===Ul&&(t=Ul);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==Ul&&(t=Hl);continue}e.raise(`Invalid character in character class`)}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`);for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===Ul&&(t=Ul)}},X.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},X.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Hl:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},X.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===Ul&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},X.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},X.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Ul&&(t=Ul);return t},X.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Hl:Ul},X.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&ql(n)||Jl(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function ql(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Jl(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}X.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Yl(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Yl(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}X.regexp_eatClassControlLetter=function(e){var t=e.current();return Xl(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},X.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},X.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Xl(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Xl(e){return e>=48&&e<=57}X.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Zl(n=e.current());)e.lastIntValue=16*e.lastIntValue+Ql(n),e.advance();return e.pos!==t};function Zl(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ql(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}X.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1},X.regexp_eatOctalDigit=function(e){var t=e.current();return $l(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function $l(e){return e>=48&&e<=55}X.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Zl(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Ql(i),e.advance()}return!0};var eu=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new fc(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Z=Lc.prototype;Z.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new eu(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Z.getToken=function(){return this.next(),new eu(this)},typeof Symbol<`u`&&(Z[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===q.eof,value:t}}}}),Z.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(q.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},Z.readToken=function(e){return Ws(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},Z.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},Z.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Z.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=$s(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},Z.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Qs(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Z.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&ec.test(String.fromCharCode(e)))++this.pos;else break loop}}},Z.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Z.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(q.ellipsis)):(++this.pos,this.finishToken(q.dot))},Z.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(q.assign,2):this.finishOp(q.slash,1)},Z.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?q.star:q.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=q.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(q.assign,n+1):this.finishOp(r,n)},Z.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(q.assign,3):this.finishOp(e===124?q.logicalOR:q.logicalAND,2):t===61?this.finishOp(q.assign,2):this.finishOp(e===124?q.bitwiseOR:q.bitwiseAND,1)},Z.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(q.assign,2):this.finishOp(q.bitwiseXOR,1)},Z.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Xs.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(q.incDec,2):t===61?this.finishOp(q.assign,2):this.finishOp(q.plusMin,1)},Z.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(q.assign,n+1):this.finishOp(q.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(q.relational,n))},Z.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(q.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(q.arrow)):this.finishOp(e===61?q.eq:q.prefix,1)},Z.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(q.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(q.assign,3):this.finishOp(q.coalesce,2)}return this.finishOp(q.question,1)},Z.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),Ws(t,!0)||t===92))return this.finishToken(q.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+lc(t)+`'`)},Z.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(q.parenL);case 41:return++this.pos,this.finishToken(q.parenR);case 59:return++this.pos,this.finishToken(q.semi);case 44:return++this.pos,this.finishToken(q.comma);case 91:return++this.pos,this.finishToken(q.bracketL);case 93:return++this.pos,this.finishToken(q.bracketR);case 123:return++this.pos,this.finishToken(q.braceL);case 125:return++this.pos,this.finishToken(q.braceR);case 58:return++this.pos,this.finishToken(q.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(q.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(q.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+lc(e)+`'`)},Z.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Z.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(Xs.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new Nl(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(q.regexp,{pattern:i,flags:o,value:c})},Z.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95){i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;continue}if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function tu(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function nu(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}Z.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=nu(this.input.slice(t,this.pos)),++this.pos):Ws(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(q.num,n)},Z.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=nu(this.input.slice(t,this.pos));return++this.pos,Ws(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(q.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),Ws(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=tu(this.input.slice(t,this.pos),n);return this.finishToken(q.num,a)},Z.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},Z.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Qs(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(q.string,t)};var ru={};Z.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ru)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},Z.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ru;this.raise(e,t)},Z.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===q.template||this.type===q.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(q.dollarBraceL)):(++this.pos,this.finishToken(q.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(q.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Qs(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
54
- `;break;default:e+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else ++this.pos}},Z.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(q.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
34
+ `),cooked:this.value},this.next(),n.tail=this.type===J.backQuote,this.finishNode(n,`TemplateElement`)},X.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===J.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(J.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(J.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},X.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===J.name||this.type===J.num||this.type===J.string||this.type===J.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===J.star)&&!As.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(J.braceR);){if(r)r=!1;else if(this.expect(J.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(J.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},X.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(J.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===J.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===J.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(J.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(J.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},X.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},X.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===J.colon&&this.unexpected(),this.eat(J.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===J.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==J.comma&&this.type!==J.braceR&&this.type!==J.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===J.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},X.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(J.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(J.bracketR),e.key;e.computed=!1}return e.key=this.type===J.num||this.type===J.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},X.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},X.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(uc(t,r.generator)|ic|(n?ac:0)),this.expect(J.parenL),r.params=this.parseBindingList(J.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},X.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(uc(n,!1)|nc),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},X.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==J.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,gc),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},X.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},X.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,fc,t?null:n)}},X.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(J.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===J.comma?o=null:this.type===J.ellipsis?(o=this.parseSpread(r),r&&this.type===J.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},X.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&lc)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},X.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},X.parseIdentNode=function(){var e=this.startNode();return this.type===J.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name===`class`||e.name===`function`)&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=J.name):this.unexpected(),e},X.parsePrivateIdent=function(){var e=this.startNode();return this.type===J.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},X.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===J.semi||this.canInsertSemicolon()||this.type!==J.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(J.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},X.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var Lc=_c.prototype;Lc.raise=function(e,t){var n=qs(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},Lc.raiseRecoverable=Lc.raise,Lc.curPosition=function(){if(this.options.locations)return new Gs(this.curLine,this.pos-this.lineStart)};var Rc=_c.prototype,zc=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Rc.enterScope=function(e){this.scopeStack.push(new zc(e))},Rc.exitScope=function(){this.scopeStack.pop()},Rc.treatFunctionsAsVarInScope=function(e){return e.flags&$s||!this.inModule&&e.flags&Qs},Rc.declareName=function(e,t,n){var r=!1;if(t===pc){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Qs&&delete this.undefinedExports[e]}else if(t===hc)this.currentScope().lexical.push(e);else if(t===mc){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&rc&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&Qs&&delete this.undefinedExports[e],s.flags&lc)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},Rc.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},Rc.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Rc.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(lc|sc|oc))return t}},Rc.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(lc|sc|oc)&&!(t.flags&nc))return t}};var Bc=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new Ks(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Vc=_c.prototype;Vc.startNode=function(){return new Bc(this,this.start,this.startLoc)},Vc.startNodeAt=function(e,t){return new Bc(this,e,t)};function Hc(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Vc.finishNode=function(e,t){return Hc.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Vc.finishNodeAt=function(e,t,n,r){return Hc.call(this,e,t,n,r)},Vc.copyNode=function(e){var t=new Bc(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Uc=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,Wc=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,Gc=Wc+` Extended_Pictographic`,Kc=Gc,qc=Kc+` EBase EComp EMod EPres ExtPict`,Jc=qc,Yc=Jc,Xc={9:Wc,10:Gc,11:Kc,12:qc,13:Jc,14:Yc},Zc=`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`,Qc={9:``,10:``,11:``,12:``,13:``,14:Zc},$c=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,el=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,tl=el+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,nl=tl+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,rl=nl+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,il=rl+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,al=il+` `+Uc,ol={9:el,10:tl,11:nl,12:rl,13:il,14:al},sl={};function cl(e){var t=sl[e]={binary:Hs(Xc[e]+` `+$c),binaryOfStrings:Hs(Qc[e]),nonBinary:{General_Category:Hs($c),Script:Hs(ol[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var ll=0,ul=[9,10,11,12,13,14];ll<ul.length;ll+=1){var dl=ul[ll];cl(dl)}var Z=_c.prototype,fl=function(e,t){this.parent=e,this.base=t||this};fl.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},fl.prototype.sibling=function(){return new fl(this.parent,this.base)};var pl=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=sl[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};pl.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},pl.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},pl.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},pl.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},pl.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},pl.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},pl.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},pl.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e?(this.advance(t),!0):!1},pl.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},Z.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function ml(e){for(var t in e)return!0;return!1}Z.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&ml(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Z.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},Z.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new fl(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},Z.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Z.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},Z.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Z.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},Z.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Z.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},Z.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Z.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Z.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},Z.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},Z.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&hl(n);)t+=Us(n),e.advance();return t};function hl(e){return e===105||e===109||e===115}Z.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Z.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},Z.regexp_eatSyntaxCharacter=function(e){var t=e.current();return gl(t)?(e.lastIntValue=t,e.advance(),!0):!1};function gl(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Z.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!gl(n);)e.advance();return e.pos!==t},Z.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1},Z.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`);t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},Z.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},Z.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Us(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Us(e.lastIntValue);return!0}return!1},Z.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),_l(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function _l(e){return Cs(e,!0)||e===36||e===95}Z.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),vl(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function vl(e){return ws(e,!0)||e===36||e===95||e===8204||e===8205}Z.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},Z.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Z.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},Z.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Z.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Z.regexp_eatZero=function(e){return e.current()===48&&!Al(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},Z.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1},Z.regexp_eatControlLetter=function(e){var t=e.current();return yl(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function yl(e){return e>=65&&e<=90||e>=97&&e<=122}Z.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&bl(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function bl(e){return e>=0&&e<=1114111}Z.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1},Z.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var xl=0,Sl=1,Cl=2;Z.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(wl(t))return e.lastIntValue=-1,e.advance(),Sl;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===Cl&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return xl};function wl(e){return e===100||e===68||e===115||e===83||e===119||e===87}Z.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),Sl}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return xl},Z.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){zs(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},Z.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Sl;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Cl;e.raise(`Invalid property name`)},Z.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;Tl(t=e.current());)e.lastStringValue+=Us(t),e.advance();return e.lastStringValue!==``};function Tl(e){return yl(e)||e===95}Z.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;El(t=e.current());)e.lastStringValue+=Us(t),e.advance();return e.lastStringValue!==``};function El(e){return Tl(e)||Al(e)}Z.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Z.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===Cl&&e.raise(`Negated character class may contain strings`),!0}return!1},Z.regexp_classContents=function(e){return e.current()===93?Sl:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Sl)},Z.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},Z.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||Nl(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r===93?!1:(e.lastIntValue=r,e.advance(),!0)},Z.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Z.regexp_classSetExpression=function(e){var t=Sl,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===Cl&&(t=Cl);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==Cl&&(t=Sl);continue}e.raise(`Invalid character in character class`)}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`);for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===Cl&&(t=Cl)}},Z.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},Z.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Sl:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Z.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===Cl&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Z.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},Z.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Cl&&(t=Cl);return t},Z.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Sl:Cl},Z.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&Dl(n)||Ol(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function Dl(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Ol(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}Z.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return kl(t)?(e.lastIntValue=t,e.advance(),!0):!1};function kl(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}Z.regexp_eatClassControlLetter=function(e){var t=e.current();return Al(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},Z.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},Z.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Al(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Al(e){return e>=48&&e<=57}Z.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;jl(n=e.current());)e.lastIntValue=16*e.lastIntValue+Ml(n),e.advance();return e.pos!==t};function jl(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ml(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}Z.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1},Z.regexp_eatOctalDigit=function(e){var t=e.current();return Nl(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Nl(e){return e>=48&&e<=55}Z.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!jl(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Ml(i),e.advance()}return!0};var Pl=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Ks(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Q=_c.prototype;Q.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new Pl(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Q.getToken=function(){return this.next(),new Pl(this)},typeof Symbol<`u`&&(Q[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===J.eof,value:t}}}}),Q.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(J.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},Q.readToken=function(e){return Cs(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},Q.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},Q.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Q.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=Ns(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},Q.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Ms(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Q.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&Ps.test(String.fromCharCode(e)))++this.pos;else break loop}}},Q.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Q.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(J.ellipsis)):(++this.pos,this.finishToken(J.dot))},Q.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(J.assign,2):this.finishOp(J.slash,1)},Q.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?J.star:J.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=J.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(J.assign,n+1):this.finishOp(r,n)},Q.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(J.assign,3):this.finishOp(e===124?J.logicalOR:J.logicalAND,2):t===61?this.finishOp(J.assign,2):this.finishOp(e===124?J.bitwiseOR:J.bitwiseAND,1)},Q.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(J.assign,2):this.finishOp(J.bitwiseXOR,1)},Q.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||As.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(J.incDec,2):t===61?this.finishOp(J.assign,2):this.finishOp(J.plusMin,1)},Q.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(J.assign,n+1):this.finishOp(J.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(J.relational,n))},Q.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(J.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(J.arrow)):this.finishOp(e===61?J.eq:J.prefix,1)},Q.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(J.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(J.assign,3):this.finishOp(J.coalesce,2)}return this.finishOp(J.question,1)},Q.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),Cs(t,!0)||t===92))return this.finishToken(J.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+Us(t)+`'`)},Q.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(J.parenL);case 41:return++this.pos,this.finishToken(J.parenR);case 59:return++this.pos,this.finishToken(J.semi);case 44:return++this.pos,this.finishToken(J.comma);case 91:return++this.pos,this.finishToken(J.bracketL);case 93:return++this.pos,this.finishToken(J.bracketR);case 123:return++this.pos,this.finishToken(J.braceL);case 125:return++this.pos,this.finishToken(J.braceR);case 58:return++this.pos,this.finishToken(J.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(J.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(J.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+Us(e)+`'`)},Q.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Q.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(As.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new pl(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(J.regexp,{pattern:i,flags:o,value:c})},Q.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95){i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;continue}if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function Fl(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function Il(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}Q.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=Il(this.input.slice(t,this.pos)),++this.pos):Cs(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(J.num,n)},Q.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=Il(this.input.slice(t,this.pos));return++this.pos,Cs(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(J.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),Cs(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=Fl(this.input.slice(t,this.pos),n);return this.finishToken(J.num,a)},Q.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},Q.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ms(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(J.string,t)};var Ll={};Q.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ll)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},Q.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ll;this.raise(e,t)},Q.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===J.template||this.type===J.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(J.dollarBraceL)):(++this.pos,this.finishToken(J.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(J.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ms(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
35
+ `;break;default:e+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else ++this.pos}},Q.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(J.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
55
36
  `&&++this.pos;case`
56
- `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,`Unterminated template`)},Z.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
57
- `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return lc(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return Qs(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},Z.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},Z.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Gs(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?Ws:Gs)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=lc(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},Z.readWord=function(){var e=this.readWord1(),t=q.name;return this.keywords.test(e)&&(t=Ys[e]),this.finishToken(t,e)},Lc.acorn={Parser:Lc,version:`8.16.0`,defaultOptions:mc,Position:dc,SourceLocation:fc,getLineInfo:pc,Node:ol,TokenType:G,tokTypes:q,keywordTypes:Ys,TokContext:Zc,tokContexts:Qc,isIdentifierChar:Gs,isIdentifierStart:Ws,Token:eu,isNewLine:Qs,lineBreak:Xs,lineBreakG:Zs,nonASCIIwhitespace:ec};var iu=o(((e,t)=>{t.exports={quot:`"`,amp:`&`,apos:`'`,lt:`<`,gt:`>`,nbsp:`\xA0`,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:`ÿ`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,fnof:`ƒ`,circ:`ˆ`,tilde:`˜`,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:`ϖ`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,bull:`•`,hellip:`…`,permil:`‰`,prime:`′`,Prime:`″`,lsaquo:`‹`,rsaquo:`›`,oline:`‾`,frasl:`⁄`,euro:`€`,image:`ℑ`,weierp:`℘`,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:`♦`}})),au=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.acorn={}))})(e,(function(e){"use strict";var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],r=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,i=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,a={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},o=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,s={5:o,"5module":o+` export import`,6:o+` const class extends export import super`},c=/^in(stanceof)?$/,l=RegExp(`[`+i+`]`),u=RegExp(`[`+i+r+`]`);function d(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function f(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&l.test(String.fromCharCode(e)):t===!1?!1:d(e,n)}function p(e,r){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&u.test(String.fromCharCode(e)):r===!1?!1:d(e,n)||d(e,t)}var m=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function h(e,t){return new m(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},_={startsExpr:!0},v={};function y(e,t){return t===void 0&&(t={}),t.keyword=e,v[e]=new m(e,t)}var b={num:new m(`num`,_),regexp:new m(`regexp`,_),string:new m(`string`,_),name:new m(`name`,_),privateId:new m(`privateId`,_),eof:new m(`eof`),bracketL:new m(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new m(`]`),braceL:new m(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new m(`}`),parenL:new m(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new m(`)`),comma:new m(`,`,g),semi:new m(`;`,g),colon:new m(`:`,g),dot:new m(`.`),question:new m(`?`,g),questionDot:new m(`?.`),arrow:new m(`=>`,g),template:new m(`template`),invalidTemplate:new m(`invalidTemplate`),ellipsis:new m(`...`,g),backQuote:new m("`",_),dollarBraceL:new m("${",{beforeExpr:!0,startsExpr:!0}),eq:new m(`=`,{beforeExpr:!0,isAssign:!0}),assign:new m(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new m(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new m(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:h(`||`,1),logicalAND:h(`&&`,2),bitwiseOR:h(`|`,3),bitwiseXOR:h(`^`,4),bitwiseAND:h(`&`,5),equality:h(`==/!=/===/!==`,6),relational:h(`</>/<=/>=`,7),bitShift:h(`<</>>/>>>`,8),plusMin:new m(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:h(`%`,10),star:h(`*`,10),slash:h(`/`,10),starstar:new m(`**`,{beforeExpr:!0}),coalesce:h(`??`,1),_break:y(`break`),_case:y(`case`,g),_catch:y(`catch`),_continue:y(`continue`),_debugger:y(`debugger`),_default:y(`default`,g),_do:y(`do`,{isLoop:!0,beforeExpr:!0}),_else:y(`else`,g),_finally:y(`finally`),_for:y(`for`,{isLoop:!0}),_function:y(`function`,_),_if:y(`if`),_return:y(`return`,g),_switch:y(`switch`),_throw:y(`throw`,g),_try:y(`try`),_var:y(`var`),_const:y(`const`),_while:y(`while`,{isLoop:!0}),_with:y(`with`),_new:y(`new`,{beforeExpr:!0,startsExpr:!0}),_this:y(`this`,_),_super:y(`super`,_),_class:y(`class`,_),_extends:y(`extends`,g),_export:y(`export`),_import:y(`import`,_),_null:y(`null`,_),_true:y(`true`,_),_false:y(`false`,_),_in:y(`in`,{beforeExpr:!0,binop:7}),_instanceof:y(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:y(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},x=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(x.source,`g`);function C(e){return e===10||e===13||e===8232||e===8233}function w(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(C(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var T=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,E=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ee=Object.prototype,D=ee.hasOwnProperty,O=ee.toString,k=Object.hasOwn||(function(e,t){return D.call(e,t)}),te=Array.isArray||(function(e){return O.call(e)===`[object Array]`}),A=Object.create(null);function j(e){return A[e]||(A[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function ne(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var re=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ie=function(e,t){this.line=e,this.column=t};ie.prototype.offset=function(e){return new ie(this.line,this.column+e)};var ae=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function oe(e,t){for(var n=1,r=0;;){var i=w(e,r,t);if(i<0)return new ie(n,t-r);++n,r=i}}var se={ecmaVersion:null,sourceType:`script`,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ce=!1;function le(e){var t={};for(var n in se)t[n]=e&&k(e,n)?e[n]:se[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!ce&&typeof console==`object`&&console.warn&&(ce=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
58
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),te(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(te(t.onComment)&&(t.onComment=ue(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function ue(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new ae(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var de=1,fe=2,pe=4,me=8,he=16,ge=32,_e=64,ve=128,ye=256,be=512,xe=1024,Se=de|fe|ye;function Ce(e,t){return fe|(e?pe:0)|(t?me:0)}var we=0,Te=1,Ee=2,De=3,M=4,Oe=5,N=function(e,t,n){this.options=e=le(e),this.sourceFile=e.sourceFile,this.keywords=j(s[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=a[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=j(r);var i=(r?r+` `:``)+a.strict;this.reservedWordsStrict=j(i),this.reservedWordsStrictBind=j(i+` `+a.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
59
- `,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(x).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=b.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?fe:de),this.regexpState=null,this.privateNameStack=[]},P={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};N.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},P.inFunction.get=function(){return(this.currentVarScope().flags&fe)>0},P.inGenerator.get=function(){return(this.currentVarScope().flags&me)>0},P.inAsync.get=function(){return(this.currentVarScope().flags&pe)>0},P.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(ye|be))return!1;if(t&fe)return(t&pe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},P.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&de)},P.allowSuper.get=function(){return(this.currentThisScope().flags&_e)>0||this.options.allowSuperOutsideMethod},P.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ve)>0},P.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},P.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(ye|be)||t&fe&&!(t&he))return!0}return!1},P.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&xe||!this.inModule&&e&de)},P.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ye)>0},N.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},N.parse=function(e,t){return new this(t,e).parse()},N.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},N.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(N.prototype,P);var ke=N.prototype,Ae=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ke.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){E.lastIndex=e,e+=E.exec(this.input)[0].length;var t=Ae.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){E.lastIndex=e+t[0].length;var n=E.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||x.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,E.lastIndex=e,e+=E.exec(this.input)[0].length,this.input[e]===`;`&&e++}},ke.eat=function(e){return this.type===e?(this.next(),!0):!1},ke.isContextual=function(e){return this.type===b.name&&this.value===e&&!this.containsEsc},ke.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},ke.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ke.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||x.test(this.input.slice(this.lastTokEnd,this.start))},ke.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ke.semicolon=function(){!this.eat(b.semi)&&!this.insertSemicolon()&&this.unexpected()},ke.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ke.expect=function(e){this.eat(e)||this.unexpected()},ke.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var je=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ke.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},ke.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},ke.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},ke.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var F=N.prototype;F.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==b.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var I={kind:`loop`},L={kind:`switch`};F.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;E.lastIndex=this.pos;var t=E.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(f(r)){var i=n;do n+=r<=65535?1:2;while(p(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!c.test(a))return!0}return!1},F.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;E.lastIndex=this.pos;var e=E.exec(this.input),t=this.pos+e[0].length,n;return!x.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(p(n=this.fullCharCodeAt(t+8))||n===92))},F.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;E.lastIndex=this.pos;var n=E.exec(this.input),r=this.pos+n[0].length;if(x.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||p(a=this.fullCharCodeAt(i))||a===92)return!1;E.lastIndex=i;var o=E.exec(this.input);if(r=i+o[0].length,o&&x.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!f(s)&&s!==92)return!1;var l=r;do r+=s<=65535?1:2;while(p(s=this.fullCharCodeAt(r)));if(s===92)return!0;var u=this.input.slice(l,r);return!(c.test(u)||t&&u===`of`)},F.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},F.isUsing=function(e){return this.isUsingKeyword(!1,e)},F.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=b._var,a=`let`),r){case b._break:case b._continue:return this.parseBreakContinueStatement(i,r.keyword);case b._debugger:return this.parseDebuggerStatement(i);case b._do:return this.parseDoStatement(i);case b._for:return this.parseForStatement(i);case b._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case b._class:return e&&this.unexpected(),this.parseClass(i,!0);case b._if:return this.parseIfStatement(i);case b._return:return this.parseReturnStatement(i);case b._switch:return this.parseSwitchStatement(i);case b._throw:return this.parseThrowStatement(i);case b._try:return this.parseTryStatement(i);case b._const:case b._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case b._while:return this.parseWhileStatement(i);case b._with:return this.parseWithStatement(i);case b.braceL:return this.parseBlock(!0,i);case b.semi:return this.parseEmptyStatement(i);case b._export:case b._import:if(this.options.ecmaVersion>10&&r===b._import){E.lastIndex=this.pos;var o=E.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===b._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===b.name&&d.type===`Identifier`&&this.eat(b.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},F.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(b.semi)||this.insertSemicolon()?e.label=null:this.type===b.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},F.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},F.parseDoStatement=function(e){return this.next(),this.labels.push(I),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(b._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(b.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},F.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(I),this.enterScope(0),this.expect(b.parenL),this.type===b.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===b._var||this.type===b._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new je,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===b._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===b._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},F.parseForAfterInit=function(e,t,n){return(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===b._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},F.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Me|(n?0:Ne),!1,t)},F.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(b._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},F.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(b.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},F.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(b.braceL),this.labels.push(L),this.enterScope(xe);for(var t,n=!1;this.type!==b.braceR;)if(this.type===b._case||this.type===b._default){var r=this.type===b._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(b.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},F.parseThrowStatement=function(e){return this.next(),x.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var R=[];F.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?ge:0),this.checkLValPattern(e,t?M:Ee),this.expect(b.parenR),e},F.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===b._catch){var t=this.startNode();this.next(),this.eat(b.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(b._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},F.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},F.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(I),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},F.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},F.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},F.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===b._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},F.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},F.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(b.braceL),e&&this.enterScope(0);this.type!==b.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},F.parseFor=function(e,t){return e.init=t,this.expect(b.semi),e.test=this.type===b.semi?null:this.parseExpression(),this.expect(b.semi),e.update=this.type===b.parenR?null:this.parseExpression(),this.expect(b.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},F.parseForIn=function(e,t){var n=this.type===b._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(b.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},F.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(b.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==b._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&!(t&&(this.type===b._in||this.isContextual(`of`)))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(b.comma))break}return e},F.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?Te:Ee,!1)};var Me=1,Ne=2,Pe=4;F.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===b.star&&t&Ne&&this.unexpected(),e.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Me&&(e.id=t&Pe&&this.type!==b.name?null:this.parseIdent(),e.id&&!(t&Ne)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Te:Ee:De));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ce(e.async,e.generator)),t&Me||(e.id=this.type===b.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&Me?`FunctionDeclaration`:`FunctionExpression`)},F.parseFunctionParams=function(e){this.expect(b.parenL),e.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},F.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(b.braceL);this.type!==b.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&Fe(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},F.parseClassElement=function(e){if(this.eat(b.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(b.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===b.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===b.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(b.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===b.parenL||o!==`method`||i||a){var l=!n.static&&Ie(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},F.isClassElementNameStart=function(){return this.type===b.name||this.type===b.privateId||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword},F.parseClassElementName=function(e){this.type===b.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},F.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&Ie(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},F.parseClassField=function(e){return Ie(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&Ie(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(b.eq)?(this.enterScope(be|_e),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},F.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(ye|_e);this.type!==b.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},F.parseClassId=function(e,t){this.type===b.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Ee,!1)):(t===!0&&this.unexpected(),e.id=null)},F.parseClassSuper=function(e){e.superClass=this.eat(b._extends)?this.parseExprSubscripts(null,!1):null},F.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},F.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];k(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function Fe(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function Ie(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}F.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==b.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},F.parseExport=function(e,t){if(this.next(),this.eat(b.star))return this.parseExportAllDeclaration(e,t);if(this.eat(b._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==b.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},F.parseExportDeclaration=function(e){return this.parseStatement(null)},F.parseExportDefaultDeclaration=function(){var e;if(this.type===b._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Me|Pe,!1,e)}else if(this.type===b._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}else{var r=this.parseMaybeAssign();return this.semicolon(),r}},F.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),k(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},F.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},F.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},F.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},F.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},F.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(b.braceL);!this.eat(b.braceR);){if(n)n=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;t.push(this.parseExportSpecifier(e))}return t},F.parseImport=function(e){return this.next(),this.type===b.string?(e.specifiers=R,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===b.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},F.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Ee),this.finishNode(e,`ImportSpecifier`)},F.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Ee),this.finishNode(e,`ImportDefaultSpecifier`)},F.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,Ee),this.finishNode(e,`ImportNamespaceSpecifier`)},F.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===b.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(b.comma)))return e;if(this.type===b.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(b.braceL);!this.eat(b.braceR);){if(t)t=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;e.push(this.parseImportSpecifier())}return e},F.parseWithClause=function(){var e=[];if(!this.eat(b._with))return e;this.expect(b.braceL);for(var t={},n=!0;!this.eat(b.braceR);){if(n)n=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;k(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},F.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(b.colon),this.type!==b.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},F.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===b.string){var e=this.parseLiteral(this.value);return re.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},F.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},F.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var Le=N.prototype;Le.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},Le.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},Le.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},Le.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==b.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},Le.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case b.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(b.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case b.braceL:return this.parseObj(!0)}return this.parseIdent()},Le.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(b.comma),t&&this.type===b.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===b.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},Le.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Le.parseBindingListItem=function(e){return e},Le.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(b.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},Le.checkLValSimple=function(e,t,n){t===void 0&&(t=we);var r=t!==we;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===Ee&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(k(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==Oe&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},Le.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=we),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},Le.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=we),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Re=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},z={b_stat:new Re(`{`,!1),b_expr:new Re(`{`,!0),b_tmpl:new Re("${",!1),p_stat:new Re(`(`,!1),p_expr:new Re(`(`,!0),q_tmpl:new Re("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Re(`function`,!1),f_expr:new Re(`function`,!0),f_expr_gen:new Re(`function`,!0,!1,null,!0),f_gen:new Re(`function`,!1,!1,null,!0)},ze=N.prototype;ze.initialContext=function(){return[z.b_stat]},ze.curContext=function(){return this.context[this.context.length-1]},ze.braceIsBlock=function(e){var t=this.curContext();return t===z.f_expr||t===z.f_stat?!0:e===b.colon&&(t===z.b_stat||t===z.b_expr)?!t.isExpr:e===b._return||e===b.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===b._else||e===b.semi||e===b.eof||e===b.parenR||e===b.arrow?!0:e===b.braceL?t===z.b_stat:e===b._var||e===b._const||e===b.name?!1:!this.exprAllowed},ze.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},ze.updateContext=function(e){var t,n=this.type;n.keyword&&e===b.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},ze.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},b.parenR.updateContext=b.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===z.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},b.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?z.b_stat:z.b_expr),this.exprAllowed=!0},b.dollarBraceL.updateContext=function(){this.context.push(z.b_tmpl),this.exprAllowed=!0},b.parenL.updateContext=function(e){var t=e===b._if||e===b._for||e===b._with||e===b._while;this.context.push(t?z.p_stat:z.p_expr),this.exprAllowed=!0},b.incDec.updateContext=function(){},b._function.updateContext=b._class.updateContext=function(e){e.beforeExpr&&e!==b._else&&!(e===b.semi&&this.curContext()!==z.p_stat)&&!(e===b._return&&x.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===b.colon||e===b.braceL)&&this.curContext()===z.b_stat)?this.context.push(z.f_expr):this.context.push(z.f_stat),this.exprAllowed=!1},b.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},b.backQuote.updateContext=function(){this.curContext()===z.q_tmpl?this.context.pop():this.context.push(z.q_tmpl),this.exprAllowed=!1},b.star.updateContext=function(e){if(e===b._function){var t=this.context.length-1;this.context[t]===z.f_expr?this.context[t]=z.f_expr_gen:this.context[t]=z.f_gen}this.exprAllowed=!0},b.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==b.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var B=N.prototype;B.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);return}i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}},B.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===b.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(b.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,`SequenceExpression`)}return i},B.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new je,r=!0);var s=this.start,c=this.startLoc;(this.type===b.parenL||this.type===b.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===b.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===b.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}else r&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},B.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(b.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(b.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},B.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},B.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==b._in)&&a>r){var o=this.type===b.logicalOR||this.type===b.logicalAND,s=this.type===b.coalesce;s&&(a=b.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===b.coalesce||s&&(this.type===b.logicalOR||this.type===b.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},B.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},B.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===b.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&Be(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&Ve(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===b.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==b._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&this.eat(b.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1);else return o};function Be(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&Be(e.expression)}function Ve(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&Ve(e.expression)||e.type===`ParenthesizedExpression`&&Ve(e.expression)}B.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type===`MemberExpression`&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},B.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},B.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(b.arrow)},B.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},B.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(b.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(b.bracketL);if(l||c&&this.type!==b.parenL&&this.type!==b.backQuote||this.eat(b.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(b.bracketR)):this.type===b.privateId&&e.type!==`Super`?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(b.parenL)){var d=new je,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===b.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},B.parseExprAtom=function(e,t,n){this.type===b.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case b._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===b.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==b.dot&&this.type!==b.bracketL&&this.type!==b.parenL&&this.unexpected(),this.finishNode(r,`Super`);case b._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case b.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(b._function))return this.overrideContext(z.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===b.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(b.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case b.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case b.num:case b.string:return this.parseLiteral(this.value);case b._null:case b._true:case b._false:return r=this.startNode(),r.value=this.type===b._null?null:this.type===b._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case b.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case b.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(b.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case b.braceL:return this.overrideContext(z.b_expr),this.parseObj(!1,e);case b._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case b._class:return this.parseClass(this.startNode(),!1);case b._new:return this.parseNew();case b.backQuote:return this.parseTemplate();case b._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},B.parseExprAtomDefault=function(){this.unexpected()},B.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===b.parenL&&!e)return this.parseDynamicImport(t);if(this.type===b.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}else this.unexpected()},B.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(b.parenR)?e.options=null:(this.expect(b.comma),this.afterTrailingComma(b.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(b.parenR)||(this.expect(b.comma),this.afterTrailingComma(b.parenR)||this.unexpected())));else if(!this.eat(b.parenR)){var t=this.start;this.eat(b.comma)&&this.eat(b.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},B.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},B.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},B.parseParenExpression=function(){this.expect(b.parenL);var e=this.parseExpression();return this.expect(b.parenR),e},B.shouldParseArrow=function(e){return!this.canInsertSemicolon()},B.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new je,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==b.parenR;)if(l?l=!1:this.expect(b.comma),a&&this.afterTrailingComma(b.parenR,!0)){u=!0;break}else if(this.type===b.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}else c.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(b.parenR),e&&this.shouldParseArrow(c)&&this.eat(b.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}else return i},B.parseParenItem=function(e){return e},B.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var He=[];B.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===b.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(b.parenL)?e.arguments=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1):e.arguments=He,this.finishNode(e,`NewExpression`)},B.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===b.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
37
+ `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,`Unterminated template`)},Q.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
38
+ `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Us(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return Ms(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},Q.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},Q.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(ws(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?Cs:ws)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=Us(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},Q.readWord=function(){var e=this.readWord1(),t=J.name;return this.keywords.test(e)&&(t=ks[e]),this.finishToken(t,e)},_c.acorn={Parser:_c,version:`8.16.0`,defaultOptions:Js,Position:Gs,SourceLocation:Ks,getLineInfo:qs,Node:Bc,TokenType:Ts,tokTypes:J,keywordTypes:ks,TokContext:jc,tokContexts:Mc,isIdentifierChar:ws,isIdentifierStart:Cs,Token:Pl,isNewLine:Ms,lineBreak:As,lineBreakG:js,nonASCIIwhitespace:Ps};var Rl=R(((e,t)=>{t.exports={quot:`"`,amp:`&`,apos:`'`,lt:`<`,gt:`>`,nbsp:`\xA0`,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:`ÿ`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,fnof:`ƒ`,circ:`ˆ`,tilde:`˜`,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:`ϖ`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,bull:`•`,hellip:`…`,permil:`‰`,prime:`′`,Prime:`″`,lsaquo:`‹`,rsaquo:`›`,oline:`‾`,frasl:`⁄`,euro:`€`,image:`ℑ`,weierp:`℘`,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:`♦`}})),zl=R(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.acorn={}))})(e,(function(e){"use strict";var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],r=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,i=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,a={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},o=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,s={5:o,"5module":o+` export import`,6:o+` const class extends export import super`},c=/^in(stanceof)?$/,l=RegExp(`[`+i+`]`),u=RegExp(`[`+i+r+`]`);function d(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function f(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&l.test(String.fromCharCode(e)):t===!1?!1:d(e,n)}function p(e,r){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&u.test(String.fromCharCode(e)):r===!1?!1:d(e,n)||d(e,t)}var m=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function h(e,t){return new m(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},_={startsExpr:!0},v={};function y(e,t){return t===void 0&&(t={}),t.keyword=e,v[e]=new m(e,t)}var b={num:new m(`num`,_),regexp:new m(`regexp`,_),string:new m(`string`,_),name:new m(`name`,_),privateId:new m(`privateId`,_),eof:new m(`eof`),bracketL:new m(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new m(`]`),braceL:new m(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new m(`}`),parenL:new m(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new m(`)`),comma:new m(`,`,g),semi:new m(`;`,g),colon:new m(`:`,g),dot:new m(`.`),question:new m(`?`,g),questionDot:new m(`?.`),arrow:new m(`=>`,g),template:new m(`template`),invalidTemplate:new m(`invalidTemplate`),ellipsis:new m(`...`,g),backQuote:new m("`",_),dollarBraceL:new m("${",{beforeExpr:!0,startsExpr:!0}),eq:new m(`=`,{beforeExpr:!0,isAssign:!0}),assign:new m(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new m(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new m(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:h(`||`,1),logicalAND:h(`&&`,2),bitwiseOR:h(`|`,3),bitwiseXOR:h(`^`,4),bitwiseAND:h(`&`,5),equality:h(`==/!=/===/!==`,6),relational:h(`</>/<=/>=`,7),bitShift:h(`<</>>/>>>`,8),plusMin:new m(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:h(`%`,10),star:h(`*`,10),slash:h(`/`,10),starstar:new m(`**`,{beforeExpr:!0}),coalesce:h(`??`,1),_break:y(`break`),_case:y(`case`,g),_catch:y(`catch`),_continue:y(`continue`),_debugger:y(`debugger`),_default:y(`default`,g),_do:y(`do`,{isLoop:!0,beforeExpr:!0}),_else:y(`else`,g),_finally:y(`finally`),_for:y(`for`,{isLoop:!0}),_function:y(`function`,_),_if:y(`if`),_return:y(`return`,g),_switch:y(`switch`),_throw:y(`throw`,g),_try:y(`try`),_var:y(`var`),_const:y(`const`),_while:y(`while`,{isLoop:!0}),_with:y(`with`),_new:y(`new`,{beforeExpr:!0,startsExpr:!0}),_this:y(`this`,_),_super:y(`super`,_),_class:y(`class`,_),_extends:y(`extends`,g),_export:y(`export`),_import:y(`import`,_),_null:y(`null`,_),_true:y(`true`,_),_false:y(`false`,_),_in:y(`in`,{beforeExpr:!0,binop:7}),_instanceof:y(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:y(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},x=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(x.source,`g`);function C(e){return e===10||e===13||e===8232||e===8233}function w(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(C(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var T=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,E=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,D=Object.prototype,O=D.hasOwnProperty,ee=D.toString,k=Object.hasOwn||(function(e,t){return O.call(e,t)}),te=Array.isArray||(function(e){return ee.call(e)===`[object Array]`}),A=Object.create(null);function j(e){return A[e]||(A[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function ne(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var re=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ie=function(e,t){this.line=e,this.column=t};ie.prototype.offset=function(e){return new ie(this.line,this.column+e)};var M=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function ae(e,t){for(var n=1,r=0;;){var i=w(e,r,t);if(i<0)return new ie(n,t-r);++n,r=i}}var oe={ecmaVersion:null,sourceType:`script`,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},se=!1;function N(e){var t={};for(var n in oe)t[n]=e&&k(e,n)?e[n]:oe[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!se&&typeof console==`object`&&console.warn&&(se=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
39
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),te(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(te(t.onComment)&&(t.onComment=P(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function P(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new M(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var F=1,ce=2,le=4,ue=8,I=16,de=32,fe=64,pe=128,me=256,L=512,he=1024,ge=F|ce|me;function _e(e,t){return ce|(e?le:0)|(t?ue:0)}var ve=0,ye=1,be=2,xe=3,Se=4,Ce=5,we=function(e,t,n){this.options=e=N(e),this.sourceFile=e.sourceFile,this.keywords=j(s[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=a[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=j(r);var i=(r?r+` `:``)+a.strict;this.reservedWordsStrict=j(i),this.reservedWordsStrictBind=j(i+` `+a.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
40
+ `,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(x).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=b.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?ce:F),this.regexpState=null,this.privateNameStack=[]},Te={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};we.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Te.inFunction.get=function(){return(this.currentVarScope().flags&ce)>0},Te.inGenerator.get=function(){return(this.currentVarScope().flags&ue)>0},Te.inAsync.get=function(){return(this.currentVarScope().flags&le)>0},Te.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(me|L))return!1;if(t&ce)return(t&le)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Te.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&F)},Te.allowSuper.get=function(){return(this.currentThisScope().flags&fe)>0||this.options.allowSuperOutsideMethod},Te.allowDirectSuper.get=function(){return(this.currentThisScope().flags&pe)>0},Te.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Te.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(me|L)||t&ce&&!(t&I))return!0}return!1},Te.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&he||!this.inModule&&e&F)},Te.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&me)>0},we.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},we.parse=function(e,t){return new this(t,e).parse()},we.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},we.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(we.prototype,Te);var Ee=we.prototype,R=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Ee.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){E.lastIndex=e,e+=E.exec(this.input)[0].length;var t=R.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){E.lastIndex=e+t[0].length;var n=E.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||x.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,E.lastIndex=e,e+=E.exec(this.input)[0].length,this.input[e]===`;`&&e++}},Ee.eat=function(e){return this.type===e?(this.next(),!0):!1},Ee.isContextual=function(e){return this.type===b.name&&this.value===e&&!this.containsEsc},Ee.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},Ee.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Ee.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||x.test(this.input.slice(this.lastTokEnd,this.start))},Ee.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ee.semicolon=function(){!this.eat(b.semi)&&!this.insertSemicolon()&&this.unexpected()},Ee.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Ee.expect=function(e){this.eat(e)||this.unexpected()},Ee.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var De=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ee.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},Ee.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},Ee.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},Ee.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var z=we.prototype;z.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==b.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var Oe={kind:`loop`},ke={kind:`switch`};z.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;E.lastIndex=this.pos;var t=E.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(f(r)){var i=n;do n+=r<=65535?1:2;while(p(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!c.test(a))return!0}return!1},z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;E.lastIndex=this.pos;var e=E.exec(this.input),t=this.pos+e[0].length,n;return!x.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(p(n=this.fullCharCodeAt(t+8))||n===92))},z.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;E.lastIndex=this.pos;var n=E.exec(this.input),r=this.pos+n[0].length;if(x.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||p(a=this.fullCharCodeAt(i))||a===92)return!1;E.lastIndex=i;var o=E.exec(this.input);if(r=i+o[0].length,o&&x.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!f(s)&&s!==92)return!1;var l=r;do r+=s<=65535?1:2;while(p(s=this.fullCharCodeAt(r)));if(s===92)return!0;var u=this.input.slice(l,r);return!(c.test(u)||t&&u===`of`)},z.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},z.isUsing=function(e){return this.isUsingKeyword(!1,e)},z.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=b._var,a=`let`),r){case b._break:case b._continue:return this.parseBreakContinueStatement(i,r.keyword);case b._debugger:return this.parseDebuggerStatement(i);case b._do:return this.parseDoStatement(i);case b._for:return this.parseForStatement(i);case b._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case b._class:return e&&this.unexpected(),this.parseClass(i,!0);case b._if:return this.parseIfStatement(i);case b._return:return this.parseReturnStatement(i);case b._switch:return this.parseSwitchStatement(i);case b._throw:return this.parseThrowStatement(i);case b._try:return this.parseTryStatement(i);case b._const:case b._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case b._while:return this.parseWhileStatement(i);case b._with:return this.parseWithStatement(i);case b.braceL:return this.parseBlock(!0,i);case b.semi:return this.parseEmptyStatement(i);case b._export:case b._import:if(this.options.ecmaVersion>10&&r===b._import){E.lastIndex=this.pos;var o=E.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===b._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===b.name&&d.type===`Identifier`&&this.eat(b.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},z.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(b.semi)||this.insertSemicolon()?e.label=null:this.type===b.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},z.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},z.parseDoStatement=function(e){return this.next(),this.labels.push(Oe),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(b._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(b.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},z.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(Oe),this.enterScope(0),this.expect(b.parenL),this.type===b.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===b._var||this.type===b._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new De,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===b._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===b._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},z.parseForAfterInit=function(e,t,n){return(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===b._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},z.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,je|(n?0:Me),!1,t)},z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(b._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},z.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(b.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(b.braceL),this.labels.push(ke),this.enterScope(he);for(var t,n=!1;this.type!==b.braceR;)if(this.type===b._case||this.type===b._default){var r=this.type===b._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(b.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},z.parseThrowStatement=function(e){return this.next(),x.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var Ae=[];z.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?de:0),this.checkLValPattern(e,t?Se:be),this.expect(b.parenR),e},z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===b._catch){var t=this.startNode();this.next(),this.eat(b.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(b._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},z.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Oe),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},z.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===b._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},z.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(b.braceL),e&&this.enterScope(0);this.type!==b.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},z.parseFor=function(e,t){return e.init=t,this.expect(b.semi),e.test=this.type===b.semi?null:this.parseExpression(),this.expect(b.semi),e.update=this.type===b.parenR?null:this.parseExpression(),this.expect(b.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},z.parseForIn=function(e,t){var n=this.type===b._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(b.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},z.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(b.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==b._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&!(t&&(this.type===b._in||this.isContextual(`of`)))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(b.comma))break}return e},z.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?ye:be,!1)};var je=1,Me=2,Ne=4;z.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===b.star&&t&Me&&this.unexpected(),e.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&je&&(e.id=t&Ne&&this.type!==b.name?null:this.parseIdent(),e.id&&!(t&Me)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?ye:be:xe));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(_e(e.async,e.generator)),t&je||(e.id=this.type===b.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&je?`FunctionDeclaration`:`FunctionExpression`)},z.parseFunctionParams=function(e){this.expect(b.parenL),e.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},z.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(b.braceL);this.type!==b.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&Pe(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},z.parseClassElement=function(e){if(this.eat(b.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(b.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===b.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===b.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(b.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===b.parenL||o!==`method`||i||a){var l=!n.static&&Fe(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},z.isClassElementNameStart=function(){return this.type===b.name||this.type===b.privateId||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword},z.parseClassElementName=function(e){this.type===b.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},z.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&Fe(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},z.parseClassField=function(e){return Fe(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&Fe(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(b.eq)?(this.enterScope(L|fe),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},z.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(me|fe);this.type!==b.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},z.parseClassId=function(e,t){this.type===b.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,be,!1)):(t===!0&&this.unexpected(),e.id=null)},z.parseClassSuper=function(e){e.superClass=this.eat(b._extends)?this.parseExprSubscripts(null,!1):null},z.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},z.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];k(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function Pe(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function Fe(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}z.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==b.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},z.parseExport=function(e,t){if(this.next(),this.eat(b.star))return this.parseExportAllDeclaration(e,t);if(this.eat(b._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==b.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},z.parseExportDeclaration=function(e){return this.parseStatement(null)},z.parseExportDefaultDeclaration=function(){var e;if(this.type===b._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,je|Ne,!1,e)}else if(this.type===b._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}else{var r=this.parseMaybeAssign();return this.semicolon(),r}},z.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),k(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},z.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},z.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},z.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},z.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},z.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(b.braceL);!this.eat(b.braceR);){if(n)n=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;t.push(this.parseExportSpecifier(e))}return t},z.parseImport=function(e){return this.next(),this.type===b.string?(e.specifiers=Ae,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===b.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},z.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,be),this.finishNode(e,`ImportSpecifier`)},z.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,be),this.finishNode(e,`ImportDefaultSpecifier`)},z.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,be),this.finishNode(e,`ImportNamespaceSpecifier`)},z.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===b.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(b.comma)))return e;if(this.type===b.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(b.braceL);!this.eat(b.braceR);){if(t)t=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;e.push(this.parseImportSpecifier())}return e},z.parseWithClause=function(){var e=[];if(!this.eat(b._with))return e;this.expect(b.braceL);for(var t={},n=!0;!this.eat(b.braceR);){if(n)n=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;k(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},z.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(b.colon),this.type!==b.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===b.string){var e=this.parseLiteral(this.value);return re.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},z.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},z.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var Ie=we.prototype;Ie.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},Ie.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},Ie.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},Ie.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==b.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},Ie.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case b.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(b.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case b.braceL:return this.parseObj(!0)}return this.parseIdent()},Ie.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(b.comma),t&&this.type===b.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===b.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},Ie.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Ie.parseBindingListItem=function(e){return e},Ie.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(b.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},Ie.checkLValSimple=function(e,t,n){t===void 0&&(t=ve);var r=t!==ve;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===be&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(k(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==Ce&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},Ie.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=ve),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},Ie.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=ve),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var B=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},V={b_stat:new B(`{`,!1),b_expr:new B(`{`,!0),b_tmpl:new B("${",!1),p_stat:new B(`(`,!1),p_expr:new B(`(`,!0),q_tmpl:new B("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new B(`function`,!1),f_expr:new B(`function`,!0),f_expr_gen:new B(`function`,!0,!1,null,!0),f_gen:new B(`function`,!1,!1,null,!0)},H=we.prototype;H.initialContext=function(){return[V.b_stat]},H.curContext=function(){return this.context[this.context.length-1]},H.braceIsBlock=function(e){var t=this.curContext();return t===V.f_expr||t===V.f_stat?!0:e===b.colon&&(t===V.b_stat||t===V.b_expr)?!t.isExpr:e===b._return||e===b.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===b._else||e===b.semi||e===b.eof||e===b.parenR||e===b.arrow?!0:e===b.braceL?t===V.b_stat:e===b._var||e===b._const||e===b.name?!1:!this.exprAllowed},H.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},H.updateContext=function(e){var t,n=this.type;n.keyword&&e===b.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},H.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},b.parenR.updateContext=b.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===V.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},b.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?V.b_stat:V.b_expr),this.exprAllowed=!0},b.dollarBraceL.updateContext=function(){this.context.push(V.b_tmpl),this.exprAllowed=!0},b.parenL.updateContext=function(e){var t=e===b._if||e===b._for||e===b._with||e===b._while;this.context.push(t?V.p_stat:V.p_expr),this.exprAllowed=!0},b.incDec.updateContext=function(){},b._function.updateContext=b._class.updateContext=function(e){e.beforeExpr&&e!==b._else&&!(e===b.semi&&this.curContext()!==V.p_stat)&&!(e===b._return&&x.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===b.colon||e===b.braceL)&&this.curContext()===V.b_stat)?this.context.push(V.f_expr):this.context.push(V.f_stat),this.exprAllowed=!1},b.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},b.backQuote.updateContext=function(){this.curContext()===V.q_tmpl?this.context.pop():this.context.push(V.q_tmpl),this.exprAllowed=!1},b.star.updateContext=function(e){if(e===b._function){var t=this.context.length-1;this.context[t]===V.f_expr?this.context[t]=V.f_expr_gen:this.context[t]=V.f_gen}this.exprAllowed=!0},b.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==b.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var U=we.prototype;U.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);return}i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}},U.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===b.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(b.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,`SequenceExpression`)}return i},U.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new De,r=!0);var s=this.start,c=this.startLoc;(this.type===b.parenL||this.type===b.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===b.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===b.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}else r&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},U.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(b.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(b.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},U.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},U.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==b._in)&&a>r){var o=this.type===b.logicalOR||this.type===b.logicalAND,s=this.type===b.coalesce;s&&(a=b.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===b.coalesce||s&&(this.type===b.logicalOR||this.type===b.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},U.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},U.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===b.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&Le(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&Re(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===b.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==b._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&this.eat(b.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1);else return o};function Le(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&Le(e.expression)}function Re(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&Re(e.expression)||e.type===`ParenthesizedExpression`&&Re(e.expression)}U.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type===`MemberExpression`&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},U.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},U.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(b.arrow)},U.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},U.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(b.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(b.bracketL);if(l||c&&this.type!==b.parenL&&this.type!==b.backQuote||this.eat(b.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(b.bracketR)):this.type===b.privateId&&e.type!==`Super`?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(b.parenL)){var d=new De,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===b.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},U.parseExprAtom=function(e,t,n){this.type===b.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case b._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===b.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==b.dot&&this.type!==b.bracketL&&this.type!==b.parenL&&this.unexpected(),this.finishNode(r,`Super`);case b._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case b.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(b._function))return this.overrideContext(V.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===b.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(b.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case b.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case b.num:case b.string:return this.parseLiteral(this.value);case b._null:case b._true:case b._false:return r=this.startNode(),r.value=this.type===b._null?null:this.type===b._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case b.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case b.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(b.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case b.braceL:return this.overrideContext(V.b_expr),this.parseObj(!1,e);case b._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case b._class:return this.parseClass(this.startNode(),!1);case b._new:return this.parseNew();case b.backQuote:return this.parseTemplate();case b._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},U.parseExprAtomDefault=function(){this.unexpected()},U.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===b.parenL&&!e)return this.parseDynamicImport(t);if(this.type===b.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}else this.unexpected()},U.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(b.parenR)?e.options=null:(this.expect(b.comma),this.afterTrailingComma(b.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(b.parenR)||(this.expect(b.comma),this.afterTrailingComma(b.parenR)||this.unexpected())));else if(!this.eat(b.parenR)){var t=this.start;this.eat(b.comma)&&this.eat(b.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},U.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},U.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},U.parseParenExpression=function(){this.expect(b.parenL);var e=this.parseExpression();return this.expect(b.parenR),e},U.shouldParseArrow=function(e){return!this.canInsertSemicolon()},U.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new De,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==b.parenR;)if(l?l=!1:this.expect(b.comma),a&&this.afterTrailingComma(b.parenR,!0)){u=!0;break}else if(this.type===b.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}else c.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(b.parenR),e&&this.shouldParseArrow(c)&&this.eat(b.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}else return i},U.parseParenItem=function(e){return e},U.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var ze=[];U.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===b.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(b.parenL)?e.arguments=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1):e.arguments=ze,this.finishNode(e,`NewExpression`)},U.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===b.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
60
41
  `),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
61
- `),cooked:this.value},this.next(),n.tail=this.type===b.backQuote,this.finishNode(n,`TemplateElement`)},B.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===b.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(b.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(b.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},B.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===b.name||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===b.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},B.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(b.braceR);){if(r)r=!1;else if(this.expect(b.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(b.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},B.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(b.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===b.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(b.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(b.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},B.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},B.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===b.colon&&this.unexpected(),this.eat(b.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===b.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==b.comma&&this.type!==b.braceR&&this.type!==b.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===b.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},B.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(b.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(b.bracketR),e.key;e.computed=!1}return e.key=this.type===b.num||this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},B.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},B.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ce(t,r.generator)|_e|(n?ve:0)),this.expect(b.parenL),r.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},B.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Ce(n,!1)|he),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},B.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==b.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Oe),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},B.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},B.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,Te,t?null:n)}},B.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(b.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===b.comma?o=null:this.type===b.ellipsis?(o=this.parseSpread(r),r&&this.type===b.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},B.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&Se)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},B.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},B.parseIdentNode=function(){var e=this.startNode();return this.type===b.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name===`class`||e.name===`function`)&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=b.name):this.unexpected(),e},B.parsePrivateIdent=function(){var e=this.startNode();return this.type===b.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},B.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===b.semi||this.canInsertSemicolon()||this.type!==b.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(b.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},B.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var Ue=N.prototype;Ue.raise=function(e,t){var n=oe(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},Ue.raiseRecoverable=Ue.raise,Ue.curPosition=function(){if(this.options.locations)return new ie(this.curLine,this.pos-this.lineStart)};var We=N.prototype,Ge=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};We.enterScope=function(e){this.scopeStack.push(new Ge(e))},We.exitScope=function(){this.scopeStack.pop()},We.treatFunctionsAsVarInScope=function(e){return e.flags&fe||!this.inModule&&e.flags&de},We.declareName=function(e,t,n){var r=!1;if(t===Ee){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&de&&delete this.undefinedExports[e]}else if(t===M)this.currentScope().lexical.push(e);else if(t===De){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&ge&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&de&&delete this.undefinedExports[e],s.flags&Se)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},We.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},We.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},We.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Se|be|ye))return t}},We.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Se|be|ye)&&!(t.flags&he))return t}};var Ke=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new ae(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},qe=N.prototype;qe.startNode=function(){return new Ke(this,this.start,this.startLoc)},qe.startNodeAt=function(e,t){return new Ke(this,e,t)};function Je(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}qe.finishNode=function(e,t){return Je.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},qe.finishNodeAt=function(e,t,n,r){return Je.call(this,e,t,n,r)},qe.copyNode=function(e){var t=new Ke(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Ye=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,Xe=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,Ze=Xe+` Extended_Pictographic`,Qe=Ze,$e=Qe+` EBase EComp EMod EPres ExtPict`,et=$e,tt=et,nt={9:Xe,10:Ze,11:Qe,12:$e,13:et,14:tt},rt=`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`,it={9:``,10:``,11:``,12:``,13:``,14:rt},at=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,ot=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,st=ot+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,ct=st+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,lt=ct+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,ut=lt+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,dt=ut+` `+Ye,ft={9:ot,10:st,11:ct,12:lt,13:ut,14:dt},pt={};function mt(e){var t=pt[e]={binary:j(nt[e]+` `+at),binaryOfStrings:j(it[e]),nonBinary:{General_Category:j(at),Script:j(ft[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var ht=0,gt=[9,10,11,12,13,14];ht<gt.length;ht+=1){var _t=gt[ht];mt(_t)}var V=N.prototype,vt=function(e,t){this.parent=e,this.base=t||this};vt.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},vt.prototype.sibling=function(){return new vt(this.parent,this.base)};var yt=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=pt[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};yt.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},yt.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},yt.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},yt.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},yt.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},yt.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},yt.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},yt.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e?(this.advance(t),!0):!1},yt.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},V.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function bt(e){for(var t in e)return!0;return!1}V.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&bt(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},V.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},V.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new vt(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},V.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},V.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},V.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},V.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},V.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},V.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},V.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},V.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},V.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},V.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},V.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&xt(n);)t+=ne(n),e.advance();return t};function xt(e){return e===105||e===109||e===115}V.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},V.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},V.regexp_eatSyntaxCharacter=function(e){var t=e.current();return St(t)?(e.lastIntValue=t,e.advance(),!0):!1};function St(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}V.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!St(n);)e.advance();return e.pos!==t},V.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1},V.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`);t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},V.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},V.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ne(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ne(e.lastIntValue);return!0}return!1},V.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Ct(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Ct(e){return f(e,!0)||e===36||e===95}V.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),wt(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function wt(e){return p(e,!0)||e===36||e===95||e===8204||e===8205}V.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},V.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},V.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},V.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},V.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},V.regexp_eatZero=function(e){return e.current()===48&&!It(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},V.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1},V.regexp_eatControlLetter=function(e){var t=e.current();return Tt(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Tt(e){return e>=65&&e<=90||e>=97&&e<=122}V.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Et(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function Et(e){return e>=0&&e<=1114111}V.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1},V.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Dt=0,Ot=1,kt=2;V.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(At(t))return e.lastIntValue=-1,e.advance(),Ot;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===kt&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return Dt};function At(e){return e===100||e===68||e===115||e===83||e===119||e===87}V.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),Ot}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return Dt},V.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){k(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},V.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Ot;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return kt;e.raise(`Invalid property name`)},V.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;jt(t=e.current());)e.lastStringValue+=ne(t),e.advance();return e.lastStringValue!==``};function jt(e){return Tt(e)||e===95}V.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;Mt(t=e.current());)e.lastStringValue+=ne(t),e.advance();return e.lastStringValue!==``};function Mt(e){return jt(e)||It(e)}V.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},V.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===kt&&e.raise(`Negated character class may contain strings`),!0}return!1},V.regexp_classContents=function(e){return e.current()===93?Ot:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Ot)},V.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},V.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||zt(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r===93?!1:(e.lastIntValue=r,e.advance(),!0)},V.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},V.regexp_classSetExpression=function(e){var t=Ot,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===kt&&(t=kt);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==kt&&(t=Ot);continue}e.raise(`Invalid character in character class`)}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`);for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===kt&&(t=kt)}},V.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},V.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Ot:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},V.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===kt&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},V.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},V.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===kt&&(t=kt);return t},V.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Ot:kt},V.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&Nt(n)||Pt(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function Nt(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Pt(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}V.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Ft(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ft(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}V.regexp_eatClassControlLetter=function(e){var t=e.current();return It(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},V.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},V.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;It(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function It(e){return e>=48&&e<=57}V.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Lt(n=e.current());)e.lastIntValue=16*e.lastIntValue+Rt(n),e.advance();return e.pos!==t};function Lt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Rt(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}V.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1},V.regexp_eatOctalDigit=function(e){var t=e.current();return zt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function zt(e){return e>=48&&e<=55}V.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Lt(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Rt(i),e.advance()}return!0};var Bt=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new ae(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},H=N.prototype;H.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new Bt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},H.getToken=function(){return this.next(),new Bt(this)},typeof Symbol<`u`&&(H[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===b.eof,value:t}}}}),H.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(b.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},H.readToken=function(e){return f(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},H.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},H.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},H.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=w(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},H.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!C(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},H.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&T.test(String.fromCharCode(e)))++this.pos;else break loop}}},H.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},H.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(b.ellipsis)):(++this.pos,this.finishToken(b.dot))},H.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(b.assign,2):this.finishOp(b.slash,1)},H.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?b.star:b.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=b.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(b.assign,n+1):this.finishOp(r,n)},H.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(b.assign,3):this.finishOp(e===124?b.logicalOR:b.logicalAND,2):t===61?this.finishOp(b.assign,2):this.finishOp(e===124?b.bitwiseOR:b.bitwiseAND,1)},H.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(b.assign,2):this.finishOp(b.bitwiseXOR,1)},H.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||x.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(b.incDec,2):t===61?this.finishOp(b.assign,2):this.finishOp(b.plusMin,1)},H.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(b.assign,n+1):this.finishOp(b.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(b.relational,n))},H.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(b.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(b.arrow)):this.finishOp(e===61?b.eq:b.prefix,1)},H.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(b.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(b.assign,3):this.finishOp(b.coalesce,2)}return this.finishOp(b.question,1)},H.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),f(t,!0)||t===92))return this.finishToken(b.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+ne(t)+`'`)},H.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(b.parenL);case 41:return++this.pos,this.finishToken(b.parenR);case 59:return++this.pos,this.finishToken(b.semi);case 44:return++this.pos,this.finishToken(b.comma);case 91:return++this.pos,this.finishToken(b.bracketL);case 93:return++this.pos,this.finishToken(b.bracketR);case 123:return++this.pos,this.finishToken(b.braceL);case 125:return++this.pos,this.finishToken(b.braceR);case 58:return++this.pos,this.finishToken(b.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(b.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(b.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+ne(e)+`'`)},H.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},H.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(x.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new yt(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(b.regexp,{pattern:i,flags:o,value:c})},H.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95){i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;continue}if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function Vt(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function Ht(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}H.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=Ht(this.input.slice(t,this.pos)),++this.pos):f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(b.num,n)},H.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=Ht(this.input.slice(t,this.pos));return++this.pos,f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(b.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=Vt(this.input.slice(t,this.pos),n);return this.finishToken(b.num,a)},H.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},H.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(C(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(b.string,t)};var Ut={};H.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ut)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},H.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ut;this.raise(e,t)},H.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===b.template||this.type===b.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(b.dollarBraceL)):(++this.pos,this.finishToken(b.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(b.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(C(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
62
- `;break;default:e+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else ++this.pos}},H.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(b.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
42
+ `),cooked:this.value},this.next(),n.tail=this.type===b.backQuote,this.finishNode(n,`TemplateElement`)},U.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===b.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(b.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(b.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},U.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===b.name||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===b.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},U.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(b.braceR);){if(r)r=!1;else if(this.expect(b.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(b.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},U.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(b.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===b.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(b.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(b.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},U.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},U.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===b.colon&&this.unexpected(),this.eat(b.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===b.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==b.comma&&this.type!==b.braceR&&this.type!==b.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===b.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},U.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(b.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(b.bracketR),e.key;e.computed=!1}return e.key=this.type===b.num||this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},U.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},U.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(_e(t,r.generator)|fe|(n?pe:0)),this.expect(b.parenL),r.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},U.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(_e(n,!1)|I),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},U.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==b.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Ce),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},U.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},U.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,ye,t?null:n)}},U.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(b.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===b.comma?o=null:this.type===b.ellipsis?(o=this.parseSpread(r),r&&this.type===b.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},U.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&ge)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},U.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},U.parseIdentNode=function(){var e=this.startNode();return this.type===b.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name===`class`||e.name===`function`)&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=b.name):this.unexpected(),e},U.parsePrivateIdent=function(){var e=this.startNode();return this.type===b.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},U.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===b.semi||this.canInsertSemicolon()||this.type!==b.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(b.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},U.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var Be=we.prototype;Be.raise=function(e,t){var n=ae(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},Be.raiseRecoverable=Be.raise,Be.curPosition=function(){if(this.options.locations)return new ie(this.curLine,this.pos-this.lineStart)};var Ve=we.prototype,He=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Ve.enterScope=function(e){this.scopeStack.push(new He(e))},Ve.exitScope=function(){this.scopeStack.pop()},Ve.treatFunctionsAsVarInScope=function(e){return e.flags&ce||!this.inModule&&e.flags&F},Ve.declareName=function(e,t,n){var r=!1;if(t===be){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&F&&delete this.undefinedExports[e]}else if(t===Se)this.currentScope().lexical.push(e);else if(t===xe){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&de&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&F&&delete this.undefinedExports[e],s.flags&ge)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},Ve.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},Ve.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ve.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ge|L|me))return t}},Ve.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ge|L|me)&&!(t.flags&I))return t}};var Ue=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new M(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},We=we.prototype;We.startNode=function(){return new Ue(this,this.start,this.startLoc)},We.startNodeAt=function(e,t){return new Ue(this,e,t)};function Ge(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}We.finishNode=function(e,t){return Ge.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},We.finishNodeAt=function(e,t,n,r){return Ge.call(this,e,t,n,r)},We.copyNode=function(e){var t=new Ue(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Ke=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,qe=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,Je=qe+` Extended_Pictographic`,Ye=Je,Xe=Ye+` EBase EComp EMod EPres ExtPict`,Ze=Xe,Qe=Ze,$e={9:qe,10:Je,11:Ye,12:Xe,13:Ze,14:Qe},et=`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`,tt={9:``,10:``,11:``,12:``,13:``,14:et},nt=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,rt=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,it=rt+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,at=it+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,ot=at+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,st=ot+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,ct=st+` `+Ke,lt={9:rt,10:it,11:at,12:ot,13:st,14:ct},ut={};function dt(e){var t=ut[e]={binary:j($e[e]+` `+nt),binaryOfStrings:j(tt[e]),nonBinary:{General_Category:j(nt),Script:j(lt[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var ft=0,pt=[9,10,11,12,13,14];ft<pt.length;ft+=1){var mt=pt[ft];dt(mt)}var W=we.prototype,ht=function(e,t){this.parent=e,this.base=t||this};ht.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},ht.prototype.sibling=function(){return new ht(this.parent,this.base)};var gt=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=ut[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};gt.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},gt.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},gt.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},gt.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},gt.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},gt.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},gt.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},gt.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e?(this.advance(t),!0):!1},gt.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},W.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function _t(e){for(var t in e)return!0;return!1}W.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&_t(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},W.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},W.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new ht(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},W.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},W.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},W.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},W.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},W.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},W.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},W.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},W.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},W.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},W.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},W.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&vt(n);)t+=ne(n),e.advance();return t};function vt(e){return e===105||e===109||e===115}W.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},W.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},W.regexp_eatSyntaxCharacter=function(e){var t=e.current();return yt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function yt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}W.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!yt(n);)e.advance();return e.pos!==t},W.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1},W.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`);t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},W.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},W.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ne(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ne(e.lastIntValue);return!0}return!1},W.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),bt(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function bt(e){return f(e,!0)||e===36||e===95}W.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),xt(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function xt(e){return p(e,!0)||e===36||e===95||e===8204||e===8205}W.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},W.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},W.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},W.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},W.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},W.regexp_eatZero=function(e){return e.current()===48&&!Nt(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},W.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1},W.regexp_eatControlLetter=function(e){var t=e.current();return St(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function St(e){return e>=65&&e<=90||e>=97&&e<=122}W.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ct(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function Ct(e){return e>=0&&e<=1114111}W.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1},W.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var wt=0,Tt=1,Et=2;W.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Dt(t))return e.lastIntValue=-1,e.advance(),Tt;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===Et&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return wt};function Dt(e){return e===100||e===68||e===115||e===83||e===119||e===87}W.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),Tt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return wt},W.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){k(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},W.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Tt;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Et;e.raise(`Invalid property name`)},W.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;Ot(t=e.current());)e.lastStringValue+=ne(t),e.advance();return e.lastStringValue!==``};function Ot(e){return St(e)||e===95}W.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;kt(t=e.current());)e.lastStringValue+=ne(t),e.advance();return e.lastStringValue!==``};function kt(e){return Ot(e)||Nt(e)}W.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},W.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===Et&&e.raise(`Negated character class may contain strings`),!0}return!1},W.regexp_classContents=function(e){return e.current()===93?Tt:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Tt)},W.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},W.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||It(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r===93?!1:(e.lastIntValue=r,e.advance(),!0)},W.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},W.regexp_classSetExpression=function(e){var t=Tt,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===Et&&(t=Et);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==Et&&(t=Tt);continue}e.raise(`Invalid character in character class`)}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`);for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===Et&&(t=Et)}},W.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},W.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Tt:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},W.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===Et&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},W.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},W.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Et&&(t=Et);return t},W.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Tt:Et},W.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&At(n)||jt(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function At(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function jt(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}W.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Mt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Mt(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}W.regexp_eatClassControlLetter=function(e){var t=e.current();return Nt(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},W.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},W.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Nt(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Nt(e){return e>=48&&e<=57}W.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Pt(n=e.current());)e.lastIntValue=16*e.lastIntValue+Ft(n),e.advance();return e.pos!==t};function Pt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ft(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}W.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1},W.regexp_eatOctalDigit=function(e){var t=e.current();return It(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function It(e){return e>=48&&e<=55}W.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Pt(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Ft(i),e.advance()}return!0};var Lt=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new M(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},G=we.prototype;G.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new Lt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},G.getToken=function(){return this.next(),new Lt(this)},typeof Symbol<`u`&&(G[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===b.eof,value:t}}}}),G.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(b.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},G.readToken=function(e){return f(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},G.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},G.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},G.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=w(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},G.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!C(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},G.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&T.test(String.fromCharCode(e)))++this.pos;else break loop}}},G.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},G.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(b.ellipsis)):(++this.pos,this.finishToken(b.dot))},G.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(b.assign,2):this.finishOp(b.slash,1)},G.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?b.star:b.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=b.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(b.assign,n+1):this.finishOp(r,n)},G.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(b.assign,3):this.finishOp(e===124?b.logicalOR:b.logicalAND,2):t===61?this.finishOp(b.assign,2):this.finishOp(e===124?b.bitwiseOR:b.bitwiseAND,1)},G.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(b.assign,2):this.finishOp(b.bitwiseXOR,1)},G.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||x.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(b.incDec,2):t===61?this.finishOp(b.assign,2):this.finishOp(b.plusMin,1)},G.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(b.assign,n+1):this.finishOp(b.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(b.relational,n))},G.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(b.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(b.arrow)):this.finishOp(e===61?b.eq:b.prefix,1)},G.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(b.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(b.assign,3):this.finishOp(b.coalesce,2)}return this.finishOp(b.question,1)},G.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),f(t,!0)||t===92))return this.finishToken(b.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+ne(t)+`'`)},G.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(b.parenL);case 41:return++this.pos,this.finishToken(b.parenR);case 59:return++this.pos,this.finishToken(b.semi);case 44:return++this.pos,this.finishToken(b.comma);case 91:return++this.pos,this.finishToken(b.bracketL);case 93:return++this.pos,this.finishToken(b.bracketR);case 123:return++this.pos,this.finishToken(b.braceL);case 125:return++this.pos,this.finishToken(b.braceR);case 58:return++this.pos,this.finishToken(b.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(b.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(b.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+ne(e)+`'`)},G.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},G.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(x.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new gt(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(b.regexp,{pattern:i,flags:o,value:c})},G.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95){i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;continue}if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function Rt(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function zt(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}G.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=zt(this.input.slice(t,this.pos)),++this.pos):f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(b.num,n)},G.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=zt(this.input.slice(t,this.pos));return++this.pos,f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(b.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=Rt(this.input.slice(t,this.pos),n);return this.finishToken(b.num,a)},G.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},G.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(C(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(b.string,t)};var Bt={};G.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Bt)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},G.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Bt;this.raise(e,t)},G.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===b.template||this.type===b.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(b.dollarBraceL)):(++this.pos,this.finishToken(b.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(b.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(C(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
43
+ `;break;default:e+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else ++this.pos}},G.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(b.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
63
44
  `&&++this.pos;case`
64
- `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,`Unterminated template`)},H.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
65
- `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ne(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return C(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},H.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},H.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(p(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?f:p)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=ne(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},H.readWord=function(){var e=this.readWord1(),t=b.name;return this.keywords.test(e)&&(t=v[e]),this.finishToken(t,e)};var Wt=`8.16.0`;N.acorn={Parser:N,version:Wt,defaultOptions:se,Position:ie,SourceLocation:ae,getLineInfo:oe,Node:Ke,TokenType:m,tokTypes:b,keywordTypes:v,TokContext:Re,tokContexts:z,isIdentifierChar:p,isIdentifierStart:f,Token:Bt,isNewLine:C,lineBreak:x,lineBreakG:S,nonASCIIwhitespace:T};function Gt(e,t){return N.parse(e,t)}function Kt(e,t,n){return N.parseExpressionAt(e,t,n)}function qt(e,t){return N.tokenizer(e,t)}e.Node=Ke,e.Parser=N,e.Position=ie,e.SourceLocation=ae,e.TokContext=Re,e.Token=Bt,e.TokenType=m,e.defaultOptions=se,e.getLineInfo=oe,e.isIdentifierChar=p,e.isIdentifierStart=f,e.isNewLine=C,e.keywordTypes=v,e.lineBreak=x,e.lineBreakG=S,e.nonASCIIwhitespace=T,e.parse=Gt,e.parseExpressionAt=Kt,e.tokContexts=z,e.tokTypes=b,e.tokenizer=qt,e.version=Wt}))})),ou=o(((e,t)=>{let n=iu(),r=/^[\da-fA-F]+$/,i=/^\d+$/,a=new WeakMap;function o(e){e=e.Parser.acorn||e;let t=a.get(e);if(!t){let n=e.tokTypes,r=e.TokContext,i=e.TokenType,o=new r(`<tag`,!1),s=new r(`</tag`,!1),c=new r(`<tag>...</tag>`,!0,!0),l={tc_oTag:o,tc_cTag:s,tc_expr:c},u={jsxName:new i(`jsxName`),jsxText:new i(`jsxText`,{beforeExpr:!0}),jsxTagStart:new i(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:new i(`jsxTagEnd`)};u.jsxTagStart.updateContext=function(){this.context.push(c),this.context.push(o),this.exprAllowed=!1},u.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===o&&e===n.slash||t===s?(this.context.pop(),this.exprAllowed=this.curContext()===c):this.exprAllowed=!0},t={tokContexts:l,tokTypes:u},a.set(e,t)}return t}function s(e){if(!e)return e;if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return s(e.object)+`.`+s(e.property)}t.exports=function(e){return e||={},function(t){return c({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}},Object.defineProperty(t.exports,`tokTypes`,{get:function(){return o(au()).tokTypes},configurable:!0,enumerable:!0});function c(e,t){let a=t.acorn||au(),c=o(a),l=a.tokTypes,u=c.tokTypes,d=a.tokContexts,f=c.tokContexts.tc_oTag,p=c.tokContexts.tc_cTag,m=c.tokContexts.tc_expr,h=a.isNewLine,g=a.isIdentifierStart,_=a.isIdentifierChar;return class extends t{static get acornJsx(){return c}jsx_readToken(){let e=``,t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated JSX contents`);let n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:return this.pos===this.start?n===60&&this.exprAllowed?(++this.pos,this.finishToken(u.jsxTagStart)):this.getTokenFromCode(n):(e+=this.input.slice(t,this.pos),this.finishToken(u.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(n===62?`&gt;`:`&rbrace;`)+'` or `{"'+this.input[this.pos]+'"}`?');default:h(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t=this.input.charCodeAt(this.pos),n;return++this.pos,t===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,n=e?`
45
+ `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,`Unterminated template`)},G.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
46
+ `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ne(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return C(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},G.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},G.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(p(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?f:p)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=ne(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},G.readWord=function(){var e=this.readWord1(),t=b.name;return this.keywords.test(e)&&(t=v[e]),this.finishToken(t,e)};var Vt=`8.16.0`;we.acorn={Parser:we,version:Vt,defaultOptions:oe,Position:ie,SourceLocation:M,getLineInfo:ae,Node:Ue,TokenType:m,tokTypes:b,keywordTypes:v,TokContext:B,tokContexts:V,isIdentifierChar:p,isIdentifierStart:f,Token:Lt,isNewLine:C,lineBreak:x,lineBreakG:S,nonASCIIwhitespace:T};function Ht(e,t){return we.parse(e,t)}function Ut(e,t,n){return we.parseExpressionAt(e,t,n)}function Wt(e,t){return we.tokenizer(e,t)}e.Node=Ue,e.Parser=we,e.Position=ie,e.SourceLocation=M,e.TokContext=B,e.Token=Lt,e.TokenType=m,e.defaultOptions=oe,e.getLineInfo=ae,e.isIdentifierChar=p,e.isIdentifierStart=f,e.isNewLine=C,e.keywordTypes=v,e.lineBreak=x,e.lineBreakG=S,e.nonASCIIwhitespace=T,e.parse=Ht,e.parseExpressionAt=Ut,e.tokContexts=V,e.tokTypes=b,e.tokenizer=Wt,e.version=Vt}))})),Bl=R(((e,t)=>{let n=Rl(),r=/^[\da-fA-F]+$/,i=/^\d+$/,a=new WeakMap;function o(e){e=e.Parser.acorn||e;let t=a.get(e);if(!t){let n=e.tokTypes,r=e.TokContext,i=e.TokenType,o=new r(`<tag`,!1),s=new r(`</tag`,!1),c=new r(`<tag>...</tag>`,!0,!0),l={tc_oTag:o,tc_cTag:s,tc_expr:c},u={jsxName:new i(`jsxName`),jsxText:new i(`jsxText`,{beforeExpr:!0}),jsxTagStart:new i(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:new i(`jsxTagEnd`)};u.jsxTagStart.updateContext=function(){this.context.push(c),this.context.push(o),this.exprAllowed=!1},u.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===o&&e===n.slash||t===s?(this.context.pop(),this.exprAllowed=this.curContext()===c):this.exprAllowed=!0},t={tokContexts:l,tokTypes:u},a.set(e,t)}return t}function s(e){if(!e)return e;if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return s(e.object)+`.`+s(e.property)}t.exports=function(e){return e||={},function(t){return c({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}},Object.defineProperty(t.exports,`tokTypes`,{get:function(){return o(zl()).tokTypes},configurable:!0,enumerable:!0});function c(e,t){let a=t.acorn||zl(),c=o(a),l=a.tokTypes,u=c.tokTypes,d=a.tokContexts,f=c.tokContexts.tc_oTag,p=c.tokContexts.tc_cTag,m=c.tokContexts.tc_expr,h=a.isNewLine,g=a.isIdentifierStart,_=a.isIdentifierChar;return class extends t{static get acornJsx(){return c}jsx_readToken(){let e=``,t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated JSX contents`);let n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:return this.pos===this.start?n===60&&this.exprAllowed?(++this.pos,this.finishToken(u.jsxTagStart)):this.getTokenFromCode(n):(e+=this.input.slice(t,this.pos),this.finishToken(u.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(n===62?`&gt;`:`&rbrace;`)+'` or `{"'+this.input[this.pos]+'"}`?');default:h(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t=this.input.charCodeAt(this.pos),n;return++this.pos,t===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,n=e?`
66
47
  `:`\r
67
- `):n=String.fromCharCode(t),this.options.locations&&(++this.curLine,this.lineStart=this.pos),n}jsx_readString(e){let t=``,n=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);let r=this.input.charCodeAt(this.pos);if(r===e)break;r===38?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):h(r)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(l.string,t)}jsx_readEntity(){let e=``,t=0,a,o=this.input[this.pos];o!==`&`&&this.raise(this.pos,`Entity must start with an ampersand`);let s=++this.pos;for(;this.pos<this.input.length&&t++<10;){if(o=this.input[this.pos++],o===`;`){e[0]===`#`?e[1]===`x`?(e=e.substr(2),r.test(e)&&(a=String.fromCharCode(parseInt(e,16)))):(e=e.substr(1),i.test(e)&&(a=String.fromCharCode(parseInt(e,10)))):a=n[e];break}e+=o}return a||(this.pos=s,`&`)}jsx_readWord(){let e,t=this.pos;do e=this.input.charCodeAt(++this.pos);while(_(e)||e===45);return this.finishToken(u.jsxName,this.input.slice(t,this.pos))}jsx_parseIdentifier(){let e=this.startNode();return this.type===u.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,`JSXIdentifier`)}jsx_parseNamespacedName(){let t=this.start,n=this.startLoc,r=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(l.colon))return r;var i=this.startNodeAt(t,n);return i.namespace=r,i.name=this.jsx_parseIdentifier(),this.finishNode(i,`JSXNamespacedName`)}jsx_parseElementName(){if(this.type===u.jsxTagEnd)return``;let t=this.start,n=this.startLoc,r=this.jsx_parseNamespacedName();for(this.type===l.dot&&r.type===`JSXNamespacedName`&&!e.allowNamespacedObjects&&this.unexpected();this.eat(l.dot);){let e=this.startNodeAt(t,n);e.object=r,e.property=this.jsx_parseIdentifier(),r=this.finishNode(e,`JSXMemberExpression`)}return r}jsx_parseAttributeValue(){switch(this.type){case l.braceL:let e=this.jsx_parseExpressionContainer();return e.expression.type===`JSXEmptyExpression`&&this.raise(e.start,`JSX attributes must only be assigned a non-empty expression`),e;case u.jsxTagStart:case l.string:return this.parseExprAtom();default:this.raise(this.start,`JSX value should be either an expression or a quoted JSX text`)}}jsx_parseEmptyExpression(){let e=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(e,`JSXEmptyExpression`,this.start,this.startLoc)}jsx_parseExpressionContainer(){let e=this.startNode();return this.next(),e.expression=this.type===l.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(l.braceR),this.finishNode(e,`JSXExpressionContainer`)}jsx_parseAttribute(){let e=this.startNode();return this.eat(l.braceL)?(this.expect(l.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(l.braceR),this.finishNode(e,`JSXSpreadAttribute`)):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(l.eq)?this.jsx_parseAttributeValue():null,this.finishNode(e,`JSXAttribute`))}jsx_parseOpeningElementAt(e,t){let n=this.startNodeAt(e,t);n.attributes=[];let r=this.jsx_parseElementName();for(r&&(n.name=r);this.type!==l.slash&&this.type!==u.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(l.slash),this.expect(u.jsxTagEnd),this.finishNode(n,r?`JSXOpeningElement`:`JSXOpeningFragment`)}jsx_parseClosingElementAt(e,t){let n=this.startNodeAt(e,t),r=this.jsx_parseElementName();return r&&(n.name=r),this.expect(u.jsxTagEnd),this.finishNode(n,r?`JSXClosingElement`:`JSXClosingFragment`)}jsx_parseElementAt(e,t){let n=this.startNodeAt(e,t),r=[],i=this.jsx_parseOpeningElementAt(e,t),a=null;if(!i.selfClosing){contents:for(;;)switch(this.type){case u.jsxTagStart:if(e=this.start,t=this.startLoc,this.next(),this.eat(l.slash)){a=this.jsx_parseClosingElementAt(e,t);break contents}r.push(this.jsx_parseElementAt(e,t));break;case u.jsxText:r.push(this.parseExprAtom());break;case l.braceL:r.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}s(a.name)!==s(i.name)&&this.raise(a.start,`Expected corresponding JSX closing tag for <`+s(i.name)+`>`)}let o=i.name?`Element`:`Fragment`;return n[`opening`+o]=i,n[`closing`+o]=a,n.children=r,this.type===l.relational&&this.value===`<`&&this.raise(this.start,`Adjacent JSX elements must be wrapped in an enclosing tag`),this.finishNode(n,`JSX`+o)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type=`JSXText`,e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===u.jsxText?this.jsx_parseText():this.type===u.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===m)return this.jsx_readToken();if(t===f||t===p){if(g(e))return this.jsx_readWord();if(e==62)return++this.pos,this.finishToken(u.jsxTagEnd);if((e===34||e===39)&&t==f)return this.jsx_readString(e)}return e===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(u.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==l.braceL){var t=this.curContext();t==f?this.context.push(d.b_expr):t==m?this.context.push(d.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else if(this.type===l.slash&&e===u.jsxTagStart)this.context.length-=2,this.context.push(p),this.exprAllowed=!1;else return super.updateContext(e)}}}}));function su(e){return`\x1B[33m`+e+`\x1B[39m`}const cu={}.hasOwnProperty,lu=Symbol(`continue`),uu=Symbol(`exit`),du=Symbol(`skip`);function fu(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return mu(e)&&(s.displayName=`node (`+su(e.type)+`)`),s;function s(){let s=n?pu(n(e,t,a,o)):[];if(s[0]===uu)return s;if(s[0]!==du){let t;for(t in e)if(cu.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(mu(r)){let e=i(r,t,a,n)();if(e[0]===uu)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(mu(r)){let e=i(r,t,void 0,n)();if(e[0]===uu)return e}}}return r?pu(r(e,t,a,o)):s}}}function pu(e){return Array.isArray(e)?e:typeof e==`number`?[lu,e]:[e]}function mu(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function hu(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=_u(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&gu(m);if(g&&!t.allowEmpty)throw new W(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(gu(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,fu(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=vu(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function gu(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function _u(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=yu(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function vu(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function yu(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
48
+ `):n=String.fromCharCode(t),this.options.locations&&(++this.curLine,this.lineStart=this.pos),n}jsx_readString(e){let t=``,n=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);let r=this.input.charCodeAt(this.pos);if(r===e)break;r===38?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):h(r)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(l.string,t)}jsx_readEntity(){let e=``,t=0,a,o=this.input[this.pos];o!==`&`&&this.raise(this.pos,`Entity must start with an ampersand`);let s=++this.pos;for(;this.pos<this.input.length&&t++<10;){if(o=this.input[this.pos++],o===`;`){e[0]===`#`?e[1]===`x`?(e=e.substr(2),r.test(e)&&(a=String.fromCharCode(parseInt(e,16)))):(e=e.substr(1),i.test(e)&&(a=String.fromCharCode(parseInt(e,10)))):a=n[e];break}e+=o}return a||(this.pos=s,`&`)}jsx_readWord(){let e,t=this.pos;do e=this.input.charCodeAt(++this.pos);while(_(e)||e===45);return this.finishToken(u.jsxName,this.input.slice(t,this.pos))}jsx_parseIdentifier(){let e=this.startNode();return this.type===u.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,`JSXIdentifier`)}jsx_parseNamespacedName(){let t=this.start,n=this.startLoc,r=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(l.colon))return r;var i=this.startNodeAt(t,n);return i.namespace=r,i.name=this.jsx_parseIdentifier(),this.finishNode(i,`JSXNamespacedName`)}jsx_parseElementName(){if(this.type===u.jsxTagEnd)return``;let t=this.start,n=this.startLoc,r=this.jsx_parseNamespacedName();for(this.type===l.dot&&r.type===`JSXNamespacedName`&&!e.allowNamespacedObjects&&this.unexpected();this.eat(l.dot);){let e=this.startNodeAt(t,n);e.object=r,e.property=this.jsx_parseIdentifier(),r=this.finishNode(e,`JSXMemberExpression`)}return r}jsx_parseAttributeValue(){switch(this.type){case l.braceL:let e=this.jsx_parseExpressionContainer();return e.expression.type===`JSXEmptyExpression`&&this.raise(e.start,`JSX attributes must only be assigned a non-empty expression`),e;case u.jsxTagStart:case l.string:return this.parseExprAtom();default:this.raise(this.start,`JSX value should be either an expression or a quoted JSX text`)}}jsx_parseEmptyExpression(){let e=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(e,`JSXEmptyExpression`,this.start,this.startLoc)}jsx_parseExpressionContainer(){let e=this.startNode();return this.next(),e.expression=this.type===l.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(l.braceR),this.finishNode(e,`JSXExpressionContainer`)}jsx_parseAttribute(){let e=this.startNode();return this.eat(l.braceL)?(this.expect(l.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(l.braceR),this.finishNode(e,`JSXSpreadAttribute`)):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(l.eq)?this.jsx_parseAttributeValue():null,this.finishNode(e,`JSXAttribute`))}jsx_parseOpeningElementAt(e,t){let n=this.startNodeAt(e,t);n.attributes=[];let r=this.jsx_parseElementName();for(r&&(n.name=r);this.type!==l.slash&&this.type!==u.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(l.slash),this.expect(u.jsxTagEnd),this.finishNode(n,r?`JSXOpeningElement`:`JSXOpeningFragment`)}jsx_parseClosingElementAt(e,t){let n=this.startNodeAt(e,t),r=this.jsx_parseElementName();return r&&(n.name=r),this.expect(u.jsxTagEnd),this.finishNode(n,r?`JSXClosingElement`:`JSXClosingFragment`)}jsx_parseElementAt(e,t){let n=this.startNodeAt(e,t),r=[],i=this.jsx_parseOpeningElementAt(e,t),a=null;if(!i.selfClosing){contents:for(;;)switch(this.type){case u.jsxTagStart:if(e=this.start,t=this.startLoc,this.next(),this.eat(l.slash)){a=this.jsx_parseClosingElementAt(e,t);break contents}r.push(this.jsx_parseElementAt(e,t));break;case u.jsxText:r.push(this.parseExprAtom());break;case l.braceL:r.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}s(a.name)!==s(i.name)&&this.raise(a.start,`Expected corresponding JSX closing tag for <`+s(i.name)+`>`)}let o=i.name?`Element`:`Fragment`;return n[`opening`+o]=i,n[`closing`+o]=a,n.children=r,this.type===l.relational&&this.value===`<`&&this.raise(this.start,`Adjacent JSX elements must be wrapped in an enclosing tag`),this.finishNode(n,`JSX`+o)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type=`JSXText`,e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===u.jsxText?this.jsx_parseText():this.type===u.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===m)return this.jsx_readToken();if(t===f||t===p){if(g(e))return this.jsx_readWord();if(e==62)return++this.pos,this.finishToken(u.jsxTagEnd);if((e===34||e===39)&&t==f)return this.jsx_readString(e)}return e===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(u.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==l.braceL){var t=this.curContext();t==f?this.context.push(d.b_expr):t==m?this.context.push(d.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else if(this.type===l.slash&&e===u.jsxTagStart)this.context.length-=2,this.context.push(p),this.exprAllowed=!1;else return super.updateContext(e)}}}}));function Vl(e){return`\x1B[33m`+e+`\x1B[39m`}const Hl={}.hasOwnProperty,Ul=Symbol(`continue`),Wl=Symbol(`exit`),Gl=Symbol(`skip`);function Kl(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return Jl(e)&&(s.displayName=`node (`+Vl(e.type)+`)`),s;function s(){let s=n?ql(n(e,t,a,o)):[];if(s[0]===Wl)return s;if(s[0]!==Gl){let t;for(t in e)if(Hl.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(Jl(r)){let e=i(r,t,a,n)();if(e[0]===Wl)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(Jl(r)){let e=i(r,t,void 0,n)();if(e[0]===Wl)return e}}}return r?ql(r(e,t,a,o)):s}}}function ql(e){return Array.isArray(e)?e:typeof e==`number`?[Ul,e]:[e]}function Jl(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function Yl(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=Zl(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&Xl(m);if(g&&!t.allowEmpty)throw new Zo(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(Xl(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,Kl(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=Ql(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function Xl(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function Zl(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=$l(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function Ql(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function $l(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
68
49
  `;break;case-3:a=`\r
69
- `;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function bu(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=xu(n.start,r[0]||t.start),a=xu(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function xu(e,t){if(e&&typeof e==`object`){let n=`line`in e?Su(e.line):void 0,r=`column`in e?Su(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:Su(t)}}}function Su(e){return typeof e==`number`&&e>-1?e:void 0}const Cu=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,wu=`#unexpected-type-in-code-expected-an-object-spread-spread`;function Tu(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new W("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=Cu+`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,e}if(I(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?Eu.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||I(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new W("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=Cu+`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,e}return R(t)?U(e,_,`linePrefix`,3)(t):_(t)}}function Eu(e,t,n,r,i,a,o){let s=hu(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=bu(e),n=new W("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=Cu+wu,n}if(e.expression.properties[1]){let t=new W(`Unexpected extra content in spread: only a single spread is supported`,{place:bu(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=Cu+`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=bu(e.expression.properties[0]),n=new W("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=Cu+wu,n}}if(s.error){let e=new W(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=Cu+`#could-not-parse-expression-with-acorn`,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function Du(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return Tu.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return R(t)?U(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||I(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return Tu.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}const Ou=/[$_\p{ID_Start}]/u,ku=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,Au=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,ju={};function Mu(e){return e?Ou.test(String.fromCodePoint(e)):!1}function Nu(e,t){let n=(t||ju).jsx?Au:ku;return e?n.test(String.fromCodePoint(e)):!1}const Pu=`https://github.com/micromark/micromark-extension-mdx-jsx`;function Fu(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,D,O,k,te){let A=this,j,ne;return re;function re(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),ie}function ie(e){return L(e)?n(e):(j=ae,M(e))}function ae(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),j=oe,M;if(t===62)return De(t);if(t!==null&&t>=0&&Mu(t))return e.enter(d),e.enter(f),e.consume(t),se;P(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function oe(t){if(t===62)return De(t);if(t!==null&&t>=0&&Mu(t))return e.enter(d),e.enter(f),e.consume(t),se;P(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function se(t){if(t!==null&&t>=0&&Nu(t,{jsx:!0}))return e.consume(t),se;if(t===46||t===47||t===58||t===62||t===123||L(t)||Ne(t))return e.exit(f),j=ce,M(t);P(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function ce(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),j=le,M;if(t===58)return e.enter(h),e.consume(t),e.exit(h),j=fe,M;if(t===47||t===62||t===123||t!==null&&t>=0&&Mu(t))return e.exit(d),he(t);P(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function le(t){if(t!==null&&t>=0&&Mu(t))return e.enter(m),e.consume(t),ue;P(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ue(t){if(t!==null&&t>=0&&Nu(t,{jsx:!0}))return e.consume(t),ue;if(t===46||t===47||t===62||t===123||L(t)||Ne(t))return e.exit(m),j=de,M(t);P(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function de(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),j=le,M;if(t===47||t===62||t===123||t!==null&&t>=0&&Mu(t))return e.exit(d),he(t);P(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(t){if(t!==null&&t>=0&&Mu(t))return e.enter(g),e.consume(t),pe;P(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function pe(t){if(t!==null&&t>=0&&Nu(t,{jsx:!0}))return e.consume(t),pe;if(t===47||t===62||t===123||L(t)||Ne(t))return e.exit(g),j=me,M(t);P(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function me(t){if(t===47||t===62||t===123||t!==null&&t>=0&&Mu(t))return e.exit(d),he(t);P(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),j=Ee,M;if(t===62)return De(t);if(t===123)return Tu.call(A,e,ge,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&Mu(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),_e;P(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(e){return j=he,M(e)}function _e(t){if(t!==null&&t>=0&&Nu(t,{jsx:!0}))return e.consume(t),_e;if(t===47||t===58||t===61||t===62||t===123||L(t)||Ne(t))return e.exit(S),j=ve,M(t);P(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function ve(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),j=ye,M;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),j=Se,M;if(t===47||t===62||t===123||L(t)||Ne(t)||t!==null&&t>=0&&Mu(t))return e.exit(x),e.exit(b),j=he,M(t);P(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ye(t){if(t!==null&&t>=0&&Mu(t))return e.enter(w),e.consume(t),be;P(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function be(t){if(t!==null&&t>=0&&Nu(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===61||t===62||t===123||L(t)||Ne(t))return e.exit(w),e.exit(x),j=xe,M(t);P(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xe(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),j=Se,M;if(t===47||t===62||t===123||t!==null&&t>=0&&Mu(t))return e.exit(b),he(t);P(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Se(t){if(t===34||t===39)return e.enter(E),e.enter(ee),e.consume(t),e.exit(ee),ne=t,we;if(t===123)return Tu.call(A,e,Ce,O,k,te,r,i,a,!1,!1,o)(t);P(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function Ce(t){return e.exit(b),j=he,M(t)}function we(t){return t===null&&P(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ne)+"`"),t===ne?(e.enter(ee),e.consume(t),e.exit(ee),e.exit(E),e.exit(b),ne=void 0,j=he,M):I(t)?(j=we,M(t)):(e.enter(D),Te(t))}function Te(t){return t===null||t===ne||I(t)?(e.exit(D),we(t)):(e.consume(t),Te)}function Ee(e){if(e===62)return De(e);P(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function De(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function M(t){return I(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N):R(t)||Ne(t)?(e.enter(`esWhitespace`),Oe(t)):j(t)}function Oe(t){return I(t)?(e.exit(`esWhitespace`),M(t)):R(t)||Ne(t)?(e.consume(t),Oe):(e.exit(`esWhitespace`),j(t))}function N(e){if(!o&&A.parser.lazy[A.now().line]){let e=new W("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",A.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=Pu+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return M(e)}function P(e,t,n){let r=new W(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+Iu(e)+`)`)+` `+t+`, expected `+n,A.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=Pu+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function Iu(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function Lu(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return Fu.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function Ru(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return Fu.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return R(e)?U(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||I(e)?r(e):i(e)}}}function zu(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:Ru(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:Lu(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function Bu(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}const Vu={tokenize:Gu,partial:!0},Hu=`https://github.com/micromark/micromark-extension-mdxjs-esm`,Uu=new Set([`ExportAllDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ImportDeclaration`]);function Wu(e){let t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw Error("Expected an `acorn` instance passed in as `options.acorn`");let n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:`module`},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(t,i,a){let o=this,s=o.parser.definedModuleSpecifiers||(o.parser.definedModuleSpecifiers=[]),c=this.events.length+1,l=``;return o.interrupt?a:u;function u(e){return o.now().column>1?a(e):(t.enter(`mdxjsEsm`),t.enter(`mdxjsEsmData`),t.consume(e),l+=String.fromCharCode(e),d)}function d(e){return Oe(e)?(t.consume(e),l+=String.fromCharCode(e),d):(l===`import`||l===`export`)&&e===32?(t.consume(e),f):a(e)}function f(e){return e===null||I(e)?(t.exit(`mdxjsEsmData`),p(e)):(t.consume(e),f)}function p(e){return e===null?h(e):I(e)?t.check(Vu,h,m)(e):(t.enter(`mdxjsEsmData`),f(e))}function m(e){return t.enter(`lineEnding`),t.consume(e),t.exit(`lineEnding`),p}function h(a){let l=hu(o.events.slice(c),{acorn:n,acornOptions:r,tokenTypes:[`mdxjsEsmData`],prefix:s.length>0?`var `+s.join(`,`)+`
70
- `:``});if(l.error){if(a!==null&&l.swallow)return m(a);let e=new W(`Could not parse import/exports with acorn`,{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:`acorn`,source:`micromark-extension-mdxjs-esm`});throw e.url=Hu+`#could-not-parse-importexports-with-acorn`,e}s.length>0&&l.estree.body.shift();let u=-1;for(;++u<l.estree.body.length;){let e=l.estree.body[u];if(!Uu.has(e.type)){let t=new W("Unexpected `"+e.type+"` in code: only import/exports are supported",{place:bu(e),ruleId:`non-esm`,source:`micromark-extension-mdxjs-esm`});throw t.url=Hu+`#unexpected-type-in-code-only-importexports-are-supported`,t}if(e.type===`ImportDeclaration`&&!o.interrupt){let t=-1;for(;++t<e.specifiers.length;){let n=e.specifiers[t];s.push(n.local.name)}}}return Object.assign(t.exit(`mdxjsEsm`),e.addResult?{estree:l.estree}:void 0),i(a)}}}function Gu(e,t,n){return r;function r(r){return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),e.attempt(zi,t,n)}}var Ku=l(ou(),1);function qu(e){let t=Object.assign({acorn:Lc.extend((0,Ku.default)()),acornOptions:{ecmaVersion:2024,sourceType:`module`},addResult:!0},e);return ai([Wu(t),Du(t),zu(t),Bu()])}const Ju={};function Yu(e){let t=this,n=e||Ju,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(qu(n)),a.push(js()),o.push(Ms(n))}const Xu={tokenize:Zu};function Zu(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return I(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}const Qu={tokenize:ed},$u={tokenize:td};function ed(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return ni(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($u,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt($u,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return I(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;ni(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function td(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}const nd={tokenize:rd};function rd(e){let t=this,n=e.attempt(zi,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(da,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}const id={resolveAll:cd()},ad=sd(`string`),od=sd(`text`);function sd(e){return{resolveAll:cd(e===`text`?ld:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function cd(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ld(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var ud=s({attentionMarkers:()=>vd,contentInitial:()=>fd,disable:()=>yd,document:()=>dd,flow:()=>md,flowInitial:()=>pd,insideSpan:()=>_d,string:()=>hd,text:()=>gd});const dd={42:io,43:io,45:io,48:io,49:io,50:io,51:io,52:io,53:io,54:io,55:io,56:io,57:io,62:Vi},fd={91:ba},pd={[-2]:$i,[-1]:$i,32:$i},md={35:Ea,42:no,45:[po,no],60:ja,61:po,95:no,96:Xi,126:Xi},hd={38:qi,92:Gi},gd={[-5]:eo,[-4]:eo,[-3]:eo,33:Xa,38:qi,42:Ni,60:[Li,Ra],91:Qa,92:[wa,Gi],93:Ba,95:Ni,96:ra},_d={null:[Ni,id]},vd={null:[42,95]},yd={null:[]};function bd(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ri(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Mi(a,l.events,l),l.events):[]}function f(e,t){return Sd(p(e),t)}function p(e){return xd(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){I(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ni(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function xd(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Sd(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
50
+ `;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function eu(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=tu(n.start,r[0]||t.start),a=tu(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function tu(e,t){if(e&&typeof e==`object`){let n=`line`in e?nu(e.line):void 0,r=`column`in e?nu(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:nu(t)}}}function nu(e){return typeof e==`number`&&e>-1?e:void 0}const ru=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,iu=`#unexpected-type-in-code-expected-an-object-spread-spread`;function au(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new Zo("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=ru+`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,e}if(B(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?ou.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||B(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new Zo("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=ru+`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,e}return H(t)?K(e,_,`linePrefix`,3)(t):_(t)}}function ou(e,t,n,r,i,a,o){let s=Yl(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=eu(e),n=new Zo("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=ru+iu,n}if(e.expression.properties[1]){let t=new Zo(`Unexpected extra content in spread: only a single spread is supported`,{place:eu(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=ru+`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=eu(e.expression.properties[0]),n=new Zo("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=ru+iu,n}}if(s.error){let e=new Zo(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=ru+`#could-not-parse-expression-with-acorn`,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function su(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return au.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return H(t)?K(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||B(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return au.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}const cu=/[$_\p{ID_Start}]/u,lu=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,uu=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,du={};function fu(e){return e?cu.test(String.fromCodePoint(e)):!1}function pu(e,t){let n=(t||du).jsx?uu:lu;return e?n.test(String.fromCodePoint(e)):!1}const mu=`https://github.com/micromark/micromark-extension-mdx-jsx`;function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee,k,te){let A=this,j,ne;return re;function re(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),ie}function ie(e){return V(e)?n(e):(j=M,Se(e))}function M(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),j=ae,Se;if(t===62)return xe(t);if(t!==null&&t>=0&&fu(t))return e.enter(d),e.enter(f),e.consume(t),oe;Te(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function ae(t){if(t===62)return xe(t);if(t!==null&&t>=0&&fu(t))return e.enter(d),e.enter(f),e.consume(t),oe;Te(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function oe(t){if(t!==null&&t>=0&&pu(t,{jsx:!0}))return e.consume(t),oe;if(t===46||t===47||t===58||t===62||t===123||V(t)||Le(t))return e.exit(f),j=se,Se(t);Te(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function se(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),j=N,Se;if(t===58)return e.enter(h),e.consume(t),e.exit(h),j=ce,Se;if(t===47||t===62||t===123||t!==null&&t>=0&&fu(t))return e.exit(d),I(t);Te(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function N(t){if(t!==null&&t>=0&&fu(t))return e.enter(m),e.consume(t),P;Te(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function P(t){if(t!==null&&t>=0&&pu(t,{jsx:!0}))return e.consume(t),P;if(t===46||t===47||t===62||t===123||V(t)||Le(t))return e.exit(m),j=F,Se(t);Te(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function F(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),j=N,Se;if(t===47||t===62||t===123||t!==null&&t>=0&&fu(t))return e.exit(d),I(t);Te(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ce(t){if(t!==null&&t>=0&&fu(t))return e.enter(g),e.consume(t),le;Te(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function le(t){if(t!==null&&t>=0&&pu(t,{jsx:!0}))return e.consume(t),le;if(t===47||t===62||t===123||V(t)||Le(t))return e.exit(g),j=ue,Se(t);Te(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ue(t){if(t===47||t===62||t===123||t!==null&&t>=0&&fu(t))return e.exit(d),I(t);Te(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function I(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),j=be,Se;if(t===62)return xe(t);if(t===123)return au.call(A,e,de,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&fu(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),fe;Te(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function de(e){return j=I,Se(e)}function fe(t){if(t!==null&&t>=0&&pu(t,{jsx:!0}))return e.consume(t),fe;if(t===47||t===58||t===61||t===62||t===123||V(t)||Le(t))return e.exit(S),j=pe,Se(t);Te(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function pe(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),j=me,Se;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),j=ge,Se;if(t===47||t===62||t===123||V(t)||Le(t)||t!==null&&t>=0&&fu(t))return e.exit(x),e.exit(b),j=I,Se(t);Te(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function me(t){if(t!==null&&t>=0&&fu(t))return e.enter(w),e.consume(t),L;Te(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function L(t){if(t!==null&&t>=0&&pu(t,{jsx:!0}))return e.consume(t),L;if(t===47||t===61||t===62||t===123||V(t)||Le(t))return e.exit(w),e.exit(x),j=he,Se(t);Te(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function he(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),j=ge,Se;if(t===47||t===62||t===123||t!==null&&t>=0&&fu(t))return e.exit(b),I(t);Te(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ge(t){if(t===34||t===39)return e.enter(E),e.enter(D),e.consume(t),e.exit(D),ne=t,ve;if(t===123)return au.call(A,e,_e,ee,k,te,r,i,a,!1,!1,o)(t);Te(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function _e(t){return e.exit(b),j=I,Se(t)}function ve(t){return t===null&&Te(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ne)+"`"),t===ne?(e.enter(D),e.consume(t),e.exit(D),e.exit(E),e.exit(b),ne=void 0,j=I,Se):B(t)?(j=ve,Se(t)):(e.enter(O),ye(t))}function ye(t){return t===null||t===ne||B(t)?(e.exit(O),ve(t)):(e.consume(t),ye)}function be(e){if(e===62)return xe(e);Te(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function xe(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function Se(t){return B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),we):H(t)||Le(t)?(e.enter(`esWhitespace`),Ce(t)):j(t)}function Ce(t){return B(t)?(e.exit(`esWhitespace`),Se(t)):H(t)||Le(t)?(e.consume(t),Ce):(e.exit(`esWhitespace`),j(t))}function we(e){if(!o&&A.parser.lazy[A.now().line]){let e=new Zo("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",A.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=mu+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return Se(e)}function Te(e,t,n){let r=new Zo(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+gu(e)+`)`)+` `+t+`, expected `+n,A.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=mu+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function gu(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function _u(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return hu.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function vu(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return hu.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return H(e)?K(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||B(e)?r(e):i(e)}}}function yu(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:vu(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:_u(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function bu(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}const xu={tokenize:Tu,partial:!0},Su=`https://github.com/micromark/micromark-extension-mdxjs-esm`,Cu=new Set([`ExportAllDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ImportDeclaration`]);function wu(e){let t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw Error("Expected an `acorn` instance passed in as `options.acorn`");let n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:`module`},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(t,i,a){let o=this,s=o.parser.definedModuleSpecifiers||(o.parser.definedModuleSpecifiers=[]),c=this.events.length+1,l=``;return o.interrupt?a:u;function u(e){return o.now().column>1?a(e):(t.enter(`mdxjsEsm`),t.enter(`mdxjsEsmData`),t.consume(e),l+=String.fromCharCode(e),d)}function d(e){return Ae(e)?(t.consume(e),l+=String.fromCharCode(e),d):(l===`import`||l===`export`)&&e===32?(t.consume(e),f):a(e)}function f(e){return e===null||B(e)?(t.exit(`mdxjsEsmData`),p(e)):(t.consume(e),f)}function p(e){return e===null?h(e):B(e)?t.check(xu,h,m)(e):(t.enter(`mdxjsEsmData`),f(e))}function m(e){return t.enter(`lineEnding`),t.consume(e),t.exit(`lineEnding`),p}function h(a){let l=Yl(o.events.slice(c),{acorn:n,acornOptions:r,tokenTypes:[`mdxjsEsmData`],prefix:s.length>0?`var `+s.join(`,`)+`
51
+ `:``});if(l.error){if(a!==null&&l.swallow)return m(a);let e=new Zo(`Could not parse import/exports with acorn`,{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:`acorn`,source:`micromark-extension-mdxjs-esm`});throw e.url=Su+`#could-not-parse-importexports-with-acorn`,e}s.length>0&&l.estree.body.shift();let u=-1;for(;++u<l.estree.body.length;){let e=l.estree.body[u];if(!Cu.has(e.type)){let t=new Zo("Unexpected `"+e.type+"` in code: only import/exports are supported",{place:eu(e),ruleId:`non-esm`,source:`micromark-extension-mdxjs-esm`});throw t.url=Su+`#unexpected-type-in-code-only-importexports-are-supported`,t}if(e.type===`ImportDeclaration`&&!o.interrupt){let t=-1;for(;++t<e.specifiers.length;){let n=e.specifiers[t];s.push(n.local.name)}}}return Object.assign(t.exit(`mdxjsEsm`),e.addResult?{estree:l.estree}:void 0),i(a)}}}function Tu(e,t,n){return r;function r(r){return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),e.attempt(_i,t,n)}}var Eu=Oe(Bl(),1);function Du(e){let t=Object.assign({acorn:_c.extend((0,Eu.default)()),acornOptions:{ecmaVersion:2024,sourceType:`module`},addResult:!0},e);return Lr([wu(t),su(t),yu(t),bu()])}const Ou={};function ku(e){let t=this,n=e||Ou,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Du(n)),a.push(us()),o.push(ds(n))}const Au={tokenize:ju};function ju(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return B(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}const Mu={tokenize:Pu},Nu={tokenize:Fu};function Pu(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Pr(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Nu,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Nu,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return B(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Pr(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fu(e,t,n){return K(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}const Iu={tokenize:Lu};function Lu(e){let t=this,n=e.attempt(_i,r,e.attempt(this.parser.constructs.flowInitial,i,K(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ui,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}const Ru={resolveAll:Hu()},zu=Vu(`string`),Bu=Vu(`text`);function Vu(e){return{resolveAll:Hu(e===`text`?Uu:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Hu(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Uu(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Wu=De({attentionMarkers:()=>Qu,contentInitial:()=>Ku,disable:()=>$u,document:()=>Gu,flow:()=>Ju,flowInitial:()=>qu,insideSpan:()=>Zu,string:()=>Yu,text:()=>Xu});const Gu={42:Ia,43:Ia,45:Ia,48:Ia,49:Ia,50:Ia,51:Ia,52:Ia,53:Ia,54:Ia,55:Ia,56:Ia,57:Ia,62:yi},Ku={91:Qi},qu={[-2]:ji,[-1]:ji,32:ji},Ju={35:ia,42:Pa,45:[Wa,Pa],60:la,61:Wa,95:Pa,96:Oi,126:Oi},Yu={38:Ti,92:Ci},Xu={[-5]:Ma,[-4]:Ma,[-3]:Ma,33:Oa,38:Ti,42:di,60:[hi,ga],91:Aa,92:[na,Ci],93:va,95:di,96:Fi},Zu={null:[di,Ru]},Qu={null:[42,95]},$u={null:[]};function ed(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Fr(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ui(a,l.events,l),l.events):[]}function f(e,t){return nd(p(e),t)}function p(e){return td(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){B(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Pr(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function td(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function nd(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
71
52
  `;break;case-3:o=`\r
72
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Cd(e){let t={constructs:ai([ud,...(e||{}).extensions||[]]),content:n(Xu),defined:[],document:n(Qu),flow:n(nd),lazy:{},string:n(ad),text:n(od)};return t;function n(e){return n;function n(n){return bd(t,e,n)}}}function wd(e){for(;!la(e););return e}const Td=/[\0\t\n\r]/g;function Ed(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Td.lastIndex=u,c=Td.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Dd={}.hasOwnProperty;function Od(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),kd(n)(wd(Cd(n).document().write(Ed()(e,t,!0))))}function kd(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ce),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ye),blockQuote:a(me),characterEscape:T,characterReference:T,codeFenced:a(he),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(he,o),codeText:a(ge,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(_e),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(be),hardBreakTrailing:a(be),htmlFlow:a(xe,o),htmlFlowData:T,htmlText:a(xe,o),htmlTextData:T,image:a(Se),label:o,link:a(Ce),listItem:a(Te),listItemValue:f,listOrdered:a(we,d),listUnordered:a(we),paragraph:a(Ee),reference:se,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ye),strong:a(De),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(te),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(O),htmlFlowData:E,htmlText:c(k),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:ee,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:ie,resourceTitleString:ae,resource:oe,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};jd(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Dd.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Nd).call(a,void 0,e[0])}for(r.position={start:Ad(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ad(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ad(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Nd).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+hs({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ad(e.end)}function u(){return kn(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jt(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=M(),n.position={start:Ad(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ad(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ad(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function O(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=br(t),n.identifier=jt(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=vr(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=_r(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=Ad(e.end)}function fe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[]}}function he(){return{type:`code`,lang:null,meta:null,value:``}}function ge(){return{type:`inlineCode`,value:``}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ve(){return{type:`emphasis`,children:[]}}function ye(){return{type:`heading`,depth:0,children:[]}}function be(){return{type:`break`}}function xe(){return{type:`html`,value:``}}function Se(){return{type:`image`,title:null,url:``,alt:null}}function Ce(){return{type:`link`,title:null,url:``,children:[]}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Te(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ee(){return{type:`paragraph`,children:[]}}function De(){return{type:`strong`,children:[]}}function M(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function Ad(e){return{line:e.line,column:e.column,offset:e.offset}}function jd(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?jd(e,r):Md(e,r)}}function Md(e,t){let n;for(n in t)if(Dd.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Nd(e,t){throw e?Error("Cannot close `"+e.type+"` ("+hs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hs({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+hs({start:t.start,end:t.end})+`) is still open`)}function Pd(e){let t=this;t.parser=n;function n(n){return Od(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Fd(e){if(e)throw e}var Id=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ld(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Rd(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?zd(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function zd(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}function Bd(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}const Vd=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var Hd=class{constructor(e){let t;t=e?Bd(e)?{path:e}:typeof e==`string`||Kd(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:f.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Vd.length;){let e=Vd[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Vd.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?d.default.basename(this.path):void 0}set basename(e){Wd(e,`basename`),Ud(e,`basename`),this.path=d.default.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?d.default.dirname(this.path):void 0}set dirname(e){Gd(this.basename,`dirname`),this.path=d.default.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?d.default.extname(this.path):void 0}set extname(e){if(Ud(e,`extname`),Gd(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=d.default.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Bd(e)&&(e=(0,g.fileURLToPath)(e)),Wd(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?d.default.basename(this.path,this.extname):void 0}set stem(e){Wd(e,`stem`),Ud(e,`stem`),this.path=d.default.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new W(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Ud(e,t){if(e&&e.includes(d.default.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+d.default.sep+"`")}function Wd(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Gd(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Kd(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}const qd=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r});var Jd=l(Id(),1);const Yd={}.hasOwnProperty,Xd=new class e extends qd{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Rd()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Jd.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?($d(`data`,this.frozen),this.namespace[e]=t,this):Yd.call(this.namespace,e)&&this.namespace[e]||void 0:e?($d(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=nf(e),n=this.parser||this.Parser;return Zd(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Zd(`process`,this.parser||this.Parser),Qd(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=nf(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);af(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Zd(`processSync`,this.parser||this.Parser),Qd(`processSync`,this.compiler||this.Compiler),this.process(e,r),tf(`processSync`,`process`,t),n;function r(e,r){t=!0,Fd(e),n=r}}run(e,t,n){ef(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=nf(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),tf(`runSync`,`run`,n),r;function i(e,t){Fd(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=nf(t),r=this.compiler||this.Compiler;return Qd(`stringify`,r),ef(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if($d(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Jd.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ld(o)&&Ld(r)&&(r=(0,Jd.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Zd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Qd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function $d(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ef(e){if(!Ld(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function tf(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nf(e){return rf(e)?e:new Hd(e)}function rf(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function af(e){return typeof e==`string`||of(e)}function of(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function sf(e){return Xd().use(Pd).use(Vo).use($e,[`yaml`]).use(Yu).parse(e)}let cf=null;try{let e=(0,h.createRequire)(e(`url`).pathToFileURL(__filename).href),{platform:t,arch:n}=f.default,r={"win32-x64":[`napi-md-compiler.win32-x64-msvc`,`win32-x64-msvc`],"linux-x64":[`napi-md-compiler.linux-x64-gnu`,`linux-x64-gnu`],"linux-arm64":[`napi-md-compiler.linux-arm64-gnu`,`linux-arm64-gnu`],"darwin-arm64":[`napi-md-compiler.darwin-arm64`,`darwin-arm64`],"darwin-x64":[`napi-md-compiler.darwin-x64`,`darwin-x64`]}[`${t}-${n}`];if(r!=null){let[t,n]=r;try{cf=e(`../${t}.node`)}catch{try{cf=e(`@truenine/memory-sync-cli-${n}`).mdCompiler}catch{}}}}catch{}function lf(e){return e?.blankLineAfter??!0}function uf(e,t){if(cf!=null&&t==null)return cf.buildFrontMatter(JSON.stringify(e));let n=Object.fromEntries(Object.entries(e).filter(([e,t])=>t!=null));return Object.keys(n).length===0?`---
73
- ---`:`---\n${_.stringify(n,{singleQuote:t?.singleQuote??!1,lineWidth:t?.lineWidth??0}).trimEnd()}\n---`}function df(e,t,n){return e==null||Object.keys(e).length===0?t:`${uf(e,n)}${lf(n)?`
53
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function rd(e){let t={constructs:Lr([Wu,...(e||{}).extensions||[]]),content:n(Au),defined:[],document:n(Mu),flow:n(Iu),lazy:{},string:n(zu),text:n(Bu)};return t;function n(e){return n;function n(n){return ed(t,e,n)}}}function id(e){for(;!Vi(e););return e}const ad=/[\0\t\n\r]/g;function od(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(ad.lastIndex=u,c=ad.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const sd={}.hasOwnProperty;function cd(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ld(n)(id(rd(n).document().write(od()(e,t,!0))))}function ld(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(ue),characterEscape:T,characterReference:T,codeFenced:a(I),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(I,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(L),hardBreakTrailing:a(L),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:oe,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:N,characterReferenceMarkerNumeric:N,characterReferenceValue:P,characterReference:F,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(te),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(k),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:se,resourceDestinationString:ie,resourceTitleString:M,resource:ae,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};dd(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];sd.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||pd).call(a,void 0,e[0])}for(r.position={start:ud(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ud(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ud(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||pd).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+qo({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ud(e.end)}function u(){return kn(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:ud(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ud(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ud(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=gr(t),n.identifier=Lt(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ae(){this.data.inReference=void 0}function oe(){this.data.referenceType=`collapsed`}function se(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function N(e){this.data.characterReferenceType=e.type}function P(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=mr(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=pr(t);let i=this.stack[this.stack.length-1];i.value+=r}function F(e){let t=this.stack.pop();t.position.end=ud(e.end)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[]}}function I(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function L(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function ud(e){return{line:e.line,column:e.column,offset:e.offset}}function dd(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?dd(e,r):fd(e,r)}}function fd(e,t){let n;for(n in t)if(sd.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function pd(e,t){throw e?Error("Cannot close `"+e.type+"` ("+qo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qo({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+qo({start:t.start,end:t.end})+`) is still open`)}function md(e){let t=this;t.parser=n;function n(n){return cd(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function hd(e){if(e)throw e}var gd=R(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function _d(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function vd(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?yd(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function yd(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}function bd(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}const xd=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var Sd=class{constructor(e){let t;t=e?bd(e)?{path:e}:typeof e==`string`||Ed(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:d.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<xd.length;){let e=xd[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)xd.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?u.default.basename(this.path):void 0}set basename(e){wd(e,`basename`),Cd(e,`basename`),this.path=u.default.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?u.default.dirname(this.path):void 0}set dirname(e){Td(this.basename,`dirname`),this.path=u.default.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?u.default.extname(this.path):void 0}set extname(e){if(Cd(e,`extname`),Td(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=u.default.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){bd(e)&&(e=(0,h.fileURLToPath)(e)),wd(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?u.default.basename(this.path,this.extname):void 0}set stem(e){wd(e,`stem`),Cd(e,`stem`),this.path=u.default.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Zo(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Cd(e,t){if(e&&e.includes(u.default.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+u.default.sep+"`")}function wd(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Td(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Ed(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}const Dd=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r});var Od=Oe(gd(),1);const kd={}.hasOwnProperty,Ad=new class e extends Dd{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=vd()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Od.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Nd(`data`,this.frozen),this.namespace[e]=t,this):kd.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Nd(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Id(e),n=this.parser||this.Parser;return jd(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),jd(`process`,this.parser||this.Parser),Md(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Id(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Rd(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),jd(`processSync`,this.parser||this.Parser),Md(`processSync`,this.compiler||this.Compiler),this.process(e,r),Fd(`processSync`,`process`,t),n;function r(e,r){t=!0,hd(e),n=r}}run(e,t,n){Pd(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Id(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Fd(`runSync`,`run`,n),r;function i(e,t){hd(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Id(t),r=this.compiler||this.Compiler;return Md(`stringify`,r),Pd(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Nd(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Od.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];_d(o)&&_d(r)&&(r=(0,Od.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function jd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Md(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Nd(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Pd(e){if(!_d(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Fd(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Id(e){return Ld(e)?e:new Sd(e)}function Ld(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Rd(e){return typeof e==`string`||zd(e)}function zd(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function Bd(e){return Ad().use(md).use(yo).use(at,[`yaml`]).use(ku).parse(e)}var Vd=R((e=>{let t=Symbol.for(`yaml.alias`),n=Symbol.for(`yaml.document`),r=Symbol.for(`yaml.map`),i=Symbol.for(`yaml.pair`),a=Symbol.for(`yaml.scalar`),o=Symbol.for(`yaml.seq`),s=Symbol.for(`yaml.node.type`),c=e=>!!e&&typeof e==`object`&&e[s]===t,l=e=>!!e&&typeof e==`object`&&e[s]===n,u=e=>!!e&&typeof e==`object`&&e[s]===r,d=e=>!!e&&typeof e==`object`&&e[s]===i,f=e=>!!e&&typeof e==`object`&&e[s]===a,p=e=>!!e&&typeof e==`object`&&e[s]===o;function m(e){if(e&&typeof e==`object`)switch(e[s]){case r:case o:return!0}return!1}function h(e){if(e&&typeof e==`object`)switch(e[s]){case t:case r:case a:case o:return!0}return!1}e.ALIAS=t,e.DOC=n,e.MAP=r,e.NODE_TYPE=s,e.PAIR=i,e.SCALAR=a,e.SEQ=o,e.hasAnchor=e=>(f(e)||m(e))&&!!e.anchor,e.isAlias=c,e.isCollection=m,e.isDocument=l,e.isMap=u,e.isNode=h,e.isPair=d,e.isScalar=f,e.isSeq=p})),Hd=R((e=>{var t=Vd();let n=Symbol(`break visit`),r=Symbol(`skip children`),i=Symbol(`remove node`);function a(e,n){let r=l(n);t.isDocument(e)?o(null,e.contents,r,Object.freeze([e]))===i&&(e.contents=null):o(null,e,r,Object.freeze([]))}a.BREAK=n,a.SKIP=r,a.REMOVE=i;function o(e,r,a,s){let c=u(e,r,a,s);if(t.isNode(c)||t.isPair(c))return d(e,s,c),o(e,c,a,s);if(typeof c!=`symbol`){if(t.isCollection(r)){s=Object.freeze(s.concat(r));for(let e=0;e<r.items.length;++e){let t=o(e,r.items[e],a,s);if(typeof t==`number`)e=t-1;else if(t===n)return n;else t===i&&(r.items.splice(e,1),--e)}}else if(t.isPair(r)){s=Object.freeze(s.concat(r));let e=o(`key`,r.key,a,s);if(e===n)return n;e===i&&(r.key=null);let t=o(`value`,r.value,a,s);if(t===n)return n;t===i&&(r.value=null)}}return c}async function s(e,n){let r=l(n);t.isDocument(e)?await c(null,e.contents,r,Object.freeze([e]))===i&&(e.contents=null):await c(null,e,r,Object.freeze([]))}s.BREAK=n,s.SKIP=r,s.REMOVE=i;async function c(e,r,a,o){let s=await u(e,r,a,o);if(t.isNode(s)||t.isPair(s))return d(e,o,s),c(e,s,a,o);if(typeof s!=`symbol`){if(t.isCollection(r)){o=Object.freeze(o.concat(r));for(let e=0;e<r.items.length;++e){let t=await c(e,r.items[e],a,o);if(typeof t==`number`)e=t-1;else if(t===n)return n;else t===i&&(r.items.splice(e,1),--e)}}else if(t.isPair(r)){o=Object.freeze(o.concat(r));let e=await c(`key`,r.key,a,o);if(e===n)return n;e===i&&(r.key=null);let t=await c(`value`,r.value,a,o);if(t===n)return n;t===i&&(r.value=null)}}return s}function l(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(e,n,r,i){if(typeof r==`function`)return r(e,n,i);if(t.isMap(n))return r.Map?.(e,n,i);if(t.isSeq(n))return r.Seq?.(e,n,i);if(t.isPair(n))return r.Pair?.(e,n,i);if(t.isScalar(n))return r.Scalar?.(e,n,i);if(t.isAlias(n))return r.Alias?.(e,n,i)}function d(e,n,r){let i=n[n.length-1];if(t.isCollection(i))i.items[e]=r;else if(t.isPair(i))e===`key`?i.key=r:i.value=r;else if(t.isDocument(i))i.contents=r;else{let e=t.isAlias(i)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}e.visit=a,e.visitAsync=s})),Ud=R((e=>{var t=Vd(),n=Hd();let r={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},i=e=>e.replace(/[!,[\]{}]/g,e=>r[e]);var a=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+i(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],i=Object.entries(this.tags),a;if(e&&i.length>0&&t.isNode(e.contents)){let r={};n.visit(e.contents,(e,n)=>{t.isNode(n)&&n.tag&&(r[n.tag]=!0)}),a=Object.keys(r)}else a=[];for(let[t,n]of i)t===`!!`&&n===`tag:yaml.org,2002:`||(!e||a.some(e=>e.startsWith(n)))&&r.push(`%TAG ${t} ${n}`);return r.join(`
54
+ `)}};a.defaultYaml={explicit:!1,version:`1.2`},a.defaultTags={"!!":`tag:yaml.org,2002:`},e.Directives=a})),Wd=R((e=>{var t=Vd(),n=Hd();function r(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function i(e){let t=new Set;return n.visit(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function a(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function o(e,n){let r=[],o=new Map,s=null;return{onAnchor:t=>{r.push(t),s??=i(e);let o=a(n,s);return s.add(o),o},setAnchors:()=>{for(let e of r){let n=o.get(e);if(typeof n==`object`&&n.anchor&&(t.isScalar(n.node)||t.isCollection(n.node)))n.node.anchor=n.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:o}}e.anchorIsValid=r,e.anchorNames=i,e.createNodeAnchors=o,e.findNewAnchor=a})),Gd=R((e=>{function t(e,n,r,i){if(i&&typeof i==`object`)if(Array.isArray(i))for(let n=0,r=i.length;n<r;++n){let r=i[n],a=t(e,i,String(n),r);a===void 0?delete i[n]:a!==r&&(i[n]=a)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let r=i.get(n),a=t(e,i,n,r);a===void 0?i.delete(n):a!==r&&i.set(n,a)}else if(i instanceof Set)for(let n of Array.from(i)){let r=t(e,i,n,n);r===void 0?i.delete(n):r!==n&&(i.delete(n),i.add(r))}else for(let[n,r]of Object.entries(i)){let a=t(e,i,n,r);a===void 0?delete i[n]:a!==r&&(i[n]=a)}return e.call(n,r,i)}e.applyReviver=t})),Kd=R((e=>{var t=Vd();function n(e,r,i){if(Array.isArray(e))return e.map((e,t)=>n(e,String(t),i));if(e&&typeof e.toJSON==`function`){if(!i||!t.hasAnchor(e))return e.toJSON(r,i);let n={aliasCount:0,count:1,res:void 0};i.anchors.set(e,n),i.onCreate=e=>{n.res=e,delete i.onCreate};let a=e.toJSON(r,i);return i.onCreate&&i.onCreate(a),a}return typeof e==`bigint`&&!i?.keep?Number(e):e}e.toJS=n})),qd=R((e=>{var t=Gd(),n=Vd(),r=Kd();e.NodeBase=class{constructor(e){Object.defineProperty(this,n.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:a,onAnchor:o,reviver:s}={}){if(!n.isDocument(e))throw TypeError(`A document argument is required`);let c={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof a==`number`?a:100},l=r.toJS(this,``,c);if(typeof o==`function`)for(let{count:e,res:t}of c.anchors.values())o(t,e);return typeof s==`function`?t.applyReviver(s,{"":l},``,l):l}}})),Jd=R((e=>{var t=Wd(),n=Hd(),r=Vd(),i=qd(),a=Kd(),o=class extends i.NodeBase{constructor(e){super(r.ALIAS),this.source=e,Object.defineProperty(this,`tag`,{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let i;t?.aliasResolveCache?i=t.aliasResolveCache:(i=[],n.visit(e,{Node:(e,t)=>{(r.isAlias(t)||r.hasAnchor(t))&&i.push(t)}}),t&&(t.aliasResolveCache=i));let a;for(let e of i){if(e===this)break;e.anchor===this.source&&(a=e)}return a}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,o=this.resolve(r,t);if(!o){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let c=n.get(o);if(c||=(a.toJS(o,null,t),n.get(o)),c?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=s(r,o,n)),c.count*c.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return c.res}toString(e,n,r){let i=`*${this.source}`;if(e){if(t.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${i} `}return i}};function s(e,t,n){if(r.isAlias(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(r.isCollection(t)){let r=0;for(let i of t.items){let t=s(e,i,n);t>r&&(r=t)}return r}else if(r.isPair(t)){let r=s(e,t.key,n),i=s(e,t.value,n);return Math.max(r,i)}return 1}e.Alias=o})),Yd=R((e=>{var t=Vd(),n=qd(),r=Kd();let i=e=>!e||typeof e!=`function`&&typeof e!=`object`;var a=class extends n.NodeBase{constructor(e){super(t.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:r.toJS(this.value,e,t)}toString(){return String(this.value)}};a.BLOCK_FOLDED=`BLOCK_FOLDED`,a.BLOCK_LITERAL=`BLOCK_LITERAL`,a.PLAIN=`PLAIN`,a.QUOTE_DOUBLE=`QUOTE_DOUBLE`,a.QUOTE_SINGLE=`QUOTE_SINGLE`,e.Scalar=a,e.isScalarValue=i})),Xd=R((e=>{var t=Jd(),n=Vd(),r=Yd();function i(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function a(e,a,o){if(n.isDocument(e)&&(e=e.contents),n.isNode(e))return e;if(n.isPair(e)){let t=o.schema[n.MAP].createNode?.(o.schema,null,o);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:s,onAnchor:c,onTagObj:l,schema:u,sourceObjects:d}=o,f;if(s&&e&&typeof e==`object`){if(f=d.get(e),f)return f.anchor??=c(e),new t.Alias(f.anchor);f={anchor:null,node:null},d.set(e,f)}a?.startsWith(`!!`)&&(a=`tag:yaml.org,2002:`+a.slice(2));let p=i(e,a,u.tags);if(!p){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new r.Scalar(e);return f&&(f.node=t),t}p=e instanceof Map?u[n.MAP]:Symbol.iterator in Object(e)?u[n.SEQ]:u[n.MAP]}l&&(l(p),delete o.onTagObj);let m=p?.createNode?p.createNode(o.schema,e,o):typeof p?.nodeClass?.from==`function`?p.nodeClass.from(o.schema,e,o):new r.Scalar(e);return a?m.tag=a:p.default||(m.tag=p.tag),f&&(f.node=m),m}e.createNode=a})),Zd=R((e=>{var t=Xd(),n=Vd(),r=qd();function i(e,n,r){let i=r;for(let e=n.length-1;e>=0;--e){let t=n[e];if(typeof t==`number`&&Number.isInteger(t)&&t>=0){let e=[];e[t]=i,i=e}else i=new Map([[t,i]])}return t.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}let a=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done;e.Collection=class extends r.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,`schema`,{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>n.isNode(t)||n.isPair(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(a(e))this.add(t);else{let[r,...a]=e,o=this.get(r,!0);if(n.isCollection(o))o.addIn(a,t);else if(o===void 0&&this.schema)this.set(r,i(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let i=this.get(t,!0);if(n.isCollection(i))return i.deleteIn(r);throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...i]=e,a=this.get(r,!0);return i.length===0?!t&&n.isScalar(a)?a.value:a:n.isCollection(a)?a.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!n.isPair(t))return!1;let r=t.value;return r==null||e&&n.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let i=this.get(t,!0);return n.isCollection(i)?i.hasIn(r):!1}setIn(e,t){let[r,...a]=e;if(a.length===0)this.set(r,t);else{let e=this.get(r,!0);if(n.isCollection(e))e.setIn(a,t);else if(e===void 0&&this.schema)this.set(r,i(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}},e.collectionFromPath=i,e.isEmptyPath=a})),Qd=R((e=>{let t=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function n(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}e.indentComment=n,e.lineComment=(e,t,r)=>e.endsWith(`
55
+ `)?n(r,t):r.includes(`
56
+ `)?`
57
+ `+n(r,t):(e.endsWith(` `)?``:` `)+r,e.stringifyComment=t})),$d=R((e=>{let t=`block`,n=`quoted`;function r(e,r,a=`flow`,{indentAtStart:o,lineWidth:s=80,minContentWidth:c=20,onFold:l,onOverflow:u}={}){if(!s||s<0)return e;s<c&&(c=0);let d=Math.max(1+c,1+s-r.length);if(e.length<=d)return e;let f=[],p={},m=s-r.length;typeof o==`number`&&(o>s-Math.max(2,c)?f.push(0):m=s-o);let h,g,_=!1,v=-1,y=-1,b=-1;a===t&&(v=i(e,v,r.length),v!==-1&&(m=v+d));for(let o;o=e[v+=1];){if(a===n&&o===`\\`){switch(y=v,e[v+1]){case`x`:v+=3;break;case`u`:v+=5;break;case`U`:v+=9;break;default:v+=1}b=v}if(o===`
58
+ `)a===t&&(v=i(e,v,r.length)),m=v+r.length+d,h=void 0;else{if(o===` `&&g&&g!==` `&&g!==`
59
+ `&&g!==` `){let t=e[v+1];t&&t!==` `&&t!==`
60
+ `&&t!==` `&&(h=v)}if(v>=m)if(h)f.push(h),m=h+d,h=void 0;else if(a===n){for(;g===` `||g===` `;)g=o,o=e[v+=1],_=!0;let t=v>b+1?v-2:y-1;if(p[t])return e;f.push(t),p[t]=!0,m=t+d,h=void 0}else _=!0}g=o}if(_&&u&&u(),f.length===0)return e;l&&l();let x=e.slice(0,f[0]);for(let t=0;t<f.length;++t){let i=f[t],o=f[t+1]||e.length;i===0?x=`\n${r}${e.slice(0,o)}`:(a===n&&p[i]&&(x+=`${e[i]}\\`),x+=`\n${r}${e.slice(i+1,o)}`)}return x}function i(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
61
+ `);r=t,i=t+1,a=e[i]}return r}e.FOLD_BLOCK=t,e.FOLD_FLOW=`flow`,e.FOLD_QUOTED=n,e.foldFlowLines=r})),ef=R((e=>{var t=Yd(),n=$d();let r=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),i=e=>/^(%|---|\.\.\.)/m.test(e);function a(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
62
+ `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function o(e,t){let a=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return a;let{implicitKey:o}=t,s=t.options.doubleQuotedMinMultiLineLength,c=t.indent||(i(e)?` `:``),l=``,u=0;for(let e=0,t=a[e];t;t=a[++e])if(t===` `&&a[e+1]===`\\`&&a[e+2]===`n`&&(l+=a.slice(u,e)+`\\ `,e+=1,u=e,t=`\\`),t===`\\`)switch(a[e+1]){case`u`:{l+=a.slice(u,e);let t=a.substr(e+2,4);switch(t){case`0000`:l+=`\\0`;break;case`0007`:l+=`\\a`;break;case`000b`:l+=`\\v`;break;case`001b`:l+=`\\e`;break;case`0085`:l+=`\\N`;break;case`00a0`:l+=`\\_`;break;case`2028`:l+=`\\L`;break;case`2029`:l+=`\\P`;break;default:t.substr(0,2)===`00`?l+=`\\x`+t.substr(2):l+=a.substr(e,6)}e+=5,u=e+1}break;case`n`:if(o||a[e+2]===`"`||a.length<s)e+=1;else{for(l+=a.slice(u,e)+`
63
+
64
+ `;a[e+2]===`\\`&&a[e+3]===`n`&&a[e+4]!==`"`;)l+=`
65
+ `,e+=2;l+=c,a[e+2]===` `&&(l+=`\\`),e+=1,u=e+1}break;default:e+=1}return l=u?l+a.slice(u):a,o?l:n.foldFlowLines(l,c,n.FOLD_QUOTED,r(t,!1))}function s(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
66
+ `)||/[ \t]\n|\n[ \t]/.test(e))return o(e,t);let a=t.indent||(i(e)?` `:``),s=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${a}`)+`'`;return t.implicitKey?s:n.foldFlowLines(s,a,n.FOLD_FLOW,r(t,!1))}function c(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=o;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?s:i&&!t?o:n?s:o}return r(e,t)}let l;try{l=RegExp(`(^|(?<!
67
+ ))
68
+ +(?!
69
+ |$)`,`g`)}catch{l=/\n+(?!\n|$)/g}function u({comment:e,type:o,value:s},u,d,f){let{blockQuote:p,commentString:m,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(s))return c(s,u);let g=u.indent||(u.forceBlockIndent||i(s)?` `:``),_=p===`literal`?!0:p===`folded`||o===t.Scalar.BLOCK_FOLDED?!1:o===t.Scalar.BLOCK_LITERAL?!0:!a(s,h,g.length);if(!s)return _?`|
70
+ `:`>
71
+ `;let v,y;for(y=s.length;y>0;--y){let e=s[y-1];if(e!==`
72
+ `&&e!==` `&&e!==` `)break}let b=s.substring(y),x=b.indexOf(`
73
+ `);x===-1?v=`-`:s===b||x!==b.length-1?(v=`+`,f&&f()):v=``,b&&=(s=s.slice(0,-b.length),b[b.length-1]===`
74
+ `&&(b=b.slice(0,-1)),b.replace(l,`$&${g}`));let S=!1,C,w=-1;for(C=0;C<s.length;++C){let e=s[C];if(e===` `)S=!0;else if(e===`
75
+ `)w=C;else break}let T=s.substring(0,w<C?w+1:C);T&&=(s=s.substring(T.length),T.replace(/\n+/g,`$&${g}`));let E=(S?g?`2`:`1`:``)+v;if(e&&(E+=` `+m(e.replace(/ ?[\r\n]+/g,` `)),d&&d()),!_){let e=s.replace(/\n+/g,`
76
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${g}`),i=!1,a=r(u,!0);p!==`folded`&&o!==t.Scalar.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let c=n.foldFlowLines(`${T}${e}${b}`,g,n.FOLD_BLOCK,a);if(!i)return`>${E}\n${g}${c}`}return s=s.replace(/\n+/g,`$&${g}`),`|${E}\n${g}${T}${s}${b}`}function d(e,a,o,s){let{type:l,value:d}=e,{actualString:f,implicitKey:p,indent:m,indentStep:h,inFlow:g}=a;if(p&&d.includes(`
77
+ `)||g&&/[[\]{},]/.test(d))return c(d,a);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(d))return p||g||!d.includes(`
78
+ `)?c(d,a):u(e,a,o,s);if(!p&&!g&&l!==t.Scalar.PLAIN&&d.includes(`
79
+ `))return u(e,a,o,s);if(i(d)){if(m===``)return a.forceBlockIndent=!0,u(e,a,o,s);if(p&&m===h)return c(d,a)}let _=d.replace(/\n+/g,`$&\n${m}`);if(f){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(_),{compat:t,tags:n}=a.doc.schema;if(n.some(e)||t?.some(e))return c(d,a)}return p?_:n.foldFlowLines(_,m,n.FOLD_FLOW,r(a,!1))}function f(e,n,r,i){let{implicitKey:a,inFlow:l}=n,f=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:p}=e;p!==t.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(f.value)&&(p=t.Scalar.QUOTE_DOUBLE);let m=e=>{switch(e){case t.Scalar.BLOCK_FOLDED:case t.Scalar.BLOCK_LITERAL:return a||l?c(f.value,n):u(f,n,r,i);case t.Scalar.QUOTE_DOUBLE:return o(f.value,n);case t.Scalar.QUOTE_SINGLE:return s(f.value,n);case t.Scalar.PLAIN:return d(f,n,r,i);default:return null}},h=m(p);if(h===null){let{defaultKeyType:e,defaultStringType:t}=n.options,r=a&&e||t;if(h=m(r),h===null)throw Error(`Unsupported default string type ${r}`)}return h}e.stringifyString=f})),tf=R((e=>{var t=Wd(),n=Vd(),r=Qd(),i=ef();function a(e,t){let n=Object.assign({blockQuote:!0,commentString:r.stringifyComment,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),i;switch(n.collectionStyle){case`block`:i=!1;break;case`flow`:i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:i,options:n}}function o(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let r,i;if(n.isScalar(t)){i=t.value;let n=e.filter(e=>e.identify?.(i));if(n.length>1){let e=n.filter(e=>e.test);e.length>0&&(n=e)}r=n.find(e=>e.format===t.format)??n.find(e=>!e.format)}else i=t,r=e.find(e=>e.nodeClass&&i instanceof e.nodeClass);if(!r){let e=i?.constructor?.name??(i===null?`null`:typeof i);throw Error(`Tag not resolved for ${e} value`)}return r}function s(e,r,{anchors:i,doc:a}){if(!a.directives)return``;let o=[],s=(n.isScalar(e)||n.isCollection(e))&&e.anchor;s&&t.anchorIsValid(s)&&(i.add(s),o.push(`&${s}`));let c=e.tag??(r.default?null:r.tag);return c&&o.push(a.directives.tagString(c)),o.join(` `)}function c(e,t,r,a){if(n.isPair(e))return e.toString(t,r,a);if(n.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let c,l=n.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>c=e});c??=o(t.doc.schema.tags,l);let u=s(l,c,t);u.length>0&&(t.indentAtStart=(t.indentAtStart??0)+u.length+1);let d=typeof c.stringify==`function`?c.stringify(l,t,r,a):n.isScalar(l)?i.stringifyString(l,t,r,a):l.toString(t,r,a);return u?n.isScalar(l)||d[0]===`{`||d[0]===`[`?`${u} ${d}`:`${u}\n${t.indent}${d}`:d}e.createStringifyContext=a,e.stringify=c})),nf=R((e=>{var t=Vd(),n=Yd(),r=tf(),i=Qd();function a({key:e,value:a},o,s,c){let{allNullValues:l,doc:u,indent:d,indentStep:f,options:{commentString:p,indentSeq:m,simpleKeys:h}}=o,g=t.isNode(e)&&e.comment||null;if(h){if(g)throw Error(`With simple keys, key nodes cannot have comments`);if(t.isCollection(e)||!t.isNode(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let _=!h&&(!e||g&&a==null&&!o.inFlow||t.isCollection(e)||(t.isScalar(e)?e.type===n.Scalar.BLOCK_FOLDED||e.type===n.Scalar.BLOCK_LITERAL:typeof e==`object`));o=Object.assign({},o,{allNullValues:!1,implicitKey:!_&&(h||!l),indent:d+f});let v=!1,y=!1,b=r.stringify(e,o,()=>v=!0,()=>y=!0);if(!_&&!o.inFlow&&b.length>1024){if(h)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);_=!0}if(o.inFlow){if(l||a==null)return v&&s&&s(),b===``?`?`:_?`? ${b}`:b}else if(l&&!h||a==null&&_)return b=`? ${b}`,g&&!v?b+=i.lineComment(b,o.indent,p(g)):y&&c&&c(),b;v&&(g=null),_?(g&&(b+=i.lineComment(b,o.indent,p(g))),b=`? ${b}\n${d}:`):(b=`${b}:`,g&&(b+=i.lineComment(b,o.indent,p(g))));let x,S,C;t.isNode(a)?(x=!!a.spaceBefore,S=a.commentBefore,C=a.comment):(x=!1,S=null,C=null,a&&typeof a==`object`&&(a=u.createNode(a))),o.implicitKey=!1,!_&&!g&&t.isScalar(a)&&(o.indentAtStart=b.length+1),y=!1,!m&&f.length>=2&&!o.inFlow&&!_&&t.isSeq(a)&&!a.flow&&!a.tag&&!a.anchor&&(o.indent=o.indent.substring(2));let w=!1,T=r.stringify(a,o,()=>w=!0,()=>y=!0),E=` `;if(g||x||S){if(E=x?`
80
+ `:``,S){let e=p(S);E+=`\n${i.indentComment(e,o.indent)}`}T===``&&!o.inFlow?E===`
81
+ `&&C&&(E=`
82
+
83
+ `):E+=`\n${o.indent}`}else if(!_&&t.isCollection(a)){let e=T[0],t=T.indexOf(`
84
+ `),n=t!==-1,r=o.inFlow??a.flow??a.items.length===0;if(n||!r){let r=!1;if(n&&(e===`&`||e===`!`)){let n=T.indexOf(` `);e===`&`&&n!==-1&&n<t&&T[n+1]===`!`&&(n=T.indexOf(` `,n+1)),(n===-1||t<n)&&(r=!0)}r||(E=`\n${o.indent}`)}}else (T===``||T[0]===`
85
+ `)&&(E=``);return b+=E+T,o.inFlow?w&&s&&s():C&&!w?b+=i.lineComment(b,o.indent,p(C)):y&&c&&c(),b}e.stringifyPair=a})),rf=R((e=>{var t=ke(`process`);function n(e,...t){e===`debug`&&console.log(...t)}function r(e,n){(e===`debug`||e===`warn`)&&(typeof t.emitWarning==`function`?t.emitWarning(n):console.warn(n))}e.debug=n,e.warn=r})),af=R((e=>{var t=Vd(),n=Yd();let r={identify:e=>e===`<<`||typeof e==`symbol`&&e.description===`<<`,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new n.Scalar(Symbol(`<<`)),{addToJSMap:a}),stringify:()=>`<<`},i=(e,i)=>(r.identify(i)||t.isScalar(i)&&(!i.type||i.type===n.Scalar.PLAIN)&&r.identify(i.value))&&e?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default);function a(e,n,r){if(r=e&&t.isAlias(r)?r.resolve(e.doc):r,t.isSeq(r))for(let t of r.items)o(e,n,t);else if(Array.isArray(r))for(let t of r)o(e,n,t);else o(e,n,r)}function o(e,n,r){let i=e&&t.isAlias(r)?r.resolve(e.doc):r;if(!t.isMap(i))throw Error(`Merge sources must be maps or map aliases`);let a=i.toJSON(null,e,Map);for(let[e,t]of a)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}e.addMergeToJSMap=a,e.isMergeKey=i,e.merge=r})),of=R((e=>{var t=rf(),n=af(),r=tf(),i=Vd(),a=Kd();function o(e,t,{key:r,value:o}){if(i.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,o);else if(n.isMergeKey(e,r))n.addMergeToJSMap(e,t,o);else{let n=a.toJS(r,``,e);if(t instanceof Map)t.set(n,a.toJS(o,n,e));else if(t instanceof Set)t.add(n);else{let i=s(r,n,e),c=a.toJS(o,i,e);i in t?Object.defineProperty(t,i,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[i]=c}}return t}function s(e,n,a){if(n===null)return``;if(typeof n!=`object`)return String(n);if(i.isNode(e)&&a?.doc){let n=r.createStringifyContext(a.doc,{});n.anchors=new Set;for(let e of a.anchors.keys())n.anchors.add(e.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!a.mapKeyWarned){let e=JSON.stringify(i);e.length>40&&(e=e.substring(0,36)+`..."`),t.warn(a.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),a.mapKeyWarned=!0}return i}return JSON.stringify(n)}e.addPairToJSMap=o})),sf=R((e=>{var t=Xd(),n=nf(),r=of(),i=Vd();function a(e,n,r){return new o(t.createNode(e,void 0,r),t.createNode(n,void 0,r))}var o=class e{constructor(e,t=null){Object.defineProperty(this,i.NODE_TYPE,{value:i.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return i.isNode(n)&&(n=n.clone(t)),i.isNode(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return r.addPairToJSMap(t,n,this)}toString(e,t,r){return e?.doc?n.stringifyPair(this,e,t,r):JSON.stringify(this)}};e.Pair=o,e.createPair=a})),cf=R((e=>{var t=Vd(),n=tf(),r=Qd();function i(e,t,n){return(t.inFlow??e.flow?o:a)(e,t,n)}function a({comment:e,items:i},a,{blockItemPrefix:o,flowChars:c,itemIndent:l,onChompKeep:u,onComment:d}){let{indent:f,options:{commentString:p}}=a,m=Object.assign({},a,{indent:l,type:null}),h=!1,g=[];for(let e=0;e<i.length;++e){let c=i[e],u=null;if(t.isNode(c))!h&&c.spaceBefore&&g.push(``),s(a,g,c.commentBefore,h),c.comment&&(u=c.comment);else if(t.isPair(c)){let e=t.isNode(c.key)?c.key:null;e&&(!h&&e.spaceBefore&&g.push(``),s(a,g,e.commentBefore,h))}h=!1;let d=n.stringify(c,m,()=>u=null,()=>h=!0);u&&(d+=r.lineComment(d,l,p(u))),h&&u&&(h=!1),g.push(o+d)}let _;if(g.length===0)_=c.start+c.end;else{_=g[0];for(let e=1;e<g.length;++e){let t=g[e];_+=t?`\n${f}${t}`:`
86
+ `}}return e?(_+=`
87
+ `+r.indentComment(p(e),f),d&&d()):h&&u&&u(),_}function o({items:e},i,{flowChars:a,itemIndent:o}){let{indent:c,indentStep:l,flowCollectionPadding:u,options:{commentString:d}}=i;o+=l;let f=Object.assign({},i,{indent:o,inFlow:!0,type:null}),p=!1,m=0,h=[];for(let a=0;a<e.length;++a){let c=e[a],l=null;if(t.isNode(c))c.spaceBefore&&h.push(``),s(i,h,c.commentBefore,!1),c.comment&&(l=c.comment);else if(t.isPair(c)){let e=t.isNode(c.key)?c.key:null;e&&(e.spaceBefore&&h.push(``),s(i,h,e.commentBefore,!1),e.comment&&(p=!0));let n=t.isNode(c.value)?c.value:null;n?(n.comment&&(l=n.comment),n.commentBefore&&(p=!0)):c.value==null&&e?.comment&&(l=e.comment)}l&&(p=!0);let u=n.stringify(c,f,()=>l=null);a<e.length-1&&(u+=`,`),l&&(u+=r.lineComment(u,o,d(l))),!p&&(h.length>m||u.includes(`
88
+ `))&&(p=!0),h.push(u),m=h.length}let{start:g,end:_}=a;if(h.length===0)return g+_;if(!p){let e=h.reduce((e,t)=>e+t.length+2,2);p=i.options.lineWidth>0&&e>i.options.lineWidth}if(p){let e=g;for(let t of h)e+=t?`\n${l}${c}${t}`:`
89
+ `;return`${e}\n${c}${_}`}else return`${g}${u}${h.join(` `)}${u}${_}`}function s({indent:e,options:{commentString:t}},n,i,a){if(i&&a&&(i=i.replace(/^\n+/,``)),i){let a=r.indentComment(t(i),e);n.push(a.trimStart())}}e.stringifyCollection=i})),lf=R((e=>{var t=cf(),n=of(),r=Zd(),i=Vd(),a=sf(),o=Yd();function s(e,t){let n=i.isScalar(t)?t.value:t;for(let r of e)if(i.isPair(r)&&(r.key===t||r.key===n||i.isScalar(r.key)&&r.key.value===n))return r}e.YAMLMap=class extends r.Collection{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(i.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,o=new this(e),s=(e,s)=>{if(typeof i==`function`)s=i.call(t,e,s);else if(Array.isArray(i)&&!i.includes(e))return;(s!==void 0||r)&&o.items.push(a.createPair(e,s,n))};if(t instanceof Map)for(let[e,n]of t)s(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))s(e,t[e]);return typeof e.sortMapEntries==`function`&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=i.isPair(e)?e:!e||typeof e!=`object`||!(`key`in e)?new a.Pair(e,e?.value):new a.Pair(e.key,e.value);let r=s(this.items,n.key),c=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);i.isScalar(r.value)&&o.isScalarValue(n.value)?r.value.value=n.value:r.value=n.value}else if(c){let e=this.items.findIndex(e=>c(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=s(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=s(this.items,e)?.value;return(!t&&i.isScalar(n)?n.value:n)??void 0}has(e){return!!s(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,r){let i=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let e of this.items)n.addPairToJSMap(t,i,e);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(let e of this.items)if(!i.isPair(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),t.stringifyCollection(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:r,onComment:n})}},e.findPair=s})),uf=R((e=>{var t=Vd(),n=lf();e.map={collection:`map`,default:!0,nodeClass:n.YAMLMap,tag:`tag:yaml.org,2002:map`,resolve(e,n){return t.isMap(e)||n(`Expected a mapping for this tag`),e},createNode:(e,t,r)=>n.YAMLMap.from(e,t,r)}})),df=R((e=>{var t=Xd(),n=cf(),r=Zd(),i=Vd(),a=Yd(),o=Kd(),s=class extends r.Collection{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(i.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=c(e);return typeof t==`number`?this.items.splice(t,1).length>0:!1}get(e,t){let n=c(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&i.isScalar(r)?r.value:r}has(e){let t=c(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=c(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];i.isScalar(r)&&a.isScalarValue(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(o.toJS(e,String(r++),t));return n}toString(e,t,r){return e?n.stringifyCollection(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,n,r){let{replacer:i}=r,a=new this(e);if(n&&Symbol.iterator in Object(n)){let e=0;for(let o of n){if(typeof i==`function`){let t=n instanceof Set?o:String(e++);o=i.call(n,t,o)}a.items.push(t.createNode(o,void 0,r))}}return a}};function c(e){let t=i.isScalar(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}e.YAMLSeq=s})),ff=R((e=>{var t=Vd(),n=df();e.seq={collection:`seq`,default:!0,nodeClass:n.YAMLSeq,tag:`tag:yaml.org,2002:seq`,resolve(e,n){return t.isSeq(e)||n(`Expected a sequence for this tag`),e},createNode:(e,t,r)=>n.YAMLSeq.from(e,t,r)}})),pf=R((e=>{var t=ef();e.string={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,n,r,i){return n=Object.assign({actualString:!0},n),t.stringifyString(e,n,r,i)}}})),mf=R((e=>{var t=Yd();let n={identify:e=>e==null,createNode:()=>new t.Scalar(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new t.Scalar(null),stringify:({source:e},t)=>typeof e==`string`&&n.test.test(e)?e:t.options.nullStr};e.nullTag=n})),hf=R((e=>{var t=Yd();let n={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new t.Scalar(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},r){return e&&n.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?r.options.trueStr:r.options.falseStr}};e.boolTag=n})),gf=R((e=>{function t({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\d/.test(a)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-- >0;)a+=`0`}return a}e.stringifyNumber=t})),_f=R((e=>{var t=Yd(),n=gf();let r={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber};e.float={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let n=new t.Scalar(parseFloat(e)),r=e.indexOf(`.`);return r!==-1&&e[e.length-1]===`0`&&(n.minFractionDigits=e.length-r-1),n},stringify:n.stringifyNumber},e.floatExp={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():n.stringifyNumber(e)}},e.floatNaN=r})),vf=R((e=>{var t=gf();let n=e=>typeof e==`bigint`||Number.isInteger(e),r=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function i(e,r,i){let{value:a}=e;return n(a)&&a>=0?i+a.toString(r):t.stringifyNumber(e)}e.int={identify:n,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:t.stringifyNumber},e.intHex={identify:e=>n(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>i(e,16,`0x`)},e.intOct={identify:e=>n(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>r(e,2,8,n),stringify:e=>i(e,8,`0o`)}})),yf=R((e=>{var t=uf(),n=mf(),r=ff(),i=pf(),a=hf(),o=_f(),s=vf();e.schema=[t.map,r.seq,i.string,n.nullTag,a.boolTag,s.intOct,s.int,s.intHex,o.floatNaN,o.floatExp,o.float]})),bf=R((e=>{var t=Yd(),n=uf(),r=ff();function i(e){return typeof e==`bigint`||Number.isInteger(e)}let a=({value:e})=>JSON.stringify(e),o=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:a},{identify:e=>e==null,createNode:()=>new t.Scalar(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:a},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:a},{identify:i,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>i(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:a}];e.schema=[n.map,r.seq].concat(o,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}})})),xf=R((e=>{var t=ke(`buffer`),n=Yd(),r=ef();e.binary={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,n){if(typeof t.Buffer==`function`)return t.Buffer.from(e,`base64`);if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}else return n(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:i,value:a},o,s,c){if(!a)return``;let l=a,u;if(typeof t.Buffer==`function`)u=l instanceof t.Buffer?l.toString(`base64`):t.Buffer.from(l.buffer).toString(`base64`);else if(typeof btoa==`function`){let e=``;for(let t=0;t<l.length;++t)e+=String.fromCharCode(l[t]);u=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(i??=n.Scalar.BLOCK_LITERAL,i!==n.Scalar.QUOTE_DOUBLE){let e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),t=Math.ceil(u.length/e),r=Array(t);for(let n=0,i=0;n<t;++n,i+=e)r[n]=u.substr(i,e);u=r.join(i===n.Scalar.BLOCK_LITERAL?`
90
+ `:` `)}return r.stringifyString({comment:e,type:i,value:u},o,s,c)}}})),Sf=R((e=>{var t=Vd(),n=sf(),r=Yd(),i=df();function a(e,i){if(t.isSeq(e))for(let a=0;a<e.items.length;++a){let o=e.items[a];if(!t.isPair(o)){if(t.isMap(o)){o.items.length>1&&i(`Each pair must have its own sequence indicator`);let e=o.items[0]||new n.Pair(new r.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){let t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[a]=t.isPair(o)?o:new n.Pair(o)}}else i(`Expected a sequence for this tag`);return e}function o(e,t,r){let{replacer:a}=r,o=new i.YAMLSeq(e);o.tag=`tag:yaml.org,2002:pairs`;let s=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof a==`function`&&(e=a.call(t,String(s++),e));let i,c;if(Array.isArray(e))if(e.length===2)i=e[0],c=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)i=t[0],c=e[i];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else i=e;o.items.push(n.createPair(i,c,r))}return o}let s={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:a,createNode:o};e.createPairs=o,e.pairs=s,e.resolvePairs=a})),Cf=R((e=>{var t=Vd(),n=Kd(),r=lf(),i=df(),a=Sf(),o=class e extends i.YAMLSeq{constructor(){super(),this.add=r.YAMLMap.prototype.add.bind(this),this.delete=r.YAMLMap.prototype.delete.bind(this),this.get=r.YAMLMap.prototype.get.bind(this),this.has=r.YAMLMap.prototype.has.bind(this),this.set=r.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(e,r){if(!r)return super.toJSON(e);let i=new Map;r?.onCreate&&r.onCreate(i);for(let e of this.items){let a,o;if(t.isPair(e)?(a=n.toJS(e.key,``,r),o=n.toJS(e.value,a,r)):a=n.toJS(e,``,r),i.has(a))throw Error(`Ordered maps must not include duplicate keys`);i.set(a,o)}return i}static from(e,t,n){let r=a.createPairs(e,t,n),i=new this;return i.items=r.items,i}};o.tag=`tag:yaml.org,2002:omap`;let s={collection:`seq`,identify:e=>e instanceof Map,nodeClass:o,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,n){let r=a.resolvePairs(e,n),i=[];for(let{key:e}of r.items)t.isScalar(e)&&(i.includes(e.value)?n(`Ordered maps must not include duplicate keys: ${e.value}`):i.push(e.value));return Object.assign(new o,r)},createNode:(e,t,n)=>o.from(e,t,n)};e.YAMLOMap=o,e.omap=s})),wf=R((e=>{var t=Yd();function n({value:e,source:t},n){return t&&(e?r:i).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}let r={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new t.Scalar(!0),stringify:n},i={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new t.Scalar(!1),stringify:n};e.falseTag=i,e.trueTag=r})),Tf=R((e=>{var t=Yd(),n=gf();let r={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber};e.float={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let n=new t.Scalar(parseFloat(e.replace(/_/g,``))),r=e.indexOf(`.`);if(r!==-1){let t=e.substring(r+1).replace(/_/g,``);t[t.length-1]===`0`&&(n.minFractionDigits=t.length)}return n},stringify:n.stringifyNumber},e.floatExp={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():n.stringifyNumber(e)}},e.floatNaN=r})),Ef=R((e=>{var t=gf();let n=e=>typeof e==`bigint`||Number.isInteger(e);function r(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function i(e,r,i){let{value:a}=e;if(n(a)){let e=a.toString(r);return a<0?`-`+i+e.substr(1):i+e}return t.stringifyNumber(e)}let a={identify:n,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>r(e,2,2,n),stringify:e=>i(e,2,`0b`)},o={identify:n,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>r(e,1,8,n),stringify:e=>i(e,8,`0`)},s={identify:n,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:t.stringifyNumber},c={identify:n,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>i(e,16,`0x`)};e.int=s,e.intBin=a,e.intHex=c,e.intOct=o})),Df=R((e=>{var t=Vd(),n=sf(),r=lf(),i=class e extends r.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(e){let i;i=t.isPair(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new n.Pair(e.key,null):new n.Pair(e,null),r.findPair(this.items,i.key)||this.items.push(i)}get(e,n){let i=r.findPair(this.items,e);return!n&&t.isPair(i)?t.isScalar(i.key)?i.key.value:i.key:i}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let i=r.findPair(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new n.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,r){let{replacer:i}=r,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof i==`function`&&(e=i.call(t,e,e)),a.items.push(n.createPair(e,null,r));return a}};i.tag=`tag:yaml.org,2002:set`;let a={collection:`map`,identify:e=>e instanceof Set,nodeClass:i,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>i.from(e,t,n),resolve(e,n){if(t.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new i,e);n(`Set items must all have null values`)}else n(`Expected a mapping for this tag`);return e}};e.YAMLSet=i,e.set=a})),Of=R((e=>{var t=gf();function n(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function r(e){let{value:n}=e,r=e=>e;if(typeof n==`bigint`)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return t.stringifyNumber(e);let i=``;n<0&&(i=`-`,n*=r(-1));let a=r(60),o=[n%a];return n<60?o.unshift(0):(n=(n-o[0])/a,o.unshift(n%a),n>=60&&(n=(n-o[0])/a,o.unshift(n))),i+o.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}let i={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>n(e,r),stringify:r},a={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>n(e,!1),stringify:r},o={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(o.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,r,i,a,s,c,l]=t.map(Number),u=t[7]?Number((t[7]+`00`).substr(1,3)):0,d=Date.UTC(r,i-1,a,s||0,c||0,l||0,u),f=t[8];if(f&&f!==`Z`){let e=n(f,!1);Math.abs(e)<30&&(e*=60),d-=6e4*e}return new Date(d)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``};e.floatTime=a,e.intTime=i,e.timestamp=o})),kf=R((e=>{var t=uf(),n=mf(),r=ff(),i=pf(),a=xf(),o=wf(),s=Tf(),c=Ef(),l=af(),u=Cf(),d=Sf(),f=Df(),p=Of();e.schema=[t.map,r.seq,i.string,n.nullTag,o.trueTag,o.falseTag,c.intBin,c.intOct,c.int,c.intHex,s.floatNaN,s.floatExp,s.float,a.binary,l.merge,u.omap,d.pairs,f.set,p.intTime,p.floatTime,p.timestamp]})),Af=R((e=>{var t=uf(),n=mf(),r=ff(),i=pf(),a=hf(),o=_f(),s=vf(),c=yf(),l=bf(),u=xf(),d=af(),f=Cf(),p=Sf(),m=kf(),h=Df(),g=Of();let _=new Map([[`core`,c.schema],[`failsafe`,[t.map,r.seq,i.string]],[`json`,l.schema],[`yaml11`,m.schema],[`yaml-1.1`,m.schema]]),v={binary:u.binary,bool:a.boolTag,float:o.float,floatExp:o.floatExp,floatNaN:o.floatNaN,floatTime:g.floatTime,int:s.int,intHex:s.intHex,intOct:s.intOct,intTime:g.intTime,map:t.map,merge:d.merge,null:n.nullTag,omap:f.omap,pairs:p.pairs,seq:r.seq,set:h.set,timestamp:g.timestamp},y={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":d.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":g.timestamp};function b(e,t,n){let r=_.get(t);if(r&&!e)return n&&!r.includes(d.merge)?r.concat(d.merge):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(_.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(d.merge)),i.reduce((e,t)=>{let n=typeof t==`string`?v[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(v).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}e.coreKnownTags=y,e.getTags=b})),jf=R((e=>{var t=Vd(),n=uf(),r=ff(),i=pf(),a=Af();let o=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;e.Schema=class e{constructor({compat:e,customTags:s,merge:c,resolveKnownTags:l,schema:u,sortMapEntries:d,toStringDefaults:f}){this.compat=Array.isArray(e)?a.getTags(e,`compat`):e?a.getTags(null,e):null,this.name=typeof u==`string`&&u||`core`,this.knownTags=l?a.coreKnownTags:{},this.tags=a.getTags(s,this.name,c),this.toStringOptions=f??null,Object.defineProperty(this,t.MAP,{value:n.map}),Object.defineProperty(this,t.SCALAR,{value:i.string}),Object.defineProperty(this,t.SEQ,{value:r.seq}),this.sortMapEntries=typeof d==`function`?d:d===!0?o:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}})),Mf=R((e=>{var t=Vd(),n=tf(),r=Qd();function i(e,i){let a=[],o=i.directives===!0;if(i.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(a.push(t),o=!0):e.directives.docStart&&(o=!0)}o&&a.push(`---`);let s=n.createStringifyContext(e,i),{commentString:c}=s.options;if(e.commentBefore){a.length!==1&&a.unshift(``);let t=c(e.commentBefore);a.unshift(r.indentComment(t,``))}let l=!1,u=null;if(e.contents){if(t.isNode(e.contents)){if(e.contents.spaceBefore&&o&&a.push(``),e.contents.commentBefore){let t=c(e.contents.commentBefore);a.push(r.indentComment(t,``))}s.forceBlockIndent=!!e.comment,u=e.contents.comment}let i=u?void 0:()=>l=!0,d=n.stringify(e.contents,s,()=>u=null,i);u&&(d+=r.lineComment(d,``,c(u))),(d[0]===`|`||d[0]===`>`)&&a[a.length-1]===`---`?a[a.length-1]=`--- ${d}`:a.push(d)}else a.push(n.stringify(e.contents,s));if(e.directives?.docEnd)if(e.comment){let t=c(e.comment);t.includes(`
91
+ `)?(a.push(`...`),a.push(r.indentComment(t,``))):a.push(`... ${t}`)}else a.push(`...`);else{let t=e.comment;t&&l&&(t=t.replace(/^\n+/,``)),t&&((!l||u)&&a[a.length-1]!==``&&a.push(``),a.push(r.indentComment(c(t),``)))}return a.join(`
92
+ `)+`
93
+ `}e.stringifyDocument=i})),Nf=R((e=>{var t=Jd(),n=Zd(),r=Vd(),i=sf(),a=Kd(),o=jf(),s=Mf(),c=Wd(),l=Gd(),u=Xd(),d=Ud(),f=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,r.NODE_TYPE,{value:r.DOC});let i=null;typeof t==`function`||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=a;let{version:o}=a;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new d.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let t=Object.create(e.prototype,{[r.NODE_TYPE]:{value:r.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=r.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){p(this.contents)&&this.contents.add(e)}addIn(e,t){p(this.contents)&&this.contents.addIn(e,t)}createAlias(e,n){if(!e.anchor){let t=c.anchorNames(this);e.anchor=!n||t.has(n)?c.findNewAnchor(n||`a`,t):n}return new t.Alias(e.anchor)}createNode(e,t,n){let i;if(typeof t==`function`)e=t.call({"":e},``,e),i=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:a,anchorPrefix:o,flow:s,keepUndefined:l,onTagObj:d,tag:f}=n??{},{onAnchor:p,setAnchors:m,sourceObjects:h}=c.createNodeAnchors(this,o||`a`),g={aliasDuplicateObjects:a??!0,keepUndefined:l??!1,onAnchor:p,onTagObj:d,replacer:i,schema:this.schema,sourceObjects:h},_=u.createNode(e,f,g);return s&&r.isCollection(_)&&(_.flow=!0),m(),_}createPair(e,t,n={}){let r=this.createNode(e,null,n),a=this.createNode(t,null,n);return new i.Pair(r,a)}delete(e){return p(this.contents)?this.contents.delete(e):!1}deleteIn(e){return n.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):p(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return r.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return n.isEmptyPath(e)?!t&&r.isScalar(this.contents)?this.contents.value:this.contents:r.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return r.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return n.isEmptyPath(e)?this.contents!==void 0:r.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=n.collectionFromPath(this.schema,[e],t):p(this.contents)&&this.contents.set(e,t)}setIn(e,t){n.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=n.collectionFromPath(this.schema,Array.from(e),t):p(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new d.Directives({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new d.Directives({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new o.Schema(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},c=a.toJS(this.contents,t??``,s);if(typeof i==`function`)for(let{count:e,res:t}of s.anchors.values())i(t,e);return typeof o==`function`?l.applyReviver(o,{"":c},``,c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return s.stringifyDocument(this,e)}};function p(e){if(r.isCollection(e))return!0;throw Error(`Expected a YAML collection as document contents`)}e.Document=f})),Pf=R((e=>{var t=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},n=class extends t{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},r=class extends t{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}};e.YAMLError=t,e.YAMLParseError=n,e.YAMLWarning=r,e.prettifyError=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
94
+ `),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}}})),Ff=R((e=>{function t(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}e.resolveProps=t})),If=R((e=>{function t(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
95
+ `))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let n of e.items){for(let e of n.start)if(e.type===`newline`)return!0;if(n.sep){for(let e of n.sep)if(e.type===`newline`)return!0}if(t(n.key)||t(n.value))return!0}return!1;default:return!0}}e.containsNewline=t})),Lf=R((e=>{var t=If();function n(e,n,r){if(n?.type===`flow-collection`){let i=n.end[0];i.indent===e&&(i.source===`]`||i.source===`}`)&&t.containsNewline(n)&&r(i,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}e.flowIndentCheck=n})),Rf=R((e=>{var t=Vd();function n(e,n,r){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let a=typeof i==`function`?i:(e,n)=>e===n||t.isScalar(e)&&t.isScalar(n)&&e.value===n.value;return n.some(e=>a(e.key,r))}e.mapIncludes=n})),zf=R((e=>{var t=sf(),n=lf(),r=Ff(),i=If(),a=Lf(),o=Rf();let s=`All mapping items must start at the same column`;function c({composeNode:e,composeEmptyNode:c},l,u,d,f){let p=new(f?.nodeClass??n.YAMLMap)(l.schema);l.atRoot&&=!1;let m=u.offset,h=null;for(let n of u.items){let{start:f,key:g,sep:_,value:v}=n,y=r.resolveProps(f,{indicator:`explicit-key-ind`,next:g??_?.[0],offset:m,onError:d,parentIndent:u.indent,startOnNewline:!0}),b=!y.found;if(b){if(g&&(g.type===`block-seq`?d(m,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in g&&g.indent!==u.indent&&d(m,`BAD_INDENT`,s)),!y.anchor&&!y.tag&&!_){h=y.end,y.comment&&(p.comment?p.comment+=`
96
+ `+y.comment:p.comment=y.comment);continue}(y.newlineAfterProp||i.containsNewline(g))&&d(g??f[f.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else y.found?.indent!==u.indent&&d(m,`BAD_INDENT`,s);l.atKey=!0;let x=y.end,S=g?e(l,g,y,d):c(l,x,f,null,y,d);l.schema.compat&&a.flowIndentCheck(u.indent,g,d),l.atKey=!1,o.mapIncludes(l,p.items,S)&&d(x,`DUPLICATE_KEY`,`Map keys must be unique`);let C=r.resolveProps(_??[],{indicator:`map-value-ind`,next:v,offset:S.range[2],onError:d,parentIndent:u.indent,startOnNewline:!g||g.type===`block-scalar`});if(m=C.end,C.found){b&&(v?.type===`block-map`&&!C.hasNewline&&d(m,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),l.options.strict&&y.start<C.found.offset-1024&&d(S.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let r=v?e(l,v,C,d):c(l,m,_,null,C,d);l.schema.compat&&a.flowIndentCheck(u.indent,v,d),m=r.range[2];let i=new t.Pair(S,r);l.options.keepSourceTokens&&(i.srcToken=n),p.items.push(i)}else{b&&d(S.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),C.comment&&(S.comment?S.comment+=`
97
+ `+C.comment:S.comment=C.comment);let e=new t.Pair(S);l.options.keepSourceTokens&&(e.srcToken=n),p.items.push(e)}}return h&&h<m&&d(h,`IMPOSSIBLE`,`Map comment with trailing content`),p.range=[u.offset,m,h??m],p}e.resolveBlockMap=c})),Bf=R((e=>{var t=df(),n=Ff(),r=Lf();function i({composeNode:e,composeEmptyNode:i},a,o,s,c){let l=new(c?.nodeClass??t.YAMLSeq)(a.schema);a.atRoot&&=!1,a.atKey&&=!1;let u=o.offset,d=null;for(let{start:t,value:c}of o.items){let f=n.resolveProps(t,{indicator:`seq-item-ind`,next:c,offset:u,onError:s,parentIndent:o.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||c)c?.type===`block-seq`?s(f.end,`BAD_INDENT`,`All sequence items must start at the same column`):s(u,`MISSING_CHAR`,`Sequence item without - indicator`);else{d=f.end,f.comment&&(l.comment=f.comment);continue}let p=c?e(a,c,f,s):i(a,f.end,t,null,f,s);a.schema.compat&&r.flowIndentCheck(o.indent,c,s),u=p.range[2],l.items.push(p)}return l.range=[o.offset,u,d??u],l}e.resolveBlockSeq=i})),Vf=R((e=>{function t(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}e.resolveEnd=t})),Hf=R((e=>{var t=Vd(),n=sf(),r=lf(),i=df(),a=Vf(),o=Ff(),s=If(),c=Rf();let l=`Block collections are not allowed within flow collections`,u=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function d({composeNode:e,composeEmptyNode:d},f,p,m,h){let g=p.start.source===`{`,_=g?`flow map`:`flow sequence`,v=new(h?.nodeClass??(g?r.YAMLMap:i.YAMLSeq))(f.schema);v.flow=!0;let y=f.atRoot;y&&(f.atRoot=!1),f.atKey&&=!1;let b=p.offset+p.start.source.length;for(let i=0;i<p.items.length;++i){let a=p.items[i],{start:h,key:y,sep:x,value:S}=a,C=o.resolveProps(h,{flow:_,indicator:`explicit-key-ind`,next:y??x?.[0],offset:b,onError:m,parentIndent:p.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!x&&!S){i===0&&C.comma?m(C.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${_}`):i<p.items.length-1&&m(C.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${_}`),C.comment&&(v.comment?v.comment+=`
98
+ `+C.comment:v.comment=C.comment),b=C.end;continue}!g&&f.options.strict&&s.containsNewline(y)&&m(y,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(i===0)C.comma&&m(C.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${_}`);else if(C.comma||m(C.start,`MISSING_CHAR`,`Missing , between ${_} items`),C.comment){let e=``;loop:for(let t of h)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let n=v.items[v.items.length-1];t.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+=`
99
+ `+e:n.comment=e,C.comment=C.comment.substring(e.length+1)}}if(!g&&!x&&!C.found){let t=S?e(f,S,C,m):d(f,C.end,x,null,C,m);v.items.push(t),b=t.range[2],u(S)&&m(t.range,`BLOCK_IN_FLOW`,l)}else{f.atKey=!0;let t=C.end,i=y?e(f,y,C,m):d(f,t,h,null,C,m);u(y)&&m(i.range,`BLOCK_IN_FLOW`,l),f.atKey=!1;let s=o.resolveProps(x??[],{flow:_,indicator:`map-value-ind`,next:S,offset:i.range[2],onError:m,parentIndent:p.indent,startOnNewline:!1});if(s.found){if(!g&&!C.found&&f.options.strict){if(x)for(let e of x){if(e===s.found)break;if(e.type===`newline`){m(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}C.start<s.found.offset-1024&&m(s.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else S&&(`source`in S&&S.source?.[0]===`:`?m(S,`MISSING_CHAR`,`Missing space after : in ${_}`):m(s.start,`MISSING_CHAR`,`Missing , or : between ${_} items`));let w=S?e(f,S,s,m):s.found?d(f,s.end,x,null,s,m):null;w?u(S)&&m(w.range,`BLOCK_IN_FLOW`,l):s.comment&&(i.comment?i.comment+=`
100
+ `+s.comment:i.comment=s.comment);let T=new n.Pair(i,w);if(f.options.keepSourceTokens&&(T.srcToken=a),g){let e=v;c.mapIncludes(f,e.items,i)&&m(t,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(T)}else{let e=new r.YAMLMap(f.schema);e.flow=!0,e.items.push(T);let t=(w??i).range;e.range=[i.range[0],t[1],t[2]],v.items.push(e)}b=w?w.range[2]:s.end}}let x=g?`}`:`]`,[S,...C]=p.end,w=b;if(S?.source===x)w=S.offset+S.source.length;else{let e=_[0].toUpperCase()+_.substring(1),t=y?`${e} must end with a ${x}`:`${e} in block collection must be sufficiently indented and end with a ${x}`;m(b,y?`MISSING_CHAR`:`BAD_INDENT`,t),S&&S.source.length!==1&&C.unshift(S)}if(C.length>0){let e=a.resolveEnd(C,w,f.options.strict,m);e.comment&&(v.comment?v.comment+=`
101
+ `+e.comment:v.comment=e.comment),v.range=[p.offset,w,e.offset]}else v.range=[p.offset,w,w];return v}e.resolveFlowCollection=d})),Uf=R((e=>{var t=Vd(),n=Yd(),r=lf(),i=df(),a=zf(),o=Bf(),s=Hf();function c(e,t,n,r,i,c){let l=n.type===`block-map`?a.resolveBlockMap(e,t,n,r,c):n.type===`block-seq`?o.resolveBlockSeq(e,t,n,r,c):s.resolveFlowCollection(e,t,n,r,c),u=l.constructor;return i===`!`||i===u.tagName?(l.tag=u.tagName,l):(i&&(l.tag=i),l)}function l(e,a,o,s,l){let u=s.tag,d=u?a.directives.tagName(u.source,e=>l(u,`TAG_RESOLVE_FAILED`,e)):null;if(o.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=s,n=e&&u?e.offset>u.offset?e:u:e??u;n&&(!t||t.offset<n.offset)&&l(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let f=o.type===`block-map`?`map`:o.type===`block-seq`?`seq`:o.start.source===`{`?`map`:`seq`;if(!u||!d||d===`!`||d===r.YAMLMap.tagName&&f===`map`||d===i.YAMLSeq.tagName&&f===`seq`)return c(e,a,o,l,d);let p=a.schema.tags.find(e=>e.tag===d&&e.collection===f);if(!p){let t=a.schema.knownTags[d];if(t?.collection===f)a.schema.tags.push(Object.assign({},t,{default:!1})),p=t;else return t?l(u,`BAD_COLLECTION_TYPE`,`${t.tag} used for ${f} collection, but expects ${t.collection??`scalar`}`,!0):l(u,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${d}`,!0),c(e,a,o,l,d)}let m=c(e,a,o,l,d,p),h=p.resolve?.(m,e=>l(u,`TAG_RESOLVE_FAILED`,e),a.options)??m,g=t.isNode(h)?h:new n.Scalar(h);return g.range=m.range,g.tag=d,p?.format&&(g.format=p.format),g}e.composeCollection=l})),Wf=R((e=>{var t=Yd();function n(e,n,a){let o=n.offset,s=r(n,e.options.strict,a);if(!s)return{value:``,type:null,comment:``,range:[o,o,o]};let c=s.mode===`>`?t.Scalar.BLOCK_FOLDED:t.Scalar.BLOCK_LITERAL,l=n.source?i(n.source):[],u=l.length;for(let e=l.length-1;e>=0;--e){let t=l[e][1];if(t===``||t===`\r`)u=e;else break}if(u===0){let e=s.chomp===`+`&&l.length>0?`
102
+ `.repeat(Math.max(1,l.length-1)):``,t=o+s.length;return n.source&&(t+=n.source.length),{value:e,type:c,comment:s.comment,range:[o,t,t]}}let d=n.indent+s.indent,f=n.offset+s.length,p=0;for(let t=0;t<u;++t){let[n,r]=l[t];if(r===``||r===`\r`)s.indent===0&&n.length>d&&(d=n.length);else{n.length<d&&a(f+n.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),s.indent===0&&(d=n.length),p=t,d===0&&!e.atRoot&&a(f,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}f+=n.length+r.length+1}for(let e=l.length-1;e>=u;--e)l[e][0].length>d&&(u=e+1);let m=``,h=``,g=!1;for(let e=0;e<p;++e)m+=l[e][0].slice(d)+`
103
+ `;for(let e=p;e<u;++e){let[n,r]=l[e];f+=n.length+r.length+1;let i=r[r.length-1]===`\r`;if(i&&(r=r.slice(0,-1)),r&&n.length<d){let e=`Block scalar lines must not be less indented than their ${s.indent?`explicit indentation indicator`:`first line`}`;a(f-r.length-(i?2:1),`BAD_INDENT`,e),n=``}c===t.Scalar.BLOCK_LITERAL?(m+=h+n.slice(d)+r,h=`
104
+ `):n.length>d||r[0]===` `?(h===` `?h=`
105
+ `:!g&&h===`
106
+ `&&(h=`
107
+
108
+ `),m+=h+n.slice(d)+r,h=`
109
+ `,g=!0):r===``?h===`
110
+ `?m+=`
111
+ `:h=`
112
+ `:(m+=h+r,h=` `,g=!1)}switch(s.chomp){case`-`:break;case`+`:for(let e=u;e<l.length;++e)m+=`
113
+ `+l[e][0].slice(d);m[m.length-1]!==`
114
+ `&&(m+=`
115
+ `);break;default:m+=`
116
+ `}let _=o+s.length+n.source.length;return{value:m,type:c,comment:s.comment,range:[o,_,_]}}function r({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function i(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}e.resolveBlockScalar=n})),Gf=R((e=>{var t=Yd(),n=Vf();function r(e,r,o){let{offset:c,type:l,source:u,end:d}=e,f,p,m=(e,t,n)=>o(c+e,t,n);switch(l){case`scalar`:f=t.Scalar.PLAIN,p=i(u,m);break;case`single-quoted-scalar`:f=t.Scalar.QUOTE_SINGLE,p=a(u,m);break;case`double-quoted-scalar`:f=t.Scalar.QUOTE_DOUBLE,p=s(u,m);break;default:return o(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${l}`),{value:``,type:null,comment:``,range:[c,c+u.length,c+u.length]}}let h=c+u.length,g=n.resolveEnd(d,h,r,o);return{value:p,type:f,comment:g.comment,range:[c,h,g.offset]}}function i(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`;break}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),o(e)}function a(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),o(e.slice(1,-1)).replace(/''/g,`'`)}function o(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
117
+ `,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
118
+ `,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
119
+ `?i+=a:a=`
120
+ `:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function s(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i===`\r`&&e[r+1]===`
121
+ `))if(i===`
122
+ `){let{fold:t,offset:i}=c(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=l[i];if(a)n+=a;else if(i===`
123
+ `)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
124
+ `)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a={x:2,u:4,U:8}[i];n+=u(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
125
+ `&&!(a===`\r`&&e[r+2]===`
126
+ `)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function c(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
127
+ `||r===`\r`)&&!(r===`\r`&&e[t+2]!==`
128
+ `);)r===`
129
+ `&&(n+=`
130
+ `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}let l={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
131
+ `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function u(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}return String.fromCodePoint(a)}e.resolveFlowScalar=r})),Kf=R((e=>{var t=Vd(),n=Yd(),r=Wf(),i=Gf();function a(e,a,c,l){let{value:u,type:d,comment:f,range:p}=a.type===`block-scalar`?r.resolveBlockScalar(e,a,l):i.resolveFlowScalar(a,e.options.strict,l),m=c?e.directives.tagName(c.source,e=>l(c,`TAG_RESOLVE_FAILED`,e)):null,h;h=e.options.stringKeys&&e.atKey?e.schema[t.SCALAR]:m?o(e.schema,u,m,c,l):a.type===`scalar`?s(e,u,a,l):e.schema[t.SCALAR];let g;try{let r=h.resolve(u,e=>l(c??a,`TAG_RESOLVE_FAILED`,e),e.options);g=t.isScalar(r)?r:new n.Scalar(r)}catch(e){let t=e instanceof Error?e.message:String(e);l(c??a,`TAG_RESOLVE_FAILED`,t),g=new n.Scalar(u)}return g.range=p,g.source=u,d&&(g.type=d),m&&(g.tag=m),h.format&&(g.format=h.format),f&&(g.comment=f),g}function o(e,n,r,i,a){if(r===`!`)return e[t.SCALAR];let o=[];for(let t of e.tags)if(!t.collection&&t.tag===r)if(t.default&&t.test)o.push(t);else return t;for(let e of o)if(e.test?.test(n))return e;let s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(a(i,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${r}`,r!==`tag:yaml.org,2002:str`),e[t.SCALAR])}function s({atKey:e,directives:n,schema:r},i,a,o){let s=r.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(i))||r[t.SCALAR];if(r.compat){let e=r.compat.find(e=>e.default&&e.test?.test(i))??r[t.SCALAR];s.tag!==e.tag&&o(a,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${n.tagString(s.tag)} or ${n.tagString(e.tag)}`,!0)}return s}e.composeScalar=a})),qf=R((e=>{function t(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}e.emptyScalarPosition=t})),Jf=R((e=>{var t=Jd(),n=Vd(),r=Uf(),i=Kf(),a=Vf(),o=qf();let s={composeNode:c,composeEmptyNode:l};function c(e,t,a,o){let c=e.atKey,{spaceBefore:d,comment:f,anchor:p,tag:m}=a,h,g=!0;switch(t.type){case`alias`:h=u(e,t,o),(p||m)&&o(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:h=i.composeScalar(e,t,m,o),p&&(h.anchor=p.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:h=r.composeCollection(s,e,t,a,o),p&&(h.anchor=p.source.substring(1));break;default:o(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),h=l(e,t.offset,void 0,null,a,o),g=!1}return p&&h.anchor===``&&o(p,`BAD_ALIAS`,`Anchor cannot be an empty string`),c&&e.options.stringKeys&&(!n.isScalar(h)||typeof h.value!=`string`||h.tag&&h.tag!==`tag:yaml.org,2002:str`)&&o(m??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),d&&(h.spaceBefore=!0),f&&(t.type===`scalar`&&t.source===``?h.comment=f:h.commentBefore=f),e.options.keepSourceTokens&&g&&(h.srcToken=t),h}function l(e,t,n,r,{spaceBefore:a,comment:s,anchor:c,tag:l,end:u},d){let f={type:`scalar`,offset:o.emptyScalarPosition(t,n,r),indent:-1,source:``},p=i.composeScalar(e,f,l,d);return c&&(p.anchor=c.source.substring(1),p.anchor===``&&d(c,`BAD_ALIAS`,`Anchor cannot be an empty string`)),a&&(p.spaceBefore=!0),s&&(p.comment=s,p.range[2]=u),p}function u({options:e},{offset:n,source:r,end:i},o){let s=new t.Alias(r.substring(1));s.source===``&&o(n,`BAD_ALIAS`,`Alias cannot be an empty string`),s.source.endsWith(`:`)&&o(n+r.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let c=n+r.length,l=a.resolveEnd(i,c,e.strict,o);return s.range=[n,c,l.offset],l.comment&&(s.comment=l.comment),s}e.composeEmptyNode=l,e.composeNode=c})),Yf=R((e=>{var t=Nf(),n=Jf(),r=Vf(),i=Ff();function a(e,a,{offset:o,start:s,value:c,end:l},u){let d=Object.assign({_directives:a},e),f=new t.Document(void 0,d),p={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},m=i.resolveProps(s,{indicator:`doc-start`,next:c??l?.[0],offset:o,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(f.directives.docStart=!0,c&&(c.type===`block-map`||c.type===`block-seq`)&&!m.hasNewline&&u(m.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),f.contents=c?n.composeNode(p,c,m,u):n.composeEmptyNode(p,m.end,s,null,m,u);let h=f.contents.range[2],g=r.resolveEnd(l,h,!1,u);return g.comment&&(f.comment=g.comment),f.range=[o,h,g.offset],f}e.composeDoc=a})),Xf=R((e=>{var t=ke(`process`),n=Ud(),r=Nf(),i=Pf(),a=Vd(),o=Yf(),s=Vf();function c(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function l(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
74
132
 
75
133
  `:`
76
- `}${t}`}function ff(e){let t=e.trim();return t.length===0?`---
77
- ---`:`---\n${t}\n---`}function pf(e,t,n){return`${ff(e)}${lf(n)?`
134
+ `)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}e.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let a=c(e);r?this.warnings.push(new i.YAMLWarning(a,t,n)):this.errors.push(new i.YAMLParseError(a,t,n))},this.directives=new n.Directives({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=l(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(a.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];a.isPair(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:l(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(t.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=c(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=o.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new i.YAMLParseError(c(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new i.YAMLParseError(c(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=s.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new i.YAMLParseError(c(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=Object.assign({_directives:this.directives},this.options),n=new r.Document(void 0,e);this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),n.range=[0,t,t],this.decorate(n,!1),yield n}}}})),Zf=R((e=>{var t=Wf(),n=Gf(),r=Pf(),i=ef();function a(e,i=!0,a){if(e){let o=(e,t,n)=>{let i=typeof e==`number`?e:Array.isArray(e)?e[0]:e.offset;if(a)a(i,t,n);else throw new r.YAMLParseError([i,i+1],t,n)};switch(e.type){case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return n.resolveFlowScalar(e,i,o);case`block-scalar`:return t.resolveBlockScalar({options:{strict:i}},e,o)}}return null}function o(e,t){let{implicitKey:n=!1,indent:r,inFlow:a=!1,offset:o=-1,type:s=`PLAIN`}=t,c=i.stringifyString({type:s,value:e},{implicitKey:n,indent:r>0?` `.repeat(r):``,inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:`newline`,offset:-1,indent:r,source:`
135
+ `}];switch(c[0]){case`|`:case`>`:{let e=c.indexOf(`
136
+ `),t=c.substring(0,e),n=c.substring(e+1)+`
137
+ `,i=[{type:`block-scalar-header`,offset:o,indent:r,source:t}];return l(i,u)||i.push({type:`newline`,offset:-1,indent:r,source:`
138
+ `}),{type:`block-scalar`,offset:o,indent:r,props:i,source:n}}case`"`:return{type:`double-quoted-scalar`,offset:o,indent:r,source:c,end:u};case`'`:return{type:`single-quoted-scalar`,offset:o,indent:r,source:c,end:u};default:return{type:`scalar`,offset:o,indent:r,source:c,end:u}}}function s(e,t,n={}){let{afterKey:r=!1,implicitKey:a=!1,inFlow:o=!1,type:s}=n,l=`indent`in e?e.indent:null;if(r&&typeof l==`number`&&(l+=2),!s)switch(e.type){case`single-quoted-scalar`:s=`QUOTE_SINGLE`;break;case`double-quoted-scalar`:s=`QUOTE_DOUBLE`;break;case`block-scalar`:{let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);s=t.source[0]===`>`?`BLOCK_FOLDED`:`BLOCK_LITERAL`;break}default:s=`PLAIN`}let d=i.stringifyString({type:s,value:t},{implicitKey:a||l===null,indent:l!==null&&l>0?` `.repeat(l):``,inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case`|`:case`>`:c(e,d);break;case`"`:u(e,d,`double-quoted-scalar`);break;case`'`:u(e,d,`single-quoted-scalar`);break;default:u(e,d,`scalar`)}}function c(e,t){let n=t.indexOf(`
139
+ `),r=t.substring(0,n),i=t.substring(n+1)+`
140
+ `;if(e.type===`block-scalar`){let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);t.source=r,e.source=i}else{let{offset:t}=e,n=`indent`in e?e.indent:-1,a=[{type:`block-scalar-header`,offset:t,indent:n,source:r}];l(a,`end`in e?e.end:void 0)||a.push({type:`newline`,offset:-1,indent:n,source:`
141
+ `});for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:`block-scalar`,indent:n,props:a,source:i})}}function l(e,t){if(t)for(let n of t)switch(n.type){case`space`:case`comment`:e.push(n);break;case`newline`:return e.push(n),!0}return!1}function u(e,t,n){switch(e.type){case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:e.type=n,e.source=t;break;case`block-scalar`:{let r=e.props.slice(1),i=t.length;e.props[0].type===`block-scalar-header`&&(i-=e.props[0].source.length);for(let e of r)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case`block-map`:case`block-seq`:{let r={type:`newline`,offset:e.offset+t.length,indent:e.indent,source:`
142
+ `};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let r=`indent`in e?e.indent:-1,i=`end`in e&&Array.isArray(e.end)?e.end.filter(e=>e.type===`space`||e.type===`comment`||e.type===`newline`):[];for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}e.createScalarToken=o,e.resolveAsScalar=a,e.setScalarValue=s})),Qf=R((e=>{let t=e=>`type`in e?n(e):r(e);function n(e){switch(e.type){case`block-scalar`:{let t=``;for(let r of e.props)t+=n(r);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=r(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=r(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=r(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if(`end`in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function r({start:e,key:t,sep:r,value:i}){let a=``;for(let t of e)a+=t.source;if(t&&(a+=n(t)),r)for(let e of r)a+=e.source;return i&&(a+=n(i)),a}e.stringify=t})),$f=R((e=>{let t=Symbol(`break visit`),n=Symbol(`skip children`),r=Symbol(`remove item`);function i(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),a(Object.freeze([]),e,t)}i.BREAK=t,i.SKIP=n,i.REMOVE=r,i.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},i.parentCollection=(e,t)=>{let n=i.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],a=n?.[r];if(a&&`items`in a)return a;throw Error(`Parent collection not found`)};function a(e,n,i){let o=i(n,e);if(typeof o==`symbol`)return o;for(let s of[`key`,`value`]){let c=n[s];if(c&&`items`in c){for(let n=0;n<c.items.length;++n){let o=a(Object.freeze(e.concat([[s,n]])),c.items[n],i);if(typeof o==`number`)n=o-1;else if(o===t)return t;else o===r&&(c.items.splice(n,1),--n)}typeof o==`function`&&s===`key`&&(o=o(n,e))}}return typeof o==`function`?o(n,e):o}e.visit=i})),ep=R((e=>{var t=Zf(),n=Qf(),r=$f();let i=e=>!!e&&`items`in e,a=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function o(e){switch(e){case``:return`<BOM>`;case``:return`<DOC>`;case``:return`<FLOW_END>`;case``:return`<SCALAR>`;default:return JSON.stringify(e)}}function s(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
143
+ `:case`\r
144
+ `:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}e.createScalarToken=t.createScalarToken,e.resolveAsScalar=t.resolveAsScalar,e.setScalarValue=t.setScalarValue,e.stringify=n.stringify,e.visit=r.visit,e.BOM=``,e.DOCUMENT=``,e.FLOW_END=``,e.SCALAR=``,e.isCollection=i,e.isScalar=a,e.prettyToken=o,e.tokenType=s})),tp=R((e=>{var t=ep();function n(e){switch(e){case void 0:case` `:case`
145
+ `:case`\r`:case` `:return!0;default:return!1}}let r=new Set(`0123456789ABCDEFabcdef`),i=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),a=new Set(`,[]{}`),o=new Set(` ,[]{}
146
+ \r `),s=e=>!e||o.has(e);e.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
147
+ `?!0:t===`\r`?this.buffer[e+1]===`
148
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
149
+ `||!t&&!this.atEnd)return e+n+1}return t===`
150
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&n(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
151
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===t.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}else n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield t.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&n(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!n(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&n(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(s),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,i=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let a=this.getLine();if(a===null)return this.setNext(`flow`);if((i!==-1&&i<this.indentNext&&a[0]!==`#`||i===0&&(a.startsWith(`---`)||a.startsWith(`...`))&&n(a[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(a[0]===`]`||a[0]===`}`)))return this.flowLevel=0,yield t.FLOW_END,yield*this.parseLineStart();let o=0;for(;a[o]===`,`;)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),a[o]){case void 0:return`flow`;case`#`:return yield*this.pushCount(a.length-o),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(s),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||n(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
152
+ `,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
153
+ `,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>n(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,n=0,r;loop:for(let t=this.pos;r=this.buffer[t];++t)switch(r){case` `:n+=1;break;case`
154
+ `:e=t,n=0;break;case`\r`:{let e=this.buffer[t+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
155
+ `)break}default:break loop}if(!r&&!this.atEnd)return this.setNext(`block-scalar`);if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
156
+ `,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let i=e+1;for(r=this.buffer[i];r===` `;)r=this.buffer[++i];if(r===` `){for(;r===` `||r===` `||r===`\r`||r===`
157
+ `;)r=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let t=e-1,r=this.buffer[t];r===`\r`&&(r=this.buffer[--t]);let i=t;for(;r===` `;)r=this.buffer[--t];if(r===`
158
+ `&&t>=this.pos&&t+1+n>i)e=t;else break}while(!0);return yield t.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,i=this.pos-1,o;for(;o=this.buffer[++i];)if(o===`:`){let t=this.buffer[i+1];if(n(t)||e&&a.has(t))break;r=i}else if(n(o)){let t=this.buffer[i+1];if(o===`\r`&&(t===`
159
+ `?(i+=1,o=`
160
+ `,t=this.buffer[i+1]):r=i),t===`#`||e&&a.has(t))break;if(o===`
161
+ `){let e=this.continueScalar(i+1);if(e===-1)break;i=Math.max(i,e-2)}}else{if(e&&a.has(o))break;r=i}return!o&&!this.atEnd?this.setNext(`plain-scalar`):(yield t.SCALAR,yield*this.pushToIndex(r+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){switch(this.charAt(0)){case`!`:return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`&`:return(yield*this.pushUntil(s))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`-`:case`?`:case`:`:{let e=this.flowLevel>0,t=this.charAt(1);if(n(t)||e&&a.has(t))return e?this.flowKey&&=!1:this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!n(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(i.has(t))t=this.buffer[++e];else if(t===`%`&&r.has(this.buffer[e+1])&&r.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
162
+ `?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
163
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}})),np=R((e=>{e.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}})),rp=R((e=>{var t=ke(`process`),n=ep(),r=tp();function i(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function a(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function o(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function s(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function c(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function l(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!i(t.start,`explicit-key-ind`)&&!i(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,o(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}e.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new r.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,t.env.LOG_TOKENS&&console.log(`|`,n.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=n.tokenType(e);if(!r){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(r===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=r,yield*this.step(),r){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&l(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&a(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:a(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=c(s(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
164
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
165
+ `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,a=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(a=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(i(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=c(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(i(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(o(t.key)&&!i(t.sep,`newline`)){let e=c(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:a,key:null,sep:[this.sourceToken]}):i(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:a,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!i(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:a});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||i(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=c(s(t));l(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
166
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
167
+ `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=c(s(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=c(s(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}}})),ip=R((e=>{var t=Xf(),n=Nf(),r=Pf(),i=rf(),a=Vd(),o=np(),s=rp();function c(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new o.LineCounter||null,prettyErrors:t}}function l(e,n={}){let{lineCounter:i,prettyErrors:a}=c(n),o=new s.Parser(i?.addNewLine),l=new t.Composer(n),u=Array.from(l.compose(o.parse(e)));if(a&&i)for(let t of u)t.errors.forEach(r.prettifyError(e,i)),t.warnings.forEach(r.prettifyError(e,i));return u.length>0?u:Object.assign([],{empty:!0},l.streamInfo())}function u(e,n={}){let{lineCounter:i,prettyErrors:a}=c(n),o=new s.Parser(i?.addNewLine),l=new t.Composer(n),u=null;for(let t of l.compose(o.parse(e),!0,e.length))if(!u)u=t;else if(u.options.logLevel!==`silent`){u.errors.push(new r.YAMLParseError(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return a&&i&&(u.errors.forEach(r.prettifyError(e,i)),u.warnings.forEach(r.prettifyError(e,i))),u}function d(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let a=u(e,n);if(!a)return null;if(a.warnings.forEach(e=>i.warn(a.options.logLevel,e)),a.errors.length>0){if(a.options.logLevel!==`silent`)throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:r},n))}function f(e,t,r){let i=null;if(typeof t==`function`||Array.isArray(t)?i=t:r===void 0&&t&&(r=t),typeof r==`string`&&(r=r.length),typeof r==`number`){let e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=r??t??{};if(!e)return}return a.isDocument(e)&&!i?e.toString(r):new n.Document(e,i,r).toString(r)}e.parse=d,e.parseAllDocuments=l,e.parseDocument=u,e.stringify=f})),ap=R((e=>{var t=Xf(),n=Nf(),r=jf(),i=Pf(),a=Jd(),o=Vd(),s=sf(),c=Yd(),l=lf(),u=df();ep();var d=tp(),f=np(),p=rp(),m=ip(),h=Hd();e.Composer=t.Composer,e.Document=n.Document,e.Schema=r.Schema,e.YAMLError=i.YAMLError,e.YAMLParseError=i.YAMLParseError,e.YAMLWarning=i.YAMLWarning,e.Alias=a.Alias,e.isAlias=o.isAlias,e.isCollection=o.isCollection,e.isDocument=o.isDocument,e.isMap=o.isMap,e.isNode=o.isNode,e.isPair=o.isPair,e.isScalar=o.isScalar,e.isSeq=o.isSeq,e.Pair=s.Pair,e.Scalar=c.Scalar,e.YAMLMap=l.YAMLMap,e.YAMLSeq=u.YAMLSeq,e.Lexer=d.Lexer,e.LineCounter=f.LineCounter,e.Parser=p.Parser,e.parse=m.parse,e.parseAllDocuments=m.parseAllDocuments,e.parseDocument=m.parseDocument,e.stringify=m.stringify,e.visit=h.visit,e.visitAsync=h.visitAsync})),op=Oe(ap(),1);let sp=null;try{let e=(0,m.createRequire)(e(`url`).pathToFileURL(__filename).href),{platform:t,arch:n}=d.default,r={"win32-x64":[`napi-md-compiler.win32-x64-msvc`,`win32-x64-msvc`],"linux-x64":[`napi-md-compiler.linux-x64-gnu`,`linux-x64-gnu`],"linux-arm64":[`napi-md-compiler.linux-arm64-gnu`,`linux-arm64-gnu`],"darwin-arm64":[`napi-md-compiler.darwin-arm64`,`darwin-arm64`],"darwin-x64":[`napi-md-compiler.darwin-x64`,`darwin-x64`]}[`${t}-${n}`];if(r!=null){let[t,n]=r;try{sp=e(`../${t}.node`)}catch{try{sp=e(`@truenine/memory-sync-cli-${n}`).mdCompiler}catch{}}}}catch{}function cp(e){return e?.blankLineAfter??!0}function lp(e,t){if(sp!=null&&t==null)return sp.buildFrontMatter(JSON.stringify(e));let n=Object.fromEntries(Object.entries(e).filter(([e,t])=>t!=null));return Object.keys(n).length===0?`---
168
+ ---`:`---\n${op.stringify(n,{singleQuote:t?.singleQuote??!1,lineWidth:t?.lineWidth??0}).trimEnd()}\n---`}function up(e,t,n){return e==null||Object.keys(e).length===0?t:`${lp(e,n)}${cp(n)?`
78
169
 
79
170
  `:`
80
- `}${t}`}function mf(e){let t=new _.Scalar(e);return t.type=_.Scalar.QUOTE_DOUBLE,t}function hf(e){let t=sf(e),n,r,i=[];for(let e of t.children)if(e.type===`yaml`){r=e.value;try{n=_.parse(e.value??``)}catch{}}else i.push(e);let a=e;return r!=null&&(a=e.replace(/^---\r?\n[\s\S]*?\r?\n---(?:(?:\r?\n){1,2}|$)/,``)),{...n!=null&&{yamlFrontMatter:n},...r!=null&&{rawFrontMatter:r},markdownAst:t,markdownContents:i,contentWithoutFrontMatter:a}}function gf(e){return cf==null?e.replaceAll(/(!?\[)([^\]]*)(\]\()([^)]+)(\))/g,(e,t,n,r,i,a)=>{let o=n.replaceAll(/\.mdx$/g,`.md`).replaceAll(/\.mdx(?=#|\?|$)/g,`.md`);return/^(?:https?:)?\/\//.test(i)?`${t}${o}${r}${i}${a}`:`${t}${o}${r}${i.replace(/\.mdx$/,`.md`).replace(/\.mdx#/,`.md#`).replace(/\.mdx\?/,`.md?`)}${a}`}):cf.transformMdxReferencesToMd(e)}var _f=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.splitWhen=e.flatten=void 0;function t(e){return e.reduce((e,t)=>[].concat(e,t),[])}e.flatten=t;function n(e,t){let n=[[]],r=0;for(let i of e)t(i)?(r++,n[r]=[]):n[r].push(i);return n}e.splitWhen=n})),vf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isEnoentCodeError=void 0;function t(e){return e.code===`ENOENT`}e.isEnoentCodeError=t})),yf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createDirentFromStats=void 0;var t=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function n(e,n){return new t(e,n)}e.createDirentFromStats=n})),bf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;let t=require(`os`),n=require(`path`),r=t.platform()===`win32`,i=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,a=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,o=/^\\\\([.?])/,s=/\\(?![!()+@[\]{}])/g;function c(e){return e.replace(/\\/g,`/`)}e.unixify=c;function l(e,t){return n.resolve(e,t)}e.makeAbsolute=l;function u(e){if(e.charAt(0)===`.`){let t=e.charAt(1);if(t===`/`||t===`\\`)return e.slice(2)}return e}e.removeLeadingDotSegment=u,e.escape=r?d:f;function d(e){return e.replace(a,`\\$2`)}e.escapeWindowsPath=d;function f(e){return e.replace(i,`\\$2`)}e.escapePosixPath=f,e.convertPathToPattern=r?p:m;function p(e){return d(e).replace(o,`//$1`).replace(s,`/`)}e.convertWindowsPathToPattern=p;function m(e){return f(e)}e.convertPosixPathToPattern=m})),xf=o(((e,t)=>{
171
+ `}${t}`}function dp(e){let t=e.trim();return t.length===0?`---
172
+ ---`:`---\n${t}\n---`}function fp(e,t,n){return`${dp(e)}${cp(n)?`
173
+
174
+ `:`
175
+ `}${t}`}function pp(e){let t=new op.Scalar(e);return t.type=op.Scalar.QUOTE_DOUBLE,t}function mp(e){let t=Bd(e),n,r,i=[];for(let e of t.children)if(e.type===`yaml`){r=e.value;try{n=op.parse(e.value??``)}catch{}}else i.push(e);let a=e;return r!=null&&(a=e.replace(/^---\r?\n[\s\S]*?\r?\n---(?:(?:\r?\n){1,2}|$)/,``)),{...n!=null&&{yamlFrontMatter:n},...r!=null&&{rawFrontMatter:r},markdownAst:t,markdownContents:i,contentWithoutFrontMatter:a}}function hp(e){return sp==null?e.replaceAll(/(!?\[)([^\]]*)(\]\()([^)]+)(\))/g,(e,t,n,r,i,a)=>{let o=n.replaceAll(/\.mdx$/g,`.md`).replaceAll(/\.mdx(?=#|\?|$)/g,`.md`);return/^(?:https?:)?\/\//.test(i)?`${t}${o}${r}${i}${a}`:`${t}${o}${r}${i.replace(/\.mdx$/,`.md`).replace(/\.mdx#/,`.md#`).replace(/\.mdx\?/,`.md?`)}${a}`}):sp.transformMdxReferencesToMd(e)}var gp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.splitWhen=e.flatten=void 0;function t(e){return e.reduce((e,t)=>[].concat(e,t),[])}e.flatten=t;function n(e,t){let n=[[]],r=0;for(let i of e)t(i)?(r++,n[r]=[]):n[r].push(i);return n}e.splitWhen=n})),_p=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isEnoentCodeError=void 0;function t(e){return e.code===`ENOENT`}e.isEnoentCodeError=t})),vp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createDirentFromStats=void 0;var t=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function n(e,n){return new t(e,n)}e.createDirentFromStats=n})),yp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;let t=require(`os`),n=require(`path`),r=t.platform()===`win32`,i=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,a=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,o=/^\\\\([.?])/,s=/\\(?![!()+@[\]{}])/g;function c(e){return e.replace(/\\/g,`/`)}e.unixify=c;function l(e,t){return n.resolve(e,t)}e.makeAbsolute=l;function u(e){if(e.charAt(0)===`.`){let t=e.charAt(1);if(t===`/`||t===`\\`)return e.slice(2)}return e}e.removeLeadingDotSegment=u,e.escape=r?d:f;function d(e){return e.replace(a,`\\$2`)}e.escapeWindowsPath=d;function f(e){return e.replace(i,`\\$2`)}e.escapePosixPath=f,e.convertPathToPattern=r?p:m;function p(e){return d(e).replace(o,`//$1`).replace(s,`/`)}e.convertWindowsPathToPattern=p;function m(e){return f(e)}e.convertPosixPathToPattern=m})),bp=o(((e,t)=>{
81
176
  /*!
82
177
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
83
178
  *
84
179
  * Copyright (c) 2014-2016, Jon Schlinkert.
85
180
  * Licensed under the MIT License.
86
181
  */
87
- t.exports=function(e){if(typeof e!=`string`||e===``)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}})),Sf=o(((e,t)=>{
182
+ t.exports=function(e){if(typeof e!=`string`||e===``)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}})),xp=o(((e,t)=>{
88
183
  /*!
89
184
  * is-glob <https://github.com/jonschlinkert/is-glob>
90
185
  *
91
186
  * Copyright (c) 2014-2017, Jon Schlinkert.
92
187
  * Released under the MIT License.
93
188
  */
94
- var n=xf(),r={"{":`}`,"(":`)`,"[":`]`},i=function(e){if(e[0]===`!`)return!0;for(var t=0,n=-2,i=-2,a=-2,o=-2,s=-2;t<e.length;){if(e[t]===`*`||e[t+1]===`?`&&/[\].+)]/.test(e[t])||i!==-1&&e[t]===`[`&&e[t+1]!==`]`&&(i<t&&(i=e.indexOf(`]`,t)),i>t&&(s===-1||s>i||(s=e.indexOf(`\\`,t),s===-1||s>i)))||a!==-1&&e[t]===`{`&&e[t+1]!==`}`&&(a=e.indexOf(`}`,t),a>t&&(s=e.indexOf(`\\`,t),s===-1||s>a))||o!==-1&&e[t]===`(`&&e[t+1]===`?`&&/[:!=]/.test(e[t+2])&&e[t+3]!==`)`&&(o=e.indexOf(`)`,t),o>t&&(s=e.indexOf(`\\`,t),s===-1||s>o))||n!==-1&&e[t]===`(`&&e[t+1]!==`|`&&(n<t&&(n=e.indexOf(`|`,t)),n!==-1&&e[n+1]!==`)`&&(o=e.indexOf(`)`,n),o>n&&(s=e.indexOf(`\\`,n),s===-1||s>o))))return!0;if(e[t]===`\\`){var c=e[t+1];t+=2;var l=r[c];if(l){var u=e.indexOf(l,t);u!==-1&&(t=u+1)}if(e[t]===`!`)return!0}else t++}return!1},a=function(e){if(e[0]===`!`)return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]===`\\`){var n=e[t+1];t+=2;var i=r[n];if(i){var a=e.indexOf(i,t);a!==-1&&(t=a+1)}if(e[t]===`!`)return!0}else t++}return!1};t.exports=function(e,t){if(typeof e!=`string`||e===``)return!1;if(n(e))return!0;var r=i;return t&&t.strict===!1&&(r=a),r(e)}})),Cf=o(((e,t)=>{var n=Sf(),r=require(`path`).posix.dirname,i=require(`os`).platform()===`win32`,a=`/`,o=/\\/g,s=/[\{\[].*[\}\]]$/,c=/(^|[^\\])([\{\[]|\([^\)]+$)/,l=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function(e,t){Object.assign({flipBackslashes:!0},t).flipBackslashes&&i&&e.indexOf(a)<0&&(e=e.replace(o,a)),s.test(e)&&(e+=a),e+=`a`;do e=r(e);while(n(e)||c.test(e));return e.replace(l,`$1`)}})),wf=o((e=>{e.isInteger=e=>typeof e==`number`?Number.isInteger(e):typeof e==`string`&&e.trim()!==``?Number.isInteger(Number(e)):!1,e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,i)=>i===!1||!e.isInteger(t)||!e.isInteger(n)?!1:(Number(n)-Number(t))/Number(r)>=i,e.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||r.type===`open`||r.type===`close`)&&r.escaped!==!0&&(r.value=`\\`+r.value,r.escaped=!0)},e.encloseBrace=e=>e.type===`brace`?e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0):!1,e.isInvalidBrace=e=>e.type===`brace`?e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1:!1,e.isOpenOrClose=e=>e.type===`open`||e.type===`close`?!0:e.open===!0||e.close===!0,e.reduce=e=>e.reduce((e,t)=>(t.type===`text`&&e.push(t.value),t.type===`range`&&(t.type=`text`),e),[]),e.flatten=(...e)=>{let t=[],n=e=>{for(let r=0;r<e.length;r++){let i=e[r];if(Array.isArray(i)){n(i);continue}i!==void 0&&t.push(i)}return t};return n(e),t}})),Tf=o(((e,t)=>{let n=wf();t.exports=(e,t={})=>{let r=(e,i={})=>{let a=t.escapeInvalid&&n.isInvalidBrace(i),o=e.invalid===!0&&t.escapeInvalid===!0,s=``;if(e.value)return(a||o)&&n.isOpenOrClose(e)?`\\`+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)s+=r(t);return s};return r(e)}})),Ef=o(((e,t)=>{t.exports=function(e){return typeof e==`number`?e-e===0:typeof e==`string`&&e.trim()!==``?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}})),Df=o(((e,t)=>{let n=Ef(),r=(e,t,a)=>{if(n(e)===!1)throw TypeError(`toRegexRange: expected the first argument to be a number`);if(t===void 0||e===t)return String(e);if(n(t)===!1)throw TypeError(`toRegexRange: expected the second argument to be a number.`);let o={relaxZeros:!0,...a};typeof o.strictZeros==`boolean`&&(o.relaxZeros=o.strictZeros===!1);let c=String(o.relaxZeros),l=String(o.shorthand),u=String(o.capture),d=String(o.wrap),f=e+`:`+t+`=`+c+l+u+d;if(r.cache.hasOwnProperty(f))return r.cache[f].result;let p=Math.min(e,t),m=Math.max(e,t);if(Math.abs(p-m)===1){let n=e+`|`+t;return o.capture?`(${n})`:o.wrap===!1?n:`(?:${n})`}let h=g(e)||g(t),_={min:e,max:t,a:p,b:m},v=[],y=[];return h&&(_.isPadded=h,_.maxLen=String(_.max).length),p<0&&(y=s(m<0?Math.abs(m):1,Math.abs(p),_,o),p=_.a=0),m>=0&&(v=s(p,m,_,o)),_.negatives=y,_.positives=v,_.result=i(y,v,o),o.capture===!0?_.result=`(${_.result})`:o.wrap!==!1&&v.length+y.length>1&&(_.result=`(?:${_.result})`),r.cache[f]=_,_.result};function i(e,t,n){let r=c(e,t,`-`,!1,n)||[],i=c(t,e,``,!1,n)||[],a=c(e,t,`-?`,!0,n)||[];return r.concat(a).concat(i).join(`|`)}function a(e,t){let n=1,r=1,i=f(e,n),a=new Set([t]);for(;e<=i&&i<=t;)a.add(i),n+=1,i=f(e,n);for(i=p(t+1,r)-1;e<i&&i<=t;)a.add(i),r+=1,i=p(t+1,r)-1;return a=[...a],a.sort(u),a}function o(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=l(e,t),i=r.length,a=``,o=0;for(let e=0;e<i;e++){let[t,i]=r[e];t===i?a+=t:t!==`0`||i!==`9`?a+=h(t,i,n):o++}return o&&(a+=n.shorthand===!0?`\\d`:`[0-9]`),{pattern:a,count:[o],digits:i}}function s(e,t,n,r){let i=a(e,t),s=[],c=e,l;for(let e=0;e<i.length;e++){let t=i[e],a=o(String(c),String(t),r),u=``;if(!n.isPadded&&l&&l.pattern===a.pattern){l.count.length>1&&l.count.pop(),l.count.push(a.count[0]),l.string=l.pattern+m(l.count),c=t+1;continue}n.isPadded&&(u=_(t,n,r)),a.string=u+a.pattern+m(a.count),s.push(a),c=t+1,l=a}return s}function c(e,t,n,r,i){let a=[];for(let i of e){let{string:e}=i;!r&&!d(t,`string`,e)&&a.push(n+e),r&&d(t,`string`,e)&&a.push(n+e)}return a}function l(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}function u(e,t){return e>t?1:t>e?-1:0}function d(e,t,n){return e.some(e=>e[t]===n)}function f(e,t){return Number(String(e).slice(0,-t)+`9`.repeat(t))}function p(e,t){return e-e%10**t}function m(e){let[t=0,n=``]=e;return n||t>1?`{${t+(n?`,`+n:``)}}`:``}function h(e,t,n){return`[${e}${t-e===1?``:`-`}${t}]`}function g(e){return/^-?(0+)\d/.test(e)}function _(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),i=n.relaxZeros!==!1;switch(r){case 0:return``;case 1:return i?`0?`:`0`;case 2:return i?`0{0,2}`:`00`;default:return i?`0{0,${r}}`:`0{${r}}`}}r.cache={},r.clearCache=()=>r.cache={},t.exports=r})),Of=o(((e,t)=>{let n=require(`util`),r=Df(),i=e=>typeof e==`object`&&!!e&&!Array.isArray(e),a=e=>t=>e===!0?Number(t):String(t),o=e=>typeof e==`number`||typeof e==`string`&&e!==``,s=e=>Number.isInteger(+e),c=e=>{let t=`${e}`,n=-1;if(t[0]===`-`&&(t=t.slice(1)),t===`0`)return!1;for(;t[++n]===`0`;);return n>0},l=(e,t,n)=>typeof e==`string`||typeof t==`string`?!0:n.stringify===!0,u=(e,t,n)=>{if(t>0){let n=e[0]===`-`?`-`:``;n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,`0`)}return n===!1?String(e):e},d=(e,t)=>{let n=e[0]===`-`?`-`:``;for(n&&(e=e.slice(1),t--);e.length<t;)e=`0`+e;return n?`-`+e:e},f=(e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r=t.capture?``:`?:`,i=``,a=``,o;return e.positives.length&&(i=e.positives.map(e=>d(String(e),n)).join(`|`)),e.negatives.length&&(a=`-(${r}${e.negatives.map(e=>d(String(e),n)).join(`|`)})`),o=i&&a?`${i}|${a}`:i||a,t.wrap?`(${r}${o})`:o},p=(e,t,n,i)=>{if(n)return r(e,t,{wrap:!1,...i});let a=String.fromCharCode(e);return e===t?a:`[${a}-${String.fromCharCode(t)}]`},m=(e,t,n)=>{if(Array.isArray(e)){let t=n.wrap===!0,r=n.capture?``:`?:`;return t?`(${r}${e.join(`|`)})`:e.join(`|`)}return r(e,t,n)},h=(...e)=>RangeError(`Invalid range arguments: `+n.inspect(...e)),g=(e,t,n)=>{if(n.strictRanges===!0)throw h([e,t]);return[]},_=(e,t)=>{if(t.strictRanges===!0)throw TypeError(`Expected step "${e}" to be a number`);return[]},v=(e,t,n=1,r={})=>{let i=Number(e),o=Number(t);if(!Number.isInteger(i)||!Number.isInteger(o)){if(r.strictRanges===!0)throw h([e,t]);return[]}i===0&&(i=0),o===0&&(o=0);let s=i>o,g=String(e),_=String(t),v=String(n);n=Math.max(Math.abs(n),1);let y=c(g)||c(_)||c(v),b=y?Math.max(g.length,_.length,v.length):0,x=y===!1&&l(e,t,r)===!1,S=r.transform||a(x);if(r.toRegex&&n===1)return p(d(e,b),d(t,b),!0,r);let C={negatives:[],positives:[]},w=e=>C[e<0?`negatives`:`positives`].push(Math.abs(e)),T=[],E=0;for(;s?i>=o:i<=o;)r.toRegex===!0&&n>1?w(i):T.push(u(S(i,E),b,x)),i=s?i-n:i+n,E++;return r.toRegex===!0?n>1?f(C,r,b):m(T,null,{wrap:!1,...r}):T},y=(e,t,n=1,r={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return g(e,t,r);let i=r.transform||(e=>String.fromCharCode(e)),a=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),c=a>o,l=Math.min(a,o),u=Math.max(a,o);if(r.toRegex&&n===1)return p(l,u,!1,r);let d=[],f=0;for(;c?a>=o:a<=o;)d.push(i(a,f)),a=c?a-n:a+n,f++;return r.toRegex===!0?m(d,null,{wrap:!1,options:r}):d},b=(e,t,n,r={})=>{if(t==null&&o(e))return[e];if(!o(e)||!o(t))return g(e,t,r);if(typeof n==`function`)return b(e,t,1,{transform:n});if(i(n))return b(e,t,0,n);let a={...r};return a.capture===!0&&(a.wrap=!0),n=n||a.step||1,s(n)?s(e)&&s(t)?v(e,t,n,a):y(e,t,Math.max(Math.abs(n),1),a):n!=null&&!i(n)?_(n,a):b(e,t,1,n)};t.exports=b})),kf=o(((e,t)=>{let n=Of(),r=wf();t.exports=(e,t={})=>{let i=(e,a={})=>{let o=r.isInvalidBrace(a),s=e.invalid===!0&&t.escapeInvalid===!0,c=o===!0||s===!0,l=t.escapeInvalid===!0?`\\`:``,u=``;if(e.isOpen===!0)return l+e.value;if(e.isClose===!0)return console.log(`node.isClose`,l,e.value),l+e.value;if(e.type===`open`)return c?l+e.value:`(`;if(e.type===`close`)return c?l+e.value:`)`;if(e.type===`comma`)return e.prev.type===`comma`?``:c?e.value:`|`;if(e.value)return e.value;if(e.nodes&&e.ranges>0){let i=r.reduce(e.nodes),a=n(...i,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(a.length!==0)return i.length>1&&a.length>1?`(${a})`:a}if(e.nodes)for(let t of e.nodes)u+=i(t,e);return u};return i(e)}})),Af=o(((e,t)=>{let n=Of(),r=Tf(),i=wf(),a=(e=``,t=``,n=!1)=>{let r=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return n?i.flatten(t).map(e=>`{${e}}`):t;for(let i of e)if(Array.isArray(i))for(let e of i)r.push(a(e,t,n));else for(let e of t)n===!0&&typeof e==`string`&&(e=`{${e}}`),r.push(Array.isArray(e)?a(i,e,n):i+e);return i.flatten(r)};t.exports=(e,t={})=>{let o=t.rangeLimit===void 0?1e3:t.rangeLimit,s=(e,c={})=>{e.queue=[];let l=c,u=c.queue;for(;l.type!==`brace`&&l.type!==`root`&&l.parent;)l=l.parent,u=l.queue;if(e.invalid||e.dollar){u.push(a(u.pop(),r(e,t)));return}if(e.type===`brace`&&e.invalid!==!0&&e.nodes.length===2){u.push(a(u.pop(),[`{}`]));return}if(e.nodes&&e.ranges>0){let s=i.reduce(e.nodes);if(i.exceedsLimit(...s,t.step,o))throw RangeError(`expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.`);let c=n(...s,t);c.length===0&&(c=r(e,t)),u.push(a(u.pop(),c)),e.nodes=[];return}let d=i.encloseBrace(e),f=e.queue,p=e;for(;p.type!==`brace`&&p.type!==`root`&&p.parent;)p=p.parent,f=p.queue;for(let t=0;t<e.nodes.length;t++){let n=e.nodes[t];if(n.type===`comma`&&e.type===`brace`){t===1&&f.push(``),f.push(``);continue}if(n.type===`close`){u.push(a(u.pop(),f,d));continue}if(n.value&&n.type!==`open`){f.push(a(f.pop(),n.value));continue}n.nodes&&s(n,e)}return f};return i.flatten(s(e))}})),jf=o(((e,t)=>{t.exports={MAX_LENGTH:1e4,CHAR_0:`0`,CHAR_9:`9`,CHAR_UPPERCASE_A:`A`,CHAR_LOWERCASE_A:`a`,CHAR_UPPERCASE_Z:`Z`,CHAR_LOWERCASE_Z:`z`,CHAR_LEFT_PARENTHESES:`(`,CHAR_RIGHT_PARENTHESES:`)`,CHAR_ASTERISK:`*`,CHAR_AMPERSAND:`&`,CHAR_AT:`@`,CHAR_BACKSLASH:`\\`,CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:`\r`,CHAR_CIRCUMFLEX_ACCENT:`^`,CHAR_COLON:`:`,CHAR_COMMA:`,`,CHAR_DOLLAR:`$`,CHAR_DOT:`.`,CHAR_DOUBLE_QUOTE:`"`,CHAR_EQUAL:`=`,CHAR_EXCLAMATION_MARK:`!`,CHAR_FORM_FEED:`\f`,CHAR_FORWARD_SLASH:`/`,CHAR_HASH:`#`,CHAR_HYPHEN_MINUS:`-`,CHAR_LEFT_ANGLE_BRACKET:`<`,CHAR_LEFT_CURLY_BRACE:`{`,CHAR_LEFT_SQUARE_BRACKET:`[`,CHAR_LINE_FEED:`
95
- `,CHAR_NO_BREAK_SPACE:`\xA0`,CHAR_PERCENT:`%`,CHAR_PLUS:`+`,CHAR_QUESTION_MARK:`?`,CHAR_RIGHT_ANGLE_BRACKET:`>`,CHAR_RIGHT_CURLY_BRACE:`}`,CHAR_RIGHT_SQUARE_BRACKET:`]`,CHAR_SEMICOLON:`;`,CHAR_SINGLE_QUOTE:`'`,CHAR_SPACE:` `,CHAR_TAB:` `,CHAR_UNDERSCORE:`_`,CHAR_VERTICAL_LINE:`|`,CHAR_ZERO_WIDTH_NOBREAK_SPACE:``}})),Mf=o(((e,t)=>{let n=Tf(),{MAX_LENGTH:r,CHAR_BACKSLASH:i,CHAR_BACKTICK:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:h,CHAR_NO_BREAK_SPACE:g,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_}=jf();t.exports=(e,t={})=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);let v=t||{},y=typeof v.maxLength==`number`?Math.min(r,v.maxLength):r;if(e.length>y)throw SyntaxError(`Input length (${e.length}), exceeds max characters (${y})`);let b={type:`root`,input:e,nodes:[]},x=[b],S=b,C=b,w=0,T=e.length,E=0,ee=0,D,O=()=>e[E++],k=e=>{if(e.type===`text`&&C.type===`dot`&&(C.type=`text`),C&&C.type===`text`&&e.type===`text`){C.value+=e.value;return}return S.nodes.push(e),e.parent=S,e.prev=C,C=e,e};for(k({type:`bos`});E<T;)if(S=x[x.length-1],D=O(),!(D===_||D===g)){if(D===i){k({type:`text`,value:(t.keepEscaping?D:``)+O()});continue}if(D===p){k({type:`text`,value:`\\`+D});continue}if(D===f){w++;let e;for(;E<T&&(e=O());){if(D+=e,e===f){w++;continue}if(e===i){D+=O();continue}if(e===p&&(w--,w===0))break}k({type:`text`,value:D});continue}if(D===c){S=k({type:`paren`,nodes:[]}),x.push(S),k({type:`text`,value:D});continue}if(D===l){if(S.type!==`paren`){k({type:`text`,value:D});continue}S=x.pop(),k({type:`text`,value:D}),S=x[x.length-1];continue}if(D===m||D===h||D===a){let e=D,n;for(t.keepQuotes!==!0&&(D=``);E<T&&(n=O());){if(n===i){D+=n+O();continue}if(n===e){t.keepQuotes===!0&&(D+=n);break}D+=n}k({type:`text`,value:D});continue}if(D===u){ee++,S=k({type:`brace`,open:!0,close:!1,dollar:C.value&&C.value.slice(-1)===`$`||S.dollar===!0,depth:ee,commas:0,ranges:0,nodes:[]}),x.push(S),k({type:`open`,value:D});continue}if(D===d){if(S.type!==`brace`){k({type:`text`,value:D});continue}S=x.pop(),S.close=!0,k({type:`close`,value:D}),ee--,S=x[x.length-1];continue}if(D===o&&ee>0){if(S.ranges>0){S.ranges=0;let e=S.nodes.shift();S.nodes=[e,{type:`text`,value:n(S)}]}k({type:`comma`,value:D}),S.commas++;continue}if(D===s&&ee>0&&S.commas===0){let e=S.nodes;if(ee===0||e.length===0){k({type:`text`,value:D});continue}if(C.type===`dot`){if(S.range=[],C.value+=D,C.type=`range`,S.nodes.length!==3&&S.nodes.length!==5){S.invalid=!0,S.ranges=0,C.type=`text`;continue}S.ranges++,S.args=[];continue}if(C.type===`range`){e.pop();let t=e[e.length-1];t.value+=C.value+D,C=t,S.ranges--;continue}k({type:`dot`,value:D});continue}k({type:`text`,value:D})}do if(S=x.pop(),S.type!==`root`){S.nodes.forEach(e=>{e.nodes||(e.type===`open`&&(e.isOpen=!0),e.type===`close`&&(e.isClose=!0),e.nodes||(e.type=`text`),e.invalid=!0)});let e=x[x.length-1],t=e.nodes.indexOf(S);e.nodes.splice(t,1,...S.nodes)}while(x.length>0);return k({type:`eos`}),b}})),Nf=o(((e,t)=>{let n=Tf(),r=kf(),i=Af(),a=Mf(),o=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let e=o.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(o.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(n=[...new Set(n)]),n};o.parse=(e,t={})=>a(e,t),o.stringify=(e,t={})=>n(typeof e==`string`?o.parse(e,t):e,t),o.compile=(e,t={})=>(typeof e==`string`&&(e=o.parse(e,t)),r(e,t)),o.expand=(e,t={})=>{typeof e==`string`&&(e=o.parse(e,t));let n=i(e,t);return t.noempty===!0&&(n=n.filter(Boolean)),t.nodupes===!0&&(n=[...new Set(n)]),n},o.create=(e,t={})=>e===``||e.length<3?[e]:t.expand===!0?o.expand(e,t):o.compile(e,t),t.exports=o})),Pf=o(((e,t)=>{let n=require(`util`),r=Nf(),i=require(`picomatch`),a=require(`picomatch/lib/utils`),o=e=>e===``||e===`./`,s=e=>{let t=e.indexOf(`{`);return t>-1&&e.indexOf(`}`,t)>-1},c=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let r=new Set,a=new Set,o=new Set,s=0,c=e=>{o.add(e.output),n&&n.onResult&&n.onResult(e)};for(let o=0;o<t.length;o++){let l=i(String(t[o]),{...n,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&s++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?r.add(e.output):(r.delete(e.output),a.add(e.output)))}}let l=(s===t.length?[...o]:[...a]).filter(e=>!r.has(e));if(n&&l.length===0){if(n.failglob===!0)throw Error(`No matches found for "${t.join(`, `)}"`);if(n.nonull===!0||n.nullglob===!0)return n.unescape?t.map(e=>e.replace(/\\/g,``)):t}return l};c.match=c,c.matcher=(e,t)=>i(e,t),c.isMatch=(e,t,n)=>i(t,n)(e),c.any=c.isMatch,c.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,i=[],a=e=>{n.onResult&&n.onResult(e),i.push(e.output)},o=new Set(c(e,t,{...n,onResult:a}));for(let e of i)o.has(e)||r.add(e);return[...r]},c.contains=(e,t,r)=>{if(typeof e!=`string`)throw TypeError(`Expected a string: "${n.inspect(e)}"`);if(Array.isArray(t))return t.some(t=>c.contains(e,t,r));if(typeof t==`string`){if(o(e)||o(t))return!1;if(e.includes(t)||e.startsWith(`./`)&&e.slice(2).includes(t))return!0}return c.isMatch(e,t,{...r,contains:!0})},c.matchKeys=(e,t,n)=>{if(!a.isObject(e))throw TypeError(`Expected the first argument to be an object`);let r=c(Object.keys(e),t,n),i={};for(let t of r)i[t]=e[t];return i},c.some=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),n);if(r.some(e=>t(e)))return!0}return!1},c.every=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),n);if(!r.every(e=>t(e)))return!1}return!0},c.all=(e,t,r)=>{if(typeof e!=`string`)throw TypeError(`Expected a string: "${n.inspect(e)}"`);return[].concat(t).every(t=>i(t,r)(e))},c.capture=(e,t,n)=>{let r=a.isWindows(n),o=i.makeRe(String(e),{...n,capture:!0}).exec(r?a.toPosixSlashes(t):t);if(o)return o.slice(1).map(e=>e===void 0?``:e)},c.makeRe=(...e)=>i.makeRe(...e),c.scan=(...e)=>i.scan(...e),c.parse=(e,t)=>{let n=[];for(let a of[].concat(e||[]))for(let e of r(String(a),t))n.push(i.parse(e,t));return n},c.braces=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return t&&t.nobrace===!0||!s(e)?[e]:r(e,t)},c.braceExpand=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return c.braces(e,{...t,expand:!0})},c.hasBraces=s,t.exports=c})),Ff=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isAbsolute=e.partitionAbsoluteAndRelative=e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;let t=require(`path`),n=Cf(),r=Pf(),i=/[*?]|^!/,a=/\[[^[]*]/,o=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,s=/[!*+?@]\([^(]*\)/,c=/,|\.\./,l=/(?!^)\/{2,}/g;function u(e,t={}){return!d(e,t)}e.isStaticPattern=u;function d(e,t={}){return e===``?!1:!!(t.caseSensitiveMatch===!1||e.includes(`\\`)||i.test(e)||a.test(e)||o.test(e)||t.extglob!==!1&&s.test(e)||t.braceExpansion!==!1&&f(e))}e.isDynamicPattern=d;function f(e){let t=e.indexOf(`{`);if(t===-1)return!1;let n=e.indexOf(`}`,t+1);if(n===-1)return!1;let r=e.slice(t,n);return c.test(r)}function p(e){return h(e)?e.slice(1):e}e.convertToPositivePattern=p;function m(e){return`!`+e}e.convertToNegativePattern=m;function h(e){return e.startsWith(`!`)&&e[1]!==`(`}e.isNegativePattern=h;function g(e){return!h(e)}e.isPositivePattern=g;function _(e){return e.filter(h)}e.getNegativePatterns=_;function v(e){return e.filter(g)}e.getPositivePatterns=v;function y(e){return e.filter(e=>!x(e))}e.getPatternsInsideCurrentDirectory=y;function b(e){return e.filter(x)}e.getPatternsOutsideCurrentDirectory=b;function x(e){return e.startsWith(`..`)||e.startsWith(`./..`)}e.isPatternRelatedToParentDirectory=x;function S(e){return n(e,{flipBackslashes:!1})}e.getBaseDirectory=S;function C(e){return e.includes(`**`)}e.hasGlobStar=C;function w(e){return e.endsWith(`/**`)}e.endsWithSlashGlobStar=w;function T(e){let n=t.basename(e);return w(e)||u(n)}e.isAffectDepthOfReadingPattern=T;function E(e){return e.reduce((e,t)=>e.concat(ee(t)),[])}e.expandPatternsWithBraceExpansion=E;function ee(e){let t=r.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>e!==``)}e.expandBraceExpansion=ee;function D(e,t){let{parts:n}=r.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return n.length===0&&(n=[e]),n[0].startsWith(`/`)&&(n[0]=n[0].slice(1),n.unshift(``)),n}e.getPatternParts=D;function O(e,t){return r.makeRe(e,t)}e.makeRe=O;function k(e,t){return e.map(e=>O(e,t))}e.convertPatternsToRe=k;function te(e,t){return t.some(t=>t.test(e))}e.matchAny=te;function A(e){return e.replace(l,`/`)}e.removeDuplicateSlashes=A;function j(e){let t=[],n=[];for(let r of e)ne(r)?t.push(r):n.push(r);return[t,n]}e.partitionAbsoluteAndRelative=j;function ne(e){return t.isAbsolute(e)}e.isAbsolute=ne})),If=o(((e,t)=>{let n=require(`stream`).PassThrough,r=Array.prototype.slice;t.exports=i;function i(){let e=[],t=r.call(arguments),i=!1,o=t[t.length-1];o&&!Array.isArray(o)&&o.pipe==null?t.pop():o={};let s=o.end!==!1,c=o.pipeError===!0;o.objectMode??=!0,o.highWaterMark??=64*1024;let l=n(o);function u(){for(let t=0,n=arguments.length;t<n;t++)e.push(a(arguments[t],o));return d(),this}function d(){if(i)return;i=!0;let t=e.shift();if(!t){process.nextTick(f);return}Array.isArray(t)||(t=[t]);let n=t.length+1;function r(){--n>0||(i=!1,d())}function a(e){function t(){e.removeListener(`merge2UnpipeEnd`,t),e.removeListener(`end`,t),c&&e.removeListener(`error`,n),r()}function n(e){l.emit(`error`,e)}if(e._readableState.endEmitted)return r();e.on(`merge2UnpipeEnd`,t),e.on(`end`,t),c&&e.on(`error`,n),e.pipe(l,{end:!1}),e.resume()}for(let e=0;e<t.length;e++)a(t[e]);r()}function f(){i=!1,l.emit(`queueDrain`),s&&l.end()}return l.setMaxListeners(0),l.add=u,l.on(`unpipe`,function(e){e.emit(`merge2UnpipeEnd`)}),t.length&&u.apply(null,t),l}function a(e,t){if(Array.isArray(e))for(let n=0,r=e.length;n<r;n++)e[n]=a(e[n],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(n(t))),!e._readableState||!e.pause||!e.pipe)throw Error(`Only readable stream can be merged.`);e.pause()}return e}})),Lf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.merge=void 0;let t=If();function n(e){let n=t(e);return e.forEach(e=>{e.once(`error`,e=>n.emit(`error`,e))}),n.once(`close`,()=>r(e)),n.once(`end`,()=>r(e)),n}e.merge=n;function r(e){e.forEach(e=>e.emit(`close`))}})),Rf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isEmpty=e.isString=void 0;function t(e){return typeof e==`string`}e.isString=t;function n(e){return e===``}e.isEmpty=n})),zf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0,e.array=_f(),e.errno=vf(),e.fs=yf(),e.path=bf(),e.pattern=Ff(),e.stream=Lf(),e.string=Rf()})),Bf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;let t=zf();function n(e,n){let s=r(e,n),c=r(n.ignore,n),l=a(s),u=o(s,c),d=l.filter(e=>t.pattern.isStaticPattern(e,n)),f=l.filter(e=>t.pattern.isDynamicPattern(e,n)),p=i(d,u,!1),m=i(f,u,!0);return p.concat(m)}e.generate=n;function r(e,n){let r=e;return n.braceExpansion&&(r=t.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes(`/`)?e:`**/${e}`)),r.map(e=>t.pattern.removeDuplicateSlashes(e))}function i(e,n,r){let i=[],a=t.pattern.getPatternsOutsideCurrentDirectory(e),o=t.pattern.getPatternsInsideCurrentDirectory(e),u=s(a),d=s(o);return i.push(...c(u,n,r)),`.`in d?i.push(l(`.`,o,n,r)):i.push(...c(d,n,r)),i}e.convertPatternsToTasks=i;function a(e){return t.pattern.getPositivePatterns(e)}e.getPositivePatterns=a;function o(e,n){return t.pattern.getNegativePatterns(e).concat(n).map(t.pattern.convertToPositivePattern)}e.getNegativePatternsAsPositive=o;function s(e){return e.reduce((e,n)=>{let r=t.pattern.getBaseDirectory(n);return r in e?e[r].push(n):e[r]=[n],e},{})}e.groupPatternsByBaseDirectory=s;function c(e,t,n){return Object.keys(e).map(r=>l(r,e[r],t,n))}e.convertPatternGroupsToTasks=c;function l(e,n,r,i){return{dynamic:i,positive:n,negative:r,base:e,patterns:[].concat(n,r.map(t.pattern.convertToNegativePattern))}}e.convertPatternGroupToTask=l})),Vf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.read=void 0;function t(e,t,i){t.fs.lstat(e,(a,o)=>{if(a!==null){n(i,a);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){r(i,o);return}t.fs.stat(e,(e,a)=>{if(e!==null){if(t.throwErrorOnBrokenSymbolicLink){n(i,e);return}r(i,o);return}t.markSymbolicLink&&(a.isSymbolicLink=()=>!0),r(i,a)})})}e.read=t;function n(e,t){e(t)}function r(e,t){e(null,t)}})),Hf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.read=void 0;function t(e,t){let n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{let n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}e.read=t})),Uf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;let t=require(`fs`);e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync};function n(t){return t===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=n})),Wf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Uf();e.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return e??t}}})),Gf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.statSync=e.stat=e.Settings=void 0;let t=Vf(),n=Hf(),r=Wf();e.Settings=r.default;function i(e,n,r){if(typeof n==`function`){t.read(e,o(),n);return}t.read(e,o(n),r)}e.stat=i;function a(e,t){let r=o(t);return n.read(e,r)}e.statSync=a;function o(e={}){return e instanceof r.default?e:new r.default(e)}})),Kf=o(((e,t)=>{
189
+ var n=bp(),r={"{":`}`,"(":`)`,"[":`]`},i=function(e){if(e[0]===`!`)return!0;for(var t=0,n=-2,i=-2,a=-2,o=-2,s=-2;t<e.length;){if(e[t]===`*`||e[t+1]===`?`&&/[\].+)]/.test(e[t])||i!==-1&&e[t]===`[`&&e[t+1]!==`]`&&(i<t&&(i=e.indexOf(`]`,t)),i>t&&(s===-1||s>i||(s=e.indexOf(`\\`,t),s===-1||s>i)))||a!==-1&&e[t]===`{`&&e[t+1]!==`}`&&(a=e.indexOf(`}`,t),a>t&&(s=e.indexOf(`\\`,t),s===-1||s>a))||o!==-1&&e[t]===`(`&&e[t+1]===`?`&&/[:!=]/.test(e[t+2])&&e[t+3]!==`)`&&(o=e.indexOf(`)`,t),o>t&&(s=e.indexOf(`\\`,t),s===-1||s>o))||n!==-1&&e[t]===`(`&&e[t+1]!==`|`&&(n<t&&(n=e.indexOf(`|`,t)),n!==-1&&e[n+1]!==`)`&&(o=e.indexOf(`)`,n),o>n&&(s=e.indexOf(`\\`,n),s===-1||s>o))))return!0;if(e[t]===`\\`){var c=e[t+1];t+=2;var l=r[c];if(l){var u=e.indexOf(l,t);u!==-1&&(t=u+1)}if(e[t]===`!`)return!0}else t++}return!1},a=function(e){if(e[0]===`!`)return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]===`\\`){var n=e[t+1];t+=2;var i=r[n];if(i){var a=e.indexOf(i,t);a!==-1&&(t=a+1)}if(e[t]===`!`)return!0}else t++}return!1};t.exports=function(e,t){if(typeof e!=`string`||e===``)return!1;if(n(e))return!0;var r=i;return t&&t.strict===!1&&(r=a),r(e)}})),Sp=o(((e,t)=>{var n=xp(),r=require(`path`).posix.dirname,i=require(`os`).platform()===`win32`,a=`/`,o=/\\/g,s=/[\{\[].*[\}\]]$/,c=/(^|[^\\])([\{\[]|\([^\)]+$)/,l=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function(e,t){Object.assign({flipBackslashes:!0},t).flipBackslashes&&i&&e.indexOf(a)<0&&(e=e.replace(o,a)),s.test(e)&&(e+=a),e+=`a`;do e=r(e);while(n(e)||c.test(e));return e.replace(l,`$1`)}})),Cp=o((e=>{e.isInteger=e=>typeof e==`number`?Number.isInteger(e):typeof e==`string`&&e.trim()!==``?Number.isInteger(Number(e)):!1,e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,i)=>i===!1||!e.isInteger(t)||!e.isInteger(n)?!1:(Number(n)-Number(t))/Number(r)>=i,e.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||r.type===`open`||r.type===`close`)&&r.escaped!==!0&&(r.value=`\\`+r.value,r.escaped=!0)},e.encloseBrace=e=>e.type===`brace`?e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0):!1,e.isInvalidBrace=e=>e.type===`brace`?e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1:!1,e.isOpenOrClose=e=>e.type===`open`||e.type===`close`?!0:e.open===!0||e.close===!0,e.reduce=e=>e.reduce((e,t)=>(t.type===`text`&&e.push(t.value),t.type===`range`&&(t.type=`text`),e),[]),e.flatten=(...e)=>{let t=[],n=e=>{for(let r=0;r<e.length;r++){let i=e[r];if(Array.isArray(i)){n(i);continue}i!==void 0&&t.push(i)}return t};return n(e),t}})),wp=o(((e,t)=>{let n=Cp();t.exports=(e,t={})=>{let r=(e,i={})=>{let a=t.escapeInvalid&&n.isInvalidBrace(i),o=e.invalid===!0&&t.escapeInvalid===!0,s=``;if(e.value)return(a||o)&&n.isOpenOrClose(e)?`\\`+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)s+=r(t);return s};return r(e)}})),Tp=o(((e,t)=>{t.exports=function(e){return typeof e==`number`?e-e===0:typeof e==`string`&&e.trim()!==``?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}})),Ep=o(((e,t)=>{let n=Tp(),r=(e,t,a)=>{if(n(e)===!1)throw TypeError(`toRegexRange: expected the first argument to be a number`);if(t===void 0||e===t)return String(e);if(n(t)===!1)throw TypeError(`toRegexRange: expected the second argument to be a number.`);let o={relaxZeros:!0,...a};typeof o.strictZeros==`boolean`&&(o.relaxZeros=o.strictZeros===!1);let c=String(o.relaxZeros),l=String(o.shorthand),u=String(o.capture),d=String(o.wrap),f=e+`:`+t+`=`+c+l+u+d;if(r.cache.hasOwnProperty(f))return r.cache[f].result;let p=Math.min(e,t),m=Math.max(e,t);if(Math.abs(p-m)===1){let n=e+`|`+t;return o.capture?`(${n})`:o.wrap===!1?n:`(?:${n})`}let h=g(e)||g(t),_={min:e,max:t,a:p,b:m},v=[],y=[];return h&&(_.isPadded=h,_.maxLen=String(_.max).length),p<0&&(y=s(m<0?Math.abs(m):1,Math.abs(p),_,o),p=_.a=0),m>=0&&(v=s(p,m,_,o)),_.negatives=y,_.positives=v,_.result=i(y,v,o),o.capture===!0?_.result=`(${_.result})`:o.wrap!==!1&&v.length+y.length>1&&(_.result=`(?:${_.result})`),r.cache[f]=_,_.result};function i(e,t,n){let r=c(e,t,`-`,!1,n)||[],i=c(t,e,``,!1,n)||[],a=c(e,t,`-?`,!0,n)||[];return r.concat(a).concat(i).join(`|`)}function a(e,t){let n=1,r=1,i=f(e,n),a=new Set([t]);for(;e<=i&&i<=t;)a.add(i),n+=1,i=f(e,n);for(i=p(t+1,r)-1;e<i&&i<=t;)a.add(i),r+=1,i=p(t+1,r)-1;return a=[...a],a.sort(u),a}function o(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=l(e,t),i=r.length,a=``,o=0;for(let e=0;e<i;e++){let[t,i]=r[e];t===i?a+=t:t!==`0`||i!==`9`?a+=h(t,i,n):o++}return o&&(a+=n.shorthand===!0?`\\d`:`[0-9]`),{pattern:a,count:[o],digits:i}}function s(e,t,n,r){let i=a(e,t),s=[],c=e,l;for(let e=0;e<i.length;e++){let t=i[e],a=o(String(c),String(t),r),u=``;if(!n.isPadded&&l&&l.pattern===a.pattern){l.count.length>1&&l.count.pop(),l.count.push(a.count[0]),l.string=l.pattern+m(l.count),c=t+1;continue}n.isPadded&&(u=_(t,n,r)),a.string=u+a.pattern+m(a.count),s.push(a),c=t+1,l=a}return s}function c(e,t,n,r,i){let a=[];for(let i of e){let{string:e}=i;!r&&!d(t,`string`,e)&&a.push(n+e),r&&d(t,`string`,e)&&a.push(n+e)}return a}function l(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}function u(e,t){return e>t?1:t>e?-1:0}function d(e,t,n){return e.some(e=>e[t]===n)}function f(e,t){return Number(String(e).slice(0,-t)+`9`.repeat(t))}function p(e,t){return e-e%10**t}function m(e){let[t=0,n=``]=e;return n||t>1?`{${t+(n?`,`+n:``)}}`:``}function h(e,t,n){return`[${e}${t-e===1?``:`-`}${t}]`}function g(e){return/^-?(0+)\d/.test(e)}function _(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),i=n.relaxZeros!==!1;switch(r){case 0:return``;case 1:return i?`0?`:`0`;case 2:return i?`0{0,2}`:`00`;default:return i?`0{0,${r}}`:`0{${r}}`}}r.cache={},r.clearCache=()=>r.cache={},t.exports=r})),Dp=o(((e,t)=>{let n=require(`util`),r=Ep(),i=e=>typeof e==`object`&&!!e&&!Array.isArray(e),a=e=>t=>e===!0?Number(t):String(t),o=e=>typeof e==`number`||typeof e==`string`&&e!==``,s=e=>Number.isInteger(+e),c=e=>{let t=`${e}`,n=-1;if(t[0]===`-`&&(t=t.slice(1)),t===`0`)return!1;for(;t[++n]===`0`;);return n>0},l=(e,t,n)=>typeof e==`string`||typeof t==`string`?!0:n.stringify===!0,u=(e,t,n)=>{if(t>0){let n=e[0]===`-`?`-`:``;n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,`0`)}return n===!1?String(e):e},d=(e,t)=>{let n=e[0]===`-`?`-`:``;for(n&&(e=e.slice(1),t--);e.length<t;)e=`0`+e;return n?`-`+e:e},f=(e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r=t.capture?``:`?:`,i=``,a=``,o;return e.positives.length&&(i=e.positives.map(e=>d(String(e),n)).join(`|`)),e.negatives.length&&(a=`-(${r}${e.negatives.map(e=>d(String(e),n)).join(`|`)})`),o=i&&a?`${i}|${a}`:i||a,t.wrap?`(${r}${o})`:o},p=(e,t,n,i)=>{if(n)return r(e,t,{wrap:!1,...i});let a=String.fromCharCode(e);return e===t?a:`[${a}-${String.fromCharCode(t)}]`},m=(e,t,n)=>{if(Array.isArray(e)){let t=n.wrap===!0,r=n.capture?``:`?:`;return t?`(${r}${e.join(`|`)})`:e.join(`|`)}return r(e,t,n)},h=(...e)=>RangeError(`Invalid range arguments: `+n.inspect(...e)),g=(e,t,n)=>{if(n.strictRanges===!0)throw h([e,t]);return[]},_=(e,t)=>{if(t.strictRanges===!0)throw TypeError(`Expected step "${e}" to be a number`);return[]},v=(e,t,n=1,r={})=>{let i=Number(e),o=Number(t);if(!Number.isInteger(i)||!Number.isInteger(o)){if(r.strictRanges===!0)throw h([e,t]);return[]}i===0&&(i=0),o===0&&(o=0);let s=i>o,g=String(e),_=String(t),v=String(n);n=Math.max(Math.abs(n),1);let y=c(g)||c(_)||c(v),b=y?Math.max(g.length,_.length,v.length):0,x=y===!1&&l(e,t,r)===!1,S=r.transform||a(x);if(r.toRegex&&n===1)return p(d(e,b),d(t,b),!0,r);let C={negatives:[],positives:[]},w=e=>C[e<0?`negatives`:`positives`].push(Math.abs(e)),T=[],E=0;for(;s?i>=o:i<=o;)r.toRegex===!0&&n>1?w(i):T.push(u(S(i,E),b,x)),i=s?i-n:i+n,E++;return r.toRegex===!0?n>1?f(C,r,b):m(T,null,{wrap:!1,...r}):T},y=(e,t,n=1,r={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return g(e,t,r);let i=r.transform||(e=>String.fromCharCode(e)),a=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),c=a>o,l=Math.min(a,o),u=Math.max(a,o);if(r.toRegex&&n===1)return p(l,u,!1,r);let d=[],f=0;for(;c?a>=o:a<=o;)d.push(i(a,f)),a=c?a-n:a+n,f++;return r.toRegex===!0?m(d,null,{wrap:!1,options:r}):d},b=(e,t,n,r={})=>{if(t==null&&o(e))return[e];if(!o(e)||!o(t))return g(e,t,r);if(typeof n==`function`)return b(e,t,1,{transform:n});if(i(n))return b(e,t,0,n);let a={...r};return a.capture===!0&&(a.wrap=!0),n=n||a.step||1,s(n)?s(e)&&s(t)?v(e,t,n,a):y(e,t,Math.max(Math.abs(n),1),a):n!=null&&!i(n)?_(n,a):b(e,t,1,n)};t.exports=b})),Op=o(((e,t)=>{let n=Dp(),r=Cp();t.exports=(e,t={})=>{let i=(e,a={})=>{let o=r.isInvalidBrace(a),s=e.invalid===!0&&t.escapeInvalid===!0,c=o===!0||s===!0,l=t.escapeInvalid===!0?`\\`:``,u=``;if(e.isOpen===!0)return l+e.value;if(e.isClose===!0)return console.log(`node.isClose`,l,e.value),l+e.value;if(e.type===`open`)return c?l+e.value:`(`;if(e.type===`close`)return c?l+e.value:`)`;if(e.type===`comma`)return e.prev.type===`comma`?``:c?e.value:`|`;if(e.value)return e.value;if(e.nodes&&e.ranges>0){let i=r.reduce(e.nodes),a=n(...i,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(a.length!==0)return i.length>1&&a.length>1?`(${a})`:a}if(e.nodes)for(let t of e.nodes)u+=i(t,e);return u};return i(e)}})),kp=o(((e,t)=>{let n=Dp(),r=wp(),i=Cp(),a=(e=``,t=``,n=!1)=>{let r=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return n?i.flatten(t).map(e=>`{${e}}`):t;for(let i of e)if(Array.isArray(i))for(let e of i)r.push(a(e,t,n));else for(let e of t)n===!0&&typeof e==`string`&&(e=`{${e}}`),r.push(Array.isArray(e)?a(i,e,n):i+e);return i.flatten(r)};t.exports=(e,t={})=>{let o=t.rangeLimit===void 0?1e3:t.rangeLimit,s=(e,c={})=>{e.queue=[];let l=c,u=c.queue;for(;l.type!==`brace`&&l.type!==`root`&&l.parent;)l=l.parent,u=l.queue;if(e.invalid||e.dollar){u.push(a(u.pop(),r(e,t)));return}if(e.type===`brace`&&e.invalid!==!0&&e.nodes.length===2){u.push(a(u.pop(),[`{}`]));return}if(e.nodes&&e.ranges>0){let s=i.reduce(e.nodes);if(i.exceedsLimit(...s,t.step,o))throw RangeError(`expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.`);let c=n(...s,t);c.length===0&&(c=r(e,t)),u.push(a(u.pop(),c)),e.nodes=[];return}let d=i.encloseBrace(e),f=e.queue,p=e;for(;p.type!==`brace`&&p.type!==`root`&&p.parent;)p=p.parent,f=p.queue;for(let t=0;t<e.nodes.length;t++){let n=e.nodes[t];if(n.type===`comma`&&e.type===`brace`){t===1&&f.push(``),f.push(``);continue}if(n.type===`close`){u.push(a(u.pop(),f,d));continue}if(n.value&&n.type!==`open`){f.push(a(f.pop(),n.value));continue}n.nodes&&s(n,e)}return f};return i.flatten(s(e))}})),Ap=o(((e,t)=>{t.exports={MAX_LENGTH:1e4,CHAR_0:`0`,CHAR_9:`9`,CHAR_UPPERCASE_A:`A`,CHAR_LOWERCASE_A:`a`,CHAR_UPPERCASE_Z:`Z`,CHAR_LOWERCASE_Z:`z`,CHAR_LEFT_PARENTHESES:`(`,CHAR_RIGHT_PARENTHESES:`)`,CHAR_ASTERISK:`*`,CHAR_AMPERSAND:`&`,CHAR_AT:`@`,CHAR_BACKSLASH:`\\`,CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:`\r`,CHAR_CIRCUMFLEX_ACCENT:`^`,CHAR_COLON:`:`,CHAR_COMMA:`,`,CHAR_DOLLAR:`$`,CHAR_DOT:`.`,CHAR_DOUBLE_QUOTE:`"`,CHAR_EQUAL:`=`,CHAR_EXCLAMATION_MARK:`!`,CHAR_FORM_FEED:`\f`,CHAR_FORWARD_SLASH:`/`,CHAR_HASH:`#`,CHAR_HYPHEN_MINUS:`-`,CHAR_LEFT_ANGLE_BRACKET:`<`,CHAR_LEFT_CURLY_BRACE:`{`,CHAR_LEFT_SQUARE_BRACKET:`[`,CHAR_LINE_FEED:`
190
+ `,CHAR_NO_BREAK_SPACE:`\xA0`,CHAR_PERCENT:`%`,CHAR_PLUS:`+`,CHAR_QUESTION_MARK:`?`,CHAR_RIGHT_ANGLE_BRACKET:`>`,CHAR_RIGHT_CURLY_BRACE:`}`,CHAR_RIGHT_SQUARE_BRACKET:`]`,CHAR_SEMICOLON:`;`,CHAR_SINGLE_QUOTE:`'`,CHAR_SPACE:` `,CHAR_TAB:` `,CHAR_UNDERSCORE:`_`,CHAR_VERTICAL_LINE:`|`,CHAR_ZERO_WIDTH_NOBREAK_SPACE:``}})),jp=o(((e,t)=>{let n=wp(),{MAX_LENGTH:r,CHAR_BACKSLASH:i,CHAR_BACKTICK:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:h,CHAR_NO_BREAK_SPACE:g,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_}=Ap();t.exports=(e,t={})=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);let v=t||{},y=typeof v.maxLength==`number`?Math.min(r,v.maxLength):r;if(e.length>y)throw SyntaxError(`Input length (${e.length}), exceeds max characters (${y})`);let b={type:`root`,input:e,nodes:[]},x=[b],S=b,C=b,w=0,T=e.length,E=0,D=0,O,ee=()=>e[E++],k=e=>{if(e.type===`text`&&C.type===`dot`&&(C.type=`text`),C&&C.type===`text`&&e.type===`text`){C.value+=e.value;return}return S.nodes.push(e),e.parent=S,e.prev=C,C=e,e};for(k({type:`bos`});E<T;)if(S=x[x.length-1],O=ee(),!(O===_||O===g)){if(O===i){k({type:`text`,value:(t.keepEscaping?O:``)+ee()});continue}if(O===p){k({type:`text`,value:`\\`+O});continue}if(O===f){w++;let e;for(;E<T&&(e=ee());){if(O+=e,e===f){w++;continue}if(e===i){O+=ee();continue}if(e===p&&(w--,w===0))break}k({type:`text`,value:O});continue}if(O===c){S=k({type:`paren`,nodes:[]}),x.push(S),k({type:`text`,value:O});continue}if(O===l){if(S.type!==`paren`){k({type:`text`,value:O});continue}S=x.pop(),k({type:`text`,value:O}),S=x[x.length-1];continue}if(O===m||O===h||O===a){let e=O,n;for(t.keepQuotes!==!0&&(O=``);E<T&&(n=ee());){if(n===i){O+=n+ee();continue}if(n===e){t.keepQuotes===!0&&(O+=n);break}O+=n}k({type:`text`,value:O});continue}if(O===u){D++,S=k({type:`brace`,open:!0,close:!1,dollar:C.value&&C.value.slice(-1)===`$`||S.dollar===!0,depth:D,commas:0,ranges:0,nodes:[]}),x.push(S),k({type:`open`,value:O});continue}if(O===d){if(S.type!==`brace`){k({type:`text`,value:O});continue}S=x.pop(),S.close=!0,k({type:`close`,value:O}),D--,S=x[x.length-1];continue}if(O===o&&D>0){if(S.ranges>0){S.ranges=0;let e=S.nodes.shift();S.nodes=[e,{type:`text`,value:n(S)}]}k({type:`comma`,value:O}),S.commas++;continue}if(O===s&&D>0&&S.commas===0){let e=S.nodes;if(D===0||e.length===0){k({type:`text`,value:O});continue}if(C.type===`dot`){if(S.range=[],C.value+=O,C.type=`range`,S.nodes.length!==3&&S.nodes.length!==5){S.invalid=!0,S.ranges=0,C.type=`text`;continue}S.ranges++,S.args=[];continue}if(C.type===`range`){e.pop();let t=e[e.length-1];t.value+=C.value+O,C=t,S.ranges--;continue}k({type:`dot`,value:O});continue}k({type:`text`,value:O})}do if(S=x.pop(),S.type!==`root`){S.nodes.forEach(e=>{e.nodes||(e.type===`open`&&(e.isOpen=!0),e.type===`close`&&(e.isClose=!0),e.nodes||(e.type=`text`),e.invalid=!0)});let e=x[x.length-1],t=e.nodes.indexOf(S);e.nodes.splice(t,1,...S.nodes)}while(x.length>0);return k({type:`eos`}),b}})),Mp=o(((e,t)=>{let n=wp(),r=Op(),i=kp(),a=jp(),o=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let e=o.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(o.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(n=[...new Set(n)]),n};o.parse=(e,t={})=>a(e,t),o.stringify=(e,t={})=>n(typeof e==`string`?o.parse(e,t):e,t),o.compile=(e,t={})=>(typeof e==`string`&&(e=o.parse(e,t)),r(e,t)),o.expand=(e,t={})=>{typeof e==`string`&&(e=o.parse(e,t));let n=i(e,t);return t.noempty===!0&&(n=n.filter(Boolean)),t.nodupes===!0&&(n=[...new Set(n)]),n},o.create=(e,t={})=>e===``||e.length<3?[e]:t.expand===!0?o.expand(e,t):o.compile(e,t),t.exports=o})),Np=o(((e,t)=>{let n=require(`path`),r=`[^\\\\/]`,i=`[^/]`,a=`(?:\\/|$)`,o=`(?:^|\\/)`,s=`\\.{1,2}${a}`,c={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:i,END_ANCHOR:a,DOTS_SLASH:s,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${o}${s})`,NO_DOT_SLASH:`(?!\\.{0,1}${a})`,NO_DOTS_SLASH:`(?!${s})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${i}*?`,START_ANCHOR:o},l={...c,SLASH_LITERAL:`[\\\\/]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:n.sep,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?l:c}}})),Pp=o((e=>{let t=require(`path`),n=process.platform===`win32`,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:o}=Np();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>a.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(o,`\\$1`),e.toPosixSlashes=e=>e.replace(r,`/`),e.removeBackslashes=e=>e.replace(i,e=>e===`\\`?``:e),e.supportsLookbehinds=()=>{let e=process.version.slice(1).split(`.`).map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10},e.isWindows=e=>e&&typeof e.windows==`boolean`?e.windows:n===!0||t.sep===`\\`,e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r}})),Fp=o(((e,t)=>{let n=Pp(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:_}=Np(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,ee=0,k=!1,te=!1,A=!1,j=!1,ne=!1,re=!1,ie=!1,M=!1,ae=!1,oe=!1,se=0,N,P,F={value:``,depth:0,isGlob:!1},ce=()=>D>=x,le=()=>E.charCodeAt(D+1),ue=()=>(N=P,E.charCodeAt(++D));for(;D<x;){P=ue();let e;if(P===a){ie=F.backslashes=!0,P=ue(),P===u&&(re=!0);continue}if(re===!0||P===u){for(se++;ce()!==!0&&(P=ue());){if(P===a){ie=F.backslashes=!0,ue();continue}if(P===u){se++;continue}if(re!==!0&&P===s&&(P=ue())===s){if(k=F.isBrace=!0,A=F.isGlob=!0,oe=!0,S===!0)continue;break}if(re!==!0&&P===o){if(k=F.isBrace=!0,A=F.isGlob=!0,oe=!0,S===!0)continue;break}if(P===h&&(se--,se===0)){re=!1,k=F.isBrace=!0,oe=!0;break}}if(S===!0)continue;break}if(P===l){if(C.push(D),w.push(F),F={value:``,depth:0,isGlob:!1},oe===!0)continue;if(N===s&&D===O+1){O+=2;continue}ee=D+1;continue}if(b.noext!==!0&&(P===p||P===i||P===r||P===m||P===c)&&le()===d){if(A=F.isGlob=!0,j=F.isExtglob=!0,oe=!0,P===c&&D===O&&(ae=!0),S===!0){for(;ce()!==!0&&(P=ue());){if(P===a){ie=F.backslashes=!0,P=ue();continue}if(P===g){A=F.isGlob=!0,oe=!0;break}}continue}break}if(P===r){if(N===r&&(ne=F.isGlobstar=!0),A=F.isGlob=!0,oe=!0,S===!0)continue;break}if(P===m){if(A=F.isGlob=!0,oe=!0,S===!0)continue;break}if(P===f){for(;ce()!==!0&&(e=ue());){if(e===a){ie=F.backslashes=!0,ue();continue}if(e===_){te=F.isBracket=!0,A=F.isGlob=!0,oe=!0;break}}if(S===!0)continue;break}if(b.nonegate!==!0&&P===c&&D===O){M=F.negated=!0,O++;continue}if(b.noparen!==!0&&P===d){if(A=F.isGlob=!0,S===!0){for(;ce()!==!0&&(P=ue());){if(P===d){ie=F.backslashes=!0,P=ue();continue}if(P===g){oe=!0;break}}continue}break}if(A===!0){if(oe=!0,S===!0)continue;break}}b.noext===!0&&(j=!1,A=!1);let I=E,de=``,fe=``;O>0&&(de=E.slice(0,O),E=E.slice(O),ee-=O),I&&A===!0&&ee>0?(I=E.slice(0,ee),fe=E.slice(ee)):A===!0?(I=``,fe=E):I=E,I&&I!==``&&I!==`/`&&I!==E&&v(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),b.unescape===!0&&(fe&&=n.removeBackslashes(fe),I&&ie===!0&&(I=n.removeBackslashes(I)));let pe={prefix:de,input:e,start:O,base:I,glob:fe,isBrace:k,isBracket:te,isGlob:A,isExtglob:j,isGlobstar:ne,negated:M,negatedExtglob:ae};if(b.tokens===!0&&(pe.maxDepth=0,v(P)||w.push(F),pe.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t?t+1:O,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=de):w[n].value=a,y(w[n]),pe.maxDepth+=w[n].depth),(n!==0||a!==``)&&T.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);T.push(n),b.tokens&&(w[w.length-1].value=n,y(w[w.length-1]),pe.maxDepth+=w[w.length-1].depth)}pe.slashes=C,pe.parts=T}return pe}})),Ip=o(((e,t)=>{let n=Np(),r=Pp(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],_=f.capture?``:`?:`,v=r.isWindows(t),y=n.globChars(v),b=n.extglobChars(y),{DOT_LITERAL:x,PLUS_LITERAL:S,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:T,NO_DOT:E,NO_DOT_SLASH:D,NO_DOTS_SLASH:O,QMARK:ee,QMARK_NO_DOT:k,STAR:te,START_ANCHOR:A}=y,j=e=>`(${_}(?:(?!${A}${e.dot?T:x}).)*?)`,ne=f.dot?``:E,re=f.dot?ee:k,ie=f.bash===!0?j(f):te;f.capture&&(ie=`(${ie})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let M={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,M),m=e.length;let ae=[],oe=[],se=[],N=h,P,F=()=>M.index===m-1,ce=M.peek=(t=1)=>e[M.index+t],le=M.advance=()=>e[++M.index]||``,ue=()=>e.slice(M.index+1),I=(e=``,t=0)=>{M.consumed+=e,M.index+=t},de=e=>{M.output+=e.output==null?e.value:e.output,I(e.value)},fe=()=>{let e=1;for(;ce()===`!`&&(ce(2)!==`(`||ce(3)===`?`);)le(),M.start++,e++;return e%2==0?!1:(M.negated=!0,M.start++,!0)},pe=e=>{M[e]++,se.push(e)},me=e=>{M[e]--,se.pop()},L=e=>{if(N.type===`globstar`){let t=M.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||ae.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(M.output=M.output.slice(0,-N.output.length),N.type=`star`,N.value=`*`,N.output=ie,M.output+=N.output)}if(ae.length&&e.type!==`paren`&&(ae[ae.length-1].inner+=e.value),(e.value||e.output)&&de(e),N&&N.type===`text`&&e.type===`text`){N.value+=e.value,N.output=(N.output||``)+e.value;return}e.prev=N,g.push(e),N=e},he=(e,t)=>{let n={...b[t],conditions:1,inner:``};n.prev=N,n.parens=M.parens,n.output=M.output;let r=(f.capture?`(`:``)+n.open;pe(`parens`),L({type:e,value:t,output:M.output?``:w}),L({type:`paren`,extglob:!0,value:le(),output:r}),ae.push(n)},ge=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=ie;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=j(f)),(i!==ie||F()||/^\)+$/.test(ue()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=ue())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(M.negatedExtglob=!0)}L({type:`paren`,extglob:!0,value:P,output:n}),me(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?ee.repeat(a.length):``):o===0?re+(a?ee.repeat(a.length):``):ee.repeat(r.length):i===`.`?x.repeat(r.length):i===`*`?t?t+i+(a?ie:``):ie:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(M.output=e,M):(M.output=r.wrapOutput(i,M,t),M)}for(;!F();){if(P=le(),P===`\0`)continue;if(P===`\\`){let e=ce();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){P+=`\\`,L({type:`text`,value:P});continue}let t=/^\\+/.exec(ue()),n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(P+=`\\`)),f.unescape===!0?P=le():P+=le(),M.brackets===0){L({type:`text`,value:P});continue}}if(M.brackets>0&&(P!==`]`||N.value===`[`||N.value===`[^`)){if(f.posix!==!1&&P===`:`){let e=N.value.slice(1);if(e.includes(`[`)&&(N.posix=!0,e.includes(`:`))){let e=N.value.lastIndexOf(`[`),t=N.value.slice(0,e),n=a[N.value.slice(e+2)];if(n){N.value=t+n,M.backtrack=!0,le(),!h.output&&g.indexOf(N)===1&&(h.output=w);continue}}}(P===`[`&&ce()!==`:`||P===`-`&&ce()===`]`)&&(P=`\\${P}`),P===`]`&&(N.value===`[`||N.value===`[^`)&&(P=`\\${P}`),f.posix===!0&&P===`!`&&N.value===`[`&&(P=`^`),N.value+=P,de({value:P});continue}if(M.quotes===1&&P!==`"`){P=r.escapeRegex(P),N.value+=P,de({value:P});continue}if(P===`"`){M.quotes=M.quotes===1?0:1,f.keepQuotes===!0&&L({type:`text`,value:P});continue}if(P===`(`){pe(`parens`),L({type:`paren`,value:P});continue}if(P===`)`){if(M.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=ae[ae.length-1];if(e&&M.parens===e.parens+1){ge(ae.pop());continue}L({type:`paren`,value:P,output:M.parens?`)`:`\\)`}),me(`parens`);continue}if(P===`[`){if(f.nobracket===!0||!ue().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));P=`\\${P}`}else pe(`brackets`);L({type:`bracket`,value:P});continue}if(P===`]`){if(f.nobracket===!0||N&&N.type===`bracket`&&N.value.length===1){L({type:`text`,value:P,output:`\\${P}`});continue}if(M.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));L({type:`text`,value:P,output:`\\${P}`});continue}me(`brackets`);let e=N.value.slice(1);if(N.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(P=`/${P}`),N.value+=P,de({value:P}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(N.value);if(M.output=M.output.slice(0,-N.value.length),f.literalBrackets===!0){M.output+=t,N.value=t;continue}N.value=`(${_}${t}|${N.value})`,M.output+=N.value;continue}if(P===`{`&&f.nobrace!==!0){pe(`braces`);let e={type:`brace`,value:P,output:`(`,outputIndex:M.output.length,tokensIndex:M.tokens.length};oe.push(e),L(e);continue}if(P===`}`){let e=oe[oe.length-1];if(f.nobrace===!0||!e){L({type:`text`,value:P,output:P});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),M.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=M.output.slice(0,e.outputIndex),r=M.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,P=t=`\\}`,M.output=n;for(let e of r)M.output+=e.output||e.value}L({type:`brace`,value:P,output:t}),me(`braces`),oe.pop();continue}if(P===`|`){ae.length>0&&ae[ae.length-1].conditions++,L({type:`text`,value:P});continue}if(P===`,`){let e=P,t=oe[oe.length-1];t&&se[se.length-1]===`braces`&&(t.comma=!0,e=`|`),L({type:`comma`,value:P,output:e});continue}if(P===`/`){if(N.type===`dot`&&M.index===M.start+1){M.start=M.index+1,M.consumed=``,M.output=``,g.pop(),N=h;continue}L({type:`slash`,value:P,output:C});continue}if(P===`.`){if(M.braces>0&&N.type===`dot`){N.value===`.`&&(N.output=x);let e=oe[oe.length-1];N.type=`dots`,N.output+=P,N.value+=P,e.dots=!0;continue}if(M.braces+M.parens===0&&N.type!==`bos`&&N.type!==`slash`){L({type:`text`,value:P,output:x});continue}L({type:`dot`,value:P,output:x});continue}if(P===`?`){if(!(N&&N.value===`(`)&&f.noextglob!==!0&&ce()===`(`&&ce(2)!==`?`){he(`qmark`,P);continue}if(N&&N.type===`paren`){let e=ce(),t=P;if(e===`<`&&!r.supportsLookbehinds())throw Error(`Node.js v10 or higher is required for regex lookbehinds`);(N.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(ue()))&&(t=`\\${P}`),L({type:`text`,value:P,output:t});continue}if(f.dot!==!0&&(N.type===`slash`||N.type===`bos`)){L({type:`qmark`,value:P,output:k});continue}L({type:`qmark`,value:P,output:ee});continue}if(P===`!`){if(f.noextglob!==!0&&ce()===`(`&&(ce(2)!==`?`||!/[!=<:]/.test(ce(3)))){he(`negate`,P);continue}if(f.nonegate!==!0&&M.index===0){fe();continue}}if(P===`+`){if(f.noextglob!==!0&&ce()===`(`&&ce(2)!==`?`){he(`plus`,P);continue}if(N&&N.value===`(`||f.regex===!1){L({type:`plus`,value:P,output:S});continue}if(N&&(N.type===`bracket`||N.type===`paren`||N.type===`brace`)||M.parens>0){L({type:`plus`,value:P});continue}L({type:`plus`,value:S});continue}if(P===`@`){if(f.noextglob!==!0&&ce()===`(`&&ce(2)!==`?`){L({type:`at`,extglob:!0,value:P,output:``});continue}L({type:`text`,value:P});continue}if(P!==`*`){(P===`$`||P===`^`)&&(P=`\\${P}`);let e=o.exec(ue());e&&(P+=e[0],M.index+=e[0].length),L({type:`text`,value:P});continue}if(N&&(N.type===`globstar`||N.star===!0)){N.type=`star`,N.star=!0,N.value+=P,N.output=ie,M.backtrack=!0,M.globstar=!0,I(P);continue}let t=ue();if(f.noextglob!==!0&&/^\([^?]/.test(t)){he(`star`,P);continue}if(N.type===`star`){if(f.noglobstar===!0){I(P);continue}let n=N.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){L({type:`star`,value:P,output:``});continue}let o=M.braces>0&&(n.type===`comma`||n.type===`brace`),s=ae.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){L({type:`star`,value:P,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[M.index+4];if(n&&n!==`/`)break;t=t.slice(3),I(`/**`,3)}if(n.type===`bos`&&F()){N.type=`globstar`,N.value+=P,N.output=j(f),M.output=N.output,M.globstar=!0,I(P);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&F()){M.output=M.output.slice(0,-(n.output+N.output).length),n.output=`(?:${n.output}`,N.type=`globstar`,N.output=j(f)+(f.strictSlashes?`)`:`|$)`),N.value+=P,M.globstar=!0,M.output+=n.output+N.output,I(P);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;M.output=M.output.slice(0,-(n.output+N.output).length),n.output=`(?:${n.output}`,N.type=`globstar`,N.output=`${j(f)}${C}|${C}${e})`,N.value+=P,M.output+=n.output+N.output,M.globstar=!0,I(P+le()),L({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){N.type=`globstar`,N.value+=P,N.output=`(?:^|${C}|${j(f)}${C})`,M.output=N.output,M.globstar=!0,I(P+le()),L({type:`slash`,value:`/`,output:``});continue}M.output=M.output.slice(0,-N.output.length),N.type=`globstar`,N.output=j(f),N.value+=P,M.output+=N.output,M.globstar=!0,I(P);continue}let n={type:`star`,value:P,output:ie};if(f.bash===!0){n.output=`.*?`,(N.type===`bos`||N.type===`slash`)&&(n.output=ne+n.output),L(n);continue}if(N&&(N.type===`bracket`||N.type===`paren`)&&f.regex===!0){n.output=P,L(n);continue}(M.index===M.start||N.type===`slash`||N.type===`dot`)&&(N.type===`dot`?(M.output+=D,N.output+=D):f.dot===!0?(M.output+=O,N.output+=O):(M.output+=ne,N.output+=ne),ce()!==`*`&&(M.output+=w,N.output+=w)),L(n)}for(;M.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));M.output=r.escapeLast(M.output,`[`),me(`brackets`)}for(;M.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));M.output=r.escapeLast(M.output,`(`),me(`parens`)}for(;M.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));M.output=r.escapeLast(M.output,`{`),me(`braces`)}if(f.strictSlashes!==!0&&(N.type===`star`||N.type===`bracket`)&&L({type:`maybe_slash`,value:``,output:`${C}?`}),M.backtrack===!0){M.output=``;for(let e of M.tokens)M.output+=e.output==null?e.value:e.output,e.suffix&&(M.output+=e.suffix)}return M};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let l=r.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:_,START_ANCHOR:v}=n.globChars(l),y=a.dot?h:m,b=a.dot?g:m,x=a.capture?``:`?:`,S={negated:!1,prefix:``},C=a.bash===!0?`.*?`:_;a.capture&&(C=`(${C})`);let w=e=>e.noglobstar===!0?C:`(${x}(?:(?!${v}${e.dot?p:u}).)*?)`,T=e=>{switch(e){case`*`:return`${y}${f}${C}`;case`.*`:return`${u}${f}${C}`;case`*.*`:return`${y}${C}${u}${f}${C}`;case`*/*`:return`${y}${C}${d}${f}${b}${C}`;case`**`:return y+w(a);case`**/*`:return`(?:${y}${w(a)}${d})?${b}${f}${C}`;case`**/*.*`:return`(?:${y}${w(a)}${d})?${b}${C}${u}${f}${C}`;case`**/.*`:return`(?:${y}${w(a)}${d})?${u}${f}${C}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=T(t[1]);return n?n+u+t[2]:void 0}}},E=T(r.removePrefix(e,S));return E&&a.strictSlashes!==!0&&(E+=`${d}?`),E},t.exports=d})),Lp=o(((e,t)=>{let n=require(`path`),r=Fp(),i=Ip(),a=Pp(),o=Np(),s=e=>e&&typeof e==`object`&&!Array.isArray(e),c=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>c(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=s(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},o=a.isWindows(t),l=r?c.compileRe(e,t):c.makeRe(e,t,!1,!0),u=l.state;delete l.state;let d=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};d=c(i.ignore,e,n)}let f=(n,r=!1)=>{let{isMatch:a,match:s,output:f}=c.test(n,l,t,{glob:e,posix:o}),p={glob:e,state:u,regex:l,posix:o,input:n,output:f,match:s,isMatch:a};return typeof i.onResult==`function`&&i.onResult(p),a===!1?(p.isMatch=!1,r?p:!1):d(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(f.state=u),f};c.test=(e,t,n,{glob:r,posix:i}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},s=o.format||(i?a.toPosixSlashes:null),l=e===r,u=l&&s?s(e):e;return l===!1&&(u=s?s(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?c.matchBase(e,t,n,i):t.exec(u)),{isMatch:!!l,match:l,output:u}},c.matchBase=(e,t,r,i=a.isWindows(r))=>(t instanceof RegExp?t:c.makeRe(t,r)).test(n.basename(e)),c.isMatch=(e,t,n)=>c(t,n)(e),c.parse=(e,t)=>Array.isArray(e)?e.map(e=>c.parse(e,t)):i(e,{...t,fastpaths:!1}),c.scan=(e,t)=>r(e,t),c.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,s=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(s=`^(?!${s}).*$`);let l=c.toRegex(s,t);return r===!0&&(l.state=e),l},c.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=i.fastpaths(e,t)),a.output||(a=i(e,t)),c.compileRe(a,t,n,r)},c.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},c.constants=o,t.exports=c})),Rp=o(((e,t)=>{t.exports=Lp()})),zp=o(((e,t)=>{let n=require(`util`),r=Mp(),i=Rp(),a=Pp(),o=e=>e===``||e===`./`,s=e=>{let t=e.indexOf(`{`);return t>-1&&e.indexOf(`}`,t)>-1},c=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let r=new Set,a=new Set,o=new Set,s=0,c=e=>{o.add(e.output),n&&n.onResult&&n.onResult(e)};for(let o=0;o<t.length;o++){let l=i(String(t[o]),{...n,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&s++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?r.add(e.output):(r.delete(e.output),a.add(e.output)))}}let l=(s===t.length?[...o]:[...a]).filter(e=>!r.has(e));if(n&&l.length===0){if(n.failglob===!0)throw Error(`No matches found for "${t.join(`, `)}"`);if(n.nonull===!0||n.nullglob===!0)return n.unescape?t.map(e=>e.replace(/\\/g,``)):t}return l};c.match=c,c.matcher=(e,t)=>i(e,t),c.isMatch=(e,t,n)=>i(t,n)(e),c.any=c.isMatch,c.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,i=[],a=e=>{n.onResult&&n.onResult(e),i.push(e.output)},o=new Set(c(e,t,{...n,onResult:a}));for(let e of i)o.has(e)||r.add(e);return[...r]},c.contains=(e,t,r)=>{if(typeof e!=`string`)throw TypeError(`Expected a string: "${n.inspect(e)}"`);if(Array.isArray(t))return t.some(t=>c.contains(e,t,r));if(typeof t==`string`){if(o(e)||o(t))return!1;if(e.includes(t)||e.startsWith(`./`)&&e.slice(2).includes(t))return!0}return c.isMatch(e,t,{...r,contains:!0})},c.matchKeys=(e,t,n)=>{if(!a.isObject(e))throw TypeError(`Expected the first argument to be an object`);let r=c(Object.keys(e),t,n),i={};for(let t of r)i[t]=e[t];return i},c.some=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),n);if(r.some(e=>t(e)))return!0}return!1},c.every=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),n);if(!r.every(e=>t(e)))return!1}return!0},c.all=(e,t,r)=>{if(typeof e!=`string`)throw TypeError(`Expected a string: "${n.inspect(e)}"`);return[].concat(t).every(t=>i(t,r)(e))},c.capture=(e,t,n)=>{let r=a.isWindows(n),o=i.makeRe(String(e),{...n,capture:!0}).exec(r?a.toPosixSlashes(t):t);if(o)return o.slice(1).map(e=>e===void 0?``:e)},c.makeRe=(...e)=>i.makeRe(...e),c.scan=(...e)=>i.scan(...e),c.parse=(e,t)=>{let n=[];for(let a of[].concat(e||[]))for(let e of r(String(a),t))n.push(i.parse(e,t));return n},c.braces=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return t&&t.nobrace===!0||!s(e)?[e]:r(e,t)},c.braceExpand=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return c.braces(e,{...t,expand:!0})},c.hasBraces=s,t.exports=c})),Bp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isAbsolute=e.partitionAbsoluteAndRelative=e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;let t=require(`path`),n=Sp(),r=zp(),i=/[*?]|^!/,a=/\[[^[]*]/,o=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,s=/[!*+?@]\([^(]*\)/,c=/,|\.\./,l=/(?!^)\/{2,}/g;function u(e,t={}){return!d(e,t)}e.isStaticPattern=u;function d(e,t={}){return e===``?!1:!!(t.caseSensitiveMatch===!1||e.includes(`\\`)||i.test(e)||a.test(e)||o.test(e)||t.extglob!==!1&&s.test(e)||t.braceExpansion!==!1&&f(e))}e.isDynamicPattern=d;function f(e){let t=e.indexOf(`{`);if(t===-1)return!1;let n=e.indexOf(`}`,t+1);if(n===-1)return!1;let r=e.slice(t,n);return c.test(r)}function p(e){return h(e)?e.slice(1):e}e.convertToPositivePattern=p;function m(e){return`!`+e}e.convertToNegativePattern=m;function h(e){return e.startsWith(`!`)&&e[1]!==`(`}e.isNegativePattern=h;function g(e){return!h(e)}e.isPositivePattern=g;function _(e){return e.filter(h)}e.getNegativePatterns=_;function v(e){return e.filter(g)}e.getPositivePatterns=v;function y(e){return e.filter(e=>!x(e))}e.getPatternsInsideCurrentDirectory=y;function b(e){return e.filter(x)}e.getPatternsOutsideCurrentDirectory=b;function x(e){return e.startsWith(`..`)||e.startsWith(`./..`)}e.isPatternRelatedToParentDirectory=x;function S(e){return n(e,{flipBackslashes:!1})}e.getBaseDirectory=S;function C(e){return e.includes(`**`)}e.hasGlobStar=C;function w(e){return e.endsWith(`/**`)}e.endsWithSlashGlobStar=w;function T(e){let n=t.basename(e);return w(e)||u(n)}e.isAffectDepthOfReadingPattern=T;function E(e){return e.reduce((e,t)=>e.concat(D(t)),[])}e.expandPatternsWithBraceExpansion=E;function D(e){let t=r.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>e!==``)}e.expandBraceExpansion=D;function O(e,t){let{parts:n}=r.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return n.length===0&&(n=[e]),n[0].startsWith(`/`)&&(n[0]=n[0].slice(1),n.unshift(``)),n}e.getPatternParts=O;function ee(e,t){return r.makeRe(e,t)}e.makeRe=ee;function k(e,t){return e.map(e=>ee(e,t))}e.convertPatternsToRe=k;function te(e,t){return t.some(t=>t.test(e))}e.matchAny=te;function A(e){return e.replace(l,`/`)}e.removeDuplicateSlashes=A;function j(e){let t=[],n=[];for(let r of e)ne(r)?t.push(r):n.push(r);return[t,n]}e.partitionAbsoluteAndRelative=j;function ne(e){return t.isAbsolute(e)}e.isAbsolute=ne})),Vp=o(((e,t)=>{let n=require(`stream`).PassThrough,r=Array.prototype.slice;t.exports=i;function i(){let e=[],t=r.call(arguments),i=!1,o=t[t.length-1];o&&!Array.isArray(o)&&o.pipe==null?t.pop():o={};let s=o.end!==!1,c=o.pipeError===!0;o.objectMode??=!0,o.highWaterMark??=64*1024;let l=n(o);function u(){for(let t=0,n=arguments.length;t<n;t++)e.push(a(arguments[t],o));return d(),this}function d(){if(i)return;i=!0;let t=e.shift();if(!t){process.nextTick(f);return}Array.isArray(t)||(t=[t]);let n=t.length+1;function r(){--n>0||(i=!1,d())}function a(e){function t(){e.removeListener(`merge2UnpipeEnd`,t),e.removeListener(`end`,t),c&&e.removeListener(`error`,n),r()}function n(e){l.emit(`error`,e)}if(e._readableState.endEmitted)return r();e.on(`merge2UnpipeEnd`,t),e.on(`end`,t),c&&e.on(`error`,n),e.pipe(l,{end:!1}),e.resume()}for(let e=0;e<t.length;e++)a(t[e]);r()}function f(){i=!1,l.emit(`queueDrain`),s&&l.end()}return l.setMaxListeners(0),l.add=u,l.on(`unpipe`,function(e){e.emit(`merge2UnpipeEnd`)}),t.length&&u.apply(null,t),l}function a(e,t){if(Array.isArray(e))for(let n=0,r=e.length;n<r;n++)e[n]=a(e[n],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(n(t))),!e._readableState||!e.pause||!e.pipe)throw Error(`Only readable stream can be merged.`);e.pause()}return e}})),Hp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.merge=void 0;let t=Vp();function n(e){let n=t(e);return e.forEach(e=>{e.once(`error`,e=>n.emit(`error`,e))}),n.once(`close`,()=>r(e)),n.once(`end`,()=>r(e)),n}e.merge=n;function r(e){e.forEach(e=>e.emit(`close`))}})),Up=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isEmpty=e.isString=void 0;function t(e){return typeof e==`string`}e.isString=t;function n(e){return e===``}e.isEmpty=n})),Wp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0,e.array=gp(),e.errno=_p(),e.fs=vp(),e.path=yp(),e.pattern=Bp(),e.stream=Hp(),e.string=Up()})),Gp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;let t=Wp();function n(e,n){let s=r(e,n),c=r(n.ignore,n),l=a(s),u=o(s,c),d=l.filter(e=>t.pattern.isStaticPattern(e,n)),f=l.filter(e=>t.pattern.isDynamicPattern(e,n)),p=i(d,u,!1),m=i(f,u,!0);return p.concat(m)}e.generate=n;function r(e,n){let r=e;return n.braceExpansion&&(r=t.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes(`/`)?e:`**/${e}`)),r.map(e=>t.pattern.removeDuplicateSlashes(e))}function i(e,n,r){let i=[],a=t.pattern.getPatternsOutsideCurrentDirectory(e),o=t.pattern.getPatternsInsideCurrentDirectory(e),u=s(a),d=s(o);return i.push(...c(u,n,r)),`.`in d?i.push(l(`.`,o,n,r)):i.push(...c(d,n,r)),i}e.convertPatternsToTasks=i;function a(e){return t.pattern.getPositivePatterns(e)}e.getPositivePatterns=a;function o(e,n){return t.pattern.getNegativePatterns(e).concat(n).map(t.pattern.convertToPositivePattern)}e.getNegativePatternsAsPositive=o;function s(e){return e.reduce((e,n)=>{let r=t.pattern.getBaseDirectory(n);return r in e?e[r].push(n):e[r]=[n],e},{})}e.groupPatternsByBaseDirectory=s;function c(e,t,n){return Object.keys(e).map(r=>l(r,e[r],t,n))}e.convertPatternGroupsToTasks=c;function l(e,n,r,i){return{dynamic:i,positive:n,negative:r,base:e,patterns:[].concat(n,r.map(t.pattern.convertToNegativePattern))}}e.convertPatternGroupToTask=l})),Kp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.read=void 0;function t(e,t,i){t.fs.lstat(e,(a,o)=>{if(a!==null){n(i,a);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){r(i,o);return}t.fs.stat(e,(e,a)=>{if(e!==null){if(t.throwErrorOnBrokenSymbolicLink){n(i,e);return}r(i,o);return}t.markSymbolicLink&&(a.isSymbolicLink=()=>!0),r(i,a)})})}e.read=t;function n(e,t){e(t)}function r(e,t){e(null,t)}})),qp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.read=void 0;function t(e,t){let n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{let n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}e.read=t})),Jp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;let t=require(`fs`);e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync};function n(t){return t===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=n})),Yp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Jp();e.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return e??t}}})),Xp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.statSync=e.stat=e.Settings=void 0;let t=Kp(),n=qp(),r=Yp();e.Settings=r.default;function i(e,n,r){if(typeof n==`function`){t.read(e,o(),n);return}t.read(e,o(n),r)}e.stat=i;function a(e,t){let r=o(t);return n.read(e,r)}e.statSync=a;function o(e={}){return e instanceof r.default?e:new r.default(e)}})),Zp=o(((e,t)=>{
96
191
  /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
97
- let n;t.exports=typeof queueMicrotask==`function`?queueMicrotask.bind(typeof window<`u`?window:global):e=>(n||=Promise.resolve()).then(e).catch(e=>setTimeout(()=>{throw e},0))})),qf=o(((e,t)=>{
192
+ let n;t.exports=typeof queueMicrotask==`function`?queueMicrotask.bind(typeof window<`u`?window:global):e=>(n||=Promise.resolve()).then(e).catch(e=>setTimeout(()=>{throw e},0))})),Qp=o(((e,t)=>{
98
193
  /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
99
- t.exports=r;let n=Kf();function r(e,t){let r,i,a,o=!0;Array.isArray(e)?(r=[],i=e.length):(a=Object.keys(e),r={},i=a.length);function s(e){function i(){t&&t(e,r),t=null}o?n(i):i()}function c(e,t,n){r[e]=n,(--i===0||t)&&s(t)}i?a?a.forEach(function(t){e[t](function(e,n){c(t,e,n)})}):e.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):s(null),o=!1}})),Jf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;let t=process.versions.node.split(`.`);if(t[0]===void 0||t[1]===void 0)throw Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);let n=Number.parseInt(t[0],10),r=Number.parseInt(t[1],10);e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n>10||n===10&&r>=10})),Yf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createDirentFromStats=void 0;var t=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function n(e,n){return new t(e,n)}e.createDirentFromStats=n})),Xf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.fs=void 0,e.fs=Yf()})),Zf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.joinPathSegments=void 0;function t(e,t,n){return e.endsWith(n)?e+t:e+n+t}e.joinPathSegments=t})),Qf=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;let t=Gf(),n=qf(),r=Jf(),i=Xf(),a=Zf();function o(e,t,n){if(!t.stats&&r.IS_SUPPORT_READDIR_WITH_FILE_TYPES){s(e,t,n);return}l(e,t,n)}e.read=o;function s(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(i,o)=>{if(i!==null){u(r,i);return}let s=o.map(n=>({dirent:n,name:n.name,path:a.joinPathSegments(e,n.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){d(r,s);return}n(s.map(e=>c(e,t)),(e,t)=>{if(e!==null){u(r,e);return}d(r,t)})})}e.readdirWithFileTypes=s;function c(e,t){return n=>{if(!e.dirent.isSymbolicLink()){n(null,e);return}t.fs.stat(e.path,(r,a)=>{if(r!==null){if(t.throwErrorOnBrokenSymbolicLink){n(r);return}n(null,e);return}e.dirent=i.fs.createDirentFromStats(e.name,a),n(null,e)})}}function l(e,r,o){r.fs.readdir(e,(s,c)=>{if(s!==null){u(o,s);return}n(c.map(n=>{let o=a.joinPathSegments(e,n,r.pathSegmentSeparator);return e=>{t.stat(o,r.fsStatSettings,(t,a)=>{if(t!==null){e(t);return}let s={name:n,path:o,dirent:i.fs.createDirentFromStats(n,a)};r.stats&&(s.stats=a),e(null,s)})}}),(e,t)=>{if(e!==null){u(o,e);return}d(o,t)})})}e.readdir=l;function u(e,t){e(t)}function d(e,t){e(null,t)}})),$f=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;let t=Gf(),n=Jf(),r=Xf(),i=Zf();function a(e,t){return!t.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,t):s(e,t)}e.read=a;function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let a={dirent:n,name:n.name,path:i.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let e=t.fs.statSync(a.path);a.dirent=r.fs.createDirentFromStats(a.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return a})}e.readdirWithFileTypes=o;function s(e,n){return n.fs.readdirSync(e).map(a=>{let o=i.joinPathSegments(e,a,n.pathSegmentSeparator),s=t.statSync(o,n.fsStatSettings),c={name:a,path:o,dirent:r.fs.createDirentFromStats(a,s)};return n.stats&&(c.stats=s),c})}e.readdir=s})),ep=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;let t=require(`fs`);e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};function n(t){return t===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=n})),tp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=Gf(),r=ep();e.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=r.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}}})),np=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Settings=e.scandirSync=e.scandir=void 0;let t=Qf(),n=$f(),r=tp();e.Settings=r.default;function i(e,n,r){if(typeof n==`function`){t.read(e,o(),n);return}t.read(e,o(n),r)}e.scandir=i;function a(e,t){let r=o(t);return n.read(e,r)}e.scandirSync=a;function o(e={}){return e instanceof r.default?e:new r.default(e)}})),rp=o(((e,t)=>{function n(e){var t=new e,n=t;function r(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r}function i(e){n.next=e,n=e}return{get:r,release:i}}t.exports=n})),ip=o(((e,t)=>{var n=rp();function r(e,t,r){if(typeof e==`function`&&(r=t,t=e,e=null),!(r>=1))throw Error(`fastqueue concurrency must be equal to or greater than 1`);var o=n(a),s=null,c=null,l=0,u=null,d={push:v,drain:i,saturated:i,pause:p,paused:!1,get concurrency(){return r},set concurrency(e){if(!(e>=1))throw Error(`fastqueue concurrency must be equal to or greater than 1`);if(r=e,!d.paused)for(;s&&l<r;)l++,b()},running:f,resume:g,idle:_,length:m,getQueue:h,unshift:y,empty:i,kill:x,killAndDrain:S,error:w,abort:C};return d;function f(){return l}function p(){d.paused=!0}function m(){for(var e=s,t=0;e;)e=e.next,t++;return t}function h(){for(var e=s,t=[];e;)t.push(e.value),e=e.next;return t}function g(){if(d.paused){if(d.paused=!1,s===null){l++,b();return}for(;s&&l<r;)l++,b()}}function _(){return l===0&&d.length()===0}function v(n,a){var f=o.get();f.context=e,f.release=b,f.value=n,f.callback=a||i,f.errorHandler=u,l>=r||d.paused?c?(c.next=f,c=f):(s=f,c=f,d.saturated()):(l++,t.call(e,f.value,f.worked))}function y(n,a){var f=o.get();f.context=e,f.release=b,f.value=n,f.callback=a||i,f.errorHandler=u,l>=r||d.paused?s?(f.next=s,s=f):(s=f,c=f,d.saturated()):(l++,t.call(e,f.value,f.worked))}function b(n){n&&o.release(n);var i=s;i&&l<=r?d.paused?l--:(c===s&&(c=null),s=i.next,i.next=null,t.call(e,i.value,i.worked),c===null&&d.empty()):--l===0&&d.drain()}function x(){s=null,c=null,d.drain=i}function S(){s=null,c=null,d.drain(),d.drain=i}function C(){var e=s;for(s=null,c=null;e;){var t=e.next,n=e.callback,r=e.errorHandler,a=e.value,o=e.context;e.value=null,e.callback=i,e.errorHandler=null,r&&r(Error(`abort`),a),n.call(o,Error(`abort`)),e.release(e),e=t}d.drain=i}function w(e){u=e}}function i(){}function a(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var r=e.callback,a=e.errorHandler,o=e.value;e.value=null,e.callback=i,e.errorHandler&&a(t,o),r.call(e.context,t,n),e.release(e)}}function o(e,t,n){typeof e==`function`&&(n=t,t=e,e=null);function a(e,n){t.call(this,e).then(function(e){n(null,e)},n)}var o=r(e,a,n),s=o.push,c=o.unshift;return o.push=l,o.unshift=u,o.drained=d,o;function l(e){var t=new Promise(function(t,n){s(e,function(e,r){if(e){n(e);return}t(r)})});return t.catch(i),t}function u(e){var t=new Promise(function(t,n){c(e,function(e,r){if(e){n(e);return}t(r)})});return t.catch(i),t}function d(){return new Promise(function(e){process.nextTick(function(){if(o.idle())e();else{var t=o.drain;o.drain=function(){typeof t==`function`&&t(),e(),o.drain=t}}})})}}t.exports=r,t.exports.promise=o})),ap=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function t(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}e.isFatalError=t;function n(e,t){return e===null||e(t)}e.isAppliedFilter=n;function r(e,t){return e.split(/[/\\]/).join(t)}e.replacePathSegmentSeparator=r;function i(e,t,n){return e===``?t:e.endsWith(n)?e+t:e+n+t}e.joinPathSegments=i})),op=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=ap();e.default=class{constructor(e,n){this._root=e,this._settings=n,this._root=t.replacePathSegmentSeparator(e,n.pathSegmentSeparator)}}})),sp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`events`),n=np(),r=ip(),i=ap(),a=op();e.default=class extends a.default{constructor(e,i){super(e,i),this._settings=i,this._scandir=n.scandir,this._emitter=new t.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit(`end`)}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw Error(`The reader is already destroyed`);this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on(`entry`,e)}onError(e){this._emitter.once(`error`,e)}onEnd(e){this._emitter.once(`end`,e)}_pushToQueue(e,t){let n={directory:e,base:t};this._queue.push(n,e=>{e!==null&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,r)=>{if(n!==null){t(n,void 0);return}for(let t of r)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){this._isDestroyed||!i.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit(`error`,e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;let n=e.path;t!==void 0&&(e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,t===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit(`entry`,e)}}})),cp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=sp();e.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{n(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{r(e,this._storage)}),this._reader.read()}};function n(e,t){e(t)}function r(e,t){e(null,t)}})),lp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`stream`),n=sp();e.default=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new n.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit(`error`,e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}})),up=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=np(),n=ap(),r=op();e.default=class extends r.default{constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(n.isFatalError(this._settings,e))throw e}_handleEntry(e,t){let r=e.path;t!==void 0&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,t===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}})),dp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=up();e.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}}})),fp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=np();e.default=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,1/0),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}}})),pp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Settings=e.walkStream=e.walkSync=e.walk=void 0;let t=cp(),n=lp(),r=dp(),i=fp();e.Settings=i.default;function a(e,n,r){if(typeof n==`function`){new t.default(e,c()).read(n);return}new t.default(e,c(n)).read(r)}e.walk=a;function o(e,t){let n=c(t);return new r.default(e,n).read()}e.walkSync=o;function s(e,t){let r=c(t);return new n.default(e,r).read()}e.walkStream=s;function c(e={}){return e instanceof i.default?e:new i.default(e)}})),mp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=Gf(),r=zf();e.default=class{constructor(e){this._settings=e,this._fsStatSettings=new n.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return t.resolve(this._settings.cwd,e)}_makeEntry(e,t){let n={name:t,path:t,dirent:r.fs.createDirentFromStats(t,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!r.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}})),hp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`stream`),n=Gf(),r=pp(),i=mp();e.default=class extends i.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=n.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,n){let r=e.map(this._getFullEntryPath,this),i=new t.PassThrough({objectMode:!0});i._write=(t,a,o)=>this._getEntry(r[t],e[t],n).then(e=>{e!==null&&n.entryFilter(e)&&i.push(e),t===r.length-1&&i.end(),o()}).catch(o);for(let e=0;e<r.length;e++)i.write(e);return i}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,r)=>e===null?t(r):n(e))})}}})),gp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=pp(),n=mp(),r=hp();e.default=class extends n.default{constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{e===null?n(t):r(e)})})}async static(e,t){let n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once(`error`,t),r.on(`data`,e=>n.push(e)),r.once(`end`,()=>e(n))})}}})),_p=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=zf();e.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(e){return t.pattern.getPatternParts(e,this._micromatchOptions).map(e=>t.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:t.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return t.array.splitWhen(e,e=>e.dynamic&&t.pattern.hasGlobStar(e.pattern))}}})),vp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=_p();e.default=class extends t.default{match(e){let t=e.split(`/`),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(let e of r){let r=e.sections[0];if(!e.complete&&n>r.length||t.every((t,n)=>{let r=e.segments[n];return!!(r.dynamic&&r.patternRe.test(t)||!r.dynamic&&r.pattern===t)}))return!0}return!1}}})),yp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=zf(),n=vp();e.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){let r=this._getMatcher(t),i=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,i)}_getMatcher(e){return new n.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let n=e.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(e,n,r,i){if(this._isSkippedByDeep(e,n.path)||this._isSkippedSymbolicLink(n))return!1;let a=t.path.removeLeadingDotSegment(n.path);return this._isSkippedByPositivePatterns(a,r)?!1:this._isSkippedByNegativePatterns(a,i)}_isSkippedByDeep(e,t){return this._settings.deep===1/0?!1:this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){let n=t.split(`/`).length;return e===``?n:n-e.split(`/`).length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,n){return!t.pattern.matchAny(e,n)}}})),bp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=zf();e.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,n){let[r,i]=t.pattern.partitionAbsoluteAndRelative(n),a={positive:{all:t.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,a)}_filter(e,n){let r=t.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(r)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(r,n,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(r),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!(!this._isMatchToPatterns(e,t.positive.all,n)||this._isMatchToPatterns(e,t.negative.relative,n)||this._isMatchToAbsoluteNegative(e,t.negative.absolute,n))}_isMatchToAbsoluteNegative(e,n,r){if(n.length===0)return!1;let i=t.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,n,r)}_isMatchToPatterns(e,n,r){if(n.length===0)return!1;let i=t.pattern.matchAny(e,n);return!i&&r?t.pattern.matchAny(e+`/`,n):i}}})),xp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=zf();e.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return t.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}})),Sp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=zf();e.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let n=e.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&e.dirent.isDirectory()&&(n+=`/`),this._settings.objectMode?Object.assign(Object.assign({},e),{path:n}):n}}})),Cp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=yp(),r=bp(),i=xp(),a=Sp();e.default=class{constructor(e){this._settings=e,this.errorFilter=new i.default(this._settings),this.entryFilter=new r.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new n.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new a.default(this._settings)}_getRootDirectory(e){return t.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let t=e.base===`.`?``:e.base;return{basePath:t,pathSegmentSeparator:`/`,concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}})),wp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=gp(),n=Cp();e.default=class extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}})),Tp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`stream`),n=hp(),r=Cp();e.default=class extends r.default{constructor(){super(...arguments),this._reader=new n.default(this._settings)}read(e){let n=this._getRootDirectory(e),r=this._getReaderOptions(e),i=this.api(n,e,r),a=new t.Readable({objectMode:!0,read:()=>{}});return i.once(`error`,e=>a.emit(`error`,e)).on(`data`,e=>a.emit(`data`,r.transform(e))).once(`end`,()=>a.emit(`end`)),a.once(`close`,()=>i.destroy()),a}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}})),Ep=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Gf(),n=pp(),r=mp();e.default=class extends r.default{constructor(){super(...arguments),this._walkSync=n.walkSync,this._statSync=t.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){let n=[];for(let r of e){let e=this._getFullEntryPath(r),i=this._getEntry(e,r,t);i===null||!t.entryFilter(i)||n.push(i)}return n}_getEntry(e,t,n){try{let n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}})),Dp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Ep(),n=Cp();e.default=class extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}})),Op=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;let t=require(`fs`),n=require(`os`),r=Math.max(n.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,r),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return e===void 0?t:e}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}})),kp=l(o(((e,t)=>{let n=Bf(),r=wp(),i=Tp(),a=Dp(),o=Op(),s=zf();async function c(e,t){u(e);let n=l(e,r.default,t),i=await Promise.all(n);return s.array.flatten(i)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(e,t){u(e);let n=l(e,a.default,t);return s.array.flatten(n)}e.sync=t;function r(e,t){u(e);let n=l(e,i.default,t);return s.stream.merge(n)}e.stream=r;function c(e,t){u(e);let r=[].concat(e),i=new o.default(t);return n.generate(r,i)}e.generateTasks=c;function d(e,t){u(e);let n=new o.default(t);return s.pattern.isDynamicPattern(e,n)}e.isDynamicPattern=d;function f(e){return u(e),s.path.escape(e)}e.escapePath=f;function p(e){return u(e),s.path.convertPathToPattern(e)}e.convertPathToPattern=p,(function(e){function t(e){return u(e),s.path.escapePosixPath(e)}e.escapePath=t;function n(e){return u(e),s.path.convertPosixPathToPattern(e)}e.convertPathToPattern=n})(e.posix||={}),(function(e){function t(e){return u(e),s.path.escapeWindowsPath(e)}e.escapePath=t;function n(e){return u(e),s.path.convertWindowsPathToPattern(e)}e.convertPathToPattern=n})(e.win32||={})})(c||={});function l(e,t,r){let i=[].concat(e),a=new o.default(r),s=n.generate(i,a),c=new t(a);return s.map(c.read,c)}function u(e){if(![].concat(e).every(e=>s.string.isString(e)&&!s.string.isEmpty(e)))throw TypeError(`Patterns must be a string (non empty) or an array of strings`)}t.exports=c}))(),1);const Ap={"win32-x64":{local:`napi-script-runtime.win32-x64-msvc`,suffix:`win32-x64-msvc`},"linux-x64":{local:`napi-script-runtime.linux-x64-gnu`,suffix:`linux-x64-gnu`},"linux-arm64":{local:`napi-script-runtime.linux-arm64-gnu`,suffix:`linux-arm64-gnu`},"darwin-arm64":{local:`napi-script-runtime.darwin-arm64`,suffix:`darwin-arm64`},"darwin-x64":{local:`napi-script-runtime.darwin-x64`,suffix:`darwin-x64`}};let jp,Mp;function Np(){let e=Ap[`${f.default.platform}-${f.default.arch}`];if(e!=null)return e;throw Error(`Unsupported platform for @truenine/script-runtime native binding: ${f.default.platform}-${f.default.arch}`)}function Pp(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.validate_public_path==`function`||typeof t.validatePublicPath==`function`||typeof t.resolve_public_path==`function`||typeof t.resolvePublicPath==`function`}function Fp(e,t,n){let r=e instanceof Error?e.message:String(e),i=t instanceof Error?t.message:String(t);return Error([`Failed to load @truenine/script-runtime native binding.`,`Tried local binary "./${Ap[`${f.default.platform}-${f.default.arch}`]?.local??`unknown`}.node" and package "@truenine/memory-sync-cli-${n}".`,`Local error: ${r}`,`Package error: ${i}`,"Run `pnpm -F @truenine/script-runtime run build` to build the native module."].join(`
100
- `))}function Ip(){let e=(0,h.createRequire)(require(`url`).pathToFileURL(__filename).href),{local:t,suffix:n}=Np();try{return e(`./${t}.node`)}catch(t){try{let t=e(`@truenine/memory-sync-cli-${n}`).scriptRuntime;if(Pp(t))return t;throw Error(`Package "@truenine/memory-sync-cli-${n}" does not export a scriptRuntime binding`)}catch(e){throw Fp(t,e,n)}}}function Lp(){if(jp!=null)return jp;if(Mp!=null)throw Mp;try{return jp=Ip(),jp}catch(e){throw Mp=e instanceof Error?e:Error(String(e)),Mp}}function Rp(e,t,n){let r=Lp(),i=r.resolve_public_path??r.resolvePublicPath;if(i==null)throw Error(`resolve_public_path native binding is unavailable`);return i(e,t,n)}function zp(){let e=[(0,g.fileURLToPath)(new URL(`./resolve-proxy-worker.mjs`,require(`url`).pathToFileURL(__filename).href)),(0,g.fileURLToPath)(new URL(`./script-runtime-worker.mjs`,require(`url`).pathToFileURL(__filename).href))];for(let t of e)if(u.existsSync(t))return t;return e[0]}function Bp(e,t,n,r=5e3){return Rp(e,JSON.stringify({...t,workerPath:zp(),timeoutMs:r}),n)}const Vp={SRC:`src`,DIST:`dist`,SKILLS:`skills`,COMMANDS:`commands`,AGENTS:`agents`,RULES:`rules`,APP:`app`,IDEA:`.idea`,IDEA_CODE_STYLES:`.idea/codeStyles`,VSCODE:`.vscode`},Hp={GLOBAL_MEMORY:`global.mdx`,GLOBAL_MEMORY_SRC:`global.src.mdx`,WORKSPACE_MEMORY:`workspace.mdx`,WORKSPACE_MEMORY_SRC:`workspace.src.mdx`,EDITOR_CONFIG:`.editorconfig`,IDEA_GITIGNORE:`.idea/.gitignore`,IDEA_PROJECT_XML:`.idea/codeStyles/Project.xml`,IDEA_CODE_STYLE_CONFIG_XML:`.idea/codeStyles/codeStyleConfig.xml`,VSCODE_SETTINGS:`.vscode/settings.json`,VSCODE_EXTENSIONS:`.vscode/extensions.json`,QODER_IGNORE:`.qoderignore`,CURSOR_IGNORE:`.cursorignore`,WARP_INDEX_IGNORE:`.warpindexignore`,AI_IGNORE:`.aiignore`,CODEIUM_IGNORE:`.codeiumignore`};Vp.SKILLS,Vp.COMMANDS,Vp.AGENTS,Vp.RULES,Hp.GLOBAL_MEMORY_SRC,Hp.WORKSPACE_MEMORY_SRC,Vp.SKILLS,Vp.COMMANDS,Vp.AGENTS,Vp.RULES,Hp.GLOBAL_MEMORY,Hp.WORKSPACE_MEMORY,Vp.APP,Vp.APP,Vp.IDEA,Vp.IDEA_CODE_STYLES,Vp.VSCODE,Hp.EDITOR_CONFIG,Hp.IDEA_GITIGNORE,Hp.IDEA_PROJECT_XML,Hp.IDEA_CODE_STYLE_CONFIG_XML,Hp.VSCODE_SETTINGS,Hp.VSCODE_EXTENSIONS,Hp.QODER_IGNORE,Hp.CURSOR_IGNORE,Hp.WARP_INDEX_IGNORE,Hp.AI_IGNORE,Hp.CODEIUM_IGNORE;let Up=function(e){return e.Output=`output`,e}({}),Wp=function(e){return e.GlobalMemory=`globalMemory`,e.ProjectRootMemory=`projectRootMemory`,e.ProjectChildrenMemory=`projectChildrenMemory`,e.Command=`command`,e.SubAgent=`subAgent`,e.Skill=`skill`,e.SkillChildDoc=`skillChildDoc`,e.SkillResource=`skillResource`,e.SkillMcpConfig=`skillMcpConfig`,e.Readme=`readme`,e.Rule=`rule`,e}({}),Q=function(e){return e.Relative=`relative`,e.Absolute=`absolute`,e.Root=`root`,e}({}),Gp=function(e){return e.VSCode=`vscode`,e.IntellijIDEA=`intellijIdea`,e.Git=`git`,e.EditorConfig=`editorconfig`,e.Original=`original`,e}({}),Kp=function(e){return e.UserHome=`userHome`,e.External=`external`,e}({});const qp=`proxy.ts`,Jp=`.gitignore`,Yp=`.git/info/exclude`,Xp=[Hp.QODER_IGNORE,Hp.CURSOR_IGNORE,Hp.WARP_INDEX_IGNORE,Hp.AI_IGNORE,Hp.CODEIUM_IGNORE,`.kiroignore`,`.traeignore`],Zp=[Jp,Yp,Hp.EDITOR_CONFIG,Hp.VSCODE_SETTINGS,Hp.VSCODE_EXTENSIONS,Hp.IDEA_PROJECT_XML,Hp.IDEA_CODE_STYLE_CONFIG_XML,Hp.IDEA_GITIGNORE,...Xp],Qp=new Map;function $p(e){let t=e.split(/[\\/]+/).filter(e=>e.length>0).join(`/`);if(t.length===0)throw Error(`public target relative path cannot be empty`);return t}function em(e){return d.join(e,`public`)}function tm(e){return d.join(em(e),qp)}function nm(e){return e?.command??`execute`}function rm(e,t){return d.resolve(t?.workspaceDir??d.dirname(e))}function im(e,t,n){return{cwd:t,workspaceDir:t,aindexDir:d.resolve(e),command:n,platform:f.default.platform}}function am(e,t,n){let r=$p(t);if(r===qp)return qp;let i=tm(e);if(!(u.existsSync(i)&&u.statSync(i).isFile()))return r;let a=nm(n),o=rm(e,n),s=[i,o,a,r].join(`::`),c=Qp.get(s);if(c!=null)return c;let l=Bp(i,im(e,o,a),r);return Qp.set(s,l),l}function om(e,t,n){let r=am(e,t,n);return d.join(em(e),...r.split(/[\\/]+/))}function sm(e,t){let n=new Set([om(e,qp)]);for(let r of Zp)n.add(om(e,r,t));return[...n]}function cm(e,t,n,r,i){let a=om(n,t,i);if(!(r.existsSync(a)&&r.statSync(a).isFile()))return;let o=r.readFileSync(a,`utf8`);return{type:e,content:o,length:o.length,filePathKind:Q.Absolute,dir:{pathKind:Q.Absolute,path:a,getDirectoryName:()=>d.basename(a)}}}var lm=class extends Error{operation;violations;constructor(e,t){super(Hm(e,t)),this.name=`ProtectedDeletionGuardError`,this.operation=e,this.violations=t}};const um=[`skills`,`commands`,`subAgents`,`rules`,`app`,`ext`,`arch`],dm=[`globalPrompt`,`workspacePrompt`];function fm(e){let t=f.default.env.XDG_CONFIG_HOME;return typeof t==`string`&&t.trim().length>0?t:d.join(e,`.config`)}function pm(e){let t=f.default.env.XDG_DATA_HOME;return typeof t==`string`&&t.trim().length>0?t:d.join(e,`.local`,`share`)}function mm(e){let t=f.default.env.XDG_STATE_HOME;return typeof t==`string`&&t.trim().length>0?t:d.join(e,`.local`,`state`)}function hm(e){let t=f.default.env.XDG_CACHE_HOME;return typeof t==`string`&&t.trim().length>0?t:d.join(e,`.cache`)}function gm(e){if(e!=null){if(typeof e.getAbsolutePath==`function`)try{let t=e.getAbsolutePath();if(t.length>0)return d.resolve(t)}catch{}if(e.pathKind===`absolute`)return d.resolve(e.path);if(typeof e.basePath==`string`&&e.basePath.length>0)return d.resolve(e.basePath,e.path)}}function _m(e){return e===`~`?m.homedir():e.startsWith(`~/`)||e.startsWith(`~\\`)?d.resolve(m.homedir(),e.slice(2)):e}function vm(e){return d.resolve(_m(e))}function ym(e){let t=d.normalize(vm(e));return f.default.platform===`win32`?t.toLowerCase():t}function bm(e){let{root:t}=d.parse(e);return e===t?e:e.endsWith(d.sep)?e.slice(0,-1):e}function xm(e,t){let n=bm(e),r=bm(t);return n===r?!0:n.startsWith(`${r}${d.sep}`)}function Sm(e){let t=vm(e),n=new Set([ym(t)]);try{if(u.existsSync(t)){let e=u.realpathSync.native(t);n.add(ym(e))}}catch{}return[...n]}function Cm(e,t,n,r,i=`path`){return{path:vm(e),protectionMode:t,reason:n,source:r,matcher:i}}function wm(e){let t=ym(e.path);return{...e,path:vm(e.path),comparisonKeys:Sm(e.path),normalizedPath:t,specificity:bm(t).length}}function Tm(e){let t=new Map;for(let n of e){let e=wm(n);t.set(`${e.protectionMode}:${e.normalizedPath}`,e)}return[...t.values()].sort((e,t)=>{let n=t.specificity-e.specificity;return n===0?e.protectionMode===t.protectionMode?e.path.localeCompare(t.path):e.protectionMode===`recursive`?-1:1:n})}function Em(e){return vm(e).replaceAll(`\\`,`/`)}function Dm(e){let t=[];for(let n of e){if(n.matcher!==`glob`){t.push(Cm(n.path,n.protectionMode,n.reason,n.source));continue}let e=kp.default.sync(Em(n.path),{onlyFiles:!1,dot:!0,absolute:!0,followSymbolicLinks:!1});for(let r of e)t.push(Cm(r,n.protectionMode,n.reason,n.source))}return t}function Om(e,t,n){return n===`direct`?xm(t,e):xm(e,t)||xm(t,e)}function km(e,t){let n=vm(e);try{if(u.existsSync(n)&&u.lstatSync(n).isDirectory())return`recursive`}catch{}return t}function Am(){let e=m.homedir();return[Cm(d.parse(e).root,`direct`,`built-in dangerous root path`,`built-in-dangerous-root`),Cm(e,`direct`,`built-in dangerous home directory`,`built-in-dangerous-root`),Cm(fm(e),`direct`,`built-in dangerous config directory`,`built-in-dangerous-root`),Cm(pm(e),`direct`,`built-in dangerous data directory`,`built-in-dangerous-root`),Cm(mm(e),`direct`,`built-in dangerous state directory`,`built-in-dangerous-root`),Cm(hm(e),`direct`,`built-in dangerous cache directory`,`built-in-dangerous-root`),Cm(d.join(e,`.aindex`),`direct`,`built-in global aindex directory`,`built-in-dangerous-root`),Cm(d.join(e,`.aindex`,`.tnmsc.json`),`direct`,`built-in global config file`,`built-in-config`)]}function jm(e,t,n){let r=[Cm(e,`direct`,`workspace root`,`workspace-reserved`),Cm(d.join(e,`aindex`),`direct`,`reserved workspace aindex root`,`workspace-reserved`),Cm(d.join(e,`knowladge`),`direct`,`reserved workspace knowladge root`,`workspace-reserved`)];for(let e of t)r.push(Cm(e,`direct`,`workspace project root`,`workspace-project-root`));return n&&r.push(Cm(d.join(e,`aindex`,`dist`,`**`,`*.mdx`),`direct`,`reserved workspace aindex dist mdx files`,`workspace-reserved`,`glob`),Cm(d.join(e,`aindex`,`app`,`**`,`*.mdx`),`direct`,`reserved workspace aindex app mdx files`,`workspace-reserved`,`glob`)),r}function Mm(e){return[Cm(e,`direct`,`resolved aindex root`,`aindex-root`)]}function Nm(e,t){return sm(e,t)}function Pm(e,t,n){let r=[];for(let n of um)r.push(Cm(d.join(t,e.aindex[n].src),`recursive`,`configured aindex ${n} source directory`,`configured-aindex-source`));for(let n of dm)r.push(Cm(d.join(t,e.aindex[n].src),`direct`,`configured aindex ${n} source file`,`configured-aindex-source`));for(let e of Nm(t,n))r.push(Cm(e,`direct`,`known aindex input config file`,`known-aindex-config`));return r}function Fm(e){let t=[],n=new Set,r=(e,r,i,a)=>{if(e==null||e.length===0)return;let o=Cm(e,r,i,a),s=`${o.protectionMode}:${ym(o.path)}`;n.has(s)||(n.add(s),t.push(o))},i=(e,t,n,i)=>{let a=gm(e);a!=null&&r(a,t,n,i)};i(e.globalMemory?.dir,`recursive`,`global memory source directory`,`collected-input-source`);for(let t of e.commands??[])i(t.dir,`recursive`,`command source directory`,`collected-input-source`);for(let t of e.subAgents??[])i(t.dir,`recursive`,`sub-agent source directory`,`collected-input-source`);for(let t of e.rules??[])i(t.dir,`recursive`,`rule source directory`,`collected-input-source`);for(let t of e.skills??[]){i(t.dir,`recursive`,`skill source directory`,`collected-input-source`);for(let e of t.childDocs??[])i(e.dir,`recursive`,`skill child document directory`,`collected-input-source`);for(let e of t.resources??[])e.sourcePath==null||e.sourcePath.length===0||r(e.sourcePath,km(e.sourcePath,`direct`),`skill resource source path`,`collected-input-source`)}for(let t of e.vscodeConfigFiles??[])i(t.dir,`direct`,`vscode input config file`,`collected-input-config`);for(let t of e.jetbrainsConfigFiles??[])i(t.dir,`direct`,`jetbrains input config file`,`collected-input-config`);for(let t of e.editorConfigFiles??[])i(t.dir,`direct`,`editorconfig input file`,`collected-input-config`);for(let t of e.aiAgentIgnoreConfigFiles??[])r(t.sourcePath,`direct`,`AI agent ignore config file`,`collected-input-config`);if(e.aindexDir!=null)for(let t of Nm(e.aindexDir,{workspaceDir:e.workspace.directory.path}))r(t,`direct`,`known aindex input config file`,`known-aindex-config`);return t}function Im(e){let t=[];for(let n of e.exactProtectedPaths??[])t.push(Cm(n,`direct`,`legacy direct protected path`,`legacy-direct`));for(let n of e.subtreeProtectedPaths??[])t.push(Cm(n,`recursive`,`legacy recursive protected path`,`legacy-recursive`));return t}function Lm(e={}){let t=e.includeReservedWorkspaceContentRoots??!0,n=Tm(Dm([...Am(),...Im(e),...e.workspaceDir==null?[]:jm(e.workspaceDir,e.projectRoots??[],t),...e.aindexDir==null?[]:Mm(e.aindexDir),...e.rules??[]]));return{rules:n.map(e=>({path:e.path,protectionMode:e.protectionMode,reason:e.reason,source:e.source,...e.matcher==null?{}:{matcher:e.matcher}})),exactProtectedPaths:n.filter(e=>e.protectionMode===`direct`).map(e=>e.path),subtreeProtectedPaths:n.filter(e=>e.protectionMode===`recursive`).map(e=>e.path),compiledRules:n}}function Rm(e){let t=new Set;for(let n of e.workspace.projects){if(n.isWorkspaceRootProject===!0)continue;let e=n.dirFromWorkspacePath?.getAbsolutePath?.();e!=null&&e.length>0&&t.add(vm(e))}return[...t]}function zm(e,t){return t==null?e:e.specificity===t.specificity?e.protectionMode===t.protectionMode?e.path.localeCompare(t.path)<0?e:t:e.protectionMode===`recursive`?e:t:e.specificity>t.specificity?e:t}function Bm(e,t){let n=vm(e),r=Sm(n),i;for(let e of t.compiledRules){let t=!1;for(let n of r){for(let r of e.comparisonKeys)if(Om(n,r,e.protectionMode)){i=zm(e,i),t=!0;break}if(t)break}}if(i!=null)return{targetPath:n,protectedPath:i.path,protectionMode:i.protectionMode,reason:i.reason,source:i.source}}function Vm(e,t){let n=[],r=new Map;for(let i of e){let e=vm(i),a=Bm(e,t);if(a==null){n.push(e);continue}r.has(a.targetPath)||r.set(a.targetPath,a)}return{safePaths:n,violations:[...r.values()].sort((e,t)=>e.targetPath.localeCompare(t.targetPath))}}function Hm(e,t){let n=t.map(e=>e.targetPath).join(`, `);return`Protected deletion guard blocked ${e} for ${t.length} path(s): ${n}`}function Um(e,t,n){e.error(j(t,n))}var Wm=class{inputEffects=[];registeredScopes=[];name;dependsOn;_log;get log(){return this._log??=M(this.name),this._log}constructor(e,t){this.name=e,t!=null&&(this.dependsOn=t)}registerEffect(e,t,n=0){this.inputEffects.push({name:e,handler:t,priority:n}),this.inputEffects.sort((e,t)=>(e.priority??0)-(t.priority??0))}async executeEffects(e,t=!1){let n=[];if(this.inputEffects.length===0)return n;let{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(e.userConfigOptions),a={logger:this.log,fs:e.fs,path:e.path,glob:e.glob,spawn:p.spawn,userConfigOptions:e.userConfigOptions,workspaceDir:r,aindexDir:i,dryRun:t};for(let e of this.inputEffects){if(t){this.log.trace({action:`dryRun`,type:`inputEffect`,name:e.name}),n.push({success:!0,description:`Would execute input effect: ${e.name}`});continue}try{let t=await e.handler(a);if(t.success)this.log.trace({action:`inputEffect`,name:e.name,status:`success`,description:t.description}),t.modifiedFiles!=null&&t.modifiedFiles.length>0&&this.log.debug({action:`inputEffect`,name:e.name,modifiedFiles:t.modifiedFiles}),t.deletedFiles!=null&&t.deletedFiles.length>0&&this.log.debug({action:`inputEffect`,name:e.name,deletedFiles:t.deletedFiles});else throw t.error??Error(`Input effect failed: ${e.name}`);n.push(t)}catch(t){let r=t instanceof Error?t:Error(String(t));throw this.logInputEffectFailure(e.name,r),n.push({success:!1,error:r,description:`Input effect failed: ${e.name}`}),r}}return n}logInputEffectFailure(e,t){if(t instanceof lm){Um(this.log,t.operation,t.violations);return}this.log.error(w({code:`INPUT_EFFECT_FAILED`,title:`Input effect failed: ${e}`,rootCause:x(`The input effect "${e}" failed before tnmsc could finish preprocessing.`,`Underlying error: ${t.message}`),exactFix:x(`Inspect the effect inputs and fix the failing file, path, or environment condition before retrying tnmsc.`),possibleFixes:[x(`Re-run the command after fixing the referenced path or generated artifact.`),x(`Add a focused regression test if this effect should handle the failure more gracefully.`)],details:{effectName:e,errorMessage:t.message}}))}hasEffects(){return this.inputEffects.length>0}getEffectCount(){return this.inputEffects.length}registerScope(e,t){this.registeredScopes.push({namespace:e,values:t}),this.log.debug({action:`registerScope`,namespace:e,keys:Object.keys(t)})}getRegisteredScopes(){return this.registeredScopes}clearRegisteredScopes(){this.registeredScopes.length=0,this.log.debug({action:`clearRegisteredScopes`})}resolveBasePaths(e){let t=e.workspaceDir,n=this.resolvePath(t,``),r=e.aindex?.dir??`aindex`;return{workspaceDir:n,aindexDir:d.join(n,r)}}resolvePath(e,t){let n=e;return n.startsWith(R_.USER_HOME)&&(n=n.replace(R_.USER_HOME,m.homedir())),n.includes(R_.WORKSPACE)&&(n=n.replace(R_.WORKSPACE,t)),d.normalize(n)}resolveAindexPath(e,t){return d.join(t,e)}readAndParseMarkdown(e,t){return hf(t.readFileSync(e,`utf8`))}};function Gm(e={}){let{filePath:t,position:n,sourceText:r,expression:i,exportName:a,nodeType:o,phase:s,hint:c,cause:l}=e,u=n?.start.line,d=n?.start.column,f=n?.end?.line,p=n?.end?.column,m=n?.start.offset,h=n?.end?.offset,g=u!=null&&r!=null?Km(r,u):void 0,_=qm(r,m,h,g),v=u!=null&&d!=null&&g!=null?Jm(u,d,p,g):void 0,y={};return t!=null&&t.length>0&&Object.assign(y,{filePath:t}),u!=null&&Object.assign(y,{line:u}),d!=null&&Object.assign(y,{column:d}),f!=null&&Object.assign(y,{endLine:f}),p!=null&&Object.assign(y,{endColumn:p}),m!=null&&Object.assign(y,{offset:m}),h!=null&&Object.assign(y,{endOffset:h}),_!=null&&_.length>0&&Object.assign(y,{snippet:_}),g!=null&&g.length>0&&Object.assign(y,{sourceLine:g}),v!=null&&v.length>0&&Object.assign(y,{codeFrame:v}),i!=null&&i.length>0&&Object.assign(y,{expression:i}),a!=null&&a.length>0&&Object.assign(y,{exportName:a}),o!=null&&o.length>0&&Object.assign(y,{nodeType:o}),s!=null&&s.length>0&&Object.assign(y,{phase:s}),c!=null&&c.length>0&&Object.assign(y,{hint:c}),l!=null&&l.length>0&&Object.assign(y,{cause:l}),y}function Km(e,t){return e.split(/\r?\n/u)[t-1]}function qm(e,t,n,r){if(e!=null&&t!=null){let r=n!=null&&n>=t?n:t+1,i=e.slice(t,r).trim();if(i.length>0)return i.length>240?`${i.slice(0,240)}...`:i}let i=r?.trim();if(i!=null&&i.length>0)return i}function Jm(e,t,n,r){let i=`${e} | `,a=` `.repeat(i.length+Math.max(0,t-1)),o=Math.max(1,(n??t+1)-t);return`${i}${r}\n${a}${`^`.repeat(o)}`}function Ym(e){if(!(e.line==null||e.column==null))return e.endLine!=null&&e.endColumn!=null?`${e.line}:${e.column}-${e.endLine}:${e.endColumn}`:`${e.line}:${e.column}`}function Xm(e,t){let n=[e];t.phase!=null&&n.push(`phase: ${t.phase}`),t.nodeType!=null&&n.push(`node: ${t.nodeType}`),t.filePath!=null&&n.push(`file: ${t.filePath}`);let r=Ym(t);return r!=null&&n.push(`location: ${r}`),t.expression!=null&&n.push(`expression: ${t.expression}`),t.exportName!=null&&n.push(`export: ${t.exportName}`),t.sourceLine!=null&&n.push(`source line: ${t.sourceLine.trimEnd()}`),t.codeFrame!=null&&(n.push(`code frame:`),n.push(t.codeFrame)),t.hint!=null&&n.push(`hint: ${t.hint}`),t.cause!=null&&n.push(`cause: ${t.cause}`),n.join(`
101
- `)}function Zm(e,t={}){return e instanceof Qm||e instanceof Error?e.message:Xm(t.summary??`Compiler diagnostic`,e)}var Qm=class extends Error{diagnostic;filePath;line;column;endLine;endColumn;snippet;sourceLine;codeFrame;phase;nodeType;constructor(e,t,n){super(Xm(t,n)),this.name=e,this.diagnostic=n,n.filePath!=null&&(this.filePath=n.filePath),n.line!=null&&(this.line=n.line),n.column!=null&&(this.column=n.column),n.endLine!=null&&(this.endLine=n.endLine),n.endColumn!=null&&(this.endColumn=n.endColumn),n.snippet!=null&&(this.snippet=n.snippet),n.sourceLine!=null&&(this.sourceLine=n.sourceLine),n.codeFrame!=null&&(this.codeFrame=n.codeFrame),n.phase!=null&&(this.phase=n.phase),n.nodeType!=null&&(this.nodeType=n.nodeType)}};function $m(e){if(e===`mdxTextExpression`||e===`mdxFlowExpression`)return`Literal braces in MDX text are parsed as expressions. Escape the braces or wrap the placeholder in code if you meant plain text.`;if(e===`mdxJsxAttributeValueExpression`)return`JSX attribute expressions must reference values that exist in scope.`}var eh=class extends Qm{expression;constructor(e,t){super(`ScopeError`,e,t),t.expression!=null&&(this.expression=t.expression)}},th=class extends eh{variableName;constructor(e,t,n={}){let r=Gm({...n,expression:t,phase:n.phase??`expression-evaluation`,hint:n.hint??$m(n.nodeType)}),i=`Undefined variable "${e}" in expression "${t??``}"`;super(i,r),this.name=`UndefinedVariableError`,this.variableName=e}},nh=class extends eh{namespace;constructor(e,t,n={}){let r=Gm({...n,expression:t,phase:n.phase??`expression-evaluation`,hint:n.hint??$m(n.nodeType)}),i=`Undefined namespace "${e}" in expression "${t??``}"`;super(i,r),this.name=`UndefinedNamespaceError`,this.namespace=e}},rh=class extends Qm{exportName;constructor(e,t,n={}){let r=Gm({...n,exportName:t,phase:n.phase??`export-parsing`,hint:n.hint??`Export metadata must be statically evaluable. Use plain literals, arrays, objects, or scope-backed references only.`});super(`ExportParseError`,e,r),t!=null&&(this.exportName=t)}},ih=Object.defineProperty,ah=(e,t)=>{let n={};for(var r in e)ih(n,r,{get:e[r],enumerable:!0});return t||ih(n,Symbol.toStringTag,{value:`Module`}),n};const oh=new Map;function sh(e,t){oh.set(e,t)}function ch(){return new Map(oh)}function lh(e){return oh.has(e)}function uh(e,t,n){let r=e.trim(),i=dh(n,e);return r===``?``:/^[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*$/i.test(r)?fh(r,t,i):ph(r,t,i)}function dh(e,t){return{expression:t,...e?.filePath!=null&&{filePath:e.filePath},...e?.sourceText!=null&&{sourceText:e.sourceText},...e?.position!=null&&{position:e.position},...e?.nodeType!=null&&{nodeType:e.nodeType}}}function fh(e,t,n){let r=e.split(`.`),i=r[0];if(i==null||!(i in t))throw new nh(i??``,e,n);let a=t[i];for(let t=1;t<r.length;t++){let i=r[t];if(i==null)continue;if(a==null)throw new th(i,e,n);if(typeof a!=`object`)throw TypeError(`Cannot read property "${i}" of ${typeof a} in expression "${e}"`);let o=a;if(!(i in o))throw new th(i,e,n);a=o[i]}return mh(a)}function ph(e,t,n){let r=Object.keys(t),i=r.map(e=>t[e]);try{return mh(Function(...r,`return (${e})`)(...i))}catch(t){let r=t instanceof Error?t.message:String(t);if(r.includes(`is not defined`)){let t=/(\w+) is not defined/.exec(r);if(t?.[1]!=null)throw new nh(t[1],e,{...n,cause:r})}let i=n?.filePath==null?[]:[`file: ${n.filePath}`],a=n?.position?.start==null?[]:[`location: ${n.position.start.line}:${n.position.start.column}`];throw Error([`Failed to evaluate expression: "${e}"`,...i,...a,`Cause: ${r}`].join(`
102
- `))}}function mh(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`object`)try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function hh(e,t){return e===null?!1:t.components.has(e)||lh(e)}async function gh(e){return async(t,n)=>(await e({type:`root`,children:t},n)).children}async function _h(e,t,n){let r=e.name;if(r==null||r===``)return[];let i=t.components.get(r);if(i==null)return[];if(t.processingStack.includes(r)){let e=[...t.processingStack,r].join(` → `);throw Error(`Circular dependency detected: ${e}`)}let a={scope:t.scope,components:t.components,processingStack:[...t.processingStack,r],...t.basePath==null?{}:{basePath:t.basePath}},o=await gh(n);try{return await i(e,a,o)}catch(e){let n=e instanceof Error?e.message:String(e),i=t.processingStack.join(` → `);throw Error(`Failed to process component "${r}"${i===``?``:` (called from: ${i})`}:\n${n}`,{cause:e})}}function vh(e,t,n){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...n?.position!=null&&{position:n.position},nodeType:t}}function yh(e,t){let n=e.name?.toLowerCase();if(n==null)return null;switch(n){case`pre`:return Sh(e,t);case`a`:return Ch(e,t);case`strong`:case`b`:return wh(e,t);case`em`:case`i`:return Th(e,t);case`img`:return Eh(e,t);case`blockquote`:return Dh(e,t);default:return null}}function bh(e,t,n){let r=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return r==null?null:typeof r.value==`string`?r.value:r.value!=null&&typeof r.value==`object`&&r.value.type===`mdxJsxAttributeValueExpression`?uh(r.value.value,n.scope,vh(n,`mdxJsxAttributeValueExpression`,r)):r.value===null?``:null}function xh(e,t){let n=``;for(let r of e.children){if(r.type===`text`){n+=r.value;continue}if(r.type===`mdxTextExpression`){n+=uh(r.value,t.scope,vh(t,`mdxTextExpression`,r));continue}(r.type===`mdxJsxFlowElement`||r.type===`mdxJsxTextElement`)&&(n+=xh(r,t))}return n}function Sh(e,t){let n=null;for(let t of e.children){if((t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)&&t.name?.toLowerCase()===`code`){n=t;break}if(t.type===`paragraph`&&`children`in t){let e=t.children;for(let t of e)if((t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)&&t.name?.toLowerCase()===`code`){n=t;break}if(n!=null)break}}if(n==null)return null;let r=bh(n,`className`,t)??``,i=/language-(\w+)/.exec(r)?.[1],a=xh(n,t);return[{type:`code`,lang:i??null,value:a.trim()}]}function Ch(e,t){let n=bh(e,`href`,t);if(n==null||n===``)return null;let r=xh(e,t);return[{type:`paragraph`,children:[{type:`link`,url:n,title:bh(e,`title`,t)??null,children:[{type:`text`,value:r}]}]}]}function wh(e,t){let n={type:`strong`,children:[{type:`text`,value:xh(e,t)}]};return e.type,[{type:`paragraph`,children:[n]}]}function Th(e,t){let n={type:`emphasis`,children:[{type:`text`,value:xh(e,t)}]};return e.type,[{type:`paragraph`,children:[n]}]}function Eh(e,t){let n=bh(e,`src`,t);if(n==null||n===``)return null;let r={type:`image`,url:n,alt:bh(e,`alt`,t)??``,title:bh(e,`title`,t)??null};return e.type,[{type:`paragraph`,children:[r]}]}function Dh(e,t){return[{type:`blockquote`,children:[{type:`paragraph`,children:[{type:`text`,value:xh(e,t)}]}]}]}function Oh(e,t){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...t.position!=null&&{position:t.position},nodeType:t.type}}function kh(e){return e==null?!1:JSON.stringify(e).includes(`"JSX`)}async function Ah(e,t,n){let r=e.data?.estree;if(r==null||r.body.length===0)return[];let i=r.body[0];return i?.type===`ExpressionStatement`?jh(i.expression,t,n,e):[]}async function jh(e,t,n,r){return e.type===`JSXElement`?Lh(e,t,n,r):e.type===`JSXFragment`?Rh(e,t,n,r):e.type===`LogicalExpression`?Mh(e,t,n,r):e.type===`ConditionalExpression`?Nh(e,t,n,r):e.type===`SequenceExpression`?Ph(e,t,n,r):e.type===`ArrayExpression`?Fh(e,t,n,r):qh(e,t,r)}async function Mh(e,t,n,r){let i=await Ih(e.left,t,n,r);return e.operator===`&&`?Gh(i)?jh(e.right,t,n,r):[]:e.operator===`||`?Gh(i)?Wh(e.left)?jh(e.left,t,n,r):Kh(i):jh(e.right,t,n,r):e.operator===`??`?i==null?jh(e.right,t,n,r):Wh(e.left)?jh(e.left,t,n,r):Kh(i):[]}async function Nh(e,t,n,r){return Gh(await Ih(e.test,t,n,r))?jh(e.consequent,t,n,r):jh(e.alternate,t,n,r)}async function Ph(e,t,n,r){let i=[];for(let a of e.expressions){let e=await jh(a,t,n,r);i.push(...e)}return i}async function Fh(e,t,n,r){let i=[];for(let a of e.elements)if(a!=null)if(a.type===`SpreadElement`){let e=await jh(a.argument,t,n,r);i.push(...e)}else{let e=await jh(a,t,n,r);i.push(...e)}return i}async function Ih(e,t,n,r){if(Wh(e))return!0;if(e.type===`Literal`)return e.value;if(e.type===`Identifier`)return e.name===`undefined`?void 0:e.name===`NaN`?NaN:e.name===`Infinity`?1/0:t.scope[e.name];if(e.type===`UnaryExpression`){let i=await Ih(e.argument,t,n,r);return e.operator===`!`?!Gh(i):e.operator===`-`?-i:e.operator===`+`?+i:e.operator===`typeof`?typeof i:void 0}if(e.type===`BinaryExpression`){let i=await Ih(e.left,t,n,r),a=await Ih(e.right,t,n,r);return e.operator===`===`?i===a:e.operator===`!==`?i!==a:e.operator===`==`?i===a:e.operator===`!=`?i!==a:e.operator===`<`?i<a:e.operator===`<=`?i<=a:e.operator===`>`?i>a:e.operator===`>=`?i>=a:e.operator===`+`?i+a:e.operator===`-`?i-a:e.operator===`*`?i*a:e.operator===`/`?i/a:e.operator===`%`?i%a:void 0}if(e.type===`LogicalExpression`){let i=await Ih(e.left,t,n,r);return e.operator===`&&`?Gh(i)?Ih(e.right,t,n,r):i:e.operator===`||`?Gh(i)?i:Ih(e.right,t,n,r):e.operator===`??`?i??Ih(e.right,t,n,r):void 0}if(e.type===`MemberExpression`){let i=await Ih(e.object,t,n,r);if(i==null)return;if(e.computed)return i[await Ih(e.property,t,n,r)];let{name:a}=e.property;return i[a]}if(e.type===`ConditionalExpression`)return Gh(await Ih(e.test,t,n,r))?Ih(e.consequent,t,n,r):Ih(e.alternate,t,n,r);let i=Uh(e);if(i!==``)try{let e=uh(i,t.scope,Oh(t,r));return e===`true`?!0:e===`false`?!1:e===`null`?null:e===`undefined`||e===``?void 0:/^-?\d+(?:\.\d+)?$/.test(e)?Number(e):e}catch{return}}async function Lh(e,t,n,r){let i=Bh(e,t);if(i.name!=null&&hh(i.name,t)){let{processAst:e}=await Promise.resolve().then(()=>Jh);return _h(i,t,e)}return yh(i,t)??(i.children.length>0?n(i.children,t):[])}async function Rh(e,t,n,r){let i=[];for(let a of e.children){let e=await zh(a,t,n,r);i.push(...e)}return i}async function zh(e,t,n,r){if(e.type===`JSXElement`)return Lh(e,t,n,r);if(e.type===`JSXFragment`)return Rh(e,t,n,r);if(e.type===`JSXText`){let t=e.value.trim();return t===``?[]:[{type:`paragraph`,children:[{type:`text`,value:t}]}]}return e.type===`JSXExpressionContainer`?e.expression.type===`JSXEmptyExpression`?[]:jh(e.expression,t,n,r):e.type===`JSXSpreadChild`?jh(e.expression,t,n,r):[]}function Bh(e,t){let n=e.openingElement,r=null;n.name.type===`JSXIdentifier`?{name:r}=n.name:n.name.type===`JSXMemberExpression`?r=Vh(n.name):n.name.type===`JSXNamespacedName`&&(r=`${n.name.namespace.name}:${n.name.name.name}`);let i=[];for(let e of n.attributes)if(e.type===`JSXAttribute`){let t=e.name.type===`JSXIdentifier`?e.name.name:`${e.name.namespace.name}:${e.name.name.name}`,n=null;e.value==null?n=null:e.value.type===`Literal`?n=String(e.value.value):e.value.type===`JSXExpressionContainer`&&e.value.expression.type!==`JSXEmptyExpression`&&(n={type:`mdxJsxAttributeValueExpression`,value:Uh(e.value.expression)}),i.push({type:`mdxJsxAttribute`,name:t,value:n})}else e.type===`JSXSpreadAttribute`&&i.push({type:`mdxJsxExpressionAttribute`,value:`...${Uh(e.argument)}`});let a=[];for(let n of e.children){let e=Hh(n,t);e!=null&&a.push(...e)}return{type:`mdxJsxFlowElement`,name:r,attributes:i,children:a}}function Vh(e){return e.object.type===`JSXIdentifier`?`${e.object.name}.${e.property.name}`:`${Vh(e.object)}.${e.property.name}`}function Hh(e,t){if(e.type===`JSXText`){let{value:t}=e;return t.trim()===``?null:[{type:`paragraph`,children:[{type:`text`,value:t}]}]}if(e.type===`JSXElement`)return[Bh(e,t)];if(e.type===`JSXFragment`){let n=[];for(let r of e.children){let e=Hh(r,t);e!=null&&n.push(...e)}return n}return e.type===`JSXExpressionContainer`?e.expression.type===`JSXEmptyExpression`?null:[{type:`paragraph`,children:[{type:`text`,value:Uh(e.expression)}]}]:e.type===`JSXSpreadChild`?[{type:`paragraph`,children:[{type:`text`,value:`...${Uh(e.expression)}`}]}]:null}function Uh(e){if(e.type===`Identifier`)return e.name;if(e.type===`Literal`)return typeof e.value==`string`?JSON.stringify(e.value):String(e.value);if(e.type===`MemberExpression`){let t=Uh(e.object);return e.computed?`${t}[${Uh(e.property)}]`:`${t}.${e.property.name}`}if(e.type===`CallExpression`)return`${Uh(e.callee)}(${e.arguments.map(e=>Uh(e)).join(`, `)})`;if(e.type===`BinaryExpression`||e.type===`LogicalExpression`){let t=Uh(e.left),n=Uh(e.right);return`(${t} ${e.operator} ${n})`}if(e.type===`UnaryExpression`){let t=Uh(e.argument);return`${e.operator}${t}`}if(e.type===`ConditionalExpression`)return`(${Uh(e.test)} ? ${Uh(e.consequent)} : ${Uh(e.alternate)})`;if(e.type===`ArrayExpression`)return`[${e.elements.filter(e=>e!=null&&e.type!==`SpreadElement`).map(e=>Uh(e)).join(`, `)}]`;if(e.type===`ObjectExpression`)return`{${e.properties.filter(e=>e.type===`Property`).map(e=>`${e.key.type===`Identifier`?e.key.name:Uh(e.key)}: ${Uh(e.value)}`).join(`, `)}}`;if(e.type===`TemplateLiteral`){let t="`";for(let n=0;n<e.quasis.length;n++)t+=e.quasis[n]?.value.raw??``,n<e.expressions.length&&(t+=`\${${Uh(e.expressions[n])}}`);return t+="`",t}return e.type===`SpreadElement`?`...${Uh(e.argument)}`:``}function Wh(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function Gh(e){return!!e}function Kh(e){if(e==null)return[];let t=typeof e==`string`?e:String(e);return t===``||t===`undefined`||t===`null`?[]:[{type:`paragraph`,children:[{type:`text`,value:t}]}]}function qh(e,t,n){let r=Uh(e);if(r===``)return[];try{return Kh(uh(r,t.scope,Oh(t,n)))}catch{return[]}}var Jh=ah({processAst:()=>Zh});function Yh(e,t,n){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...t.position!=null&&{position:t.position},nodeType:n}}function Xh(e){if(!(e.includes(`/`)&&/\.\w+$/.test(e)))return e;let t=e.lastIndexOf(`/`);return e.slice(t+1)}async function Zh(e,t){return Qh(e,t)}async function Qh(e,t){let n=[];for(let r of e.children){let e=await $h(r,t);n.push(...e)}return{type:`root`,children:n}}async function $h(e,t){if(e.type===`mdxjsEsm`)return[];if(e.type===`mdxFlowExpression`){let n=e,r=n.data?.estree,i=n.value.trim();if(i.startsWith(`/*`)&&i.endsWith(`*/`))return[];if(kh(r))return Ah(n,t,async(e,t)=>(await Zh({type:`root`,children:e},t)).children);let a=uh(n.value,t.scope,Yh(t,n,`mdxFlowExpression`));return a===``?[]:[{type:`paragraph`,children:[{type:`text`,value:a}]}]}if(e.type===`mdxJsxFlowElement`)return eg(e,t);if(e.type===`link`){let n=e,r=(await tg(n.children,t)).map(e=>e.type===`text`?{...e,value:Xh(e.value)}:e);return[{...n,children:r}]}if(!(`children`in e&&Array.isArray(e.children)))return[e];let n=await tg(e.children,t);return[{...e,children:n}]}async function eg(e,t){return e.name!=null&&hh(e.name,t)?_h(e,t,Zh):yh(e,t)??[]}async function tg(e,t){let n=[];for(let r of e){if(r.type===`mdxFlowExpression`){let e=r,i=e.data?.estree,a=e.value.trim();if(a.startsWith(`/*`)&&a.endsWith(`*/`))continue;if(kh(i)){let r=await Ah(e,t,async(e,t)=>(await Zh({type:`root`,children:e},t)).children);for(let e of r)n.push(e);continue}let o=uh(e.value,t.scope,Yh(t,e,`mdxFlowExpression`));o!==``&&n.push({type:`paragraph`,children:[{type:`text`,value:o}]});continue}if(r.type===`mdxTextExpression`){let e=r,i=e.value.trim();if(i.startsWith(`/*`)&&i.endsWith(`*/`))continue;let a={type:`text`,value:uh(e.value,t.scope,Yh(t,e,`mdxTextExpression`))};n.push(a);continue}if(r.type===`mdxJsxTextElement`){let e=r;if(e.name!=null&&hh(e.name,t)){let r=await _h(e,t,Zh);for(let e of r)e.type===`paragraph`&&`children`in e?n.push(...e.children):n.push(e);continue}let i=yh(e,t);if(i!=null)for(let e of i)e.type===`paragraph`&&`children`in e?n.push(...e.children):n.push(e);continue}if(`children`in r&&Array.isArray(r.children)){let e=await tg(r.children,t);if(r.type===`link`){let t=e.map(e=>e.type===`text`?{...e,value:Xh(e.value)}:e);n.push({...r,children:t});continue}n.push({...r,children:e});continue}n.push(r)}return n}function ng(e){let t=this;t.compiler=n;function n(n){return Nr(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function rg(e,t={}){let n={},{yamlFrontMatter:r,scope:i,filePath:a,sourceText:o}=t;for(let t of e){let e=ig(t,i,{...a!=null&&{filePath:a},...o!=null&&{sourceText:o}});Object.assign(n,e)}let s=Object.keys(n).length>0,c=r!=null&&Object.keys(r).length>0,l;return l=s&&c?`mixed`:s?`export`:`yaml`,{fields:{...r,...n},source:l}}function ig(e,t,n={}){let r={},{filePath:i,sourceText:a}=n,o=e.value.trim(),s=/^export\s+default\s+/.exec(o);if(s!=null){let n=s[0].length,c=ag(o,n);if(c!=null)try{let e=og(c.trim(),t,i);typeof e==`object`&&e&&!Array.isArray(e)&&Object.assign(r,e)}catch(t){let n=t instanceof Error?t.message:String(t);throw new rh(`Cannot statically evaluate export default`,`default`,{...i!=null&&{filePath:i},...a!=null&&{sourceText:a},...e.position!=null&&{position:e.position},nodeType:`mdxjsEsm`,phase:`export-parsing`,cause:n})}return r}let c=/export\s+const\s+(\w+)\s*=\s*/g,l=c.exec(o);for(;l!==null;){let n=l[1];if(n==null){l=c.exec(o);continue}let s=ag(o,l.index+l[0].length);if(s==null){l=c.exec(o);continue}try{let e=og(s.trim(),t,i);n===`metadata`&&typeof e==`object`&&e&&!Array.isArray(e)?Object.assign(r,e):r[n]=e}catch(t){let r=t instanceof Error?t.message:String(t);throw new rh(`Cannot statically evaluate export "${n}"`,n,{...i!=null&&{filePath:i},...a!=null&&{sourceText:a},...e.position!=null&&{position:e.position},nodeType:`mdxjsEsm`,phase:`export-parsing`,cause:r})}l=c.exec(o)}return r}function ag(e,t){let n=0,r=null,i=!1,a=t;for(let o=t;o<e.length;o++){let t=e[o];if(i){i=!1;continue}if(t===`\\`){i=!0;continue}if(r!=null){t===r&&(r=null);continue}if(t===`"`||t===`'`||t==="`"){r=t;continue}if(t===`{`||t===`[`){n++;continue}if(t===`}`||t===`]`){n--;continue}if(n===0){if(t===`;`||t===`
103
- `){a=o;break}if(t===`/`&&o+1<e.length&&e[o+1]===`/`){a=o;break}}o===e.length-1&&(a=e.length)}a<=t&&(a=e.length);let o=e.slice(t,a).trim();return o.endsWith(`;`)?o.slice(0,-1).trim():o}function og(e,t,n){let r=e.trim();if(r===``)throw Error(`Empty value cannot be evaluated`);if(r===`true`)return!0;if(r===`false`)return!1;if(r===`null`)return null;if(/^-?\d+(?:\.\d+)?$/.test(r))return Number(r);if(r.startsWith(`"`)&&r.endsWith(`"`))return sg(r.slice(1,-1),`"`);if(r.startsWith(`'`)&&r.endsWith(`'`))return sg(r.slice(1,-1),`'`);if(r.startsWith("`")&&r.endsWith("`")){let e=r.slice(1,-1);if(e.includes("${"))throw Error(`Template literal with expressions cannot be statically evaluated: ${r}`);return sg(e,"`")}if(r.startsWith(`[`)&&r.endsWith(`]`))return lg(r,t,n);if(r.startsWith(`{`)&&r.endsWith(`}`))return ug(r,t,n);if(/^[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*$/i.test(r))return cg(r,t,n);let i=n==null?``:` in file "${n}"`;throw Error(`Expression "${r}" cannot be statically evaluated${i}`)}function sg(e,t){return e.replaceAll(`\\n`,`
104
- `).replaceAll(`\\r`,`\r`).replaceAll(`\\t`,` `).replaceAll(`\\"`,`"`).replaceAll(`\\'`,`'`).replaceAll(`\\\\`,`\\`)}function cg(e,t,n){if(t==null){let t=n==null?``:` in file "${n}"`;throw Error(`Variable reference "${e}" cannot be resolved without scope${t}`)}let r=e.split(`.`),i=r[0];if(i==null||!(i in t)){let r=n==null?``:` in file "${n}"`,a=Object.keys(t).join(`, `);throw Error(`Undefined namespace "${i}" in expression "${e}"${r}. Available: ${a}`)}let a=t[i];for(let t=1;t<r.length;t++){let i=r[t];if(i==null)continue;if(a==null){let t=n==null?``:` in file "${n}"`;throw Error(`Cannot read property "${i}" of null/undefined in "${e}"${t}`)}if(typeof a!=`object`){let t=n==null?``:` in file "${n}"`;throw Error(`Cannot read property "${i}" of ${typeof a} in "${e}"${t}`)}let o=a;if(!(i in o)){let t=n==null?``:` in file "${n}"`,r=Object.keys(o).join(`, `);throw Error(`Undefined property "${i}" in "${e}"${t}. Available: ${r}`)}a=o[i]}if(typeof a==`string`||typeof a==`number`||typeof a==`boolean`||a===null||Array.isArray(a)||typeof a==`object`)return a;let o=n==null?``:` in file "${n}"`;throw Error(`Variable "${e}" resolved to unsupported type: ${typeof a}${o}`)}function lg(e,t,n){let r=e.slice(1,-1).trim();if(r===``)return[];if(t==null)try{let t=dg(e),n=JSON.parse(t);if(Array.isArray(n))return n}catch{}return fg(r).map(e=>og(e.trim(),t,n))}function ug(e,t,n){let r=e.slice(1,-1).trim();if(r===``)return{};if(t==null)try{let t=dg(e),n=JSON.parse(t);if(typeof n==`object`&&n&&!Array.isArray(n))return n}catch{}let i={},a=pg(r);for(let e of a){let r=mg(e);if(r===-1)continue;let a=e.slice(0,r).trim(),o=e.slice(r+1).trim();(a.startsWith(`"`)&&a.endsWith(`"`)||a.startsWith(`'`)&&a.endsWith(`'`))&&(a=a.slice(1,-1)),i[a]=og(o,t,n)}return i}function dg(e){let t=``,n=null,r=!1;for(let i=0;i<e.length;i++){let a=e[i];if(r){t+=a,r=!1;continue}if(a===`\\`){t+=a,r=!0;continue}if(n!=null){a===n?(t+=`"`,n=null):a===`"`&&n===`'`?t+=`\\"`:t+=a;continue}if(a===`"`||a===`'`){t+=`"`,n=a;continue}if(a===`:`&&i>0){let e=t.length-1;for(;e>=0&&/\s/.test(t.charAt(e));)e--;let n=e+1;for(;e>=0&&/[\w$]/.test(t.charAt(e));)e--;if(e++,e>0&&t.charAt(e-1)!==`"`){let r=t.slice(e,n);r.length>0&&/^[\w$]+$/.test(r)&&(t=`${t.slice(0,e)}"${r}"`)}}t+=a}return t}function fg(e){let t=[],n=``,r=0,i=null,a=!1;for(let o of e){if(a){n+=o,a=!1;continue}if(o===`\\`){n+=o,a=!0;continue}if(i!=null){n+=o,o===i&&(i=null);continue}if(o===`"`||o===`'`||o==="`"){n+=o,i=o;continue}if(o===`[`||o===`{`){r++,n+=o;continue}if(o===`]`||o===`}`){r--,n+=o;continue}if(o===`,`&&r===0){n.trim()!==``&&t.push(n.trim()),n=``;continue}n+=o}return n.trim()!==``&&t.push(n.trim()),t}function pg(e){return fg(e)}function mg(e){let t=null,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){n=!1;continue}if(i===`\\`){n=!0;continue}if(t!=null){i===t&&(t=null);continue}if(i===`"`||i===`'`||i==="`"){t=i;continue}if(i===`:`)return r}return-1}function hg(e,t,n){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...n?.position!=null&&{position:n.position},nodeType:t}}function gg(e,t){let n=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`when`);if(n?.type!==`mdxJsxAttribute`)return!0;if(typeof n.value==`string`)return n.value===`true`;if(n.value!=null&&typeof n.value==`object`&&n.value.type===`mdxJsxAttributeValueExpression`)try{let e=uh(n.value.value,t.scope,hg(t,`mdxJsxAttributeValueExpression`,n));return e===`true`||e===`1`}catch{return!1}return!1}async function _g(e,t,n){return!gg(e,t)||e.children.length===0?[]:n(e.children,t)}async function vg(e,t){if(!gg(e,t)||e.children.length===0)return[];let n=yg(e.children,t);return n===``?[]:[{type:`text`,value:n}]}function yg(e,t){let n=``;for(let r of e)if(r.type===`text`)n+=r.value;else if(r.type===`mdxTextExpression`)try{n+=uh(r.value,t.scope,hg(t,`mdxTextExpression`,r))}catch{}else `children`in r&&Array.isArray(r.children)&&(n+=yg(r.children,t));return n}function bg(){sh(`Md`,_g),sh(`Md.Line`,vg)}bg();function xg(e,t){let n={};if(e!=null&&(n.os={...e.os},n.env={...e.env},n.profile={...e.profile},n.tool={...e.tool}),t!=null)for(let[e,r]of Object.entries(t)){let t=n[e];n[e]=typeof r==`object`&&r&&!Array.isArray(r)&&typeof t==`object`&&t&&!Array.isArray(t)?{...t,...r}:r}return n}async function Sg(e,t){let n=sf(e),r=xg(t?.globalScope,t?.scope),i=ch(),a;if(t?.extractMetadata===!0){let i=n.children.find(e=>e.type===`yaml`),o;if(i!=null)try{o=_.parse(i.value)}catch{}a=rg(n.children.filter(e=>e.type===`mdxjsEsm`),{...o!=null&&{yamlFrontMatter:o},scope:r,...t?.filePath!=null&&{filePath:t.filePath},sourceText:e}),n.children=n.children.filter(e=>e.type!==`yaml`&&e.type!==`mdxjsEsm`)}let o=await Zh(n,{scope:r,components:i,processingStack:[],...t?.basePath!=null&&{basePath:t.basePath},...t?.filePath!=null&&{filePath:t.filePath},sourceText:e}),s=Xd().use($e,[`yaml`]).use(Vo).use(ng,{bullet:`-`,fence:"`",fences:!0,emphasis:`*`,strong:`*`,rule:`-`,handlers:{text(e){return e.value}}}).stringify(o).trim();return t?.extractMetadata===!0&&a!=null?{content:s,metadata:a}:s}const Cg=/^\s*(```|~~~)/u,wg=[/^\s*export\s+default\b/u,/^\s*export\s+const\b/u,/^\s*import\b/u];let Tg=null;try{let e=(0,h.createRequire)(e(`url`).pathToFileURL(__filename).href),{platform:t,arch:n}=f.default,r={"win32-x64":[`napi-md-compiler.win32-x64-msvc`,`win32-x64-msvc`],"linux-x64":[`napi-md-compiler.linux-x64-gnu`,`linux-x64-gnu`],"linux-arm64":[`napi-md-compiler.linux-arm64-gnu`,`linux-arm64-gnu`],"darwin-arm64":[`napi-md-compiler.darwin-arm64`,`darwin-arm64`],"darwin-x64":[`napi-md-compiler.darwin-x64`,`darwin-x64`]}[`${t}-${n}`];if(r!=null){let[t,n]=r;try{Tg=e(`./${t}.node`)}catch{try{Tg=e(`@truenine/memory-sync-cli-${n}`).mdCompiler}catch{}}}}catch{}async function Eg(e,t){let n=t?.extractMetadata===!0?{...t,extractMetadata:!0}:null,r=Dg(e,t);if(r!=null){if(n!=null){let{metadata:t}=r;return t==null||kg(r.content)?Sg(e,n):{content:r.content,metadata:t}}return r.content}return n==null?t==null?Sg(e):Sg(e,{...t,extractMetadata:!1}):Sg(e,n)}function Dg(e,t){if(Tg==null)return null;try{let n=Tg.compileMdxToMd(e,Og(t)),r=JSON.parse(n);return t?.extractMetadata===!0&&r.metadata==null?null:r}catch{return null}}function Og(e){if(e==null)return null;let t={...e,...e.globalScope==null?{}:{globalScope:{os:e.globalScope.os,env:e.globalScope.env,profile:e.globalScope.profile,tool:e.globalScope.tool}}};return JSON.stringify(t)}function kg(e){let t;for(let n of e.split(/\r?\n/u)){let e=Cg.exec(n);if(e?.[1]!=null){let n=e[1];t==null?t=n:t===n&&(t=void 0);continue}if(t==null&&wg.some(e=>e.test(n)))return!0}return!1}var Ag=class{type;name;_log;get log(){return this._log??=M(this.name),this._log}dependsOn;constructor(e,t,n){this.name=e,this.type=t,n!=null&&(this.dependsOn=n)}};function jg(e,t){return e==null&&t==null?[]:[...new Set([...e??[],...t??[]])]}function Mg(e,t){return e==null||t.length===0?!0:typeof e==`string`?t.includes(e):e.some(e=>t.includes(e))}function Ng(e,t){if(e==null&&t==null)return{};let n={};for(let[t,r]of Object.entries(e??{}))n[t]=[...r];for(let[e,r]of Object.entries(t??{}))n[e]=Object.hasOwn(n,e)?[...new Set([...n[e],...r])]:[...r];return n}function Pg(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.matchesSeries==`function`&&typeof t.resolveEffectiveIncludeSeries==`function`&&typeof t.resolveSubSeries==`function`}function Fg(){let e={"win32-x64":`win32-x64-msvc`,"linux-x64":`linux-x64-gnu`,"linux-arm64":`linux-arm64-gnu`,"darwin-arm64":`darwin-arm64`,"darwin-x64":`darwin-x64`}[`${f.default.platform}-${f.default.arch}`];if(e==null)return;let t=`@truenine/memory-sync-cli-${e}`,n=`napi-memory-sync-cli.${e}.node`;try{let e=(0,h.createRequire)(require(`url`).pathToFileURL(__filename).href),r=[t,`${t}/${n}`,`./${n}`];for(let t of r)try{let n=e(t),r=[n,n?.default,n?.config];for(let e of r)if(Pg(e))return e}catch{}}catch{}}const{resolveEffectiveIncludeSeries:Ig,matchesSeries:Lg,resolveSubSeries:Rg}=Fg()??{resolveEffectiveIncludeSeries:jg,matchesSeries:Mg,resolveSubSeries:Ng};function $(e,t,n){let r=Ig(t?.includeSeries,t?.[n]?.includeSeries);return e.filter(e=>Lg(e.seriName,r))}function zg(e){let t=e.replaceAll(/\.\/+/g,``);return t=t.replaceAll(/\/+$/g,``),t}function Bg(e,t){return t.startsWith(`**/`)?`${e}/${t}`:t.startsWith(`*`)?`${e}/**/${t}`:`${e}/${t}`}function Vg(e,t){for(let n of t){let t=n.replaceAll(/\/+$/g,``),r=[{prefix:t,pattern:`${t}/`},{prefix:t,pattern:`${t}\\`}];for(let{prefix:t,pattern:n}of r)if(e.startsWith(n))return{prefix:t,baseGlob:e.slice(n.length)};if(e===t)return{prefix:t,baseGlob:`**/*`}}return{prefix:null,baseGlob:e}}function Hg(e,t){let n=Rg(t?.subSeries,t?.rules?.subSeries);if(Object.keys(n).length===0)return e;let r={};for(let[e,t]of Object.entries(n)){let n=zg(e);r[n]=t}let i=Object.keys(r);return e.map(e=>{if(e.seriName==null)return e;let t=[];for(let[n,i]of Object.entries(r))(Array.isArray(e.seriName)?e.seriName.some(e=>i.includes(e)):i.includes(e.seriName))&&t.push(n);if(t.length===0)return e;let n=[];for(let r of e.globs){let{prefix:e,baseGlob:a}=Vg(r,i);e!=null&&n.push(r);for(let r of t){if(r===e)continue;let t=Bg(r,a);n.includes(t)||n.push(t)}}return{...e,globs:n}})}function Ug(e){let t=d.join(e,`.git`);if(!u.existsSync(t))return null;let n=u.lstatSync(t);if(n.isDirectory())return d.join(t,`info`);if(n.isFile())try{let n=u.readFileSync(t,`utf8`).trim(),r=/^gitdir: (.+)$/.exec(n);if(r?.[1]!=null){let t=d.resolve(e,r[1]);return d.join(t,`info`)}}catch{}return null}function Wg(e,t=5){let n=[],r=new Set([`node_modules`,`.turbo`,`dist`,`build`,`out`,`.cache`]);function i(a,o){if(o>t)return;let s;try{let e=u.readdirSync(a,{withFileTypes:!0});if(!Array.isArray(e))return;s=e}catch{return}s.some(e=>e.name===`.git`)&&a!==e&&n.push(a);for(let e of s)e.isDirectory()&&(e.name===`.git`||r.has(e.name)||i(d.join(a,e.name),o+1))}return i(e,0),n}const Gg={default:{websearch:`web_search`,webfetch:`web_fetch`,readFile:`read_file`,writeFile:`write_file`,executeCommand:`execute_command`,todolistWrite:`todolist_write`,grep:`grep`,listDirectory:`list_directory`},claudeCode:{readFile:`Read`,writeFile:`Write`,executeCommand:`Execute`,todolistWrite:`TodoWrite`,listDirectory:`List`},kiro:{websearch:`remote_web_search`,webfetch:`webFetch`,readFile:`readFile`,writeFile:`fsWrite`,executeCommand:`executeBash`,todolistWrite:`todolistWrite`,grep:`grepSearch`,listDirectory:`listDir`}};let Kg=function(e){return e.Bash=`bash`,e.Zsh=`zsh`,e.Fish=`fish`,e.Sh=`sh`,e.PowerShell=`powershell`,e.Pwsh=`pwsh`,e.Cmd=`cmd`,e.Unknown=`unknown`,e}({}),qg=function(e){return e.Win=`win`,e.Mac=`mac`,e.Linux=`linux`,e.Unknown=`unknown`,e}({});var Jg=class{userConfig;toolPreset;constructor(e={}){this.userConfig=e.userConfig,this.toolPreset=e.toolPreset??`default`}collect(){return{os:this.collectOsInfo(),env:this.collectEnvContext(),profile:this.collectProfile(),tool:this.collectToolReferences(),Md:this.createMdComponent()}}collectOsInfo(){let e=m.platform();return{platform:e,arch:m.arch(),hostname:m.hostname(),homedir:m.homedir(),tmpdir:m.tmpdir(),type:m.type(),release:m.release(),shellKind:this.detectShellKind(),kind:this.detectOsKind(e)}}detectOsKind(e){switch(e){case`win32`:return qg.Win;case`darwin`:return qg.Mac;case`linux`:case`freebsd`:case`openbsd`:case`sunos`:case`aix`:return qg.Linux;default:return qg.Unknown}}detectShellKind(){let e=(f.default.env.SHELL??f.default.env.ComSpec??``).toLowerCase();return e.includes(`bash`)?Kg.Bash:e.includes(`zsh`)?Kg.Zsh:e.includes(`fish`)?Kg.Fish:e.includes(`pwsh`)?Kg.Pwsh:e.includes(`powershell`)?Kg.PowerShell:e.includes(`cmd`)?Kg.Cmd:e.endsWith(`/sh`)?Kg.Sh:Kg.Unknown}collectEnvContext(){return{...f.default.env}}collectProfile(){return this.userConfig?.profile==null?{}:this.userConfig.profile}collectToolReferences(){let e={...Gg.default};return this.toolPreset===`claudeCode`?{...e,...Gg.claudeCode}:this.toolPreset===`kiro`?{...e,...Gg.kiro}:e}createMdComponent(){let e=(e=>e.when===!1?null:e.children);return e.Line=e=>e.when===!1?null:e.children,e}};let Yg=function(e){return e[e.SystemDefault=0]=`SystemDefault`,e[e.UserConfig=10]=`UserConfig`,e[e.PluginRegistered=20]=`PluginRegistered`,e[e.CompileTime=30]=`CompileTime`,e}({});var Xg=class{registrations=[];globalScope=null;setGlobalScope(e){this.globalScope=e}getGlobalScope(){return this.globalScope}register(e,t,n=Yg.PluginRegistered){this.registrations.push({namespace:e,values:t,priority:n})}getRegistrations(){return this.registrations}merge(e){let t={};this.globalScope!=null&&(t.os={...this.globalScope.os},t.env={...this.globalScope.env},t.profile={...this.globalScope.profile},t.tool={...this.globalScope.tool});let n=[...this.registrations].sort((e,t)=>e.priority-t.priority);for(let e of n)t[e.namespace]=this.deepMerge(t[e.namespace],e.values);if(e!=null)for(let[n,r]of Object.entries(e))t[n]=typeof r==`object`&&r&&!Array.isArray(r)?this.deepMerge(t[n],r):r;return t}deepMerge(e,t){if(e==null)return{...t};let n={...e};for(let[e,r]of Object.entries(t))n[e]=typeof r==`object`&&r&&!Array.isArray(r)&&typeof n[e]==`object`&&n[e]!==null&&!Array.isArray(n[e])?this.deepMerge(n[e],r):r;return n}resolve(e){let t=this.merge();return e.replaceAll(/\$\{([^}]+)\}/g,(e,n)=>{let r=n.split(`.`),i=t;for(let e of r)i=i?.[e];return i==null?`\${${n}}`:String(i)})}clear(){this.registrations.length=0,this.globalScope=null}};const Zg=[`project`,`global`];function Qg(e){if(e==null)return[];if(typeof e==`string`)return[e];let t=[];for(let n of e)t.includes(n)||t.push(n);return t}function $g(e,t){let n=new Map;for(let[e,r]of t.entries())n.set(r,e);return[...e].sort((e,t)=>(n.get(e)??2**53-1)-(n.get(t)??2**53-1))}function e_(e){let{requestedScopes:t,defaultScopes:n,supportedScopes:r,singleScope:i,availableScopes:a,priority:o=Zg}=e,s=Qg(t),c=Qg(n),l=new Set(Qg(r)),u=(s.length>0?s:c).filter(e=>l.has(e));if(u.length===0)return[];let d=$g(u,o);if(!i)return d;if(a!=null&&a.length>0){let e=new Set(a),t=d.find(t=>e.has(t));return t==null?[]:[t]}let[f]=d;return f==null?[]:[f]}const t_=y.z.object({src:y.z.string(),dist:y.z.string()}),n_=y.z.object({dir:y.z.string().default(`aindex`),skills:t_,commands:t_,subAgents:t_,rules:t_,globalPrompt:t_,workspacePrompt:t_,app:t_,ext:t_,arch:t_}),r_=y.z.object({includeSeriesPrefix:y.z.boolean().optional(),seriesSeparator:y.z.string().optional()}),i_=y.z.object({includeSeriesPrefix:y.z.boolean().optional(),pluginOverrides:y.z.record(y.z.string(),r_).optional()}),a_=y.z.enum([`project`,`global`]),o_=y.z.union([a_,y.z.array(a_).min(1)]),s_=y.z.object({prompt:o_.optional(),rules:o_.optional(),commands:o_.optional(),subagents:o_.optional(),skills:o_.optional(),mcp:o_.optional()}),c_=y.z.object({plugins:y.z.record(y.z.string(),s_).optional()}),l_=y.z.object({blankLineAfter:y.z.boolean().optional()}),u_=y.z.enum([`direct`,`recursive`]),d_=y.z.enum([`path`,`glob`]),f_=y.z.object({path:y.z.string(),protectionMode:u_,matcher:d_.optional(),reason:y.z.string().optional()}),p_=y.z.object({rules:y.z.array(f_).optional()}),m_=y.z.object({name:y.z.string().optional(),username:y.z.string().optional(),gender:y.z.string().optional(),birthday:y.z.string().optional()}).catchall(y.z.unknown()),h_=y.z.object({version:y.z.string().optional(),workspaceDir:y.z.string().optional(),aindex:n_.optional(),logLevel:y.z.enum([`trace`,`debug`,`info`,`warn`,`error`]).optional(),commandSeriesOptions:i_.optional(),outputScopes:c_.optional(),frontMatter:l_.optional(),cleanupProtection:p_.optional(),profile:m_.optional()}),g_=y.z.object({names:y.z.array(y.z.string()).optional()}),__=y.z.object({includeSeries:y.z.array(y.z.string()).optional(),subSeries:y.z.record(y.z.string(),y.z.array(y.z.string())).optional()});y.z.object({mcp:g_.optional(),includeSeries:y.z.array(y.z.string()).optional(),subSeries:y.z.record(y.z.string(),y.z.array(y.z.string())).optional(),rules:__.optional(),skills:__.optional(),subAgents:__.optional(),commands:__.optional()}),y.z.object({});function v_(e,t){let n=t==null?``:` in ${t}`;return e==null||e===`project`||e===`global`?{valid:!0,errors:[],warnings:[]}:{valid:!1,errors:[`Field "scope" must be "project" or "global"${n}`],warnings:[]}}function y_(e,t){let{requiredFields:n,optionalDefaults:r,filePath:i}=t,a=[],o=[];for(let t of n){let n=String(t);if(!(n in e)||e[n]==null){let e=i==null?`Missing required field "${n}"`:`Missing required field "${n}" in ${i}`;a.push(e)}}if(r!=null){for(let[t,n]of Object.entries(r))if(!(t in e)||e[t]==null){let e=i==null?`Using default value for optional field "${t}": ${JSON.stringify(n)}`:`Using default value for optional field "${t}": ${JSON.stringify(n)} in ${i}`;o.push(e)}}return{valid:a.length===0,errors:a,warnings:o}}function b_(e,t){let n=t==null?``:` in ${t}`,r=[],i=[];(!(`name`in e)||e.name==null)&&r.push(`Missing required field "name"${n}`),!(`description`in e)||e.description==null?r.push(`Missing required field "description"${n}`):(typeof e.description!=`string`||e.description.trim().length===0)&&r.push(`Required field "description" cannot be empty${n}`),e.enabled??i.push(`Using default value for optional field "enabled": true${n}`),e.keywords??i.push(`Using default value for optional field "keywords": []${n}`);let a=v_(e.scope,t);return r.push(...a.errors),{valid:r.length===0,errors:r,warnings:i}}function x_(e,t){let n=y_(e,{requiredFields:[],optionalDefaults:{},filePath:t}),r=v_(e.scope,t);return{valid:n.valid&&r.valid,errors:[...n.errors,...r.errors],warnings:n.warnings}}function S_(e,t){let n=y_(e,{requiredFields:[`name`,`description`],optionalDefaults:{},filePath:t}),r=v_(e.scope,t);return{valid:n.valid&&r.valid,errors:[...n.errors,...r.errors],warnings:n.warnings}}function C_(e,t){let n=[],r=[],i=t==null?``:` in ${t}`;!Array.isArray(e.globs)||e.globs.length===0?n.push(`Missing or empty required field "globs"${i}`):e.globs.every(e=>typeof e==`string`)||n.push(`Field "globs" must be an array of strings${i}`),(typeof e.description!=`string`||e.description.length===0)&&n.push(`Missing or empty required field "description"${i}`);let{scope:a,seriName:o}=e,s=v_(a,t);return n.push(...s.errors),a??r.push(`Using default value for optional field "scope": "project"${i}`),o!=null&&typeof o!=`string`&&!Array.isArray(o)&&n.push(`Field "seriName" must be a string or string array${i}`),{valid:n.length===0,errors:n,warnings:r}}function w_(e){return{workspace:{directory:e.workspace.directory,projects:[...e.workspace.projects]},...e.skills!=null&&{skills:[...e.skills]},...e.commands!=null&&{commands:[...e.commands]},...e.subAgents!=null&&{subAgents:[...e.subAgents]},...e.rules!=null&&{rules:[...e.rules]},...e.readmePrompts!=null&&{readmePrompts:[...e.readmePrompts]},...e.globalMemory!=null&&{globalMemory:e.globalMemory},...e.vscodeConfigFiles!=null&&{vscodeConfigFiles:[...e.vscodeConfigFiles]},...e.jetbrainsConfigFiles!=null&&{jetbrainsConfigFiles:[...e.jetbrainsConfigFiles]},...e.editorConfigFiles!=null&&{editorConfigFiles:[...e.editorConfigFiles]},...e.aiAgentIgnoreConfigFiles!=null&&{aiAgentIgnoreConfigFiles:[...e.aiAgentIgnoreConfigFiles]},...e.globalGitIgnore!=null&&{globalGitIgnore:e.globalGitIgnore},...e.shadowGitExclude!=null&&{shadowGitExclude:e.shadowGitExclude},...e.aindexDir!=null&&{aindexDir:e.aindexDir}}}const T_={Readme:{src:`rdm.mdx`,out:`README.md`},CodeOfConduct:{src:`coc.mdx`,out:`CODE_OF_CONDUCT.md`},Security:{src:`security.mdx`,out:`SECURITY.md`}},E_=[`prompt`,`rules`,`commands`,`subagents`,`skills`,`mcp`];function D_(e){return v.Buffer.isBuffer(e)}function O_(e){if(typeof e==`string`)return[e];let t=[];for(let n of e)t.includes(n)||t.push(n);return t}function k_(e,t){return t?.outputScopes?.plugins?.[e]}function A_(e){for(let t of E_){let n=e.outputCapabilities[t];if(n!=null&&n.scopes.length===0)throw Error(`Plugin ${e.name} declares empty scopes for topic "${t}"`)}}function j_(e,t){let n=k_(e.name,t);if(n!=null)for(let t of E_){let r=n[t];if(r==null)continue;let i=e.outputCapabilities[t];if(i==null)throw Error(`Invalid outputScopes configuration: outputScopes.plugins.${e.name}.${t} is set, but plugin ${e.name} does not support topic "${t}".`);let a=O_(r);if(i.singleScope&&a.length>1){let n=a.join(`, `);throw Error(`Invalid outputScopes configuration: outputScopes.plugins.${e.name}.${t} is single-scope and cannot request multiple scopes [${n}].`)}let o=new Set(i.scopes),s=a.filter(e=>!o.has(e));if(s.length>0){let n=i.scopes.join(`, `),r=s.join(`, `);throw Error(`Invalid outputScopes configuration: outputScopes.plugins.${e.name}.${t} requests unsupported scopes [${r}]. Allowed scopes: [${n}].`)}}}function M_(e,t){for(let n of e)A_(n),j_(n,t)}async function N_(e,t){let n=new Map;M_(e,t.pluginOptions);for(let r of e){let e=await r.declareOutputFiles(t),i=[];for(let n of e){if(t.dryRun===!0){i.push({path:n.path,success:!0,skipped:!1});continue}try{let e=d.dirname(n.path);if(u.mkdirSync(e,{recursive:!0}),n.ifExists===`skip`&&u.existsSync(n.path)){i.push({path:n.path,success:!0,skipped:!0});continue}if(n.ifExists===`error`&&u.existsSync(n.path))throw Error(`Refusing to overwrite existing file: ${n.path}`);if(n.symlinkTarget!=null){u.existsSync(n.path)&&u.rmSync(n.path,{force:!0,recursive:!1}),u.symlinkSync(n.symlinkTarget,n.path,`file`),i.push({path:n.path,success:!0});continue}let a=await r.convertContent(n,t);D_(a)?u.writeFileSync(n.path,a):u.writeFileSync(n.path,a,`utf8`),i.push({path:n.path,success:!0})}catch(e){i.push({path:n.path,success:!1,error:e})}}let a={files:i,dirs:[]};n.set(r.name,a)}return n}async function P_(e,t){let n=[],r=[],i=[],a=[];M_(e,t.pluginOptions);for(let n of e){let e=await n.declareOutputFiles({...t,dryRun:!0});for(let t of e)t.scope===`global`?a.push(t.path):r.push(t.path)}return{projectDirs:n,projectFiles:r,globalDirs:i,globalFiles:a}}var F_=class extends Error{nodeName;missingDependency;constructor(e,t){super(`Node "${e}" depends on missing dependency "${t}"`),this.name=`MissingDependencyError`,this.nodeName=e,this.missingDependency=t}},I_=class extends Error{cyclePath;constructor(e){super(`Circular dependency detected: ${e.join(` -> `)}`),this.name=`CircularDependencyError`,this.cyclePath=[...e]}},L_=class extends Ag{declarativeOutput=!0;outputCapabilities;globalConfigDir;outputFileName;treatWorkspaceRootProjectAsProject;indexignore;commandsConfig;subAgentsConfig;commandOutputEnabled;subAgentOutputEnabled;skillsConfig;skillOutputEnabled;toolPreset;rulesConfig;ruleOutputEnabled;cleanupConfig;supportsBlankLineAfterFrontMatter;registryWriterCache=new Map;constructor(e,t){super(e,Up.Output,t?.dependsOn),this.globalConfigDir=t?.globalConfigDir??``,this.outputFileName=t?.outputFileName??``,this.treatWorkspaceRootProjectAsProject=t?.treatWorkspaceRootProjectAsProject??!1,this.indexignore=t?.indexignore;let n=t?.commands?.transformFrontMatter;this.commandOutputEnabled=t?.commands!=null,this.commandsConfig={subDir:t?.commands?.subDir??`commands`,sourceScopes:t?.commands?.sourceScopes??[`project`,`global`],...n!=null&&{transformFrontMatter:n}},this.subAgentOutputEnabled=t?.subagents!=null,this.subAgentsConfig={subDir:t?.subagents?.subDir??`agents`,sourceScopes:t?.subagents?.sourceScopes??[`project`,`global`],includePrefix:t?.subagents?.includePrefix??!0,linkSymbol:t?.subagents?.linkSymbol??`-`,ext:t?.subagents?.ext??`.md`,...t?.subagents?.transformFrontMatter!=null&&{transformFrontMatter:t.subagents.transformFrontMatter}},this.skillOutputEnabled=t?.skills!=null,this.skillsConfig={subDir:t?.skills?.subDir??`skills`,sourceScopes:t?.skills?.sourceScopes??[`project`,`global`]},this.toolPreset=t?.toolPreset,this.ruleOutputEnabled=t?.rules!=null,this.rulesConfig={...t?.rules,sourceScopes:t?.rules?.sourceScopes??[`project`,`global`]},this.cleanupConfig=t?.cleanup??{},this.supportsBlankLineAfterFrontMatter=t?.supportsBlankLineAfterFrontMatter??!0,this.outputCapabilities=t?.capabilities==null?this.buildInferredCapabilities():this.normalizeCapabilities(t.capabilities)}buildInferredCapabilities(){let e={};return this.outputFileName.length>0&&(e.prompt={scopes:[`project`,`global`],singleScope:!1}),this.ruleOutputEnabled&&(e.rules={scopes:this.rulesConfig.sourceScopes??[`project`,`global`],singleScope:!1}),this.commandOutputEnabled&&(e.commands={scopes:this.commandsConfig.sourceScopes,singleScope:!0}),this.subAgentOutputEnabled&&(e.subagents={scopes:this.subAgentsConfig.sourceScopes,singleScope:!0}),this.skillOutputEnabled&&(e.skills={scopes:this.skillsConfig.sourceScopes,singleScope:!0}),e}normalizeCapabilities(e){let t={};for(let n of E_){let r=e[n];if(r==null)continue;let i=this.normalizeCapability(r);i!=null&&(t[n]=i)}return t}normalizeCapability(e){let t=[];for(let n of e.scopes)t.includes(n)||t.push(n);if(t.length!==0)return{scopes:t,singleScope:e.singleScope}}resolvePromptSourceProjectConfig(e){let t=this.getConcreteProjects(e);return t.find(e=>e.isPromptSourceProject===!0)?.projectConfig??t[0]?.projectConfig}getConcreteProjects(e){return e.collectedOutputContext.workspace.projects.filter(e=>e.isWorkspaceRootProject!==!0)}isProjectPromptOutputTarget(e){return e.isPromptSourceProject!==!0}getProjectOutputProjects(e){let t=[...this.getConcreteProjects(e)];if(!this.treatWorkspaceRootProjectAsProject)return t;let n=this.getWorkspaceRootProject(e);return n!=null&&t.push(n),t}getProjectPromptOutputProjects(e){return this.getProjectOutputProjects(e).filter(e=>this.isProjectPromptOutputTarget(e))}getWorkspaceRootProject(e){return e.collectedOutputContext.workspace.projects.find(e=>e.isWorkspaceRootProject===!0)}resolveProjectRootDir(e,t){if(t.isWorkspaceRootProject===!0)return this.resolveDirectoryPath(e.collectedOutputContext.workspace.directory);let n=t.dirFromWorkspacePath;if(n!=null)return this.resolveDirectoryPath(n)}resolveProjectConfigDir(e,t){let n=this.resolveProjectRootDir(e,t);if(n!=null)return this.globalConfigDir.length===0?n:d.join(n,this.globalConfigDir)}isRelativePath(e){return e.pathKind===Q.Relative}toRelativePath(e){return e.path}resolveFullPath(e,t){let n=this.resolveDirectoryPath(e),r=t??this.outputFileName;return r?d.join(n,r):n}resolveDirectoryPath(e){return e.pathKind===Q.Absolute?e.path:`basePath`in e?d.resolve(e.basePath,e.path):d.resolve(f.default.cwd(),e.path)}getWorkspaceConfigDir(e){let t=this.resolveDirectoryPath(e.collectedOutputContext.workspace.directory);return d.join(t,this.globalConfigDir)}createRelativePath(e,t,n){return d.join(t,e)}createFileRelativePath(e,t){return d.join(e,t)}getGlobalConfigDir(){return d.join(this.getHomeDir(),this.globalConfigDir)}getXdgConfigHomeDir(){let e=f.default.env.XDG_CONFIG_HOME;return typeof e==`string`&&e.trim().length>0?e:d.join(this.getHomeDir(),`.config`)}getHomeDir(){return m.homedir()}joinPath(...e){return d.join(...e)}resolvePath(...e){return d.resolve(...e)}dirname(e){return d.dirname(e)}basename(e,t){return d.basename(e,t)}getIgnoreOutputPath(){if(this.indexignore!=null)return this.indexignore}resolveCleanupScopeBasePaths(e,t){if(e===`global`)return[this.getHomeDir()];if(e===`xdgConfig`)return[this.getXdgConfigHomeDir()];let n=[];for(let e of this.getProjectOutputProjects(t)){let r=this.resolveProjectRootDir(t,e);r!=null&&n.push(r)}return n}resolveCleanupDeclaredPath(e,t){return d.isAbsolute(t)?d.resolve(t):t===`~`?this.getHomeDir():t.startsWith(`~/`)||t.startsWith(`~\\`)?d.resolve(this.getHomeDir(),t.slice(2)):d.resolve(e,t)}normalizeGlobPattern(e){return e.replaceAll(`\\`,`/`)}buildCleanupTargetsFromScopeConfig(e,t,n){if(e==null)return[];let r=[],i=[`project`,`global`,`xdgConfig`],a=(e,i,a)=>{if(a==null||a.length===0)return;let o=this.resolveCleanupScopeBasePaths(e,n);for(let n of a)for(let a of o){let o=d.isAbsolute(n)?d.resolve(n):this.resolveCleanupDeclaredPath(a,n);r.push({path:i===`glob`?this.normalizeGlobPattern(o):o,kind:i,scope:e,label:`${t}.${e}`})}};for(let t of i){let n=e[t];n!=null&&(a(t,`file`,n.files),a(t,`directory`,n.dirs),a(t,`glob`,n.globs))}return r}resolveFrontMatterBlankLineAfter(e){return this.supportsBlankLineAfterFrontMatter?e?.pluginOptions?.frontMatter?.blankLineAfter??!0:!0}buildMarkdownContent(e,t,n){return df(t,e,{blankLineAfter:this.resolveFrontMatterBlankLineAfter(n)})}buildMarkdownContentWithRaw(e,t,n,r){return t!=null&&Object.keys(t).length>0?this.buildMarkdownContent(e,t,r):n!=null&&n.length>0?pf(n,e,{blankLineAfter:this.resolveFrontMatterBlankLineAfter(r)}):e}extractGlobalMemoryContent(e){return e.collectedOutputContext.globalMemory?.content}combineGlobalWithContent(e,t,n){let{separator:r=`
105
-
106
- `,skipIfEmpty:i=!0,position:a=`before`}=n??{};if(i&&(e==null||e.trim().length===0))return t;let o=e??``;return a===`after`?`${t}${r}${o}`:`${o}${r}${t}`}transformCommandName(e,t){let{includeSeriesPrefix:n=!0,seriesSeparator:r=`-`}=t??{};return!n||e.commandPrefix==null?`${e.commandName}.md`:`${e.commandPrefix}${r}${e.commandName}.md`}transformSubAgentName(e,t){let n=t?.includePrefix??this.subAgentsConfig.includePrefix,r=t?.linkSymbol??this.subAgentsConfig.linkSymbol,i=t?.ext??this.subAgentsConfig.ext,a=i.startsWith(`.`)?i:`.${i}`;return n&&e.agentPrefix!=null&&e.agentPrefix.length>0?`${e.agentPrefix}${r}${e.agentName}${a}`:`${e.agentName}${a}`}getCommandSeriesOptions(e){let t=e.pluginOptions?.commandSeriesOptions,n=t?.pluginOverrides?.[this.name],r=n?.includeSeriesPrefix??t?.includeSeriesPrefix,i=n?.seriesSeparator;return r!=null&&i!=null?{includeSeriesPrefix:r,seriesSeparator:i}:r==null?i==null?{}:{seriesSeparator:i}:{includeSeriesPrefix:r}}getTransformOptionsFromContext(e,t){let n=this.getCommandSeriesOptions(e),r=n.includeSeriesPrefix??t?.includeSeriesPrefix,i=n.seriesSeparator??t?.seriesSeparator;return r!=null&&i!=null?{includeSeriesPrefix:r,seriesSeparator:i}:r==null?i==null?{}:{seriesSeparator:i}:{includeSeriesPrefix:r}}shouldSkipDueToPlugin(e,t){let n=e.registeredPluginNames;return n==null?!1:n.includes(t)}getRegistryWriter(e){let t=e.name,n=this.registryWriterCache.get(t);if(n!=null)return n;let r=new e(this.log);return this.registryWriterCache.set(t,r),r}async registerInRegistry(e,t,n){return e.register(t,n.dryRun)}normalizeRuleScope(e){return e.scope??`project`}normalizeSourceScope(e){return e===`global`||e===`project`?e:`project`}resolveCommandSourceScope(e){if(e.globalOnly===!0)return`global`;let t=e.yamlFrontMatter?.scope;return this.normalizeSourceScope(t)}resolveSubAgentSourceScope(e){let t=e.yamlFrontMatter?.scope;return this.normalizeSourceScope(t)}resolveSkillSourceScope(e){let t=e.yamlFrontMatter?.scope;return this.normalizeSourceScope(t)}selectSingleScopeItems(e,t,n,r){if(e.length===0)return{items:[]};let[i]=e_({requestedScopes:r,defaultScopes:t,supportedScopes:t,singleScope:!0,availableScopes:[...new Set(e.map(n))]});return i==null?{items:[]}:{selectedScope:i,items:e.filter(e=>n(e)===i)}}selectRuleScopes(e,t){let n=[...new Set(t.map(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))))];return e_({requestedScopes:this.getTopicScopeOverride(e,`rules`),defaultScopes:this.rulesConfig.sourceScopes??[`project`,`global`],supportedScopes:this.rulesConfig.sourceScopes??[`project`,`global`],singleScope:!1,availableScopes:n}).filter(e=>n.includes(e))}selectPromptScopes(e,t=[`project`,`global`],n=t){return e_({requestedScopes:this.getTopicScopeOverride(e,`prompt`),defaultScopes:n,supportedScopes:t,singleScope:!1})}getTopicScopeOverride(e,t){return e.pluginOptions?.outputScopes?.plugins?.[this.name]?.[t]}buildSkillFrontMatter(e,t){let n=e.yamlFrontMatter,r={name:n.name,description:n.description};return`displayName`in n&&n.displayName!=null&&(r.displayName=n.displayName),`keywords`in n&&n.keywords!=null&&n.keywords.length>0&&(r.keywords=n.keywords),`author`in n&&n.author!=null&&(r.author=n.author),`version`in n&&n.version!=null&&(r.version=n.version),(t?.includeTools??!0)&&`allowTools`in n&&n.allowTools!=null&&n.allowTools.length>0&&(r.allowTools=(t?.toolFormat??`array`)===`string`?n.allowTools.join(`,`):n.allowTools),t?.additionalFields!=null&&Object.assign(r,t.additionalFields),r}buildRuleContent(e,t){let n=this.rulesConfig.transformFrontMatter?this.rulesConfig.transformFrontMatter(e):{globs:e.globs.join(`, `)},r=n==null||Object.keys(n).length===0?void 0:n;return this.buildMarkdownContent(e.content,r,t)}buildRuleFileName(e){let t=`${`${this.rulesConfig.prefix??`rule`}${this.rulesConfig.linkSymbol??`-`}`}${e.prefix}${this.rulesConfig.linkSymbol??`-`}${e.ruleName}${this.rulesConfig.ext??`.md`}`;return this.log.trace(`buildRuleFileName`,{plugin:this.name,rulePrefix:e.prefix,ruleName:e.ruleName,prefix:this.rulesConfig.prefix??`rule`,linkSymbol:this.rulesConfig.linkSymbol??`-`,ext:this.rulesConfig.ext??`.md`,result:t}),t}async declareOutputFiles(e){return this.buildDefaultOutputDeclarations(e)}async declareCleanupPaths(e){let t=this.buildCleanupTargetsFromScopeConfig(this.cleanupConfig.delete,`delete`,e),n=this.buildCleanupTargetsFromScopeConfig(this.cleanupConfig.protect,`protect`,e),{excludeScanGlobs:r}=this.cleanupConfig;return t.length===0&&n.length===0&&(r==null||r.length===0)?{}:{...t.length>0&&{delete:t},...n.length>0&&{protect:n},...r!=null&&r.length>0&&{excludeScanGlobs:r}}}async convertContent(e,t){let n=e.source;switch(n.kind){case`projectRootMemory`:case`projectChildMemory`:case`globalMemory`:case`skillReference`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`subAgent`:return this.buildSubAgentContent(n.subAgent,t);case`skillMain`:return this.buildSkillMainContent(n.skill,t);case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;case`rule`:return this.buildRuleContent(n.rule,t);default:throw Error(`Unsupported declaration source for plugin ${this.name}`)}}async buildDefaultOutputDeclarations(e){let t=[],{globalMemory:n,commands:r,subAgents:i,skills:a,rules:o,aiAgentIgnoreConfigFiles:s}=e.collectedOutputContext,c=this.getTransformOptionsFromContext(e),l=this.getIgnoreOutputPath(),u=this.indexignore==null?void 0:s?.find(e=>e.fileName===this.indexignore),f=this.commandOutputEnabled&&r!=null?this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)):{items:[]},p=this.subAgentOutputEnabled&&i!=null?this.selectSingleScopeItems(i,this.subAgentsConfig.sourceScopes,e=>this.resolveSubAgentSourceScope(e),this.getTopicScopeOverride(e,`subagents`)):{items:[]},m=this.skillOutputEnabled&&a!=null?this.selectSingleScopeItems(a,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)):{items:[]},h=o??[],g=this.ruleOutputEnabled&&h.length>0?new Set(this.selectRuleScopes(e,h)):new Set,_=new Set(this.selectPromptScopes(e,this.outputCapabilities.prompt?.scopes??[`project`,`global`])),v={project:[],global:[]};for(let e of h)v[this.normalizeSourceScope(this.normalizeRuleScope(e))].push(e);let y=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter?.name??i.dir.getDirectoryName(),a=d.join(e,this.skillsConfig.subDir,r);if(t.push({path:d.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:d.join(a,e.dir.path.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillReference`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:d.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}};for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n),i=this.resolveProjectConfigDir(e,n);if(r==null||i==null)continue;if(this.outputFileName.length>0&&_.has(`project`)&&this.isProjectPromptOutputTarget(n)&&(n.rootMemoryPrompt!=null&&t.push({path:d.join(r,this.outputFileName),scope:`project`,source:{kind:`projectRootMemory`,content:n.rootMemoryPrompt.content}}),n.childMemoryPrompts!=null))for(let e of n.childMemoryPrompts)t.push({path:this.resolveFullPath(e.dir),scope:`project`,source:{kind:`projectChildMemory`,content:e.content}});let{projectConfig:a}=n;if(f.selectedScope===`project`&&f.items.length>0){let e=$(f.items,a,`commands`);for(let n of e){let e=this.transformCommandName(n,c);t.push({path:d.join(i,this.commandsConfig.subDir,e),scope:`project`,source:{kind:`command`,command:n}})}}if(p.selectedScope===`project`&&p.items.length>0){let e=$(p.items,a,`subAgents`);for(let n of e){let e=this.transformSubAgentName(n);t.push({path:d.join(i,this.subAgentsConfig.subDir,e),scope:`project`,source:{kind:`subAgent`,subAgent:n}})}}if(m.selectedScope===`project`&&m.items.length>0&&y(i,`project`,$(m.items,a,`skills`)),g.has(`project`)){let e=Hg($(v.project,a,`rules`),a),n=d.join(i,this.rulesConfig.subDir??`rules`);for(let r of e)t.push({path:d.join(n,this.buildRuleFileName(r)),scope:`project`,source:{kind:`rule`,rule:r}})}l!=null&&u!=null&&n.isWorkspaceRootProject!==!0&&n.isPromptSourceProject!==!0&&n.dirFromWorkspacePath!=null&&t.push({path:d.join(n.dirFromWorkspacePath.basePath,n.dirFromWorkspacePath.path,l),scope:`project`,source:{kind:`ignoreFile`,content:u.content}})}let b=this.resolvePromptSourceProjectConfig(e);if(f.selectedScope===`global`&&f.items.length>0){let e=$(f.items,b,`commands`),n=this.getGlobalConfigDir();for(let r of e){let e=this.transformCommandName(r,c);t.push({path:d.join(n,this.commandsConfig.subDir,e),scope:`global`,source:{kind:`command`,command:r}})}}if(p.selectedScope===`global`&&p.items.length>0){let e=$(p.items,b,`subAgents`),n=this.getGlobalConfigDir();for(let r of e){let e=this.transformSubAgentName(r);t.push({path:d.join(n,this.subAgentsConfig.subDir,e),scope:`global`,source:{kind:`subAgent`,subAgent:r}})}}if(m.selectedScope===`global`&&m.items.length>0){let e=$(m.items,b,`skills`);y(this.getGlobalConfigDir(),`global`,e)}for(let e of[`global`]){if(!g.has(e))continue;let n=this.getGlobalConfigDir(),r=Hg($(v[e],b,`rules`),b),i=d.join(n,this.rulesConfig.subDir??`rules`);for(let n of r)t.push({path:d.join(i,this.buildRuleFileName(n)),scope:e,source:{kind:`rule`,rule:n}})}return n!=null&&this.outputFileName.length>0&&_.has(`global`)&&t.push({path:d.join(this.getGlobalConfigDir(),this.outputFileName),scope:`global`,source:{kind:`globalMemory`,content:n.content}}),t}async buildCommandContent(e,t){let n=e.content,r=e.yamlFrontMatter,i=!1;if(e.rawMdxContent!=null&&this.toolPreset!=null){this.log.debug(`recompiling command with tool preset`,{file:e.dir.getAbsolutePath(),toolPreset:this.toolPreset,hasRawContent:!0});let t=new Jg({toolPreset:this.toolPreset}).collect(),a=await Eg(e.rawMdxContent,{globalScope:t,extractMetadata:!0,basePath:e.dir.basePath,filePath:e.dir.getAbsolutePath()});n=a.content,r=a.metadata.fields,i=!0}let a=this.commandsConfig.transformFrontMatter;if(a==null)throw Error(`commands.transformFrontMatter is required for command output plugin: ${this.name}`);let o=a(e,{isRecompiled:i,...r!=null&&{sourceFrontMatter:r}});return this.buildMarkdownContent(n,o,t)}buildSubAgentContent(e,t){let n=this.subAgentsConfig.transformFrontMatter;if(n!=null){let r=n(e,{...e.yamlFrontMatter!=null&&{sourceFrontMatter:e.yamlFrontMatter}});return this.buildMarkdownContent(e.content,r,t)}return this.buildMarkdownContentWithRaw(e.content,e.yamlFrontMatter,e.rawFrontMatter,t)}buildSkillMainContent(e,t){return this.buildMarkdownContentWithRaw(e.content,e.yamlFrontMatter,e.rawFrontMatter,t)}};const R_={USER_HOME:`~`,WORKSPACE:`$WORKSPACE`},z_={},B_={AgentsOutput:`AgentsOutputPlugin`,GeminiCLIOutput:`GeminiCLIOutputPlugin`,CursorOutput:`CursorOutputPlugin`,WindsurfOutput:`WindsurfOutputPlugin`,ClaudeCodeCLIOutput:`ClaudeCodeCLIOutputPlugin`,KiroIDEOutput:`KiroCLIOutputPlugin`,OpencodeCLIOutput:`OpencodeCLIOutputPlugin`,OpenAICodexCLIOutput:`CodexCLIOutputPlugin`,DroidCLIOutput:`DroidCLIOutputPlugin`,WarpIDEOutput:`WarpIDEOutputPlugin`,TraeIDEOutput:`TraeIDEOutputPlugin`,TraeCNIDEOutput:`TraeCNIDEOutputPlugin`,QoderIDEOutput:`QoderIDEPluginOutputPlugin`,JetBrainsCodeStyleOutput:`JetBrainsIDECodeStyleConfigOutputPlugin`,JetBrainsAICodexOutput:`JetBrainsAIAssistantCodexOutputPlugin`,AgentSkillsCompactOutput:`GenericSkillsOutputPlugin`,GitExcludeOutput:`GitExcludeOutputPlugin`,ReadmeOutput:`ReadmeMdConfigFileOutputPlugin`,VSCodeOutput:`VisualStudioCodeIDEConfigOutputPlugin`,EditorConfigOutput:`EditorConfigOutputPlugin`,AntigravityOutput:`AntigravityOutputPlugin`},V_={SKILL:`SKILL.md`,CURSOR_GLOBAL_RULE:`global.mdc`,CURSOR_PROJECT_RULE:`always.md`,MCP_CONFIG:`mcp.json`,CLAUDE_MEMORY:`CLAUDE.md`,WINDSURF_GLOBAL_RULE:`global_rules.md`},H_={RULES:`rules`,COMMANDS:`commands`,SKILLS:`skills`,AGENTS:`agents`,CURSOR_SKILLS:`skills-cursor`},U_={MD:`.md`,MDC:`.mdc`,MDX:`.mdx`,JSON:`.json`},W_=[{PRIMARY:`.src.mdx`}.PRIMARY],G_={zh:W_,en:U_.MDX};function K_(e){return W_.some(t=>e.endsWith(t))}const q_={CURSOR:`.cursor`,CLAUDE:`.claude`,WINDSURF:`.codeium/windsurf`,WINDSURF_RULES:`.windsurf`},J_={CURSOR:`.cursorignore`,WINDSURF:`.codeiumignore`},Y_={CURSOR:new Set([`create-rule`,`create-skill`,`create-subagent`,`migrate-to-skills`,`update-cursor-settings`])};var X_=class extends Error{kind;nameOfPrompt;sourcePath;expectedDistPath;constructor(e){let{kind:t,name:n,sourcePath:r,expectedDistPath:i}=e;super([`Missing compiled dist prompt for ${t} "${n}".`,...r==null?[]:[`source: ${r}`],`expected dist: ${i}`].join(` `)),this.name=`MissingCompiledPromptError`,this.kind=t,this.nameOfPrompt=n,r!=null&&(this.sourcePath=r),this.expectedDistPath=i}},Z_=class extends Error{filePath;lineNumber;constructor(e,t,n){super(`Compiled prompt still contains residual module syntax at ${e}:${t}: ${n.trim()}`),this.name=`ResidualModuleSyntaxError`,this.filePath=e,this.lineNumber=t}};const Q_=/^\s*(```|~~~)/u,$_=[/^\s*export\s+default\b/u,/^\s*export\s+const\b/u,/^\s*import\b/u];function ev(e,t){let n,r=e.split(/\r?\n/u);for(let[e,i]of r.entries()){let r=Q_.exec(i);if(r?.[1]!=null){let e=r[1];n==null?n=e:n===e&&(n=void 0);continue}if(n==null&&$_.some(e=>e.test(i)))throw new Z_(t,e+1,i)}}function tv(e,t,n={}){let{preferredSourcePath:r,distRootDir:i,srcRootDir:a}=n;if(t==null||t.length===0||r!=null&&r.length>0)return r;if(i==null||a==null)return;let o=e.relative(i,t);if(!(o.startsWith(`..`)||e.isAbsolute(o)))return e.join(a,o.replace(/\.mdx$/u,`.src.mdx`))}function nv(e){if(e instanceof Qm&&e.filePath!=null)return e.filePath;if(!(e instanceof Error)||!(`filePath`in e))return;let{filePath:t}=e;if(typeof t==`string`&&t.length>0)return t}function rv(e,t){let n=nv(e)??t.distPath,r=[t.operation??`Prompt compilation failed.`,`prompt kind: ${t.promptKind}`,`logical name: ${t.logicalName}`];return t.entryDistPath!=null&&t.entryDistPath.length>0&&t.entryDistPath!==n&&r.push(`entry dist file: ${t.entryDistPath}`),n!=null&&n.length>0&&r.push(`dist file: ${n}`),r.push(`src file: ${t.srcPath??`<unresolved>`}`),r.push(`diagnostic:`),r.push(e instanceof Error?Zm(e):String(e)),r.join(`
107
- `)}function iv(e){return e instanceof X_||e instanceof Z_}var av=class{constructor(e,t,n,r){this.fs=e,this.path=t,this.logger=n,this.globalScope=r}async readDirectoryStructure(e,t,n){let r=[],i=[];if(!this.exists(e))return{prompts:r,errors:i};try{let a=this.fs.readdirSync(e,{withFileTypes:!0});for(let o of a){if(!o.isDirectory())continue;let{name:a}=o,s=this.path.join(e,a),c=this.path.join(t,a);try{let e=await this.readEntry(a,s,c,n,!0);e&&r.push(e)}catch(e){if(i.push({path:s,error:e,phase:`read`}),this.logger.error(D({code:`LOCALIZED_PROMPT_ENTRY_READ_FAILED`,title:`Failed to read localized prompt entry`,operation:`read`,targetKind:`${String(n.kind)} prompt entry`,path:s,error:e,details:{entryName:a,promptKind:String(n.kind)}})),iv(e))throw e}}}catch(t){if(i.push({path:e,error:t,phase:`scan`}),this.logger.error(D({code:`LOCALIZED_PROMPT_DIRECTORY_SCAN_FAILED`,title:`Failed to scan localized prompt source directory`,operation:`scan`,targetKind:`${String(n.kind)} prompt source directory`,path:e,error:t,details:{promptKind:String(n.kind)}})),iv(t))throw t}return{prompts:r,errors:i}}async readFlatFiles(e,t,n){let r=[],i=[],a=this.exists(e),o=this.exists(t);if(this.logger.debug(`readFlatFiles: srcDir=${e}, exists=${a}`),this.logger.debug(`readFlatFiles: distDir=${t}, exists=${o}`),!a&&!o)return{prompts:r,errors:i};let s=this.normalizeExtensions(n.localeExtensions.zh),c=new Set,l=async(a,o)=>{if(!c.has(a)){c.add(a);try{let i=await this.readFlatEntry(a,e,t,a,n);i&&r.push(i)}catch(e){if(i.push({path:o,error:e,phase:`read`}),this.logger.error(D({code:`LOCALIZED_PROMPT_FILE_READ_FAILED`,title:`Failed to read localized prompt file`,operation:`read`,targetKind:`${String(n.kind)} prompt file`,path:o,error:e,details:{promptKind:String(n.kind),logicalName:a}})),iv(e))throw e}}},u=async(e,t=``)=>{if(this.exists(e))try{let n=this.fs.readdirSync(e,{withFileTypes:!0});for(let r of n){let n=t?this.path.join(t,r.name):r.name;if(r.isDirectory()){await u(this.path.join(e,r.name),n);continue}let i=this.findMatchingExtension(r.name,s);if(!r.isFile()||i==null)continue;let a=r.name.slice(0,-i.length);await l(t?this.path.join(t,a):a,this.path.join(e,r.name))}}catch(t){if(i.push({path:e,error:t,phase:`scan`}),this.logger.error(D({code:`LOCALIZED_SOURCE_DIRECTORY_SCAN_FAILED`,title:`Failed to scan localized source directory`,operation:`scan`,targetKind:`${String(n.kind)} source directory`,path:e,error:t,details:{promptKind:String(n.kind)}})),iv(t))throw t}},d=async(e,t=``)=>{if(this.exists(e))try{let n=this.fs.readdirSync(e,{withFileTypes:!0});for(let r of n){let n=t?this.path.join(t,r.name):r.name;if(r.isDirectory()){await d(this.path.join(e,r.name),n);continue}if(!r.isFile()||!r.name.endsWith(`.mdx`))continue;let i=r.name.slice(0,-4);await l(t?this.path.join(t,i):i,this.path.join(e,r.name))}}catch(t){if(i.push({path:e,error:t,phase:`scan`}),this.logger.error(D({code:`LOCALIZED_DIST_DIRECTORY_SCAN_FAILED`,title:`Failed to scan localized dist directory`,operation:`scan`,targetKind:`${String(n.kind)} dist directory`,path:e,error:t,details:{promptKind:String(n.kind)}})),iv(t))throw t}};return a&&await u(e),o&&await d(t),{prompts:r,errors:i}}async readSingleFile(e,t,n){let r=this.path.basename(e);return this.readFlatEntry(r,this.path.dirname(e),this.path.dirname(t),e,n,!0)}async readEntry(e,t,n,r,i=!0){let{localeExtensions:a,entryFileName:o,createPrompt:s,kind:c}=r,l=o??e,u=this.normalizeExtensions(a.zh),d=this.normalizeExtensions(a.en),f=this.resolveLocalizedPath(t,l,u),p=this.resolveLocalizedPath(t,l,d),m=this.path.join(n,`${l}.mdx`),h=this.exists(f)?f:this.exists(p)?p:void 0,g={promptKind:String(c),logicalName:e,entryDistPath:m,...h!=null&&{srcPath:h}},_=await this.readDistContent(m,s,e,g),v=await this.readLocaleContent(f,`zh`,s,e,String(c)),y=await this.readLocaleContent(p,`en`,s,e,String(c)),b=_!=null,S=v!=null,C=y!=null,T=S?f:C?p:void 0;if(!b&&!S&&!C)return this.logger.warn(w({code:`LOCALIZED_PROMPT_ARTIFACTS_MISSING`,title:`Missing source and dist prompt artifacts for ${e}`,rootCause:x(`tnmsc could not find either the source prompt or the compiled dist prompt for "${e}".`),exactFix:x(`Create the source prompt and rebuild the compiled dist prompt before retrying tnmsc.`),details:{promptKind:String(c),name:e,srcZhPath:f,srcEnPath:p,distPath:m}})),null;if(!b)throw new X_({kind:String(c),name:e,...T!=null&&{sourcePath:T},expectedDistPath:m});let E=S?{zh:v,...C&&{en:y},default:v,defaultLocale:`zh`}:void 0,ee=i?this.scanChildren(n,l,[`.mdx`]):void 0;return{name:e,type:c,...E!=null&&{src:E},...b&&{dist:_},metadata:{hasDist:b,hasMultipleLocales:C,isDirectoryStructure:i,...ee&&ee.length>0&&{children:ee}},paths:{...S&&{zh:f},...C&&{en:p},...b&&{dist:m}}}}async readFlatEntry(e,t,n,r,i,a=!1){let{localeExtensions:o,createPrompt:s,kind:c}=i,l=this.normalizeExtensions(o.zh),u=this.normalizeExtensions(o.en),d=this.resolveLocalizedPath(``,r,l),f=this.resolveLocalizedPath(``,r,u),p=this.path.join(n,`${e}.mdx`),m=a?d:this.path.join(t,d),h=a?f:this.path.join(t,f),g=this.exists(m)?m:this.exists(h)?h:void 0,_={promptKind:String(c),logicalName:e,entryDistPath:p,...g!=null&&{srcPath:g}},v=await this.readDistContent(p,s,e,_),y=await this.readLocaleContent(m,`zh`,s,e,String(c)),b=await this.readLocaleContent(h,`en`,s,e,String(c)),S=v!=null,C=y!=null,T=b!=null,E=C?m:T?h:void 0;if(!S&&!C&&!T)return this.logger.warn(w({code:`LOCALIZED_PROMPT_ARTIFACTS_MISSING`,title:`Missing source and dist prompt artifacts for ${e}`,rootCause:x(`tnmsc could not find either the source prompt or the compiled dist prompt for "${e}".`),exactFix:x(`Create the source prompt and rebuild the compiled dist prompt before retrying tnmsc.`),details:{promptKind:String(c),name:e,srcZhPath:m,srcEnPath:h,distPath:p}})),null;if(!S)throw new X_({kind:String(c),name:e,...E!=null&&{sourcePath:E},expectedDistPath:p});let ee=C?{zh:y,...T&&{en:b},default:y,defaultLocale:`zh`}:void 0;return{name:e,type:c,...ee!=null&&{src:ee},...S&&{dist:v},metadata:{hasDist:S,hasMultipleLocales:T,isDirectoryStructure:!1},paths:{...C&&{zh:m},...T&&{en:h},...S&&{dist:p}}}}async readLocaleContent(e,t,n,r,i){if(!this.exists(e))return null;try{let i=this.fs.readFileSync(e,`utf8`),a=this.fs.statSync(e),o=await Eg(i,{globalScope:this.globalScope,extractMetadata:!0,basePath:this.path.dirname(e),filePath:e});ev(o.content,e);let s=hf(i),c=await n(o.content,t,r,o.metadata.fields),l={content:o.content,lastModified:a.mtime,filePath:e};return i.length>0&&Object.assign(l,{rawMdx:i}),s.yamlFrontMatter!=null&&Object.assign(l,{frontMatter:s.yamlFrontMatter}),c!=null&&Object.assign(l,{prompt:c}),l}catch(n){throw this.logger.error(A({code:`LOCALIZED_SOURCE_PROMPT_READ_FAILED`,title:`Failed to read localized source prompt`,diagnosticText:rv(n,{operation:`Failed to read localized source prompt.`,promptKind:i,logicalName:r,distPath:e}),details:{promptKind:i,locale:t,filePath:e}})),n}}async readDistContent(e,t,n,r){if(!this.exists(e))return null;try{let r=this.fs.readFileSync(e,`utf8`),i=this.fs.statSync(e),a=await Eg(r,{globalScope:this.globalScope,extractMetadata:!0,basePath:this.path.dirname(e),filePath:e});ev(a.content,e);let o=hf(r),s=await t(a.content,`zh`,n,a.metadata.fields),c={content:a.content,lastModified:i.mtime,prompt:s,filePath:e,rawMdx:r};return o.yamlFrontMatter!=null&&Object.assign(c,{frontMatter:o.yamlFrontMatter}),c}catch(t){throw this.logger.error(this.buildDistReadDiagnostic(t,e,r)),t}}buildDistReadDiagnostic(e,t,n){let r=tv(this.path,t,{preferredSourcePath:t===n.entryDistPath?n.srcPath:void 0,distRootDir:this.path.dirname(n.entryDistPath),srcRootDir:n.srcPath==null?void 0:this.path.dirname(n.srcPath)});return A({code:`LOCALIZED_DIST_PROMPT_READ_FAILED`,title:`Failed to read localized dist prompt`,diagnosticText:rv(e,{operation:`Failed to read dist content.`,promptKind:n.promptKind,logicalName:n.logicalName,entryDistPath:n.entryDistPath,distPath:t,srcPath:r}),details:{promptKind:n.promptKind,logicalName:n.logicalName,filePath:t,srcPath:r}})}scanChildren(e,t,n){let r=[];if(!this.exists(e))return r;let i=new Set(n.map(e=>`${t}${e}`));try{let t=(e,a)=>{let o=this.fs.readdirSync(e,{withFileTypes:!0});for(let s of o){let o=this.path.join(e,s.name),c=a?this.path.join(a,s.name):s.name;if(s.isDirectory())t(o,c);else{let e=this.findMatchingExtension(s.name,n);if(e==null||i.has(s.name))continue;let t=s.name.slice(0,-e.length),a=this.path.dirname(c),o=a===`.`?t:this.path.join(a,t);r.push(o)}}};t(e,``)}catch(t){this.logger.warn(D({code:`LOCALIZED_PROMPT_CHILD_SCAN_FAILED`,title:`Failed to scan localized prompt child documents`,operation:`scan`,targetKind:`localized prompt child directory`,path:e,error:t}))}return r}exists(e){try{return this.fs.existsSync(e)}catch{return!1}}normalizeExtensions(e){return typeof e==`string`?[e]:e}findMatchingExtension(e,t){return t.find(t=>e.endsWith(t))}resolveLocalizedPath(e,t,n){let r=e===``?`${t}${n[0]}`:this.path.join(e,`${t}${n[0]}`);for(let r of n){let n=e===``?`${t}${r}`:this.path.join(e,`${t}${r}`);if(this.exists(n))return n}return r}};function ov(e,t,n,r){return new av(e,t,n,r)}function sv(e,t){let n=new Map;for(let r of e)if(r.mcpConfig!=null)for(let[e,i]of Object.entries(r.mcpConfig.mcpServers))n.set(e,i),t?.debug(`mcp server collected`,{skill:r.yamlFrontMatter.name,mcpName:e});return n}function cv(e,t){let n={};for(let[r,i]of e)n[r]=t(i);return n}function lv(e){let t={};if(e.command!=null)return t.command=e.command,e.args!=null&&(t.args=e.args),e.env!=null&&(t.env=e.env),t;let n=e,r=n.url??n.serverUrl;if(r==null)return t;t.url=r;let{headers:i}=n;return i!=null&&(t.headers=i),t}function uv(e){let t={};if(e.command!=null){t.type=`local`;let n=[e.command];e.args!=null&&n.push(...e.args),t.command=n,e.env!=null&&(t.environment=e.env)}else{t.type=`remote`;let n=e;n.url==null?n.serverUrl!=null&&(t.url=n.serverUrl):t.url=n.url}return t.enabled=e.disabled!==!0,t}var dv=class{name;inner;constructor(e){this.inner=e,this.name=`json:${e.name}`}async execute(e){Ee();let t=await this.inner.execute(e),n=fv(t,De());return f.default.stdout.write(`${JSON.stringify(n)}\n`),t}};function fv(e,t=De()){let{warnings:n,errors:r}=re(t);return{success:e.success,filesAffected:e.filesAffected,dirsAffected:e.dirsAffected,...e.message!=null&&{message:e.message},pluginResults:[],warnings:n,errors:r}}let pv=function(e){return e[e.Flags=0]=`Flags`,e[e.Unknown=1]=`Unknown`,e[e.Subcommand=2]=`Subcommand`,e}({});var mv=class{factories=[];register(e){this.factories.push(e),this.factories.sort((e,t)=>e.priority-t.priority)}registerWithPriority(e,t){let n={priority:t,canHandle:t=>e.canHandle(t),createCommand:t=>e.createCommand(t)};this.factories.push(n),this.factories.sort((e,t)=>e.priority-t.priority)}resolve(e){for(let t of this.factories)if(t.priority<=pv.Unknown&&t.canHandle(e))return t.createCommand(e);for(let t of this.factories)if(t.priority===pv.Subcommand&&t.canHandle(e))return t.createCommand(e);for(let t of this.factories)if(t.canHandle(e))return t.createCommand(e);throw Error(`No command factory found for the given arguments`)}};function hv(e){let t=f.default.env.XDG_DATA_HOME;return typeof t==`string`&&t.trim().length>0?t:d.default.join(e,`.local`,`share`)}function gv(){let e=f.default.platform,t=m.default.homedir();if(e===`win32`)return f.default.env.LOCALAPPDATA??d.default.join(t,`AppData`,`Local`);if(e===`darwin`)return d.default.join(t,`Library`,`Application Support`);if(e===`linux`)return hv(t);throw Error(`Unsupported platform: ${f.default.platform}`)}function _v(e){if(!u.existsSync(e))return;let t=u.lstatSync(e);t.isSymbolicLink()?f.default.platform===`win32`?u.rmSync(e,{recursive:!0,force:!0}):u.unlinkSync(e):t.isDirectory()?u.rmSync(e,{recursive:!0,force:!0}):u.unlinkSync(e)}function vv(e){let t=0,n=[];for(let r of e)try{u.existsSync(r)&&(_v(r),t++)}catch(e){n.push({path:r,error:e})}return{deleted:t,errors:n}}function yv(e){let t=0,n=[],r=[...e].sort((e,t)=>t.length-e.length);for(let e of r)try{u.existsSync(e)&&(u.rmSync(e,{recursive:!0,force:!0}),t++)}catch(t){n.push({path:e,error:t})}return{deleted:t,errors:n}}var bv=class extends Error{conflicts;constructor(e){super(kv(e)),this.name=`CleanupProtectionConflictError`,this.conflicts=e}};const xv=[`**/node_modules/**`,`**/.git/**`,`**/.turbo/**`,`**/.pnpm-store/**`,`**/.yarn/**`,`**/.next/**`];function Sv(e){return vm(e).replaceAll(`\\`,`/`)}function Cv(e){let{root:t}=d.parse(e);return e===t?e:e.endsWith(d.sep)?e.slice(0,-1):e}function wv(e,t){let n=Cv(e),r=Cv(t);return n===r?!0:n.startsWith(`${r}${d.sep}`)}function Tv(e,t){let n=Sv(e);return kp.default.sync(n,{onlyFiles:!1,dot:!0,absolute:!0,followSymbolicLinks:!1,ignore:[...t]})}function Ev(e,t){if(t.excludeBasenames==null||t.excludeBasenames.length===0)return!1;let n=d.basename(e);return t.excludeBasenames.includes(n)}async function Dv(e,t){return e.declareCleanupPaths==null?{}:e.declareCleanupPaths({...t,dryRun:!0})}function Ov(e,t){let n=new Map,r=[...t.entries()].sort((e,t)=>e[0].length-t[0].length);for(let[e,t]of r){let r=!1;for(let t of n.keys())if(wv(e,t)){r=!0;break}r||n.set(e,t)}let i=[];for(let[t,r]of e){let e=!1;for(let r of n.keys())if(wv(t,r)){e=!0;break}e||i.push(r)}return i.sort((e,t)=>e.localeCompare(t)),{files:i,dirs:[...n.values()].sort((e,t)=>e.localeCompare(t))}}function kv(e){let t=e.map(e=>e.outputPath).join(`, `);return`Cleanup protection conflict: ${e.length} output path(s) are also protected: ${t}`}function Av(e,t){let n=[];for(let[r,i]of e.entries()){let e=new Set(Sm(r));for(let a of t.compiledRules)if(a.comparisonKeys.some(t=>e.has(t)))for(let e of i)n.push({outputPath:r,outputPlugin:e,protectedPath:a.path,protectionMode:a.protectionMode,protectedBy:a.source,reason:a.reason})}return n.sort((e,t)=>{let n=e.outputPath.localeCompare(t.outputPath);return n===0?e.protectedPath.localeCompare(t.protectedPath):n})}function jv(e,t){let n=t[0];e.error(w({code:`CLEANUP_PROTECTION_CONFLICT_DETECTED`,title:`Cleanup output paths conflict with protected inputs`,rootCause:x(`tnmsc found ${t.length} output path(s) that also match protected cleanup rules.`,n==null?`No conflict details were captured.`:`Example conflict: "${n.outputPath}" is protected by "${n.protectedPath}".`),exactFix:x(`Separate generated output paths from protected source or reserved workspace paths before running cleanup again.`),possibleFixes:[x(`Update cleanup protect declarations so they do not overlap generated outputs.`),x(`Move the conflicting output target to a generated-only directory.`)],details:{count:t.length,conflicts:t.map(e=>({outputPath:e.outputPath,outputPlugin:e.outputPlugin,protectedPath:e.protectedPath,protectionMode:e.protectionMode,protectedBy:e.protectedBy,reason:e.reason}))}}))}async function Mv(e,t){let n=new Set,r=new Set,i=new Map,a=new Set(xv),o=new Map,s=[],c=(e,t)=>{t===`directory`?r.add(vm(e)):n.add(vm(e))},l=(e,t,n,r,a=`path`)=>{let o=vm(e);i.set(`${a}:${t}:${o}`,{path:o,protectionMode:t,reason:n,source:r,matcher:a})},d=e=>e.protectionMode==null?e.kind===`file`?`direct`:`recursive`:e.protectionMode;for(let e of Fm(t.collectedOutputContext))l(e.path,e.protectionMode,e.reason,e.source);if(t.collectedOutputContext.aindexDir!=null&&t.pluginOptions!=null)for(let e of Pm(t.pluginOptions,t.collectedOutputContext.aindexDir,{workspaceDir:t.collectedOutputContext.workspace.directory.path}))l(e.path,e.protectionMode,e.reason,e.source,e.matcher);for(let e of t.pluginOptions?.cleanupProtection?.rules??[])l(e.path,e.protectionMode,e.reason??`configured cleanup protection rule`,`configured-cleanup-protection`,e.matcher??`path`);for(let n of e){let e=await n.declareOutputFiles({...t,dryRun:!0});for(let t of e){let e=vm(t.path);c(e,`file`);let r=o.get(e);r==null?o.set(e,[n.name]):r.includes(n.name)||r.push(n.name)}let r=await Dv(n,t);for(let e of r.excludeScanGlobs??[])a.add(Sv(e));s.push({plugin:n,cleanup:r})}let f=[...a],p=e=>{for(let t of Tv(e.path,f))if(!Ev(t,e))try{u.lstatSync(t).isDirectory()?c(t,`directory`):c(t,`file`)}catch{}},m=(e,t)=>{let n=d(e),r=e.label==null?`plugin cleanup protect declaration`:`plugin cleanup protect declaration (${e.label})`;for(let i of Tv(e.path,f))l(i,n,r,`plugin-cleanup-protect:${t}`)};for(let{plugin:e,cleanup:t}of s){for(let n of t.protect??[]){if(n.kind===`glob`){m(n,e.name);continue}l(n.path,d(n),n.label==null?`plugin cleanup protect declaration`:`plugin cleanup protect declaration (${n.label})`,`plugin-cleanup-protect:${e.name}`)}for(let e of t.delete??[]){if(e.kind===`glob`){p(e);continue}e.kind===`directory`?c(e.path,`directory`):c(e.path,`file`)}}let h=Lm({workspaceDir:t.collectedOutputContext.workspace.directory.path,projectRoots:Rm(t.collectedOutputContext),rules:[...i.values()],...t.collectedOutputContext.aindexDir==null?{}:{aindexDir:t.collectedOutputContext.aindexDir}}),g=Av(o,h);if(g.length>0)throw new bv(g);let _=Vm([...n],h),v=Vm([...r],h),y=Ov(new Map(_.safePaths.map(e=>[e,e])),new Map(v.safePaths.map(e=>[e,e])));return{filesToDelete:y.files,dirsToDelete:y.dirs,violations:[..._.violations,...v.violations].sort((e,t)=>e.targetPath.localeCompare(t.targetPath)),conflicts:[],excludedScanGlobs:[...a].sort((e,t)=>e.localeCompare(t))}}function Nv(e,t){let n=e.map(e=>d.isAbsolute(e)?e:d.resolve(e)),r=vv(n);for(let e of n)r.errors.some(t=>t.path===e)||t.debug({action:`delete`,type:`file`,path:e});let i=r.errors.map(e=>{let n=e.error instanceof Error?e.error.message:String(e.error);return t.warn(D({code:`CLEANUP_FILE_DELETE_FAILED`,title:`Cleanup could not delete a file`,operation:`delete`,targetKind:`file`,path:e.path,error:n,details:{phase:`cleanup`}})),{path:e.path,type:`file`,error:e.error}});return{deleted:r.deleted,errors:i}}function Pv(e,t){let n=e.map(e=>d.isAbsolute(e)?e:d.resolve(e)),r=yv(n);for(let e of n)r.errors.some(t=>t.path===e)||t.debug({action:`delete`,type:`directory`,path:e});let i=r.errors.map(e=>{let n=e.error instanceof Error?e.error.message:String(e.error);return t.warn(D({code:`CLEANUP_DIRECTORY_DELETE_FAILED`,title:`Cleanup could not delete a directory`,operation:`delete`,targetKind:`directory`,path:e.path,error:n,details:{phase:`cleanup`}})),{path:e.path,type:`directory`,error:e.error}});return{deleted:r.deleted,errors:i}}function Fv(e,t){e.debug(`cleanup plan built`,{filesToDelete:t.filesToDelete.length,dirsToDelete:t.dirsToDelete.length,violations:t.violations.length,conflicts:t.conflicts.length,excludedScanGlobs:t.excludedScanGlobs})}async function Iv(e,t,n){let r=await P_(e,t);n.debug(`Collected outputs for cleanup`,{projectDirs:r.projectDirs.length,projectFiles:r.projectFiles.length,globalDirs:r.globalDirs.length,globalFiles:r.globalFiles.length});let i;try{i=await Mv(e,t)}catch(e){if(e instanceof bv)return jv(n,e.conflicts),{deletedFiles:0,deletedDirs:0,errors:[],violations:[],conflicts:e.conflicts,message:e.message};throw e}let a={filesToDelete:i.filesToDelete,dirsToDelete:i.dirsToDelete,violations:i.violations,conflicts:i.conflicts,excludedScanGlobs:i.excludedScanGlobs};if(Fv(n,a),a.violations.length>0)return Um(n,`cleanup`,a.violations),{deletedFiles:0,deletedDirs:0,errors:[],violations:a.violations,conflicts:[],message:`Protected deletion guard blocked cleanup for ${a.violations.length} path(s)`};let o=Nv(a.filesToDelete,n),s=Pv(a.dirsToDelete,n);return{deletedFiles:o.deleted,deletedDirs:s.deleted,errors:[...o.errors,...s.errors],violations:[],conflicts:[]}}var Lv=class{name=`clean`;async execute(e){let{logger:t,outputPlugins:n,createCleanContext:r}=e;t.info(`running clean pipeline`,{command:`clean`});let i=await Iv(n,r(!1),t);return i.violations.length>0||i.conflicts.length>0?{success:!1,filesAffected:0,dirsAffected:0,...i.message==null?{}:{message:i.message}}:(t.info(`clean complete`,{deletedFiles:i.deletedFiles,deletedDirs:i.deletedDirs}),{success:!0,filesAffected:i.deletedFiles,dirsAffected:i.deletedDirs})}},Rv=class{name=`dry-run-clean`;async execute(e){let{logger:t,outputPlugins:n,createCleanContext:r}=e;t.info(`running clean pipeline`,{command:`dry-run-clean`,dryRun:!0});let i=r(!0),a=await P_(n,i);t.info(`collected outputs for cleanup`,{dryRun:!0,projectDirs:a.projectDirs.length,projectFiles:a.projectFiles.length,globalDirs:a.globalDirs.length,globalFiles:a.globalFiles.length});let{filesToDelete:o,dirsToDelete:s,violations:c,excludedScanGlobs:l}=await Mv(n,i);return c.length>0?(Um(t,`dry-run-cleanup`,c),{success:!1,filesAffected:0,dirsAffected:0,message:`Protected deletion guard blocked cleanup for ${c.length} path(s)`}):(this.logDryRunFiles(o,t),this.logDryRunDirectories(s,t),t.info(`clean complete`,{dryRun:!0,filesAffected:o.length,dirsAffected:s.length,violations:0,excludedScanGlobs:l}),{success:!0,filesAffected:o.length,dirsAffected:s.length,message:`Dry-run complete, no files were deleted`})}logDryRunFiles(e,t){for(let n of e){let e=d.isAbsolute(n)?n:d.resolve(n);t.info(`would delete file`,{path:e,dryRun:!0})}}logDryRunDirectories(e,t){let n=[...e].sort((e,t)=>t.length-e.length);for(let e of n){let n=d.isAbsolute(e)?e:d.resolve(e);t.info(`would delete directory`,{path:n,dryRun:!0})}}},zv=class{canHandle(e){return e.subcommand===`clean`}createCommand(e){return e.dryRun?new Rv:new Lv}};const Bv=`.tnmsc.json`,Vv=`.aindex`;function Hv(){return d.join(m.homedir(),Vv,Bv)}var Uv=class{logger;constructor(e={}){this.logger=M(`ConfigLoader`)}getSearchPaths(e=f.default.cwd()){return[Hv()]}loadFromFile(e){let t=this.resolveTilde(e);try{if(!u.existsSync(t))return{config:{},source:null,found:!1};let e=u.readFileSync(t,`utf8`),n=this.parseConfig(e,t);return this.logger.debug(`loaded`,{source:t}),{config:n,source:t,found:!0}}catch(e){return this.logger.warn(D({code:`CONFIG_FILE_LOAD_FAILED`,title:`Failed to load config file`,operation:`read`,targetKind:`config file`,path:t,error:e})),{config:{},source:null,found:!1}}}load(e=f.default.cwd()){let t=this.getSearchPaths(e),n=[];for(let e of t){let t=this.loadFromFile(e);t.found&&n.push(t)}return{config:this.mergeConfigs(n.map(e=>e.config)),sources:n.map(e=>e.source).filter(e=>e!==null),found:n.length>0}}parseConfig(e,t){let n;try{n=JSON.parse(e)}catch(e){throw e instanceof SyntaxError?Error(`Invalid JSON in ${t}: ${e.message}`):e}let r=h_.safeParse(n);if(r.success)return r.data;let i=r.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`);throw Error(`Config validation failed in ${t}:\n${i.join(`
108
- `)}`)}mergeConfigs(e){if(e.length===0)return{};let t=e[0];return e.length===1&&t!=null?t:[...e].reverse().reduce((e,t)=>{let n=this.mergeAindex(e.aindex,t.aindex),r=this.mergeOutputScopeOptions(e.outputScopes,t.outputScopes),i=this.mergeFrontMatterOptions(e.frontMatter,t.frontMatter),a=this.mergeCleanupProtectionOptions(e.cleanupProtection,t.cleanupProtection);return{...e,...t,...n==null?{}:{aindex:n},...r==null?{}:{outputScopes:r},...i==null?{}:{frontMatter:i},...a==null?{}:{cleanupProtection:a}}},{})}mergeAindex(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{dir:t.dir??e.dir,skills:{...e.skills,...t.skills},commands:{...e.commands,...t.commands},subAgents:{...e.subAgents,...t.subAgents},rules:{...e.rules,...t.rules},globalPrompt:{...e.globalPrompt,...t.globalPrompt},workspacePrompt:{...e.workspacePrompt,...t.workspacePrompt},app:{...e.app,...t.app},ext:{...e.ext,...t.ext},arch:{...e.arch,...t.arch}}}mergeOutputScopeTopics(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{...e,...t}}mergeOutputScopeOptions(e,t){if(e==null&&t==null)return;if(e==null)return t;if(t==null)return e;let n={};for(let[t,r]of Object.entries(e.plugins??{}))r!=null&&(n[t]={...r});for(let[e,r]of Object.entries(t.plugins??{})){let t=this.mergeOutputScopeTopics(n[e],r);t!=null&&(n[e]=t)}return Object.keys(n).length===0?{}:{plugins:n}}mergeFrontMatterOptions(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{...e,...t}}mergeCleanupProtectionOptions(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{rules:[...e.rules??[],...t.rules??[]]}}resolveTilde(e){return e.startsWith(`~`)?d.join(m.homedir(),e.slice(1)):e}};let Wv=null;function Gv(e){return(e||!Wv)&&(Wv=new Uv(e)),Wv}function Kv(e){return Gv().load(e)}function qv(){let e=M(`ConfigLoader`),t=Hv();if(!u.existsSync(t)){let n=`Global config not found at ${t}. Please create it manually.`;return e.error(O({code:`GLOBAL_CONFIG_MISSING`,title:`Global config file is missing`,reason:x(`tnmsc could not find the required global config file at "${t}".`),configPath:t,exactFix:x(`Create the global config file manually before running tnmsc again.`),possibleFixes:[x("Initialize the file with a valid JSON object, for example `{}`.")]})),{valid:!1,exists:!1,errors:[n],shouldExit:!0}}let n;try{n=u.readFileSync(t,`utf8`)}catch(n){let r=n instanceof Error?n.message:String(n);return e.error(D({code:`GLOBAL_CONFIG_READ_FAILED`,title:`Failed to read global config file`,operation:`read`,targetKind:`global config file`,path:t,error:r})),{valid:!1,exists:!0,errors:[`Failed to read config: ${r}`],shouldExit:!0}}let r;try{r=JSON.parse(n)}catch(n){let r=n instanceof Error?n.message:String(n);return e.error(O({code:`GLOBAL_CONFIG_JSON_INVALID`,title:`Global config contains invalid JSON`,reason:x(`tnmsc could not parse the JSON in "${t}".`,`Parser error: ${r}`),configPath:t,exactFix:x(`Fix the JSON syntax in the global config file so it parses as a single JSON object.`),possibleFixes:[x(`Validate the file with a JSON parser and remove trailing commas or invalid tokens.`)]})),{valid:!1,exists:!0,errors:[`Invalid JSON: ${r}`],shouldExit:!0}}if(typeof r!=`object`||!r||Array.isArray(r))return e.error(O({code:`GLOBAL_CONFIG_NOT_OBJECT`,title:`Global config must be a JSON object`,reason:x(`tnmsc parsed "${t}" successfully, but the top-level value is not a JSON object.`),configPath:t,exactFix:x("Replace the top-level JSON value with an object like `{}` or a valid config object.")})),{valid:!1,exists:!0,errors:[`Config must be a JSON object`],shouldExit:!0};let i=h_.safeParse(r);if(!i.success){let n=i.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`);for(let r of n)e.error(O({code:`GLOBAL_CONFIG_VALIDATION_FAILED`,title:`Global config validation failed`,reason:C(r),configPath:t,exactFix:x(`Update the invalid config field so it matches the tnmsc schema.`),possibleFixes:[x(`Compare the field name and value against the current config schema or examples.`)],details:{validationError:r}}));return{valid:!1,exists:!0,errors:n,shouldExit:!0}}return{valid:!0,exists:!0,errors:[],shouldExit:!1}}const Jv=[`workspaceDir`,`aindex.skills.src`,`aindex.skills.dist`,`aindex.commands.src`,`aindex.commands.dist`,`aindex.subAgents.src`,`aindex.subAgents.dist`,`aindex.rules.src`,`aindex.rules.dist`,`aindex.globalPrompt.src`,`aindex.globalPrompt.dist`,`aindex.workspacePrompt.src`,`aindex.workspacePrompt.dist`,`aindex.app.src`,`aindex.app.dist`,`aindex.ext.src`,`aindex.ext.dist`,`aindex.arch.src`,`aindex.arch.dist`,`logLevel`];function Yv(e){return Jv.includes(e)}function Xv(e){return[`trace`,`debug`,`info`,`warn`,`error`].includes(e)}function Zv(){return d.join(m.homedir(),Vv,Bv)}function Qv(){let e=Zv();if(!u.existsSync(e))return{};try{let t=u.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return{}}}function $v(e){let t=Zv(),n=d.dirname(t);u.existsSync(n)||u.mkdirSync(n,{recursive:!0}),u.writeFileSync(t,`${JSON.stringify(e,null,2)}\n`,`utf8`)}function ey(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e++){let t=r[e],n=i[t];(typeof n!=`object`||!n||Array.isArray(n))&&(i[t]={}),i=i[t]}i[r.at(-1)]=n}function ty(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r||Array.isArray(r))return;r=r[e]}return r}var ny=class{name=`config`;constructor(e){this.options=e}async execute(e){let{logger:t}=e;if(this.options.length===0)return t.error(k({code:`CONFIG_COMMAND_ARGUMENTS_MISSING`,title:`Config command requires at least one key=value pair`,rootCause:x(`tnmsc config was invoked without any configuration assignments.`),exactFix:x("Run `tnmsc config key=value` with at least one supported configuration key."),possibleFixes:[x(`Use one of the supported keys: ${Jv.join(`, `)}`)],details:{validKeys:[...Jv]}})),t.info(`Usage: tnmsc config key=value`),t.info(`Valid keys: ${Jv.join(`, `)}`),{success:!1,filesAffected:0,dirsAffected:0,message:`No options provided`};let n=Qv(),r=[],i=[];for(let[e,a]of this.options){if(!Yv(e)){r.push(`Invalid key: ${e}`),t.error(k({code:`CONFIG_COMMAND_KEY_INVALID`,title:`Unsupported config key: ${e}`,rootCause:x(`The config command received "${e}", which is not a supported configuration key.`),exactFix:x(`Use one of the supported config keys and rerun the command.`),possibleFixes:[x(`Supported keys: ${Jv.join(`, `)}`)],details:{key:e,validKeys:[...Jv]}}));continue}if(e===`logLevel`&&!Xv(a)){r.push(`Invalid logLevel value: ${a}`),t.error(k({code:`CONFIG_COMMAND_LOG_LEVEL_INVALID`,title:`Unsupported logLevel value: ${a}`,rootCause:x(`The config command received "${a}" for logLevel, but tnmsc does not support that level.`),exactFix:x(`Set logLevel to one of: trace, debug, info, warn, or error.`),details:{key:e,value:a,validLevels:[`trace`,`debug`,`info`,`warn`,`error`]}}));continue}let o=ty(n,e);ey(n,e,a),o!==a&&i.push(`${e}=${a}`),t.info(`configuration updated`,{key:e,value:a})}i.length>0&&($v(n),t.info(`global config written`,{path:Zv()}));let a=r.length===0,o=a?`Configuration updated: ${i.join(`, `)}`:`Partial update: ${i.join(`, `)}. Errors: ${r.join(`, `)}`;return{success:a,filesAffected:i.length>0?1:0,dirsAffected:0,message:o}}},ry=class{name=`config-show`;async execute(e){let{logger:t}=e,n=new Uv,r=n.load(),i=r.sources.map(e=>({path:e,layer:`global`,config:n.loadFromFile(e).config})),a={merged:r.config,sources:i};return f.default.stdout.write(`${JSON.stringify(a)}\n`),t.info(`config shown`,{sources:r.sources.length}),{success:!0,filesAffected:0,dirsAffected:0,message:`Configuration displayed (${i.length} source(s))`}}},iy=class{canHandle(e){return e.subcommand===`config`}createCommand(e){if(e.showFlag)return new ry;let t=[];for(let n of e.positional){let e=n.indexOf(`=`);e>0&&t.push([n.slice(0,e),n.slice(e+1)])}return new ny([...e.setOption,...t])}},ay=class{name=`dry-run-output`;async execute(e){let{logger:t,outputPlugins:n,createWriteContext:r}=e;t.info(`started`,{command:`dry-run-output`,dryRun:!0});let i=await N_(n,r(!0)),a=0,o=0;for(let[e,n]of i)a+=n.files.length,o+=n.dirs.length,t.info(`plugin result`,{plugin:e,files:n.files.length,dirs:n.dirs.length,dryRun:!0});return t.info(`complete`,{command:`dry-run-output`,totalFiles:a,totalDirs:o,dryRun:!0}),{success:!0,filesAffected:a,dirsAffected:o,message:`Dry-run complete, no files were written`}}},oy=class{canHandle(e){return e.subcommand===`dry-run`}createCommand(e){return new ay}},sy=class{name=`execute`;async execute(e){let{logger:t,outputPlugins:n,createCleanContext:r,createWriteContext:i}=e;t.info(`started`,{command:`execute`});let a=await Iv(n,r(!1),t);if(a.violations.length>0||a.conflicts.length>0)return{success:!1,filesAffected:0,dirsAffected:0,...a.message==null?{}:{message:a.message}};t.info(`cleanup complete`,{deletedFiles:a.deletedFiles,deletedDirs:a.deletedDirs});let o=await N_(n,i(!1)),s=0,c=0,l=[];for(let e of o.values()){s+=e.files.length,c+=e.dirs.length;for(let t of e.files)t.success||l.push(t.error?.message??`Failed to write ${t.path}`)}return l.length>0?{success:!1,filesAffected:s,dirsAffected:c,message:l.join(`
109
- `)}:(t.info(`complete`,{command:`execute`,pluginCount:o.size}),{success:!0,filesAffected:s,dirsAffected:c})}},cy=class{canHandle(e){return!0}createCommand(e){return new sy}};function ly(){return`2026.10318.10339`}var uy=class{name=`version`;async execute(e){return e.logger.info(`tnmsc v${ly()}`),{success:!0,filesAffected:0,dirsAffected:0,message:`Version displayed`}}};const dy=`tnmsc`,fy=`
110
- ${dy} v${ly()} - Memory Sync CLI
194
+ t.exports=r;let n=Zp();function r(e,t){let r,i,a,o=!0;Array.isArray(e)?(r=[],i=e.length):(a=Object.keys(e),r={},i=a.length);function s(e){function i(){t&&t(e,r),t=null}o?n(i):i()}function c(e,t,n){r[e]=n,(--i===0||t)&&s(t)}i?a?a.forEach(function(t){e[t](function(e,n){c(t,e,n)})}):e.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):s(null),o=!1}})),$p=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;let t=process.versions.node.split(`.`);if(t[0]===void 0||t[1]===void 0)throw Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);let n=Number.parseInt(t[0],10),r=Number.parseInt(t[1],10);e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n>10||n===10&&r>=10})),em=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createDirentFromStats=void 0;var t=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function n(e,n){return new t(e,n)}e.createDirentFromStats=n})),tm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.fs=void 0,e.fs=em()})),nm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.joinPathSegments=void 0;function t(e,t,n){return e.endsWith(n)?e+t:e+n+t}e.joinPathSegments=t})),rm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;let t=Xp(),n=Qp(),r=$p(),i=tm(),a=nm();function o(e,t,n){if(!t.stats&&r.IS_SUPPORT_READDIR_WITH_FILE_TYPES){s(e,t,n);return}l(e,t,n)}e.read=o;function s(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(i,o)=>{if(i!==null){u(r,i);return}let s=o.map(n=>({dirent:n,name:n.name,path:a.joinPathSegments(e,n.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){d(r,s);return}n(s.map(e=>c(e,t)),(e,t)=>{if(e!==null){u(r,e);return}d(r,t)})})}e.readdirWithFileTypes=s;function c(e,t){return n=>{if(!e.dirent.isSymbolicLink()){n(null,e);return}t.fs.stat(e.path,(r,a)=>{if(r!==null){if(t.throwErrorOnBrokenSymbolicLink){n(r);return}n(null,e);return}e.dirent=i.fs.createDirentFromStats(e.name,a),n(null,e)})}}function l(e,r,o){r.fs.readdir(e,(s,c)=>{if(s!==null){u(o,s);return}n(c.map(n=>{let o=a.joinPathSegments(e,n,r.pathSegmentSeparator);return e=>{t.stat(o,r.fsStatSettings,(t,a)=>{if(t!==null){e(t);return}let s={name:n,path:o,dirent:i.fs.createDirentFromStats(n,a)};r.stats&&(s.stats=a),e(null,s)})}}),(e,t)=>{if(e!==null){u(o,e);return}d(o,t)})})}e.readdir=l;function u(e,t){e(t)}function d(e,t){e(null,t)}})),im=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;let t=Xp(),n=$p(),r=tm(),i=nm();function a(e,t){return!t.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,t):s(e,t)}e.read=a;function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let a={dirent:n,name:n.name,path:i.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let e=t.fs.statSync(a.path);a.dirent=r.fs.createDirentFromStats(a.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return a})}e.readdirWithFileTypes=o;function s(e,n){return n.fs.readdirSync(e).map(a=>{let o=i.joinPathSegments(e,a,n.pathSegmentSeparator),s=t.statSync(o,n.fsStatSettings),c={name:a,path:o,dirent:r.fs.createDirentFromStats(a,s)};return n.stats&&(c.stats=s),c})}e.readdir=s})),am=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;let t=require(`fs`);e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};function n(t){return t===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=n})),om=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=Xp(),r=am();e.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=r.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}}})),sm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Settings=e.scandirSync=e.scandir=void 0;let t=rm(),n=im(),r=om();e.Settings=r.default;function i(e,n,r){if(typeof n==`function`){t.read(e,o(),n);return}t.read(e,o(n),r)}e.scandir=i;function a(e,t){let r=o(t);return n.read(e,r)}e.scandirSync=a;function o(e={}){return e instanceof r.default?e:new r.default(e)}})),cm=o(((e,t)=>{function n(e){var t=new e,n=t;function r(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r}function i(e){n.next=e,n=e}return{get:r,release:i}}t.exports=n})),lm=o(((e,t)=>{var n=cm();function r(e,t,r){if(typeof e==`function`&&(r=t,t=e,e=null),!(r>=1))throw Error(`fastqueue concurrency must be equal to or greater than 1`);var o=n(a),s=null,c=null,l=0,u=null,d={push:v,drain:i,saturated:i,pause:p,paused:!1,get concurrency(){return r},set concurrency(e){if(!(e>=1))throw Error(`fastqueue concurrency must be equal to or greater than 1`);if(r=e,!d.paused)for(;s&&l<r;)l++,b()},running:f,resume:g,idle:_,length:m,getQueue:h,unshift:y,empty:i,kill:x,killAndDrain:S,error:w,abort:C};return d;function f(){return l}function p(){d.paused=!0}function m(){for(var e=s,t=0;e;)e=e.next,t++;return t}function h(){for(var e=s,t=[];e;)t.push(e.value),e=e.next;return t}function g(){if(d.paused){if(d.paused=!1,s===null){l++,b();return}for(;s&&l<r;)l++,b()}}function _(){return l===0&&d.length()===0}function v(n,a){var f=o.get();f.context=e,f.release=b,f.value=n,f.callback=a||i,f.errorHandler=u,l>=r||d.paused?c?(c.next=f,c=f):(s=f,c=f,d.saturated()):(l++,t.call(e,f.value,f.worked))}function y(n,a){var f=o.get();f.context=e,f.release=b,f.value=n,f.callback=a||i,f.errorHandler=u,l>=r||d.paused?s?(f.next=s,s=f):(s=f,c=f,d.saturated()):(l++,t.call(e,f.value,f.worked))}function b(n){n&&o.release(n);var i=s;i&&l<=r?d.paused?l--:(c===s&&(c=null),s=i.next,i.next=null,t.call(e,i.value,i.worked),c===null&&d.empty()):--l===0&&d.drain()}function x(){s=null,c=null,d.drain=i}function S(){s=null,c=null,d.drain(),d.drain=i}function C(){var e=s;for(s=null,c=null;e;){var t=e.next,n=e.callback,r=e.errorHandler,a=e.value,o=e.context;e.value=null,e.callback=i,e.errorHandler=null,r&&r(Error(`abort`),a),n.call(o,Error(`abort`)),e.release(e),e=t}d.drain=i}function w(e){u=e}}function i(){}function a(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var r=e.callback,a=e.errorHandler,o=e.value;e.value=null,e.callback=i,e.errorHandler&&a(t,o),r.call(e.context,t,n),e.release(e)}}function o(e,t,n){typeof e==`function`&&(n=t,t=e,e=null);function a(e,n){t.call(this,e).then(function(e){n(null,e)},n)}var o=r(e,a,n),s=o.push,c=o.unshift;return o.push=l,o.unshift=u,o.drained=d,o;function l(e){var t=new Promise(function(t,n){s(e,function(e,r){if(e){n(e);return}t(r)})});return t.catch(i),t}function u(e){var t=new Promise(function(t,n){c(e,function(e,r){if(e){n(e);return}t(r)})});return t.catch(i),t}function d(){return new Promise(function(e){process.nextTick(function(){if(o.idle())e();else{var t=o.drain;o.drain=function(){typeof t==`function`&&t(),e(),o.drain=t}}})})}}t.exports=r,t.exports.promise=o})),um=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function t(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}e.isFatalError=t;function n(e,t){return e===null||e(t)}e.isAppliedFilter=n;function r(e,t){return e.split(/[/\\]/).join(t)}e.replacePathSegmentSeparator=r;function i(e,t,n){return e===``?t:e.endsWith(n)?e+t:e+n+t}e.joinPathSegments=i})),dm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=um();e.default=class{constructor(e,n){this._root=e,this._settings=n,this._root=t.replacePathSegmentSeparator(e,n.pathSegmentSeparator)}}})),fm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`events`),n=sm(),r=lm(),i=um(),a=dm();e.default=class extends a.default{constructor(e,i){super(e,i),this._settings=i,this._scandir=n.scandir,this._emitter=new t.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit(`end`)}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw Error(`The reader is already destroyed`);this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on(`entry`,e)}onError(e){this._emitter.once(`error`,e)}onEnd(e){this._emitter.once(`end`,e)}_pushToQueue(e,t){let n={directory:e,base:t};this._queue.push(n,e=>{e!==null&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,r)=>{if(n!==null){t(n,void 0);return}for(let t of r)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){this._isDestroyed||!i.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit(`error`,e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;let n=e.path;t!==void 0&&(e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,t===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit(`entry`,e)}}})),pm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=fm();e.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{n(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{r(e,this._storage)}),this._reader.read()}};function n(e,t){e(t)}function r(e,t){e(null,t)}})),mm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`stream`),n=fm();e.default=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new n.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit(`error`,e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}})),hm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=sm(),n=um(),r=dm();e.default=class extends r.default{constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(n.isFatalError(this._settings,e))throw e}_handleEntry(e,t){let r=e.path;t!==void 0&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,t===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}})),gm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=hm();e.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}}})),_m=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=sm();e.default=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,1/0),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}}})),vm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Settings=e.walkStream=e.walkSync=e.walk=void 0;let t=pm(),n=mm(),r=gm(),i=_m();e.Settings=i.default;function a(e,n,r){if(typeof n==`function`){new t.default(e,c()).read(n);return}new t.default(e,c(n)).read(r)}e.walk=a;function o(e,t){let n=c(t);return new r.default(e,n).read()}e.walkSync=o;function s(e,t){let r=c(t);return new n.default(e,r).read()}e.walkStream=s;function c(e={}){return e instanceof i.default?e:new i.default(e)}})),ym=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=Xp(),r=Wp();e.default=class{constructor(e){this._settings=e,this._fsStatSettings=new n.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return t.resolve(this._settings.cwd,e)}_makeEntry(e,t){let n={name:t,path:t,dirent:r.fs.createDirentFromStats(t,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!r.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}})),bm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`stream`),n=Xp(),r=vm(),i=ym();e.default=class extends i.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=n.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,n){let r=e.map(this._getFullEntryPath,this),i=new t.PassThrough({objectMode:!0});i._write=(t,a,o)=>this._getEntry(r[t],e[t],n).then(e=>{e!==null&&n.entryFilter(e)&&i.push(e),t===r.length-1&&i.end(),o()}).catch(o);for(let e=0;e<r.length;e++)i.write(e);return i}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,r)=>e===null?t(r):n(e))})}}})),xm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=vm(),n=ym(),r=bm();e.default=class extends n.default{constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{e===null?n(t):r(e)})})}async static(e,t){let n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once(`error`,t),r.on(`data`,e=>n.push(e)),r.once(`end`,()=>e(n))})}}})),Sm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Wp();e.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(e){return t.pattern.getPatternParts(e,this._micromatchOptions).map(e=>t.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:t.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return t.array.splitWhen(e,e=>e.dynamic&&t.pattern.hasGlobStar(e.pattern))}}})),Cm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Sm();e.default=class extends t.default{match(e){let t=e.split(`/`),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(let e of r){let r=e.sections[0];if(!e.complete&&n>r.length||t.every((t,n)=>{let r=e.segments[n];return!!(r.dynamic&&r.patternRe.test(t)||!r.dynamic&&r.pattern===t)}))return!0}return!1}}})),wm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Wp(),n=Cm();e.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){let r=this._getMatcher(t),i=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,i)}_getMatcher(e){return new n.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let n=e.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(e,n,r,i){if(this._isSkippedByDeep(e,n.path)||this._isSkippedSymbolicLink(n))return!1;let a=t.path.removeLeadingDotSegment(n.path);return this._isSkippedByPositivePatterns(a,r)?!1:this._isSkippedByNegativePatterns(a,i)}_isSkippedByDeep(e,t){return this._settings.deep===1/0?!1:this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){let n=t.split(`/`).length;return e===``?n:n-e.split(`/`).length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,n){return!t.pattern.matchAny(e,n)}}})),Tm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Wp();e.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,n){let[r,i]=t.pattern.partitionAbsoluteAndRelative(n),a={positive:{all:t.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,a)}_filter(e,n){let r=t.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(r)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(r,n,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(r),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!(!this._isMatchToPatterns(e,t.positive.all,n)||this._isMatchToPatterns(e,t.negative.relative,n)||this._isMatchToAbsoluteNegative(e,t.negative.absolute,n))}_isMatchToAbsoluteNegative(e,n,r){if(n.length===0)return!1;let i=t.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,n,r)}_isMatchToPatterns(e,n,r){if(n.length===0)return!1;let i=t.pattern.matchAny(e,n);return!i&&r?t.pattern.matchAny(e+`/`,n):i}}})),Em=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Wp();e.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return t.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}})),Dm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Wp();e.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let n=e.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&e.dirent.isDirectory()&&(n+=`/`),this._settings.objectMode?Object.assign(Object.assign({},e),{path:n}):n}}})),Om=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`path`),n=wm(),r=Tm(),i=Em(),a=Dm();e.default=class{constructor(e){this._settings=e,this.errorFilter=new i.default(this._settings),this.entryFilter=new r.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new n.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new a.default(this._settings)}_getRootDirectory(e){return t.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let t=e.base===`.`?``:e.base;return{basePath:t,pathSegmentSeparator:`/`,concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}})),km=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=xm(),n=Om();e.default=class extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}})),Am=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=require(`stream`),n=bm(),r=Om();e.default=class extends r.default{constructor(){super(...arguments),this._reader=new n.default(this._settings)}read(e){let n=this._getRootDirectory(e),r=this._getReaderOptions(e),i=this.api(n,e,r),a=new t.Readable({objectMode:!0,read:()=>{}});return i.once(`error`,e=>a.emit(`error`,e)).on(`data`,e=>a.emit(`data`,r.transform(e))).once(`end`,()=>a.emit(`end`)),a.once(`close`,()=>i.destroy()),a}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}})),jm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Xp(),n=vm(),r=ym();e.default=class extends r.default{constructor(){super(...arguments),this._walkSync=n.walkSync,this._statSync=t.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){let n=[];for(let r of e){let e=this._getFullEntryPath(r),i=this._getEntry(e,r,t);i===null||!t.entryFilter(i)||n.push(i)}return n}_getEntry(e,t,n){try{let n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}})),Mm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=jm(),n=Om();e.default=class extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}})),Nm=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;let t=require(`fs`),n=require(`os`),r=Math.max(n.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,r),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return e===void 0?t:e}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}})),Pm=c(o(((e,t)=>{let n=Gp(),r=km(),i=Am(),a=Mm(),o=Nm(),s=Wp();async function c(e,t){u(e);let n=l(e,r.default,t),i=await Promise.all(n);return s.array.flatten(i)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(e,t){u(e);let n=l(e,a.default,t);return s.array.flatten(n)}e.sync=t;function r(e,t){u(e);let n=l(e,i.default,t);return s.stream.merge(n)}e.stream=r;function c(e,t){u(e);let r=[].concat(e),i=new o.default(t);return n.generate(r,i)}e.generateTasks=c;function d(e,t){u(e);let n=new o.default(t);return s.pattern.isDynamicPattern(e,n)}e.isDynamicPattern=d;function f(e){return u(e),s.path.escape(e)}e.escapePath=f;function p(e){return u(e),s.path.convertPathToPattern(e)}e.convertPathToPattern=p,(function(e){function t(e){return u(e),s.path.escapePosixPath(e)}e.escapePath=t;function n(e){return u(e),s.path.convertPosixPathToPattern(e)}e.convertPathToPattern=n})(e.posix||={}),(function(e){function t(e){return u(e),s.path.escapeWindowsPath(e)}e.escapePath=t;function n(e){return u(e),s.path.convertWindowsPathToPattern(e)}e.convertPathToPattern=n})(e.win32||={})})(c||={});function l(e,t,r){let i=[].concat(e),a=new o.default(r),s=n.generate(i,a),c=new t(a);return s.map(c.read,c)}function u(e){if(![].concat(e).every(e=>s.string.isString(e)&&!s.string.isEmpty(e)))throw TypeError(`Patterns must be a string (non empty) or an array of strings`)}t.exports=c}))(),1);const Fm={"win32-x64":{local:`napi-script-runtime.win32-x64-msvc`,suffix:`win32-x64-msvc`},"linux-x64":{local:`napi-script-runtime.linux-x64-gnu`,suffix:`linux-x64-gnu`},"linux-arm64":{local:`napi-script-runtime.linux-arm64-gnu`,suffix:`linux-arm64-gnu`},"darwin-arm64":{local:`napi-script-runtime.darwin-arm64`,suffix:`darwin-arm64`},"darwin-x64":{local:`napi-script-runtime.darwin-x64`,suffix:`darwin-x64`}};let Im,Lm;function Rm(){let e=Fm[`${d.default.platform}-${d.default.arch}`];if(e!=null)return e;throw Error(`Unsupported platform for @truenine/script-runtime native binding: ${d.default.platform}-${d.default.arch}`)}function zm(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.validate_public_path==`function`||typeof t.validatePublicPath==`function`||typeof t.resolve_public_path==`function`||typeof t.resolvePublicPath==`function`}function Bm(e,t,n){let r=e instanceof Error?e.message:String(e),i=t instanceof Error?t.message:String(t);return Error([`Failed to load @truenine/script-runtime native binding.`,`Tried local binary "./${Fm[`${d.default.platform}-${d.default.arch}`]?.local??`unknown`}.node" and package "@truenine/memory-sync-cli-${n}".`,`Local error: ${r}`,`Package error: ${i}`,"Run `pnpm -F @truenine/script-runtime run build` to build the native module."].join(`
195
+ `))}function Vm(){let e=(0,m.createRequire)(require(`url`).pathToFileURL(__filename).href),{local:t,suffix:n}=Rm();try{return e(`./${t}.node`)}catch(t){try{let t=e(`@truenine/memory-sync-cli-${n}`).scriptRuntime;if(zm(t))return t;throw Error(`Package "@truenine/memory-sync-cli-${n}" does not export a scriptRuntime binding`)}catch(e){throw Bm(t,e,n)}}}function Hm(){if(Im!=null)return Im;if(Lm!=null)throw Lm;try{return Im=Vm(),Im}catch(e){throw Lm=e instanceof Error?e:Error(String(e)),Lm}}function Um(e,t,n){let r=Hm(),i=r.resolve_public_path??r.resolvePublicPath;if(i==null)throw Error(`resolve_public_path native binding is unavailable`);return i(e,t,n)}function Wm(){let e=[(0,h.fileURLToPath)(new URL(`./resolve-proxy-worker.mjs`,require(`url`).pathToFileURL(__filename).href)),(0,h.fileURLToPath)(new URL(`./script-runtime-worker.mjs`,require(`url`).pathToFileURL(__filename).href))];for(let t of e)if(l.existsSync(t))return t;return e[0]}function Gm(e,t,n,r=5e3){return Um(e,JSON.stringify({...t,workerPath:Wm(),timeoutMs:r}),n)}const Km={SRC:`src`,DIST:`dist`,SKILLS:`skills`,COMMANDS:`commands`,AGENTS:`agents`,RULES:`rules`,APP:`app`,IDEA:`.idea`,IDEA_CODE_STYLES:`.idea/codeStyles`,VSCODE:`.vscode`},qm={GLOBAL_MEMORY:`global.mdx`,GLOBAL_MEMORY_SRC:`global.src.mdx`,WORKSPACE_MEMORY:`workspace.mdx`,WORKSPACE_MEMORY_SRC:`workspace.src.mdx`,EDITOR_CONFIG:`.editorconfig`,IDEA_GITIGNORE:`.idea/.gitignore`,IDEA_PROJECT_XML:`.idea/codeStyles/Project.xml`,IDEA_CODE_STYLE_CONFIG_XML:`.idea/codeStyles/codeStyleConfig.xml`,VSCODE_SETTINGS:`.vscode/settings.json`,VSCODE_EXTENSIONS:`.vscode/extensions.json`,QODER_IGNORE:`.qoderignore`,CURSOR_IGNORE:`.cursorignore`,WARP_INDEX_IGNORE:`.warpindexignore`,AI_IGNORE:`.aiignore`,CODEIUM_IGNORE:`.codeiumignore`};Km.SKILLS,Km.COMMANDS,Km.AGENTS,Km.RULES,qm.GLOBAL_MEMORY_SRC,qm.WORKSPACE_MEMORY_SRC,Km.SKILLS,Km.COMMANDS,Km.AGENTS,Km.RULES,qm.GLOBAL_MEMORY,qm.WORKSPACE_MEMORY,Km.APP,Km.APP,Km.IDEA,Km.IDEA_CODE_STYLES,Km.VSCODE,qm.EDITOR_CONFIG,qm.IDEA_GITIGNORE,qm.IDEA_PROJECT_XML,qm.IDEA_CODE_STYLE_CONFIG_XML,qm.VSCODE_SETTINGS,qm.VSCODE_EXTENSIONS,qm.QODER_IGNORE,qm.CURSOR_IGNORE,qm.WARP_INDEX_IGNORE,qm.AI_IGNORE,qm.CODEIUM_IGNORE;let Jm=function(e){return e.Output=`output`,e}({}),Ym=function(e){return e.GlobalMemory=`globalMemory`,e.ProjectRootMemory=`projectRootMemory`,e.ProjectChildrenMemory=`projectChildrenMemory`,e.Command=`command`,e.SubAgent=`subAgent`,e.Skill=`skill`,e.SkillChildDoc=`skillChildDoc`,e.SkillResource=`skillResource`,e.SkillMcpConfig=`skillMcpConfig`,e.Readme=`readme`,e.Rule=`rule`,e}({}),Xm=function(e){return e.Relative=`relative`,e.Absolute=`absolute`,e.Root=`root`,e}({}),Zm=function(e){return e.VSCode=`vscode`,e.IntellijIDEA=`intellijIdea`,e.Git=`git`,e.EditorConfig=`editorconfig`,e.Original=`original`,e}({}),Qm=function(e){return e.UserHome=`userHome`,e.External=`external`,e}({});const $m=`proxy.ts`,eh=`.gitignore`,th=`.git/info/exclude`,nh=[qm.QODER_IGNORE,qm.CURSOR_IGNORE,qm.WARP_INDEX_IGNORE,qm.AI_IGNORE,qm.CODEIUM_IGNORE,`.kiroignore`,`.traeignore`],rh=[eh,th,qm.EDITOR_CONFIG,qm.VSCODE_SETTINGS,qm.VSCODE_EXTENSIONS,qm.IDEA_PROJECT_XML,qm.IDEA_CODE_STYLE_CONFIG_XML,qm.IDEA_GITIGNORE,...nh],ih=new Map;function ah(e){let t=e.split(/[\\/]+/).filter(e=>e.length>0).join(`/`);if(t.length===0)throw Error(`public target relative path cannot be empty`);return t}function oh(e){return u.join(e,`public`)}function sh(e){return u.join(oh(e),$m)}function ch(e){return e?.command??`execute`}function lh(e,t){return u.resolve(t?.workspaceDir??u.dirname(e))}function uh(e,t,n){return{cwd:t,workspaceDir:t,aindexDir:u.resolve(e),command:n,platform:d.default.platform}}function dh(e,t,n){let r=ah(t);if(r===$m)return $m;let i=sh(e);if(!(l.existsSync(i)&&l.statSync(i).isFile()))return r;let a=ch(n),o=lh(e,n),s=[i,o,a,r].join(`::`),c=ih.get(s);if(c!=null)return c;let u=Gm(i,uh(e,o,a),r);return ih.set(s,u),u}function fh(e,t,n){let r=dh(e,t,n);return u.join(oh(e),...r.split(/[\\/]+/))}function ph(e,t){let n=new Set([fh(e,$m)]);for(let r of rh)n.add(fh(e,r,t));return[...n]}function mh(e,t,n,r,i){let a=fh(n,t,i);if(!(r.existsSync(a)&&r.statSync(a).isFile()))return;let o=r.readFileSync(a,`utf8`);return{type:e,content:o,length:o.length,filePathKind:Xm.Absolute,dir:{pathKind:Xm.Absolute,path:a,getDirectoryName:()=>u.basename(a)}}}var hh=class extends Error{operation;violations;constructor(e,t){super(Jh(e,t)),this.name=`ProtectedDeletionGuardError`,this.operation=e,this.violations=t}};const gh=[`skills`,`commands`,`subAgents`,`rules`,`app`,`ext`,`arch`],_h=[`globalPrompt`,`workspacePrompt`];function vh(e){let t=d.default.env.XDG_CONFIG_HOME;return typeof t==`string`&&t.trim().length>0?t:u.join(e,`.config`)}function yh(e){let t=d.default.env.XDG_DATA_HOME;return typeof t==`string`&&t.trim().length>0?t:u.join(e,`.local`,`share`)}function bh(e){let t=d.default.env.XDG_STATE_HOME;return typeof t==`string`&&t.trim().length>0?t:u.join(e,`.local`,`state`)}function xh(e){let t=d.default.env.XDG_CACHE_HOME;return typeof t==`string`&&t.trim().length>0?t:u.join(e,`.cache`)}function Sh(e){if(e!=null){if(typeof e.getAbsolutePath==`function`)try{let t=e.getAbsolutePath();if(t.length>0)return u.resolve(t)}catch{}if(e.pathKind===`absolute`)return u.resolve(e.path);if(typeof e.basePath==`string`&&e.basePath.length>0)return u.resolve(e.basePath,e.path)}}function Ch(e){return e===`~`?p.homedir():e.startsWith(`~/`)||e.startsWith(`~\\`)?u.resolve(p.homedir(),e.slice(2)):e}function wh(e){return u.resolve(Ch(e))}function Th(e){let t=u.normalize(wh(e));return d.default.platform===`win32`?t.toLowerCase():t}function Eh(e){let{root:t}=u.parse(e);return e===t?e:e.endsWith(u.sep)?e.slice(0,-1):e}function Dh(e,t){let n=Eh(e),r=Eh(t);return n===r?!0:n.startsWith(`${r}${u.sep}`)}function Oh(e){let t=wh(e),n=new Set([Th(t)]);try{if(l.existsSync(t)){let e=l.realpathSync.native(t);n.add(Th(e))}}catch{}return[...n]}function kh(e,t,n,r,i=`path`){return{path:wh(e),protectionMode:t,reason:n,source:r,matcher:i}}function Ah(e){let t=Th(e.path);return{...e,path:wh(e.path),comparisonKeys:Oh(e.path),normalizedPath:t,specificity:Eh(t).length}}function jh(e){let t=new Map;for(let n of e){let e=Ah(n);t.set(`${e.protectionMode}:${e.normalizedPath}`,e)}return[...t.values()].sort((e,t)=>{let n=t.specificity-e.specificity;return n===0?e.protectionMode===t.protectionMode?e.path.localeCompare(t.path):e.protectionMode===`recursive`?-1:1:n})}function Mh(e){return wh(e).replaceAll(`\\`,`/`)}function Nh(e){let t=[];for(let n of e){if(n.matcher!==`glob`){t.push(kh(n.path,n.protectionMode,n.reason,n.source));continue}let e=Pm.default.sync(Mh(n.path),{onlyFiles:!1,dot:!0,absolute:!0,followSymbolicLinks:!1});for(let r of e)t.push(kh(r,n.protectionMode,n.reason,n.source))}return t}function Ph(e,t,n){return n===`direct`?Dh(t,e):Dh(e,t)||Dh(t,e)}function Fh(e,t){let n=wh(e);try{if(l.existsSync(n)&&l.lstatSync(n).isDirectory())return`recursive`}catch{}return t}function Ih(){let e=p.homedir();return[kh(u.parse(e).root,`direct`,`built-in dangerous root path`,`built-in-dangerous-root`),kh(e,`direct`,`built-in dangerous home directory`,`built-in-dangerous-root`),kh(vh(e),`direct`,`built-in dangerous config directory`,`built-in-dangerous-root`),kh(yh(e),`direct`,`built-in dangerous data directory`,`built-in-dangerous-root`),kh(bh(e),`direct`,`built-in dangerous state directory`,`built-in-dangerous-root`),kh(xh(e),`direct`,`built-in dangerous cache directory`,`built-in-dangerous-root`),kh(u.join(e,`.aindex`),`direct`,`built-in global aindex directory`,`built-in-dangerous-root`),kh(u.join(e,`.aindex`,`.tnmsc.json`),`direct`,`built-in global config file`,`built-in-config`)]}function Lh(e,t,n){let r=[kh(e,`direct`,`workspace root`,`workspace-reserved`),kh(u.join(e,`aindex`),`direct`,`reserved workspace aindex root`,`workspace-reserved`),kh(u.join(e,`knowladge`),`direct`,`reserved workspace knowladge root`,`workspace-reserved`)];for(let e of t)r.push(kh(e,`direct`,`workspace project root`,`workspace-project-root`));return n&&r.push(kh(u.join(e,`aindex`,`dist`,`**`,`*.mdx`),`direct`,`reserved workspace aindex dist mdx files`,`workspace-reserved`,`glob`),kh(u.join(e,`aindex`,`app`,`**`,`*.mdx`),`direct`,`reserved workspace aindex app mdx files`,`workspace-reserved`,`glob`)),r}function Rh(e){return[kh(e,`direct`,`resolved aindex root`,`aindex-root`)]}function zh(e,t){return ph(e,t)}function Bh(e,t,n){let r=[];for(let n of gh)r.push(kh(u.join(t,e.aindex[n].src),`recursive`,`configured aindex ${n} source directory`,`configured-aindex-source`));for(let n of _h)r.push(kh(u.join(t,e.aindex[n].src),`direct`,`configured aindex ${n} source file`,`configured-aindex-source`));for(let e of zh(t,n))r.push(kh(e,`direct`,`known aindex input config file`,`known-aindex-config`));return r}function Vh(e){let t=[],n=new Set,r=(e,r,i,a)=>{if(e==null||e.length===0)return;let o=kh(e,r,i,a),s=`${o.protectionMode}:${Th(o.path)}`;n.has(s)||(n.add(s),t.push(o))},i=(e,t,n,i)=>{let a=Sh(e);a!=null&&r(a,t,n,i)};i(e.globalMemory?.dir,`recursive`,`global memory source directory`,`collected-input-source`);for(let t of e.commands??[])i(t.dir,`recursive`,`command source directory`,`collected-input-source`);for(let t of e.subAgents??[])i(t.dir,`recursive`,`sub-agent source directory`,`collected-input-source`);for(let t of e.rules??[])i(t.dir,`recursive`,`rule source directory`,`collected-input-source`);for(let t of e.skills??[]){i(t.dir,`recursive`,`skill source directory`,`collected-input-source`);for(let e of t.childDocs??[])i(e.dir,`recursive`,`skill child document directory`,`collected-input-source`);for(let e of t.resources??[])e.sourcePath==null||e.sourcePath.length===0||r(e.sourcePath,Fh(e.sourcePath,`direct`),`skill resource source path`,`collected-input-source`)}for(let t of e.vscodeConfigFiles??[])i(t.dir,`direct`,`vscode input config file`,`collected-input-config`);for(let t of e.jetbrainsConfigFiles??[])i(t.dir,`direct`,`jetbrains input config file`,`collected-input-config`);for(let t of e.editorConfigFiles??[])i(t.dir,`direct`,`editorconfig input file`,`collected-input-config`);for(let t of e.aiAgentIgnoreConfigFiles??[])r(t.sourcePath,`direct`,`AI agent ignore config file`,`collected-input-config`);if(e.aindexDir!=null)for(let t of zh(e.aindexDir,{workspaceDir:e.workspace.directory.path}))r(t,`direct`,`known aindex input config file`,`known-aindex-config`);return t}function Hh(e){let t=[];for(let n of e.exactProtectedPaths??[])t.push(kh(n,`direct`,`legacy direct protected path`,`legacy-direct`));for(let n of e.subtreeProtectedPaths??[])t.push(kh(n,`recursive`,`legacy recursive protected path`,`legacy-recursive`));return t}function Uh(e={}){let t=e.includeReservedWorkspaceContentRoots??!0,n=jh(Nh([...Ih(),...Hh(e),...e.workspaceDir==null?[]:Lh(e.workspaceDir,e.projectRoots??[],t),...e.aindexDir==null?[]:Rh(e.aindexDir),...e.rules??[]]));return{rules:n.map(e=>({path:e.path,protectionMode:e.protectionMode,reason:e.reason,source:e.source,...e.matcher==null?{}:{matcher:e.matcher}})),exactProtectedPaths:n.filter(e=>e.protectionMode===`direct`).map(e=>e.path),subtreeProtectedPaths:n.filter(e=>e.protectionMode===`recursive`).map(e=>e.path),compiledRules:n}}function Wh(e){let t=new Set;for(let n of e.workspace.projects){if(n.isWorkspaceRootProject===!0)continue;let e=n.dirFromWorkspacePath?.getAbsolutePath?.();e!=null&&e.length>0&&t.add(wh(e))}return[...t]}function Gh(e,t){return t==null?e:e.specificity===t.specificity?e.protectionMode===t.protectionMode?e.path.localeCompare(t.path)<0?e:t:e.protectionMode===`recursive`?e:t:e.specificity>t.specificity?e:t}function Kh(e,t){let n=wh(e),r=Oh(n),i;for(let e of t.compiledRules){let t=!1;for(let n of r){for(let r of e.comparisonKeys)if(Ph(n,r,e.protectionMode)){i=Gh(e,i),t=!0;break}if(t)break}}if(i!=null)return{targetPath:n,protectedPath:i.path,protectionMode:i.protectionMode,reason:i.reason,source:i.source}}function qh(e,t){let n=[],r=new Map;for(let i of e){let e=wh(i),a=Kh(e,t);if(a==null){n.push(e);continue}r.has(a.targetPath)||r.set(a.targetPath,a)}return{safePaths:n,violations:[...r.values()].sort((e,t)=>e.targetPath.localeCompare(t.targetPath))}}function Jh(e,t){let n=t.map(e=>e.targetPath).join(`, `);return`Protected deletion guard blocked ${e} for ${t.length} path(s): ${n}`}function Yh(e,t,n){e.error(te(t,n))}var Xh=class{inputEffects=[];registeredScopes=[];name;dependsOn;_log;get log(){return this._log??=be(this.name),this._log}constructor(e,t){this.name=e,t!=null&&(this.dependsOn=t)}registerEffect(e,t,n=0){this.inputEffects.push({name:e,handler:t,priority:n}),this.inputEffects.sort((e,t)=>(e.priority??0)-(t.priority??0))}async executeEffects(e,t=!1){let n=[];if(this.inputEffects.length===0)return n;let{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(e.userConfigOptions),a={logger:this.log,fs:e.fs,path:e.path,glob:e.glob,spawn:f.spawn,userConfigOptions:e.userConfigOptions,workspaceDir:r,aindexDir:i,dryRun:t};for(let e of this.inputEffects){if(t){this.log.trace({action:`dryRun`,type:`inputEffect`,name:e.name}),n.push({success:!0,description:`Would execute input effect: ${e.name}`});continue}try{let t=await e.handler(a);if(t.success)this.log.trace({action:`inputEffect`,name:e.name,status:`success`,description:t.description}),t.modifiedFiles!=null&&t.modifiedFiles.length>0&&this.log.debug({action:`inputEffect`,name:e.name,modifiedFiles:t.modifiedFiles}),t.deletedFiles!=null&&t.deletedFiles.length>0&&this.log.debug({action:`inputEffect`,name:e.name,deletedFiles:t.deletedFiles});else throw t.error??Error(`Input effect failed: ${e.name}`);n.push(t)}catch(t){let r=t instanceof Error?t:Error(String(t));throw this.logInputEffectFailure(e.name,r),n.push({success:!1,error:r,description:`Input effect failed: ${e.name}`}),r}}return n}logInputEffectFailure(e,t){if(t instanceof hh){Yh(this.log,t.operation,t.violations);return}this.log.error(S({code:`INPUT_EFFECT_FAILED`,title:`Input effect failed: ${e}`,rootCause:y(`The input effect "${e}" failed before tnmsc could finish preprocessing.`,`Underlying error: ${t.message}`),exactFix:y(`Inspect the effect inputs and fix the failing file, path, or environment condition before retrying tnmsc.`),possibleFixes:[y(`Re-run the command after fixing the referenced path or generated artifact.`),y(`Add a focused regression test if this effect should handle the failure more gracefully.`)],details:{effectName:e,errorMessage:t.message}}))}hasEffects(){return this.inputEffects.length>0}getEffectCount(){return this.inputEffects.length}registerScope(e,t){this.registeredScopes.push({namespace:e,values:t}),this.log.debug({action:`registerScope`,namespace:e,keys:Object.keys(t)})}getRegisteredScopes(){return this.registeredScopes}clearRegisteredScopes(){this.registeredScopes.length=0,this.log.debug({action:`clearRegisteredScopes`})}resolveBasePaths(e){let t=e.workspaceDir,n=this.resolvePath(t,``),r=e.aindex?.dir??`aindex`;return{workspaceDir:n,aindexDir:u.join(n,r)}}resolvePath(e,t){let n=e;return n.startsWith(_y.USER_HOME)&&(n=n.replace(_y.USER_HOME,p.homedir())),n.includes(_y.WORKSPACE)&&(n=n.replace(_y.WORKSPACE,t)),u.normalize(n)}resolveAindexPath(e,t){return u.join(t,e)}readAndParseMarkdown(e,t){return mp(t.readFileSync(e,`utf8`))}};function Zh(e={}){let{filePath:t,position:n,sourceText:r,expression:i,exportName:a,nodeType:o,phase:s,hint:c,cause:l}=e,u=n?.start.line,d=n?.start.column,f=n?.end?.line,p=n?.end?.column,m=n?.start.offset,h=n?.end?.offset,g=u!=null&&r!=null?Qh(r,u):void 0,_=$h(r,m,h,g),v=u!=null&&d!=null&&g!=null?eg(u,d,p,g):void 0,y={};return t!=null&&t.length>0&&Object.assign(y,{filePath:t}),u!=null&&Object.assign(y,{line:u}),d!=null&&Object.assign(y,{column:d}),f!=null&&Object.assign(y,{endLine:f}),p!=null&&Object.assign(y,{endColumn:p}),m!=null&&Object.assign(y,{offset:m}),h!=null&&Object.assign(y,{endOffset:h}),_!=null&&_.length>0&&Object.assign(y,{snippet:_}),g!=null&&g.length>0&&Object.assign(y,{sourceLine:g}),v!=null&&v.length>0&&Object.assign(y,{codeFrame:v}),i!=null&&i.length>0&&Object.assign(y,{expression:i}),a!=null&&a.length>0&&Object.assign(y,{exportName:a}),o!=null&&o.length>0&&Object.assign(y,{nodeType:o}),s!=null&&s.length>0&&Object.assign(y,{phase:s}),c!=null&&c.length>0&&Object.assign(y,{hint:c}),l!=null&&l.length>0&&Object.assign(y,{cause:l}),y}function Qh(e,t){return e.split(/\r?\n/u)[t-1]}function $h(e,t,n,r){if(e!=null&&t!=null){let r=n!=null&&n>=t?n:t+1,i=e.slice(t,r).trim();if(i.length>0)return i.length>240?`${i.slice(0,240)}...`:i}let i=r?.trim();if(i!=null&&i.length>0)return i}function eg(e,t,n,r){let i=`${e} | `,a=` `.repeat(i.length+Math.max(0,t-1)),o=Math.max(1,(n??t+1)-t);return`${i}${r}\n${a}${`^`.repeat(o)}`}function tg(e){if(!(e.line==null||e.column==null))return e.endLine!=null&&e.endColumn!=null?`${e.line}:${e.column}-${e.endLine}:${e.endColumn}`:`${e.line}:${e.column}`}function ng(e,t){let n=[e];t.phase!=null&&n.push(`phase: ${t.phase}`),t.nodeType!=null&&n.push(`node: ${t.nodeType}`),t.filePath!=null&&n.push(`file: ${t.filePath}`);let r=tg(t);return r!=null&&n.push(`location: ${r}`),t.expression!=null&&n.push(`expression: ${t.expression}`),t.exportName!=null&&n.push(`export: ${t.exportName}`),t.sourceLine!=null&&n.push(`source line: ${t.sourceLine.trimEnd()}`),t.codeFrame!=null&&(n.push(`code frame:`),n.push(t.codeFrame)),t.hint!=null&&n.push(`hint: ${t.hint}`),t.cause!=null&&n.push(`cause: ${t.cause}`),n.join(`
196
+ `)}function rg(e,t={}){return e instanceof ig||e instanceof Error?e.message:ng(t.summary??`Compiler diagnostic`,e)}var ig=class extends Error{diagnostic;filePath;line;column;endLine;endColumn;snippet;sourceLine;codeFrame;phase;nodeType;constructor(e,t,n){super(ng(t,n)),this.name=e,this.diagnostic=n,n.filePath!=null&&(this.filePath=n.filePath),n.line!=null&&(this.line=n.line),n.column!=null&&(this.column=n.column),n.endLine!=null&&(this.endLine=n.endLine),n.endColumn!=null&&(this.endColumn=n.endColumn),n.snippet!=null&&(this.snippet=n.snippet),n.sourceLine!=null&&(this.sourceLine=n.sourceLine),n.codeFrame!=null&&(this.codeFrame=n.codeFrame),n.phase!=null&&(this.phase=n.phase),n.nodeType!=null&&(this.nodeType=n.nodeType)}};function ag(e){if(e===`mdxTextExpression`||e===`mdxFlowExpression`)return`Literal braces in MDX text are parsed as expressions. Escape the braces or wrap the placeholder in code if you meant plain text.`;if(e===`mdxJsxAttributeValueExpression`)return`JSX attribute expressions must reference values that exist in scope.`}var og=class extends ig{expression;constructor(e,t){super(`ScopeError`,e,t),t.expression!=null&&(this.expression=t.expression)}},sg=class extends og{variableName;constructor(e,t,n={}){let r=Zh({...n,expression:t,phase:n.phase??`expression-evaluation`,hint:n.hint??ag(n.nodeType)}),i=`Undefined variable "${e}" in expression "${t??``}"`;super(i,r),this.name=`UndefinedVariableError`,this.variableName=e}},cg=class extends og{namespace;constructor(e,t,n={}){let r=Zh({...n,expression:t,phase:n.phase??`expression-evaluation`,hint:n.hint??ag(n.nodeType)}),i=`Undefined namespace "${e}" in expression "${t??``}"`;super(i,r),this.name=`UndefinedNamespaceError`,this.namespace=e}},lg=class extends ig{exportName;constructor(e,t,n={}){let r=Zh({...n,exportName:t,phase:n.phase??`export-parsing`,hint:n.hint??`Export metadata must be statically evaluable. Use plain literals, arrays, objects, or scope-backed references only.`});super(`ExportParseError`,e,r),t!=null&&(this.exportName=t)}};const ug=new Map;function dg(e,t){ug.set(e,t)}function fg(){return new Map(ug)}function pg(e){return ug.has(e)}function mg(e,t,n){let r=e.trim(),i=hg(n,e);return r===``?``:/^[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*$/i.test(r)?gg(r,t,i):_g(r,t,i)}function hg(e,t){return{expression:t,...e?.filePath!=null&&{filePath:e.filePath},...e?.sourceText!=null&&{sourceText:e.sourceText},...e?.position!=null&&{position:e.position},...e?.nodeType!=null&&{nodeType:e.nodeType}}}function gg(e,t,n){let r=e.split(`.`),i=r[0];if(i==null||!(i in t))throw new cg(i??``,e,n);let a=t[i];for(let t=1;t<r.length;t++){let i=r[t];if(i==null)continue;if(a==null)throw new sg(i,e,n);if(typeof a!=`object`)throw TypeError(`Cannot read property "${i}" of ${typeof a} in expression "${e}"`);let o=a;if(!(i in o))throw new sg(i,e,n);a=o[i]}return vg(a)}function _g(e,t,n){let r=Object.keys(t),i=r.map(e=>t[e]);try{return vg(Function(...r,`return (${e})`)(...i))}catch(t){let r=t instanceof Error?t.message:String(t);if(r.includes(`is not defined`)){let t=/(\w+) is not defined/.exec(r);if(t?.[1]!=null)throw new cg(t[1],e,{...n,cause:r})}let i=n?.filePath==null?[]:[`file: ${n.filePath}`],a=n?.position?.start==null?[]:[`location: ${n.position.start.line}:${n.position.start.column}`];throw Error([`Failed to evaluate expression: "${e}"`,...i,...a,`Cause: ${r}`].join(`
197
+ `))}}function vg(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`object`)try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function yg(e,t){return e===null?!1:t.components.has(e)||pg(e)}async function bg(e){return async(t,n)=>(await e({type:`root`,children:t},n)).children}async function xg(e,t,n){let r=e.name;if(r==null||r===``)return[];let i=t.components.get(r);if(i==null)return[];if(t.processingStack.includes(r)){let e=[...t.processingStack,r].join(` → `);throw Error(`Circular dependency detected: ${e}`)}let a={scope:t.scope,components:t.components,processingStack:[...t.processingStack,r],...t.basePath==null?{}:{basePath:t.basePath}},o=await bg(n);try{return await i(e,a,o)}catch(e){let n=e instanceof Error?e.message:String(e),i=t.processingStack.join(` → `);throw Error(`Failed to process component "${r}"${i===``?``:` (called from: ${i})`}:\n${n}`,{cause:e})}}function Sg(e,t,n){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...n?.position!=null&&{position:n.position},nodeType:t}}function Cg(e,t){let n=e.name?.toLowerCase();if(n==null)return null;switch(n){case`pre`:return Eg(e,t);case`a`:return Dg(e,t);case`strong`:case`b`:return Og(e,t);case`em`:case`i`:return kg(e,t);case`img`:return Ag(e,t);case`blockquote`:return jg(e,t);default:return null}}function wg(e,t,n){let r=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return r==null?null:typeof r.value==`string`?r.value:r.value!=null&&typeof r.value==`object`&&r.value.type===`mdxJsxAttributeValueExpression`?mg(r.value.value,n.scope,Sg(n,`mdxJsxAttributeValueExpression`,r)):r.value===null?``:null}function Tg(e,t){let n=``;for(let r of e.children){if(r.type===`text`){n+=r.value;continue}if(r.type===`mdxTextExpression`){n+=mg(r.value,t.scope,Sg(t,`mdxTextExpression`,r));continue}(r.type===`mdxJsxFlowElement`||r.type===`mdxJsxTextElement`)&&(n+=Tg(r,t))}return n}function Eg(e,t){let n=null;for(let t of e.children){if((t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)&&t.name?.toLowerCase()===`code`){n=t;break}if(t.type===`paragraph`&&`children`in t){let e=t.children;for(let t of e)if((t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)&&t.name?.toLowerCase()===`code`){n=t;break}if(n!=null)break}}if(n==null)return null;let r=wg(n,`className`,t)??``,i=/language-(\w+)/.exec(r)?.[1],a=Tg(n,t);return[{type:`code`,lang:i??null,value:a.trim()}]}function Dg(e,t){let n=wg(e,`href`,t);if(n==null||n===``)return null;let r=Tg(e,t);return[{type:`paragraph`,children:[{type:`link`,url:n,title:wg(e,`title`,t)??null,children:[{type:`text`,value:r}]}]}]}function Og(e,t){let n={type:`strong`,children:[{type:`text`,value:Tg(e,t)}]};return e.type,[{type:`paragraph`,children:[n]}]}function kg(e,t){let n={type:`emphasis`,children:[{type:`text`,value:Tg(e,t)}]};return e.type,[{type:`paragraph`,children:[n]}]}function Ag(e,t){let n=wg(e,`src`,t);if(n==null||n===``)return null;let r={type:`image`,url:n,alt:wg(e,`alt`,t)??``,title:wg(e,`title`,t)??null};return e.type,[{type:`paragraph`,children:[r]}]}function jg(e,t){return[{type:`blockquote`,children:[{type:`paragraph`,children:[{type:`text`,value:Tg(e,t)}]}]}]}function Mg(e,t){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...t.position!=null&&{position:t.position},nodeType:t.type}}function Ng(e){return e==null?!1:JSON.stringify(e).includes(`"JSX`)}async function Pg(e,t,n){let r=e.data?.estree;if(r==null||r.body.length===0)return[];let i=r.body[0];return i?.type===`ExpressionStatement`?Fg(i.expression,t,n,e):[]}async function Fg(e,t,n,r){return e.type===`JSXElement`?Vg(e,t,n,r):e.type===`JSXFragment`?Hg(e,t,n,r):e.type===`LogicalExpression`?Ig(e,t,n,r):e.type===`ConditionalExpression`?Lg(e,t,n,r):e.type===`SequenceExpression`?Rg(e,t,n,r):e.type===`ArrayExpression`?zg(e,t,n,r):Zg(e,t,r)}async function Ig(e,t,n,r){let i=await Bg(e.left,t,n,r);return e.operator===`&&`?Yg(i)?Fg(e.right,t,n,r):[]:e.operator===`||`?Yg(i)?Jg(e.left)?Fg(e.left,t,n,r):Xg(i):Fg(e.right,t,n,r):e.operator===`??`?i==null?Fg(e.right,t,n,r):Jg(e.left)?Fg(e.left,t,n,r):Xg(i):[]}async function Lg(e,t,n,r){return Yg(await Bg(e.test,t,n,r))?Fg(e.consequent,t,n,r):Fg(e.alternate,t,n,r)}async function Rg(e,t,n,r){let i=[];for(let a of e.expressions){let e=await Fg(a,t,n,r);i.push(...e)}return i}async function zg(e,t,n,r){let i=[];for(let a of e.elements)if(a!=null)if(a.type===`SpreadElement`){let e=await Fg(a.argument,t,n,r);i.push(...e)}else{let e=await Fg(a,t,n,r);i.push(...e)}return i}async function Bg(e,t,n,r){if(Jg(e))return!0;if(e.type===`Literal`)return e.value;if(e.type===`Identifier`)return e.name===`undefined`?void 0:e.name===`NaN`?NaN:e.name===`Infinity`?1/0:t.scope[e.name];if(e.type===`UnaryExpression`){let i=await Bg(e.argument,t,n,r);return e.operator===`!`?!Yg(i):e.operator===`-`?-i:e.operator===`+`?+i:e.operator===`typeof`?typeof i:void 0}if(e.type===`BinaryExpression`){let i=await Bg(e.left,t,n,r),a=await Bg(e.right,t,n,r);return e.operator===`===`?i===a:e.operator===`!==`?i!==a:e.operator===`==`?i===a:e.operator===`!=`?i!==a:e.operator===`<`?i<a:e.operator===`<=`?i<=a:e.operator===`>`?i>a:e.operator===`>=`?i>=a:e.operator===`+`?i+a:e.operator===`-`?i-a:e.operator===`*`?i*a:e.operator===`/`?i/a:e.operator===`%`?i%a:void 0}if(e.type===`LogicalExpression`){let i=await Bg(e.left,t,n,r);return e.operator===`&&`?Yg(i)?Bg(e.right,t,n,r):i:e.operator===`||`?Yg(i)?i:Bg(e.right,t,n,r):e.operator===`??`?i??Bg(e.right,t,n,r):void 0}if(e.type===`MemberExpression`){let i=await Bg(e.object,t,n,r);if(i==null)return;if(e.computed)return i[await Bg(e.property,t,n,r)];let{name:a}=e.property;return i[a]}if(e.type===`ConditionalExpression`)return Yg(await Bg(e.test,t,n,r))?Bg(e.consequent,t,n,r):Bg(e.alternate,t,n,r);let i=qg(e);if(i!==``)try{let e=mg(i,t.scope,Mg(t,r));return e===`true`?!0:e===`false`?!1:e===`null`?null:e===`undefined`||e===``?void 0:/^-?\d+(?:\.\d+)?$/.test(e)?Number(e):e}catch{return}}async function Vg(e,t,n,r){let i=Wg(e,t);if(i.name!=null&&yg(i.name,t)){let{processAst:e}=await Promise.resolve().then(()=>Qg);return xg(i,t,e)}return Cg(i,t)??(i.children.length>0?n(i.children,t):[])}async function Hg(e,t,n,r){let i=[];for(let a of e.children){let e=await Ug(a,t,n,r);i.push(...e)}return i}async function Ug(e,t,n,r){if(e.type===`JSXElement`)return Vg(e,t,n,r);if(e.type===`JSXFragment`)return Hg(e,t,n,r);if(e.type===`JSXText`){let t=e.value.trim();return t===``?[]:[{type:`paragraph`,children:[{type:`text`,value:t}]}]}return e.type===`JSXExpressionContainer`?e.expression.type===`JSXEmptyExpression`?[]:Fg(e.expression,t,n,r):e.type===`JSXSpreadChild`?Fg(e.expression,t,n,r):[]}function Wg(e,t){let n=e.openingElement,r=null;n.name.type===`JSXIdentifier`?{name:r}=n.name:n.name.type===`JSXMemberExpression`?r=Gg(n.name):n.name.type===`JSXNamespacedName`&&(r=`${n.name.namespace.name}:${n.name.name.name}`);let i=[];for(let e of n.attributes)if(e.type===`JSXAttribute`){let t=e.name.type===`JSXIdentifier`?e.name.name:`${e.name.namespace.name}:${e.name.name.name}`,n=null;e.value==null?n=null:e.value.type===`Literal`?n=String(e.value.value):e.value.type===`JSXExpressionContainer`&&e.value.expression.type!==`JSXEmptyExpression`&&(n={type:`mdxJsxAttributeValueExpression`,value:qg(e.value.expression)}),i.push({type:`mdxJsxAttribute`,name:t,value:n})}else e.type===`JSXSpreadAttribute`&&i.push({type:`mdxJsxExpressionAttribute`,value:`...${qg(e.argument)}`});let a=[];for(let n of e.children){let e=Kg(n,t);e!=null&&a.push(...e)}return{type:`mdxJsxFlowElement`,name:r,attributes:i,children:a}}function Gg(e){return e.object.type===`JSXIdentifier`?`${e.object.name}.${e.property.name}`:`${Gg(e.object)}.${e.property.name}`}function Kg(e,t){if(e.type===`JSXText`){let{value:t}=e;return t.trim()===``?null:[{type:`paragraph`,children:[{type:`text`,value:t}]}]}if(e.type===`JSXElement`)return[Wg(e,t)];if(e.type===`JSXFragment`){let n=[];for(let r of e.children){let e=Kg(r,t);e!=null&&n.push(...e)}return n}return e.type===`JSXExpressionContainer`?e.expression.type===`JSXEmptyExpression`?null:[{type:`paragraph`,children:[{type:`text`,value:qg(e.expression)}]}]:e.type===`JSXSpreadChild`?[{type:`paragraph`,children:[{type:`text`,value:`...${qg(e.expression)}`}]}]:null}function qg(e){if(e.type===`Identifier`)return e.name;if(e.type===`Literal`)return typeof e.value==`string`?JSON.stringify(e.value):String(e.value);if(e.type===`MemberExpression`){let t=qg(e.object);return e.computed?`${t}[${qg(e.property)}]`:`${t}.${e.property.name}`}if(e.type===`CallExpression`)return`${qg(e.callee)}(${e.arguments.map(e=>qg(e)).join(`, `)})`;if(e.type===`BinaryExpression`||e.type===`LogicalExpression`){let t=qg(e.left),n=qg(e.right);return`(${t} ${e.operator} ${n})`}if(e.type===`UnaryExpression`){let t=qg(e.argument);return`${e.operator}${t}`}if(e.type===`ConditionalExpression`)return`(${qg(e.test)} ? ${qg(e.consequent)} : ${qg(e.alternate)})`;if(e.type===`ArrayExpression`)return`[${e.elements.filter(e=>e!=null&&e.type!==`SpreadElement`).map(e=>qg(e)).join(`, `)}]`;if(e.type===`ObjectExpression`)return`{${e.properties.filter(e=>e.type===`Property`).map(e=>`${e.key.type===`Identifier`?e.key.name:qg(e.key)}: ${qg(e.value)}`).join(`, `)}}`;if(e.type===`TemplateLiteral`){let t="`";for(let n=0;n<e.quasis.length;n++)t+=e.quasis[n]?.value.raw??``,n<e.expressions.length&&(t+=`\${${qg(e.expressions[n])}}`);return t+="`",t}return e.type===`SpreadElement`?`...${qg(e.argument)}`:``}function Jg(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function Yg(e){return!!e}function Xg(e){if(e==null)return[];let t=typeof e==`string`?e:String(e);return t===``||t===`undefined`||t===`null`?[]:[{type:`paragraph`,children:[{type:`text`,value:t}]}]}function Zg(e,t,n){let r=qg(e);if(r===``)return[];try{return Xg(mg(r,t.scope,Mg(t,n)))}catch{return[]}}var Qg=De({processAst:()=>t_});function $g(e,t,n){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...t.position!=null&&{position:t.position},nodeType:n}}function e_(e){if(!(e.includes(`/`)&&/\.\w+$/.test(e)))return e;let t=e.lastIndexOf(`/`);return e.slice(t+1)}async function t_(e,t){return n_(e,t)}async function n_(e,t){let n=[];for(let r of e.children){let e=await r_(r,t);n.push(...e)}return{type:`root`,children:n}}async function r_(e,t){if(e.type===`mdxjsEsm`)return[];if(e.type===`mdxFlowExpression`){let n=e,r=n.data?.estree,i=n.value.trim();if(i.startsWith(`/*`)&&i.endsWith(`*/`))return[];if(Ng(r))return Pg(n,t,async(e,t)=>(await t_({type:`root`,children:e},t)).children);let a=mg(n.value,t.scope,$g(t,n,`mdxFlowExpression`));return a===``?[]:[{type:`paragraph`,children:[{type:`text`,value:a}]}]}if(e.type===`mdxJsxFlowElement`)return i_(e,t);if(e.type===`link`){let n=e,r=(await a_(n.children,t)).map(e=>e.type===`text`?{...e,value:e_(e.value)}:e);return[{...n,children:r}]}if(!(`children`in e&&Array.isArray(e.children)))return[e];let n=await a_(e.children,t);return[{...e,children:n}]}async function i_(e,t){return e.name!=null&&yg(e.name,t)?xg(e,t,t_):Cg(e,t)??[]}async function a_(e,t){let n=[];for(let r of e){if(r.type===`mdxFlowExpression`){let e=r,i=e.data?.estree,a=e.value.trim();if(a.startsWith(`/*`)&&a.endsWith(`*/`))continue;if(Ng(i)){let r=await Pg(e,t,async(e,t)=>(await t_({type:`root`,children:e},t)).children);for(let e of r)n.push(e);continue}let o=mg(e.value,t.scope,$g(t,e,`mdxFlowExpression`));o!==``&&n.push({type:`paragraph`,children:[{type:`text`,value:o}]});continue}if(r.type===`mdxTextExpression`){let e=r,i=e.value.trim();if(i.startsWith(`/*`)&&i.endsWith(`*/`))continue;let a={type:`text`,value:mg(e.value,t.scope,$g(t,e,`mdxTextExpression`))};n.push(a);continue}if(r.type===`mdxJsxTextElement`){let e=r;if(e.name!=null&&yg(e.name,t)){let r=await xg(e,t,t_);for(let e of r)e.type===`paragraph`&&`children`in e?n.push(...e.children):n.push(e);continue}let i=Cg(e,t);if(i!=null)for(let e of i)e.type===`paragraph`&&`children`in e?n.push(...e.children):n.push(e);continue}if(`children`in r&&Array.isArray(r.children)){let e=await a_(r.children,t);if(r.type===`link`){let t=e.map(e=>e.type===`text`?{...e,value:e_(e.value)}:e);n.push({...r,children:t});continue}n.push({...r,children:e});continue}n.push(r)}return n}function o_(e,t={}){let n={},{yamlFrontMatter:r,scope:i,filePath:a,sourceText:o}=t;for(let t of e){let e=s_(t,i,{...a!=null&&{filePath:a},...o!=null&&{sourceText:o}});Object.assign(n,e)}let s=Object.keys(n).length>0,c=r!=null&&Object.keys(r).length>0,l;return l=s&&c?`mixed`:s?`export`:`yaml`,{fields:{...r,...n},source:l}}function s_(e,t,n={}){let r={},{filePath:i,sourceText:a}=n,o=e.value.trim(),s=/^export\s+default\s+/.exec(o);if(s!=null){let n=s[0].length,c=c_(o,n);if(c!=null)try{let e=l_(c.trim(),t,i);typeof e==`object`&&e&&!Array.isArray(e)&&Object.assign(r,e)}catch(t){let n=t instanceof Error?t.message:String(t);throw new lg(`Cannot statically evaluate export default`,`default`,{...i!=null&&{filePath:i},...a!=null&&{sourceText:a},...e.position!=null&&{position:e.position},nodeType:`mdxjsEsm`,phase:`export-parsing`,cause:n})}return r}let c=/export\s+const\s+(\w+)\s*=\s*/g,l=c.exec(o);for(;l!==null;){let n=l[1];if(n==null){l=c.exec(o);continue}let s=c_(o,l.index+l[0].length);if(s==null){l=c.exec(o);continue}try{let e=l_(s.trim(),t,i);n===`metadata`&&typeof e==`object`&&e&&!Array.isArray(e)?Object.assign(r,e):r[n]=e}catch(t){let r=t instanceof Error?t.message:String(t);throw new lg(`Cannot statically evaluate export "${n}"`,n,{...i!=null&&{filePath:i},...a!=null&&{sourceText:a},...e.position!=null&&{position:e.position},nodeType:`mdxjsEsm`,phase:`export-parsing`,cause:r})}l=c.exec(o)}return r}function c_(e,t){let n=0,r=null,i=!1,a=t;for(let o=t;o<e.length;o++){let t=e[o];if(i){i=!1;continue}if(t===`\\`){i=!0;continue}if(r!=null){t===r&&(r=null);continue}if(t===`"`||t===`'`||t==="`"){r=t;continue}if(t===`{`||t===`[`){n++;continue}if(t===`}`||t===`]`){n--;continue}if(n===0){if(t===`;`||t===`
198
+ `){a=o;break}if(t===`/`&&o+1<e.length&&e[o+1]===`/`){a=o;break}}o===e.length-1&&(a=e.length)}a<=t&&(a=e.length);let o=e.slice(t,a).trim();return o.endsWith(`;`)?o.slice(0,-1).trim():o}function l_(e,t,n){let r=e.trim();if(r===``)throw Error(`Empty value cannot be evaluated`);if(r===`true`)return!0;if(r===`false`)return!1;if(r===`null`)return null;if(/^-?\d+(?:\.\d+)?$/.test(r))return Number(r);if(r.startsWith(`"`)&&r.endsWith(`"`))return u_(r.slice(1,-1),`"`);if(r.startsWith(`'`)&&r.endsWith(`'`))return u_(r.slice(1,-1),`'`);if(r.startsWith("`")&&r.endsWith("`")){let e=r.slice(1,-1);if(e.includes("${"))throw Error(`Template literal with expressions cannot be statically evaluated: ${r}`);return u_(e,"`")}if(r.startsWith(`[`)&&r.endsWith(`]`))return f_(r,t,n);if(r.startsWith(`{`)&&r.endsWith(`}`))return p_(r,t,n);if(/^[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*$/i.test(r))return d_(r,t,n);let i=n==null?``:` in file "${n}"`;throw Error(`Expression "${r}" cannot be statically evaluated${i}`)}function u_(e,t){return e.replaceAll(`\\n`,`
199
+ `).replaceAll(`\\r`,`\r`).replaceAll(`\\t`,` `).replaceAll(`\\"`,`"`).replaceAll(`\\'`,`'`).replaceAll(`\\\\`,`\\`)}function d_(e,t,n){if(t==null){let t=n==null?``:` in file "${n}"`;throw Error(`Variable reference "${e}" cannot be resolved without scope${t}`)}let r=e.split(`.`),i=r[0];if(i==null||!(i in t)){let r=n==null?``:` in file "${n}"`,a=Object.keys(t).join(`, `);throw Error(`Undefined namespace "${i}" in expression "${e}"${r}. Available: ${a}`)}let a=t[i];for(let t=1;t<r.length;t++){let i=r[t];if(i==null)continue;if(a==null){let t=n==null?``:` in file "${n}"`;throw Error(`Cannot read property "${i}" of null/undefined in "${e}"${t}`)}if(typeof a!=`object`){let t=n==null?``:` in file "${n}"`;throw Error(`Cannot read property "${i}" of ${typeof a} in "${e}"${t}`)}let o=a;if(!(i in o)){let t=n==null?``:` in file "${n}"`,r=Object.keys(o).join(`, `);throw Error(`Undefined property "${i}" in "${e}"${t}. Available: ${r}`)}a=o[i]}if(typeof a==`string`||typeof a==`number`||typeof a==`boolean`||a===null||Array.isArray(a)||typeof a==`object`)return a;let o=n==null?``:` in file "${n}"`;throw Error(`Variable "${e}" resolved to unsupported type: ${typeof a}${o}`)}function f_(e,t,n){let r=e.slice(1,-1).trim();if(r===``)return[];if(t==null)try{let t=m_(e),n=JSON.parse(t);if(Array.isArray(n))return n}catch{}return h_(r).map(e=>l_(e.trim(),t,n))}function p_(e,t,n){let r=e.slice(1,-1).trim();if(r===``)return{};if(t==null)try{let t=m_(e),n=JSON.parse(t);if(typeof n==`object`&&n&&!Array.isArray(n))return n}catch{}let i={},a=g_(r);for(let e of a){let r=__(e);if(r===-1)continue;let a=e.slice(0,r).trim(),o=e.slice(r+1).trim();(a.startsWith(`"`)&&a.endsWith(`"`)||a.startsWith(`'`)&&a.endsWith(`'`))&&(a=a.slice(1,-1)),i[a]=l_(o,t,n)}return i}function m_(e){let t=``,n=null,r=!1;for(let i=0;i<e.length;i++){let a=e[i];if(r){t+=a,r=!1;continue}if(a===`\\`){t+=a,r=!0;continue}if(n!=null){a===n?(t+=`"`,n=null):a===`"`&&n===`'`?t+=`\\"`:t+=a;continue}if(a===`"`||a===`'`){t+=`"`,n=a;continue}if(a===`:`&&i>0){let e=t.length-1;for(;e>=0&&/\s/.test(t.charAt(e));)e--;let n=e+1;for(;e>=0&&/[\w$]/.test(t.charAt(e));)e--;if(e++,e>0&&t.charAt(e-1)!==`"`){let r=t.slice(e,n);r.length>0&&/^[\w$]+$/.test(r)&&(t=`${t.slice(0,e)}"${r}"`)}}t+=a}return t}function h_(e){let t=[],n=``,r=0,i=null,a=!1;for(let o of e){if(a){n+=o,a=!1;continue}if(o===`\\`){n+=o,a=!0;continue}if(i!=null){n+=o,o===i&&(i=null);continue}if(o===`"`||o===`'`||o==="`"){n+=o,i=o;continue}if(o===`[`||o===`{`){r++,n+=o;continue}if(o===`]`||o===`}`){r--,n+=o;continue}if(o===`,`&&r===0){n.trim()!==``&&t.push(n.trim()),n=``;continue}n+=o}return n.trim()!==``&&t.push(n.trim()),t}function g_(e){return h_(e)}function __(e){let t=null,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){n=!1;continue}if(i===`\\`){n=!0;continue}if(t!=null){i===t&&(t=null);continue}if(i===`"`||i===`'`||i==="`"){t=i;continue}if(i===`:`)return r}return-1}const v_={}.hasOwnProperty;function y_(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&v_.call(t,e)){let n=String(t[e]);i=v_.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}const b_={}.hasOwnProperty;function x_(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)x_(e,t.extensions[n]);for(r in t)if(b_.call(t,r))switch(r){case`extensions`:break;case`unsafe`:S_(e[r],t[r]);break;case`join`:S_(e[r],t[r]);break;case`handlers`:C_(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function S_(e,t){t&&e.push(...t)}function C_(e,t){t&&Object.assign(e,t)}const w_=[T_];function T_(e,t,n,r){if(t.type===`code`&&hn(t,r)&&(e.type===`list`||e.type===t.type&&hn(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&Nn(t,r))?void 0:n.spread?1:0}const E_=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],D_=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
200
+ `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:E_},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
201
+ ]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:E_},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
202
+ *])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:E_},{atBreak:!0,character:`+`,after:`(?:[ \r
203
+ ])`},{atBreak:!0,character:`-`,after:`(?:[ \r
204
+ -])`},{atBreak:!0,before:`\\d+`,character:`.`,after:`(?:[ \r
205
+ ]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:E_},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:E_},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:E_},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:E_},{atBreak:!0,character:`~`}];function O_(e){return e.label||!e.identifier?e.label||``:gr(e.identifier)}function k_(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function A_(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
206
+ `)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=Sn(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+Sn(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function j_(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
207
+ `,after:`
208
+ `,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(M_(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function M_(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
209
+ `.repeat(1+a);if(a===!1)return`
210
+
211
+ <!---->
212
+
213
+ `}return`
214
+
215
+ `}const N_=/\r?\n|\r/g;function P_(e,t){let n=[],r=0,i=0,a;for(;a=N_.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function F_(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!dn(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(I_);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(L_(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(Sn(r.charCodeAt(e))),c++))}return a.push(L_(r.slice(c,l),n.after)),a.join(``)}function I_(e,t){return e-t}function L_(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function R_(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function z_(e,t){let n=t||{},r={associationId:O_,containerPhrasing:U_,containerFlow:W_,createTracker:R_,compilePattern:k_,enter:a,handlers:{...ur},handle:void 0,indentLines:P_,indexStack:[],join:[...w_],options:{},safe:G_,stack:[],unsafe:[...D_]};x_(r,n),r.options.tightDefinitions&&r.join.push(H_),r.handle=y_(`type`,{invalid:B_,unknown:V_,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
216
+ `,after:`
217
+ `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
218
+ `),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function B_(e){throw Error("Cannot handle value `"+e+"`, expected node")}function V_(e){let t=e;throw Error("Cannot handle unknown node `"+t.type+"`")}function H_(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function U_(e,t){return A_(e,this,t)}function W_(e,t){return j_(e,this,t)}function G_(e,t){return F_(this,e,t)}function K_(e,t,n){return{...e.filePath!=null&&{filePath:e.filePath},...e.sourceText!=null&&{sourceText:e.sourceText},...n?.position!=null&&{position:n.position},nodeType:t}}function q_(e,t){let n=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`when`);if(n?.type!==`mdxJsxAttribute`)return!0;if(typeof n.value==`string`)return n.value===`true`;if(n.value!=null&&typeof n.value==`object`&&n.value.type===`mdxJsxAttributeValueExpression`)try{let e=mg(n.value.value,t.scope,K_(t,`mdxJsxAttributeValueExpression`,n));return e===`true`||e===`1`}catch{return!1}return!1}async function J_(e,t,n){return!q_(e,t)||e.children.length===0?[]:n(e.children,t)}async function Y_(e,t){if(!q_(e,t)||e.children.length===0)return[];let n=X_(e.children,t);return n===``?[]:[{type:`text`,value:n}]}function X_(e,t){let n=``;for(let r of e)if(r.type===`text`)n+=r.value;else if(r.type===`mdxTextExpression`)try{n+=mg(r.value,t.scope,K_(t,`mdxTextExpression`,r))}catch{}else `children`in r&&Array.isArray(r.children)&&(n+=X_(r.children,t));return n}function Z_(){dg(`Md`,J_),dg(`Md.Line`,Y_)}function Q_(e){let t=this;t.compiler=n;function n(n){return z_(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}var $_=Oe(ap(),1);Z_();function ev(e,t){let n={};if(e!=null&&(n.os={...e.os},n.env={...e.env},n.profile={...e.profile},n.tool={...e.tool}),t!=null)for(let[e,r]of Object.entries(t)){let t=n[e];n[e]=typeof r==`object`&&r&&!Array.isArray(r)&&typeof t==`object`&&t&&!Array.isArray(t)?{...t,...r}:r}return n}async function tv(e,t){let n=Bd(e),r=ev(t?.globalScope,t?.scope),i=fg(),a;if(t?.extractMetadata===!0){let i=n.children.find(e=>e.type===`yaml`),o;if(i!=null)try{o=$_.parse(i.value)}catch{}a=o_(n.children.filter(e=>e.type===`mdxjsEsm`),{...o!=null&&{yamlFrontMatter:o},scope:r,...t?.filePath!=null&&{filePath:t.filePath},sourceText:e}),n.children=n.children.filter(e=>e.type!==`yaml`&&e.type!==`mdxjsEsm`)}let o=await t_(n,{scope:r,components:i,processingStack:[],...t?.basePath!=null&&{basePath:t.basePath},...t?.filePath!=null&&{filePath:t.filePath},sourceText:e}),s=Ad().use(at,[`yaml`]).use(yo).use(Q_,{bullet:`-`,fence:"`",fences:!0,emphasis:`*`,strong:`*`,rule:`-`,handlers:{text(e){return e.value}}}).stringify(o).trim();return t?.extractMetadata===!0&&a!=null?{content:s,metadata:a}:s}const nv=/^\s*(```|~~~)/u,rv=[/^\s*export\s+default\b/u,/^\s*export\s+const\b/u,/^\s*import\b/u];let iv=null;try{let e=(0,m.createRequire)(e(`url`).pathToFileURL(__filename).href),{platform:t,arch:n}=d.default,r={"win32-x64":[`napi-md-compiler.win32-x64-msvc`,`win32-x64-msvc`],"linux-x64":[`napi-md-compiler.linux-x64-gnu`,`linux-x64-gnu`],"linux-arm64":[`napi-md-compiler.linux-arm64-gnu`,`linux-arm64-gnu`],"darwin-arm64":[`napi-md-compiler.darwin-arm64`,`darwin-arm64`],"darwin-x64":[`napi-md-compiler.darwin-x64`,`darwin-x64`]}[`${t}-${n}`];if(r!=null){let[t,n]=r;try{iv=e(`./${t}.node`)}catch{try{iv=e(`@truenine/memory-sync-cli-${n}`).mdCompiler}catch{}}}}catch{}async function av(e,t){let n=t?.extractMetadata===!0?{...t,extractMetadata:!0}:null,r=ov(e,t);if(r!=null){if(n!=null){let{metadata:t}=r;return t==null||cv(r.content)?tv(e,n):{content:r.content,metadata:t}}return r.content}return n==null?t==null?tv(e):tv(e,{...t,extractMetadata:!1}):tv(e,n)}function ov(e,t){if(iv==null)return null;try{let n=iv.compileMdxToMd(e,sv(t)),r=JSON.parse(n);return t?.extractMetadata===!0&&r.metadata==null?null:r}catch{return null}}function sv(e){if(e==null)return null;let t={...e,...e.globalScope==null?{}:{globalScope:{os:e.globalScope.os,env:e.globalScope.env,profile:e.globalScope.profile,tool:e.globalScope.tool}}};return JSON.stringify(t)}function cv(e){let t;for(let n of e.split(/\r?\n/u)){let e=nv.exec(n);if(e?.[1]!=null){let n=e[1];t==null?t=n:t===n&&(t=void 0);continue}if(t==null&&rv.some(e=>e.test(n)))return!0}return!1}var lv=class{type;name;_log;get log(){return this._log??=be(this.name),this._log}dependsOn;constructor(e,t,n){this.name=e,this.type=t,n!=null&&(this.dependsOn=n)}};function uv(e,t){return e==null&&t==null?[]:[...new Set([...e??[],...t??[]])]}function dv(e,t){return e==null||t.length===0?!0:typeof e==`string`?t.includes(e):e.some(e=>t.includes(e))}function fv(e,t){if(e==null&&t==null)return{};let n={};for(let[t,r]of Object.entries(e??{}))n[t]=[...r];for(let[e,r]of Object.entries(t??{}))n[e]=Object.hasOwn(n,e)?[...new Set([...n[e],...r])]:[...r];return n}function pv(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.matchesSeries==`function`&&typeof t.resolveEffectiveIncludeSeries==`function`&&typeof t.resolveSubSeries==`function`}function mv(){let e={"win32-x64":`win32-x64-msvc`,"linux-x64":`linux-x64-gnu`,"linux-arm64":`linux-arm64-gnu`,"darwin-arm64":`darwin-arm64`,"darwin-x64":`darwin-x64`}[`${d.default.platform}-${d.default.arch}`];if(e==null)return;let t=`@truenine/memory-sync-cli-${e}`,n=`napi-memory-sync-cli.${e}.node`;try{let e=(0,m.createRequire)(require(`url`).pathToFileURL(__filename).href),r=[t,`${t}/${n}`,`./${n}`];for(let t of r)try{let n=e(t),r=[n,n?.default,n?.config];for(let e of r)if(pv(e))return e}catch{}}catch{}}const{resolveEffectiveIncludeSeries:hv,matchesSeries:gv,resolveSubSeries:_v}=mv()??{resolveEffectiveIncludeSeries:uv,matchesSeries:dv,resolveSubSeries:fv};function $(e,t,n){let r=hv(t?.includeSeries,t?.[n]?.includeSeries);return e.filter(e=>gv(e.seriName,r))}function vv(e){let t=e.replaceAll(/\.\/+/g,``);return t=t.replaceAll(/\/+$/g,``),t}function yv(e,t){return t.startsWith(`**/`)?`${e}/${t}`:t.startsWith(`*`)?`${e}/**/${t}`:`${e}/${t}`}function bv(e,t){for(let n of t){let t=n.replaceAll(/\/+$/g,``),r=[{prefix:t,pattern:`${t}/`},{prefix:t,pattern:`${t}\\`}];for(let{prefix:t,pattern:n}of r)if(e.startsWith(n))return{prefix:t,baseGlob:e.slice(n.length)};if(e===t)return{prefix:t,baseGlob:`**/*`}}return{prefix:null,baseGlob:e}}function xv(e,t){let n=_v(t?.subSeries,t?.rules?.subSeries);if(Object.keys(n).length===0)return e;let r={};for(let[e,t]of Object.entries(n)){let n=vv(e);r[n]=t}let i=Object.keys(r);return e.map(e=>{if(e.seriName==null)return e;let t=[];for(let[n,i]of Object.entries(r))(Array.isArray(e.seriName)?e.seriName.some(e=>i.includes(e)):i.includes(e.seriName))&&t.push(n);if(t.length===0)return e;let n=[];for(let r of e.globs){let{prefix:e,baseGlob:a}=bv(r,i);e!=null&&n.push(r);for(let r of t){if(r===e)continue;let t=yv(r,a);n.includes(t)||n.push(t)}}return{...e,globs:n}})}function Sv(e){let t=u.join(e,`.git`);if(!l.existsSync(t))return null;let n=l.lstatSync(t);if(n.isDirectory())return u.join(t,`info`);if(n.isFile())try{let n=l.readFileSync(t,`utf8`).trim(),r=/^gitdir: (.+)$/.exec(n);if(r?.[1]!=null){let t=u.resolve(e,r[1]);return u.join(t,`info`)}}catch{}return null}function Cv(e,t=5){let n=[],r=new Set([`node_modules`,`.turbo`,`dist`,`build`,`out`,`.cache`]);function i(a,o){if(o>t)return;let s;try{let e=l.readdirSync(a,{withFileTypes:!0});if(!Array.isArray(e))return;s=e}catch{return}s.some(e=>e.name===`.git`)&&a!==e&&n.push(a);for(let e of s)e.isDirectory()&&(e.name===`.git`||r.has(e.name)||i(u.join(a,e.name),o+1))}return i(e,0),n}const wv={default:{websearch:`web_search`,webfetch:`web_fetch`,readFile:`read_file`,writeFile:`write_file`,executeCommand:`execute_command`,todolistWrite:`todolist_write`,grep:`grep`,listDirectory:`list_directory`},claudeCode:{readFile:`Read`,writeFile:`Write`,executeCommand:`Execute`,todolistWrite:`TodoWrite`,listDirectory:`List`},kiro:{websearch:`remote_web_search`,webfetch:`webFetch`,readFile:`readFile`,writeFile:`fsWrite`,executeCommand:`executeBash`,todolistWrite:`todolistWrite`,grep:`grepSearch`,listDirectory:`listDir`}};let Tv=function(e){return e.Bash=`bash`,e.Zsh=`zsh`,e.Fish=`fish`,e.Sh=`sh`,e.PowerShell=`powershell`,e.Pwsh=`pwsh`,e.Cmd=`cmd`,e.Unknown=`unknown`,e}({}),Ev=function(e){return e.Win=`win`,e.Mac=`mac`,e.Linux=`linux`,e.Unknown=`unknown`,e}({});var Dv=class{userConfig;toolPreset;constructor(e={}){this.userConfig=e.userConfig,this.toolPreset=e.toolPreset??`default`}collect(){return{os:this.collectOsInfo(),env:this.collectEnvContext(),profile:this.collectProfile(),tool:this.collectToolReferences(),Md:this.createMdComponent()}}collectOsInfo(){let e=p.platform();return{platform:e,arch:p.arch(),hostname:p.hostname(),homedir:p.homedir(),tmpdir:p.tmpdir(),type:p.type(),release:p.release(),shellKind:this.detectShellKind(),kind:this.detectOsKind(e)}}detectOsKind(e){switch(e){case`win32`:return Ev.Win;case`darwin`:return Ev.Mac;case`linux`:case`freebsd`:case`openbsd`:case`sunos`:case`aix`:return Ev.Linux;default:return Ev.Unknown}}detectShellKind(){let e=(d.default.env.SHELL??d.default.env.ComSpec??``).toLowerCase();return e.includes(`bash`)?Tv.Bash:e.includes(`zsh`)?Tv.Zsh:e.includes(`fish`)?Tv.Fish:e.includes(`pwsh`)?Tv.Pwsh:e.includes(`powershell`)?Tv.PowerShell:e.includes(`cmd`)?Tv.Cmd:e.endsWith(`/sh`)?Tv.Sh:Tv.Unknown}collectEnvContext(){return{...d.default.env}}collectProfile(){return this.userConfig?.profile==null?{}:this.userConfig.profile}collectToolReferences(){let e={...wv.default};return this.toolPreset===`claudeCode`?{...e,...wv.claudeCode}:this.toolPreset===`kiro`?{...e,...wv.kiro}:e}createMdComponent(){let e=(e=>e.when===!1?null:e.children);return e.Line=e=>e.when===!1?null:e.children,e}};let Ov=function(e){return e[e.SystemDefault=0]=`SystemDefault`,e[e.UserConfig=10]=`UserConfig`,e[e.PluginRegistered=20]=`PluginRegistered`,e[e.CompileTime=30]=`CompileTime`,e}({});var kv=class{registrations=[];globalScope=null;setGlobalScope(e){this.globalScope=e}getGlobalScope(){return this.globalScope}register(e,t,n=Ov.PluginRegistered){this.registrations.push({namespace:e,values:t,priority:n})}getRegistrations(){return this.registrations}merge(e){let t={};this.globalScope!=null&&(t.os={...this.globalScope.os},t.env={...this.globalScope.env},t.profile={...this.globalScope.profile},t.tool={...this.globalScope.tool});let n=[...this.registrations].sort((e,t)=>e.priority-t.priority);for(let e of n)t[e.namespace]=this.deepMerge(t[e.namespace],e.values);if(e!=null)for(let[n,r]of Object.entries(e))t[n]=typeof r==`object`&&r&&!Array.isArray(r)?this.deepMerge(t[n],r):r;return t}deepMerge(e,t){if(e==null)return{...t};let n={...e};for(let[e,r]of Object.entries(t))n[e]=typeof r==`object`&&r&&!Array.isArray(r)&&typeof n[e]==`object`&&n[e]!==null&&!Array.isArray(n[e])?this.deepMerge(n[e],r):r;return n}resolve(e){let t=this.merge();return e.replaceAll(/\$\{([^}]+)\}/g,(e,n)=>{let r=n.split(`.`),i=t;for(let e of r)i=i?.[e];return i==null?`\${${n}}`:String(i)})}clear(){this.registrations.length=0,this.globalScope=null}};const Av=[`project`,`global`];function jv(e){if(e==null)return[];if(typeof e==`string`)return[e];let t=[];for(let n of e)t.includes(n)||t.push(n);return t}function Mv(e,t){let n=new Map;for(let[e,r]of t.entries())n.set(r,e);return[...e].sort((e,t)=>(n.get(e)??2**53-1)-(n.get(t)??2**53-1))}function Nv(e){let{requestedScopes:t,defaultScopes:n,supportedScopes:r,singleScope:i,availableScopes:a,priority:o=Av}=e,s=jv(t),c=jv(n),l=new Set(jv(r)),u=(s.length>0?s:c).filter(e=>l.has(e));if(u.length===0)return[];let d=Mv(u,o);if(!i)return d;if(a!=null&&a.length>0){let e=new Set(a),t=d.find(t=>e.has(t));return t==null?[]:[t]}let[f]=d;return f==null?[]:[f]}const Pv=_.z.object({src:_.z.string(),dist:_.z.string()}),Fv=_.z.object({dir:_.z.string().default(`aindex`),skills:Pv,commands:Pv,subAgents:Pv,rules:Pv,globalPrompt:Pv,workspacePrompt:Pv,app:Pv,ext:Pv,arch:Pv}),Iv=_.z.object({includeSeriesPrefix:_.z.boolean().optional(),seriesSeparator:_.z.string().optional()}),Lv=_.z.object({includeSeriesPrefix:_.z.boolean().optional(),pluginOverrides:_.z.record(_.z.string(),Iv).optional()}),Rv=_.z.enum([`project`,`global`]),zv=_.z.union([Rv,_.z.array(Rv).min(1)]),Bv=_.z.object({prompt:zv.optional(),rules:zv.optional(),commands:zv.optional(),subagents:zv.optional(),skills:zv.optional(),mcp:zv.optional()}),Vv=_.z.object({plugins:_.z.record(_.z.string(),Bv).optional()}),Hv=_.z.object({blankLineAfter:_.z.boolean().optional()}),Uv=_.z.enum([`direct`,`recursive`]),Wv=_.z.enum([`path`,`glob`]),Gv=_.z.object({path:_.z.string(),protectionMode:Uv,matcher:Wv.optional(),reason:_.z.string().optional()}),Kv=_.z.object({rules:_.z.array(Gv).optional()}),qv=_.z.object({name:_.z.string().optional(),username:_.z.string().optional(),gender:_.z.string().optional(),birthday:_.z.string().optional()}).catchall(_.z.unknown()),Jv=_.z.object({version:_.z.string().optional(),workspaceDir:_.z.string().optional(),aindex:Fv.optional(),logLevel:_.z.enum([`trace`,`debug`,`info`,`warn`,`error`]).optional(),commandSeriesOptions:Lv.optional(),outputScopes:Vv.optional(),frontMatter:Hv.optional(),cleanupProtection:Kv.optional(),profile:qv.optional()}),Yv=_.z.object({names:_.z.array(_.z.string()).optional()}),Xv=_.z.object({includeSeries:_.z.array(_.z.string()).optional(),subSeries:_.z.record(_.z.string(),_.z.array(_.z.string())).optional()});_.z.object({mcp:Yv.optional(),includeSeries:_.z.array(_.z.string()).optional(),subSeries:_.z.record(_.z.string(),_.z.array(_.z.string())).optional(),rules:Xv.optional(),skills:Xv.optional(),subAgents:Xv.optional(),commands:Xv.optional()}),_.z.object({});function Zv(e,t){let n=t==null?``:` in ${t}`;return e==null||e===`project`||e===`global`?{valid:!0,errors:[],warnings:[]}:{valid:!1,errors:[`Field "scope" must be "project" or "global"${n}`],warnings:[]}}function Qv(e,t){let{requiredFields:n,optionalDefaults:r,filePath:i}=t,a=[],o=[];for(let t of n){let n=String(t);if(!(n in e)||e[n]==null){let e=i==null?`Missing required field "${n}"`:`Missing required field "${n}" in ${i}`;a.push(e)}}if(r!=null){for(let[t,n]of Object.entries(r))if(!(t in e)||e[t]==null){let e=i==null?`Using default value for optional field "${t}": ${JSON.stringify(n)}`:`Using default value for optional field "${t}": ${JSON.stringify(n)} in ${i}`;o.push(e)}}return{valid:a.length===0,errors:a,warnings:o}}function $v(e,t){let n=t==null?``:` in ${t}`,r=[],i=[];(!(`name`in e)||e.name==null)&&r.push(`Missing required field "name"${n}`),!(`description`in e)||e.description==null?r.push(`Missing required field "description"${n}`):(typeof e.description!=`string`||e.description.trim().length===0)&&r.push(`Required field "description" cannot be empty${n}`),e.enabled??i.push(`Using default value for optional field "enabled": true${n}`),e.keywords??i.push(`Using default value for optional field "keywords": []${n}`);let a=Zv(e.scope,t);return r.push(...a.errors),{valid:r.length===0,errors:r,warnings:i}}function ey(e,t){let n=Qv(e,{requiredFields:[],optionalDefaults:{},filePath:t}),r=Zv(e.scope,t);return{valid:n.valid&&r.valid,errors:[...n.errors,...r.errors],warnings:n.warnings}}function ty(e,t){let n=Qv(e,{requiredFields:[`name`,`description`],optionalDefaults:{},filePath:t}),r=Zv(e.scope,t);return{valid:n.valid&&r.valid,errors:[...n.errors,...r.errors],warnings:n.warnings}}function ny(e,t){let n=[],r=[],i=t==null?``:` in ${t}`;!Array.isArray(e.globs)||e.globs.length===0?n.push(`Missing or empty required field "globs"${i}`):e.globs.every(e=>typeof e==`string`)||n.push(`Field "globs" must be an array of strings${i}`),(typeof e.description!=`string`||e.description.length===0)&&n.push(`Missing or empty required field "description"${i}`);let{scope:a,seriName:o}=e,s=Zv(a,t);return n.push(...s.errors),a??r.push(`Using default value for optional field "scope": "project"${i}`),o!=null&&typeof o!=`string`&&!Array.isArray(o)&&n.push(`Field "seriName" must be a string or string array${i}`),{valid:n.length===0,errors:n,warnings:r}}function ry(e){return{workspace:{directory:e.workspace.directory,projects:[...e.workspace.projects]},...e.skills!=null&&{skills:[...e.skills]},...e.commands!=null&&{commands:[...e.commands]},...e.subAgents!=null&&{subAgents:[...e.subAgents]},...e.rules!=null&&{rules:[...e.rules]},...e.readmePrompts!=null&&{readmePrompts:[...e.readmePrompts]},...e.globalMemory!=null&&{globalMemory:e.globalMemory},...e.vscodeConfigFiles!=null&&{vscodeConfigFiles:[...e.vscodeConfigFiles]},...e.jetbrainsConfigFiles!=null&&{jetbrainsConfigFiles:[...e.jetbrainsConfigFiles]},...e.editorConfigFiles!=null&&{editorConfigFiles:[...e.editorConfigFiles]},...e.aiAgentIgnoreConfigFiles!=null&&{aiAgentIgnoreConfigFiles:[...e.aiAgentIgnoreConfigFiles]},...e.globalGitIgnore!=null&&{globalGitIgnore:e.globalGitIgnore},...e.shadowGitExclude!=null&&{shadowGitExclude:e.shadowGitExclude},...e.aindexDir!=null&&{aindexDir:e.aindexDir}}}const iy={Readme:{src:`rdm.mdx`,out:`README.md`},CodeOfConduct:{src:`coc.mdx`,out:`CODE_OF_CONDUCT.md`},Security:{src:`security.mdx`,out:`SECURITY.md`}},ay=[`prompt`,`rules`,`commands`,`subagents`,`skills`,`mcp`];function oy(e){return g.Buffer.isBuffer(e)}function sy(e){if(typeof e==`string`)return[e];let t=[];for(let n of e)t.includes(n)||t.push(n);return t}function cy(e,t){return t?.outputScopes?.plugins?.[e]}function ly(e){for(let t of ay){let n=e.outputCapabilities[t];if(n!=null&&n.scopes.length===0)throw Error(`Plugin ${e.name} declares empty scopes for topic "${t}"`)}}function uy(e,t){let n=cy(e.name,t);if(n!=null)for(let t of ay){let r=n[t];if(r==null)continue;let i=e.outputCapabilities[t];if(i==null)throw Error(`Invalid outputScopes configuration: outputScopes.plugins.${e.name}.${t} is set, but plugin ${e.name} does not support topic "${t}".`);let a=sy(r);if(i.singleScope&&a.length>1){let n=a.join(`, `);throw Error(`Invalid outputScopes configuration: outputScopes.plugins.${e.name}.${t} is single-scope and cannot request multiple scopes [${n}].`)}let o=new Set(i.scopes),s=a.filter(e=>!o.has(e));if(s.length>0){let n=i.scopes.join(`, `),r=s.join(`, `);throw Error(`Invalid outputScopes configuration: outputScopes.plugins.${e.name}.${t} requests unsupported scopes [${r}]. Allowed scopes: [${n}].`)}}}function dy(e,t){for(let n of e)ly(n),uy(n,t)}async function fy(e,t){let n=new Map;dy(e,t.pluginOptions);for(let r of e){let e=await r.declareOutputFiles(t),i=[];for(let n of e){if(t.dryRun===!0){i.push({path:n.path,success:!0,skipped:!1});continue}try{let e=u.dirname(n.path);if(l.mkdirSync(e,{recursive:!0}),n.ifExists===`skip`&&l.existsSync(n.path)){i.push({path:n.path,success:!0,skipped:!0});continue}if(n.ifExists===`error`&&l.existsSync(n.path))throw Error(`Refusing to overwrite existing file: ${n.path}`);if(n.symlinkTarget!=null){l.existsSync(n.path)&&l.rmSync(n.path,{force:!0,recursive:!1}),l.symlinkSync(n.symlinkTarget,n.path,`file`),i.push({path:n.path,success:!0});continue}let a=await r.convertContent(n,t);oy(a)?l.writeFileSync(n.path,a):l.writeFileSync(n.path,a,`utf8`),i.push({path:n.path,success:!0})}catch(e){i.push({path:n.path,success:!1,error:e})}}let a={files:i,dirs:[]};n.set(r.name,a)}return n}async function py(e,t){let n=[],r=[],i=[],a=[];dy(e,t.pluginOptions);for(let n of e){let e=await n.declareOutputFiles({...t,dryRun:!0});for(let t of e)t.scope===`global`?a.push(t.path):r.push(t.path)}return{projectDirs:n,projectFiles:r,globalDirs:i,globalFiles:a}}var my=class extends Error{nodeName;missingDependency;constructor(e,t){super(`Node "${e}" depends on missing dependency "${t}"`),this.name=`MissingDependencyError`,this.nodeName=e,this.missingDependency=t}},hy=class extends Error{cyclePath;constructor(e){super(`Circular dependency detected: ${e.join(` -> `)}`),this.name=`CircularDependencyError`,this.cyclePath=[...e]}},gy=class extends lv{declarativeOutput=!0;outputCapabilities;globalConfigDir;outputFileName;treatWorkspaceRootProjectAsProject;indexignore;commandsConfig;subAgentsConfig;commandOutputEnabled;subAgentOutputEnabled;skillsConfig;skillOutputEnabled;toolPreset;rulesConfig;ruleOutputEnabled;cleanupConfig;supportsBlankLineAfterFrontMatter;registryWriterCache=new Map;constructor(e,t){super(e,Jm.Output,t?.dependsOn),this.globalConfigDir=t?.globalConfigDir??``,this.outputFileName=t?.outputFileName??``,this.treatWorkspaceRootProjectAsProject=t?.treatWorkspaceRootProjectAsProject??!1,this.indexignore=t?.indexignore;let n=t?.commands?.transformFrontMatter;this.commandOutputEnabled=t?.commands!=null,this.commandsConfig={subDir:t?.commands?.subDir??`commands`,sourceScopes:t?.commands?.sourceScopes??[`project`,`global`],...n!=null&&{transformFrontMatter:n}},this.subAgentOutputEnabled=t?.subagents!=null,this.subAgentsConfig={subDir:t?.subagents?.subDir??`agents`,sourceScopes:t?.subagents?.sourceScopes??[`project`,`global`],includePrefix:t?.subagents?.includePrefix??!0,linkSymbol:t?.subagents?.linkSymbol??`-`,ext:t?.subagents?.ext??`.md`,...t?.subagents?.transformFrontMatter!=null&&{transformFrontMatter:t.subagents.transformFrontMatter}},this.skillOutputEnabled=t?.skills!=null,this.skillsConfig={subDir:t?.skills?.subDir??`skills`,sourceScopes:t?.skills?.sourceScopes??[`project`,`global`]},this.toolPreset=t?.toolPreset,this.ruleOutputEnabled=t?.rules!=null,this.rulesConfig={...t?.rules,sourceScopes:t?.rules?.sourceScopes??[`project`,`global`]},this.cleanupConfig=t?.cleanup??{},this.supportsBlankLineAfterFrontMatter=t?.supportsBlankLineAfterFrontMatter??!0,this.outputCapabilities=t?.capabilities==null?this.buildInferredCapabilities():this.normalizeCapabilities(t.capabilities)}buildInferredCapabilities(){let e={};return this.outputFileName.length>0&&(e.prompt={scopes:[`project`,`global`],singleScope:!1}),this.ruleOutputEnabled&&(e.rules={scopes:this.rulesConfig.sourceScopes??[`project`,`global`],singleScope:!1}),this.commandOutputEnabled&&(e.commands={scopes:this.commandsConfig.sourceScopes,singleScope:!0}),this.subAgentOutputEnabled&&(e.subagents={scopes:this.subAgentsConfig.sourceScopes,singleScope:!0}),this.skillOutputEnabled&&(e.skills={scopes:this.skillsConfig.sourceScopes,singleScope:!0}),e}normalizeCapabilities(e){let t={};for(let n of ay){let r=e[n];if(r==null)continue;let i=this.normalizeCapability(r);i!=null&&(t[n]=i)}return t}normalizeCapability(e){let t=[];for(let n of e.scopes)t.includes(n)||t.push(n);if(t.length!==0)return{scopes:t,singleScope:e.singleScope}}resolvePromptSourceProjectConfig(e){let t=this.getConcreteProjects(e);return t.find(e=>e.isPromptSourceProject===!0)?.projectConfig??t[0]?.projectConfig}getConcreteProjects(e){return e.collectedOutputContext.workspace.projects.filter(e=>e.isWorkspaceRootProject!==!0)}isProjectPromptOutputTarget(e){return e.isPromptSourceProject!==!0}getProjectOutputProjects(e){let t=[...this.getConcreteProjects(e)];if(!this.treatWorkspaceRootProjectAsProject)return t;let n=this.getWorkspaceRootProject(e);return n!=null&&t.push(n),t}getProjectPromptOutputProjects(e){return this.getProjectOutputProjects(e).filter(e=>this.isProjectPromptOutputTarget(e))}getWorkspaceRootProject(e){return e.collectedOutputContext.workspace.projects.find(e=>e.isWorkspaceRootProject===!0)}resolveProjectRootDir(e,t){if(t.isWorkspaceRootProject===!0)return this.resolveDirectoryPath(e.collectedOutputContext.workspace.directory);let n=t.dirFromWorkspacePath;if(n!=null)return this.resolveDirectoryPath(n)}resolveProjectConfigDir(e,t){let n=this.resolveProjectRootDir(e,t);if(n!=null)return this.globalConfigDir.length===0?n:u.join(n,this.globalConfigDir)}isRelativePath(e){return e.pathKind===Xm.Relative}toRelativePath(e){return e.path}resolveFullPath(e,t){let n=this.resolveDirectoryPath(e),r=t??this.outputFileName;return r?u.join(n,r):n}resolveDirectoryPath(e){return e.pathKind===Xm.Absolute?e.path:`basePath`in e?u.resolve(e.basePath,e.path):u.resolve(d.default.cwd(),e.path)}getWorkspaceConfigDir(e){let t=this.resolveDirectoryPath(e.collectedOutputContext.workspace.directory);return u.join(t,this.globalConfigDir)}createRelativePath(e,t,n){return u.join(t,e)}createFileRelativePath(e,t){return u.join(e,t)}getGlobalConfigDir(){return u.join(this.getHomeDir(),this.globalConfigDir)}getXdgConfigHomeDir(){let e=d.default.env.XDG_CONFIG_HOME;return typeof e==`string`&&e.trim().length>0?e:u.join(this.getHomeDir(),`.config`)}getHomeDir(){return p.homedir()}joinPath(...e){return u.join(...e)}resolvePath(...e){return u.resolve(...e)}dirname(e){return u.dirname(e)}basename(e,t){return u.basename(e,t)}getIgnoreOutputPath(){if(this.indexignore!=null)return this.indexignore}resolveCleanupScopeBasePaths(e,t){if(e===`global`)return[this.getHomeDir()];if(e===`xdgConfig`)return[this.getXdgConfigHomeDir()];let n=[];for(let e of this.getProjectOutputProjects(t)){let r=this.resolveProjectRootDir(t,e);r!=null&&n.push(r)}return n}resolveCleanupDeclaredPath(e,t){return u.isAbsolute(t)?u.resolve(t):t===`~`?this.getHomeDir():t.startsWith(`~/`)||t.startsWith(`~\\`)?u.resolve(this.getHomeDir(),t.slice(2)):u.resolve(e,t)}normalizeGlobPattern(e){return e.replaceAll(`\\`,`/`)}buildCleanupTargetsFromScopeConfig(e,t,n){if(e==null)return[];let r=[],i=[`project`,`global`,`xdgConfig`],a=(e,i,a)=>{if(a==null||a.length===0)return;let o=this.resolveCleanupScopeBasePaths(e,n);for(let n of a)for(let a of o){let o=u.isAbsolute(n)?u.resolve(n):this.resolveCleanupDeclaredPath(a,n);r.push({path:i===`glob`?this.normalizeGlobPattern(o):o,kind:i,scope:e,label:`${t}.${e}`})}};for(let t of i){let n=e[t];n!=null&&(a(t,`file`,n.files),a(t,`directory`,n.dirs),a(t,`glob`,n.globs))}return r}resolveFrontMatterBlankLineAfter(e){return this.supportsBlankLineAfterFrontMatter?e?.pluginOptions?.frontMatter?.blankLineAfter??!0:!0}buildMarkdownContent(e,t,n){return up(t,e,{blankLineAfter:this.resolveFrontMatterBlankLineAfter(n)})}buildMarkdownContentWithRaw(e,t,n,r){return t!=null&&Object.keys(t).length>0?this.buildMarkdownContent(e,t,r):n!=null&&n.length>0?fp(n,e,{blankLineAfter:this.resolveFrontMatterBlankLineAfter(r)}):e}extractGlobalMemoryContent(e){return e.collectedOutputContext.globalMemory?.content}combineGlobalWithContent(e,t,n){let{separator:r=`
219
+
220
+ `,skipIfEmpty:i=!0,position:a=`before`}=n??{};if(i&&(e==null||e.trim().length===0))return t;let o=e??``;return a===`after`?`${t}${r}${o}`:`${o}${r}${t}`}transformCommandName(e,t){let{includeSeriesPrefix:n=!0,seriesSeparator:r=`-`}=t??{};return!n||e.commandPrefix==null?`${e.commandName}.md`:`${e.commandPrefix}${r}${e.commandName}.md`}transformSubAgentName(e,t){let n=t?.includePrefix??this.subAgentsConfig.includePrefix,r=t?.linkSymbol??this.subAgentsConfig.linkSymbol,i=t?.ext??this.subAgentsConfig.ext,a=i.startsWith(`.`)?i:`.${i}`;return n&&e.agentPrefix!=null&&e.agentPrefix.length>0?`${e.agentPrefix}${r}${e.agentName}${a}`:`${e.agentName}${a}`}getCommandSeriesOptions(e){let t=e.pluginOptions?.commandSeriesOptions,n=t?.pluginOverrides?.[this.name],r=n?.includeSeriesPrefix??t?.includeSeriesPrefix,i=n?.seriesSeparator;return r!=null&&i!=null?{includeSeriesPrefix:r,seriesSeparator:i}:r==null?i==null?{}:{seriesSeparator:i}:{includeSeriesPrefix:r}}getTransformOptionsFromContext(e,t){let n=this.getCommandSeriesOptions(e),r=n.includeSeriesPrefix??t?.includeSeriesPrefix,i=n.seriesSeparator??t?.seriesSeparator;return r!=null&&i!=null?{includeSeriesPrefix:r,seriesSeparator:i}:r==null?i==null?{}:{seriesSeparator:i}:{includeSeriesPrefix:r}}shouldSkipDueToPlugin(e,t){let n=e.registeredPluginNames;return n==null?!1:n.includes(t)}getRegistryWriter(e){let t=e.name,n=this.registryWriterCache.get(t);if(n!=null)return n;let r=new e(this.log);return this.registryWriterCache.set(t,r),r}async registerInRegistry(e,t,n){return e.register(t,n.dryRun)}normalizeRuleScope(e){return e.scope??`project`}normalizeSourceScope(e){return e===`global`||e===`project`?e:`project`}resolveCommandSourceScope(e){if(e.globalOnly===!0)return`global`;let t=e.yamlFrontMatter?.scope;return this.normalizeSourceScope(t)}resolveSubAgentSourceScope(e){let t=e.yamlFrontMatter?.scope;return this.normalizeSourceScope(t)}resolveSkillSourceScope(e){let t=e.yamlFrontMatter?.scope;return this.normalizeSourceScope(t)}selectSingleScopeItems(e,t,n,r){if(e.length===0)return{items:[]};let[i]=Nv({requestedScopes:r,defaultScopes:t,supportedScopes:t,singleScope:!0,availableScopes:[...new Set(e.map(n))]});return i==null?{items:[]}:{selectedScope:i,items:e.filter(e=>n(e)===i)}}selectRuleScopes(e,t){let n=[...new Set(t.map(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))))];return Nv({requestedScopes:this.getTopicScopeOverride(e,`rules`),defaultScopes:this.rulesConfig.sourceScopes??[`project`,`global`],supportedScopes:this.rulesConfig.sourceScopes??[`project`,`global`],singleScope:!1,availableScopes:n}).filter(e=>n.includes(e))}selectPromptScopes(e,t=[`project`,`global`],n=t){return Nv({requestedScopes:this.getTopicScopeOverride(e,`prompt`),defaultScopes:n,supportedScopes:t,singleScope:!1})}getTopicScopeOverride(e,t){return e.pluginOptions?.outputScopes?.plugins?.[this.name]?.[t]}buildSkillFrontMatter(e,t){let n=e.yamlFrontMatter,r={name:n.name,description:n.description};return`displayName`in n&&n.displayName!=null&&(r.displayName=n.displayName),`keywords`in n&&n.keywords!=null&&n.keywords.length>0&&(r.keywords=n.keywords),`author`in n&&n.author!=null&&(r.author=n.author),`version`in n&&n.version!=null&&(r.version=n.version),(t?.includeTools??!0)&&`allowTools`in n&&n.allowTools!=null&&n.allowTools.length>0&&(r.allowTools=(t?.toolFormat??`array`)===`string`?n.allowTools.join(`,`):n.allowTools),t?.additionalFields!=null&&Object.assign(r,t.additionalFields),r}buildRuleContent(e,t){let n=this.rulesConfig.transformFrontMatter?this.rulesConfig.transformFrontMatter(e):{globs:e.globs.join(`, `)},r=n==null||Object.keys(n).length===0?void 0:n;return this.buildMarkdownContent(e.content,r,t)}buildRuleFileName(e){let t=`${`${this.rulesConfig.prefix??`rule`}${this.rulesConfig.linkSymbol??`-`}`}${e.prefix}${this.rulesConfig.linkSymbol??`-`}${e.ruleName}${this.rulesConfig.ext??`.md`}`;return this.log.trace(`buildRuleFileName`,{plugin:this.name,rulePrefix:e.prefix,ruleName:e.ruleName,prefix:this.rulesConfig.prefix??`rule`,linkSymbol:this.rulesConfig.linkSymbol??`-`,ext:this.rulesConfig.ext??`.md`,result:t}),t}async declareOutputFiles(e){return this.buildDefaultOutputDeclarations(e)}async declareCleanupPaths(e){let t=this.buildCleanupTargetsFromScopeConfig(this.cleanupConfig.delete,`delete`,e),n=this.buildCleanupTargetsFromScopeConfig(this.cleanupConfig.protect,`protect`,e),{excludeScanGlobs:r}=this.cleanupConfig;return t.length===0&&n.length===0&&(r==null||r.length===0)?{}:{...t.length>0&&{delete:t},...n.length>0&&{protect:n},...r!=null&&r.length>0&&{excludeScanGlobs:r}}}async convertContent(e,t){let n=e.source;switch(n.kind){case`projectRootMemory`:case`projectChildMemory`:case`globalMemory`:case`skillReference`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`subAgent`:return this.buildSubAgentContent(n.subAgent,t);case`skillMain`:return this.buildSkillMainContent(n.skill,t);case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;case`rule`:return this.buildRuleContent(n.rule,t);default:throw Error(`Unsupported declaration source for plugin ${this.name}`)}}async buildDefaultOutputDeclarations(e){let t=[],{globalMemory:n,commands:r,subAgents:i,skills:a,rules:o,aiAgentIgnoreConfigFiles:s}=e.collectedOutputContext,c=this.getTransformOptionsFromContext(e),l=this.getIgnoreOutputPath(),d=this.indexignore==null?void 0:s?.find(e=>e.fileName===this.indexignore),f=this.commandOutputEnabled&&r!=null?this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)):{items:[]},p=this.subAgentOutputEnabled&&i!=null?this.selectSingleScopeItems(i,this.subAgentsConfig.sourceScopes,e=>this.resolveSubAgentSourceScope(e),this.getTopicScopeOverride(e,`subagents`)):{items:[]},m=this.skillOutputEnabled&&a!=null?this.selectSingleScopeItems(a,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)):{items:[]},h=o??[],g=this.ruleOutputEnabled&&h.length>0?new Set(this.selectRuleScopes(e,h)):new Set,_=new Set(this.selectPromptScopes(e,this.outputCapabilities.prompt?.scopes??[`project`,`global`])),v={project:[],global:[]};for(let e of h)v[this.normalizeSourceScope(this.normalizeRuleScope(e))].push(e);let y=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter?.name??i.dir.getDirectoryName(),a=u.join(e,this.skillsConfig.subDir,r);if(t.push({path:u.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:u.join(a,e.dir.path.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillReference`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:u.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}};for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n),i=this.resolveProjectConfigDir(e,n);if(r==null||i==null)continue;if(this.outputFileName.length>0&&_.has(`project`)&&this.isProjectPromptOutputTarget(n)&&(n.rootMemoryPrompt!=null&&t.push({path:u.join(r,this.outputFileName),scope:`project`,source:{kind:`projectRootMemory`,content:n.rootMemoryPrompt.content}}),n.childMemoryPrompts!=null))for(let e of n.childMemoryPrompts)t.push({path:this.resolveFullPath(e.dir),scope:`project`,source:{kind:`projectChildMemory`,content:e.content}});let{projectConfig:a}=n;if(f.selectedScope===`project`&&f.items.length>0){let e=$(f.items,a,`commands`);for(let n of e){let e=this.transformCommandName(n,c);t.push({path:u.join(i,this.commandsConfig.subDir,e),scope:`project`,source:{kind:`command`,command:n}})}}if(p.selectedScope===`project`&&p.items.length>0){let e=$(p.items,a,`subAgents`);for(let n of e){let e=this.transformSubAgentName(n);t.push({path:u.join(i,this.subAgentsConfig.subDir,e),scope:`project`,source:{kind:`subAgent`,subAgent:n}})}}if(m.selectedScope===`project`&&m.items.length>0&&y(i,`project`,$(m.items,a,`skills`)),g.has(`project`)){let e=xv($(v.project,a,`rules`),a),n=u.join(i,this.rulesConfig.subDir??`rules`);for(let r of e)t.push({path:u.join(n,this.buildRuleFileName(r)),scope:`project`,source:{kind:`rule`,rule:r}})}l!=null&&d!=null&&n.isWorkspaceRootProject!==!0&&n.isPromptSourceProject!==!0&&n.dirFromWorkspacePath!=null&&t.push({path:u.join(n.dirFromWorkspacePath.basePath,n.dirFromWorkspacePath.path,l),scope:`project`,source:{kind:`ignoreFile`,content:d.content}})}let b=this.resolvePromptSourceProjectConfig(e);if(f.selectedScope===`global`&&f.items.length>0){let e=$(f.items,b,`commands`),n=this.getGlobalConfigDir();for(let r of e){let e=this.transformCommandName(r,c);t.push({path:u.join(n,this.commandsConfig.subDir,e),scope:`global`,source:{kind:`command`,command:r}})}}if(p.selectedScope===`global`&&p.items.length>0){let e=$(p.items,b,`subAgents`),n=this.getGlobalConfigDir();for(let r of e){let e=this.transformSubAgentName(r);t.push({path:u.join(n,this.subAgentsConfig.subDir,e),scope:`global`,source:{kind:`subAgent`,subAgent:r}})}}if(m.selectedScope===`global`&&m.items.length>0){let e=$(m.items,b,`skills`);y(this.getGlobalConfigDir(),`global`,e)}for(let e of[`global`]){if(!g.has(e))continue;let n=this.getGlobalConfigDir(),r=xv($(v[e],b,`rules`),b),i=u.join(n,this.rulesConfig.subDir??`rules`);for(let n of r)t.push({path:u.join(i,this.buildRuleFileName(n)),scope:e,source:{kind:`rule`,rule:n}})}return n!=null&&this.outputFileName.length>0&&_.has(`global`)&&t.push({path:u.join(this.getGlobalConfigDir(),this.outputFileName),scope:`global`,source:{kind:`globalMemory`,content:n.content}}),t}async buildCommandContent(e,t){let n=e.content,r=e.yamlFrontMatter,i=!1;if(e.rawMdxContent!=null&&this.toolPreset!=null){this.log.debug(`recompiling command with tool preset`,{file:e.dir.getAbsolutePath(),toolPreset:this.toolPreset,hasRawContent:!0});let t=new Dv({toolPreset:this.toolPreset}).collect(),a=await av(e.rawMdxContent,{globalScope:t,extractMetadata:!0,basePath:e.dir.basePath,filePath:e.dir.getAbsolutePath()});n=a.content,r=a.metadata.fields,i=!0}let a=this.commandsConfig.transformFrontMatter;if(a==null)throw Error(`commands.transformFrontMatter is required for command output plugin: ${this.name}`);let o=a(e,{isRecompiled:i,...r!=null&&{sourceFrontMatter:r}});return this.buildMarkdownContent(n,o,t)}buildSubAgentContent(e,t){let n=this.subAgentsConfig.transformFrontMatter;if(n!=null){let r=n(e,{...e.yamlFrontMatter!=null&&{sourceFrontMatter:e.yamlFrontMatter}});return this.buildMarkdownContent(e.content,r,t)}return this.buildMarkdownContentWithRaw(e.content,e.yamlFrontMatter,e.rawFrontMatter,t)}buildSkillMainContent(e,t){return this.buildMarkdownContentWithRaw(e.content,e.yamlFrontMatter,e.rawFrontMatter,t)}};const _y={USER_HOME:`~`,WORKSPACE:`$WORKSPACE`},vy={},yy={AgentsOutput:`AgentsOutputPlugin`,GeminiCLIOutput:`GeminiCLIOutputPlugin`,CursorOutput:`CursorOutputPlugin`,WindsurfOutput:`WindsurfOutputPlugin`,ClaudeCodeCLIOutput:`ClaudeCodeCLIOutputPlugin`,KiroIDEOutput:`KiroCLIOutputPlugin`,OpencodeCLIOutput:`OpencodeCLIOutputPlugin`,OpenAICodexCLIOutput:`CodexCLIOutputPlugin`,DroidCLIOutput:`DroidCLIOutputPlugin`,WarpIDEOutput:`WarpIDEOutputPlugin`,TraeIDEOutput:`TraeIDEOutputPlugin`,TraeCNIDEOutput:`TraeCNIDEOutputPlugin`,QoderIDEOutput:`QoderIDEPluginOutputPlugin`,JetBrainsCodeStyleOutput:`JetBrainsIDECodeStyleConfigOutputPlugin`,JetBrainsAICodexOutput:`JetBrainsAIAssistantCodexOutputPlugin`,AgentSkillsCompactOutput:`GenericSkillsOutputPlugin`,GitExcludeOutput:`GitExcludeOutputPlugin`,ReadmeOutput:`ReadmeMdConfigFileOutputPlugin`,VSCodeOutput:`VisualStudioCodeIDEConfigOutputPlugin`,EditorConfigOutput:`EditorConfigOutputPlugin`,AntigravityOutput:`AntigravityOutputPlugin`},by={SKILL:`SKILL.md`,CURSOR_GLOBAL_RULE:`global.mdc`,CURSOR_PROJECT_RULE:`always.md`,MCP_CONFIG:`mcp.json`,CLAUDE_MEMORY:`CLAUDE.md`,WINDSURF_GLOBAL_RULE:`global_rules.md`},xy={RULES:`rules`,COMMANDS:`commands`,SKILLS:`skills`,AGENTS:`agents`,CURSOR_SKILLS:`skills-cursor`},Sy={MD:`.md`,MDC:`.mdc`,MDX:`.mdx`,JSON:`.json`},Cy=[{PRIMARY:`.src.mdx`}.PRIMARY],wy={zh:Cy,en:Sy.MDX};function Ty(e){return Cy.some(t=>e.endsWith(t))}const Ey={CURSOR:`.cursor`,CLAUDE:`.claude`,WINDSURF:`.codeium/windsurf`,WINDSURF_RULES:`.windsurf`},Dy={CURSOR:`.cursorignore`,WINDSURF:`.codeiumignore`},Oy={CURSOR:new Set([`create-rule`,`create-skill`,`create-subagent`,`migrate-to-skills`,`update-cursor-settings`])};var ky=class extends Error{kind;nameOfPrompt;sourcePath;expectedDistPath;constructor(e){let{kind:t,name:n,sourcePath:r,expectedDistPath:i}=e;super([`Missing compiled dist prompt for ${t} "${n}".`,...r==null?[]:[`source: ${r}`],`expected dist: ${i}`].join(` `)),this.name=`MissingCompiledPromptError`,this.kind=t,this.nameOfPrompt=n,r!=null&&(this.sourcePath=r),this.expectedDistPath=i}},Ay=class extends Error{filePath;lineNumber;constructor(e,t,n){super(`Compiled prompt still contains residual module syntax at ${e}:${t}: ${n.trim()}`),this.name=`ResidualModuleSyntaxError`,this.filePath=e,this.lineNumber=t}};const jy=/^\s*(```|~~~)/u,My=[/^\s*export\s+default\b/u,/^\s*export\s+const\b/u,/^\s*import\b/u];function Ny(e,t){let n,r=e.split(/\r?\n/u);for(let[e,i]of r.entries()){let r=jy.exec(i);if(r?.[1]!=null){let e=r[1];n==null?n=e:n===e&&(n=void 0);continue}if(n==null&&My.some(e=>e.test(i)))throw new Ay(t,e+1,i)}}function Py(e,t,n={}){let{preferredSourcePath:r,distRootDir:i,srcRootDir:a}=n;if(t==null||t.length===0||r!=null&&r.length>0)return r;if(i==null||a==null)return;let o=e.relative(i,t);if(!(o.startsWith(`..`)||e.isAbsolute(o)))return e.join(a,o.replace(/\.mdx$/u,`.src.mdx`))}function Fy(e){if(e instanceof ig&&e.filePath!=null)return e.filePath;if(!(e instanceof Error)||!(`filePath`in e))return;let{filePath:t}=e;if(typeof t==`string`&&t.length>0)return t}function Iy(e,t){let n=Fy(e)??t.distPath,r=[t.operation??`Prompt compilation failed.`,`prompt kind: ${t.promptKind}`,`logical name: ${t.logicalName}`];return t.entryDistPath!=null&&t.entryDistPath.length>0&&t.entryDistPath!==n&&r.push(`entry dist file: ${t.entryDistPath}`),n!=null&&n.length>0&&r.push(`dist file: ${n}`),r.push(`src file: ${t.srcPath??`<unresolved>`}`),r.push(`diagnostic:`),r.push(e instanceof Error?rg(e):String(e)),r.join(`
221
+ `)}function Ly(e){return e instanceof ky||e instanceof Ay}var Ry=class{constructor(e,t,n,r){this.fs=e,this.path=t,this.logger=n,this.globalScope=r}async readDirectoryStructure(e,t,n){let r=[],i=[];if(!this.exists(e))return{prompts:r,errors:i};try{let a=this.fs.readdirSync(e,{withFileTypes:!0});for(let o of a){if(!o.isDirectory())continue;let{name:a}=o,s=this.path.join(e,a),c=this.path.join(t,a);try{let e=await this.readEntry(a,s,c,n,!0);e&&r.push(e)}catch(e){if(i.push({path:s,error:e,phase:`read`}),this.logger.error(E({code:`LOCALIZED_PROMPT_ENTRY_READ_FAILED`,title:`Failed to read localized prompt entry`,operation:`read`,targetKind:`${String(n.kind)} prompt entry`,path:s,error:e,details:{entryName:a,promptKind:String(n.kind)}})),Ly(e))throw e}}}catch(t){if(i.push({path:e,error:t,phase:`scan`}),this.logger.error(E({code:`LOCALIZED_PROMPT_DIRECTORY_SCAN_FAILED`,title:`Failed to scan localized prompt source directory`,operation:`scan`,targetKind:`${String(n.kind)} prompt source directory`,path:e,error:t,details:{promptKind:String(n.kind)}})),Ly(t))throw t}return{prompts:r,errors:i}}async readFlatFiles(e,t,n){let r=[],i=[],a=this.exists(e),o=this.exists(t);if(this.logger.debug(`readFlatFiles: srcDir=${e}, exists=${a}`),this.logger.debug(`readFlatFiles: distDir=${t}, exists=${o}`),!a&&!o)return{prompts:r,errors:i};let s=this.normalizeExtensions(n.localeExtensions.zh),c=new Set,l=async(a,o)=>{if(!c.has(a)){c.add(a);try{let i=await this.readFlatEntry(a,e,t,a,n);i&&r.push(i)}catch(e){if(i.push({path:o,error:e,phase:`read`}),this.logger.error(E({code:`LOCALIZED_PROMPT_FILE_READ_FAILED`,title:`Failed to read localized prompt file`,operation:`read`,targetKind:`${String(n.kind)} prompt file`,path:o,error:e,details:{promptKind:String(n.kind),logicalName:a}})),Ly(e))throw e}}},u=async(e,t=``)=>{if(this.exists(e))try{let n=this.fs.readdirSync(e,{withFileTypes:!0});for(let r of n){let n=t?this.path.join(t,r.name):r.name;if(r.isDirectory()){await u(this.path.join(e,r.name),n);continue}let i=this.findMatchingExtension(r.name,s);if(!r.isFile()||i==null)continue;let a=r.name.slice(0,-i.length);await l(t?this.path.join(t,a):a,this.path.join(e,r.name))}}catch(t){if(i.push({path:e,error:t,phase:`scan`}),this.logger.error(E({code:`LOCALIZED_SOURCE_DIRECTORY_SCAN_FAILED`,title:`Failed to scan localized source directory`,operation:`scan`,targetKind:`${String(n.kind)} source directory`,path:e,error:t,details:{promptKind:String(n.kind)}})),Ly(t))throw t}},d=async(e,t=``)=>{if(this.exists(e))try{let n=this.fs.readdirSync(e,{withFileTypes:!0});for(let r of n){let n=t?this.path.join(t,r.name):r.name;if(r.isDirectory()){await d(this.path.join(e,r.name),n);continue}if(!r.isFile()||!r.name.endsWith(`.mdx`))continue;let i=r.name.slice(0,-4);await l(t?this.path.join(t,i):i,this.path.join(e,r.name))}}catch(t){if(i.push({path:e,error:t,phase:`scan`}),this.logger.error(E({code:`LOCALIZED_DIST_DIRECTORY_SCAN_FAILED`,title:`Failed to scan localized dist directory`,operation:`scan`,targetKind:`${String(n.kind)} dist directory`,path:e,error:t,details:{promptKind:String(n.kind)}})),Ly(t))throw t}};return a&&await u(e),o&&await d(t),{prompts:r,errors:i}}async readSingleFile(e,t,n){let r=this.path.basename(e);return this.readFlatEntry(r,this.path.dirname(e),this.path.dirname(t),e,n,!0)}async readEntry(e,t,n,r,i=!0){let{localeExtensions:a,entryFileName:o,createPrompt:s,kind:c}=r,l=o??e,u=this.normalizeExtensions(a.zh),d=this.normalizeExtensions(a.en),f=this.resolveLocalizedPath(t,l,u),p=this.resolveLocalizedPath(t,l,d),m=this.path.join(n,`${l}.mdx`),h=this.exists(f)?f:this.exists(p)?p:void 0,g={promptKind:String(c),logicalName:e,entryDistPath:m,...h!=null&&{srcPath:h}},_=await this.readDistContent(m,s,e,g),v=await this.readLocaleContent(f,`zh`,s,e,String(c)),b=await this.readLocaleContent(p,`en`,s,e,String(c)),x=_!=null,C=v!=null,w=b!=null,T=C?f:w?p:void 0;if(!x&&!C&&!w)return this.logger.warn(S({code:`LOCALIZED_PROMPT_ARTIFACTS_MISSING`,title:`Missing source and dist prompt artifacts for ${e}`,rootCause:y(`tnmsc could not find either the source prompt or the compiled dist prompt for "${e}".`),exactFix:y(`Create the source prompt and rebuild the compiled dist prompt before retrying tnmsc.`),details:{promptKind:String(c),name:e,srcZhPath:f,srcEnPath:p,distPath:m}})),null;if(!x)throw new ky({kind:String(c),name:e,...T!=null&&{sourcePath:T},expectedDistPath:m});let E=C?{zh:v,...w&&{en:b},default:v,defaultLocale:`zh`}:void 0,D=i?this.scanChildren(n,l,[`.mdx`]):void 0;return{name:e,type:c,...E!=null&&{src:E},...x&&{dist:_},metadata:{hasDist:x,hasMultipleLocales:w,isDirectoryStructure:i,...D&&D.length>0&&{children:D}},paths:{...C&&{zh:f},...w&&{en:p},...x&&{dist:m}}}}async readFlatEntry(e,t,n,r,i,a=!1){let{localeExtensions:o,createPrompt:s,kind:c}=i,l=this.normalizeExtensions(o.zh),u=this.normalizeExtensions(o.en),d=this.resolveLocalizedPath(``,r,l),f=this.resolveLocalizedPath(``,r,u),p=this.path.join(n,`${e}.mdx`),m=a?d:this.path.join(t,d),h=a?f:this.path.join(t,f),g=this.exists(m)?m:this.exists(h)?h:void 0,_={promptKind:String(c),logicalName:e,entryDistPath:p,...g!=null&&{srcPath:g}},v=await this.readDistContent(p,s,e,_),b=await this.readLocaleContent(m,`zh`,s,e,String(c)),x=await this.readLocaleContent(h,`en`,s,e,String(c)),C=v!=null,w=b!=null,T=x!=null,E=w?m:T?h:void 0;if(!C&&!w&&!T)return this.logger.warn(S({code:`LOCALIZED_PROMPT_ARTIFACTS_MISSING`,title:`Missing source and dist prompt artifacts for ${e}`,rootCause:y(`tnmsc could not find either the source prompt or the compiled dist prompt for "${e}".`),exactFix:y(`Create the source prompt and rebuild the compiled dist prompt before retrying tnmsc.`),details:{promptKind:String(c),name:e,srcZhPath:m,srcEnPath:h,distPath:p}})),null;if(!C)throw new ky({kind:String(c),name:e,...E!=null&&{sourcePath:E},expectedDistPath:p});let D=w?{zh:b,...T&&{en:x},default:b,defaultLocale:`zh`}:void 0;return{name:e,type:c,...D!=null&&{src:D},...C&&{dist:v},metadata:{hasDist:C,hasMultipleLocales:T,isDirectoryStructure:!1},paths:{...w&&{zh:m},...T&&{en:h},...C&&{dist:p}}}}async readLocaleContent(e,t,n,r,i){if(!this.exists(e))return null;try{let i=this.fs.readFileSync(e,`utf8`),a=this.fs.statSync(e),o=await av(i,{globalScope:this.globalScope,extractMetadata:!0,basePath:this.path.dirname(e),filePath:e});Ny(o.content,e);let s=mp(i),c=await n(o.content,t,r,o.metadata.fields),l={content:o.content,lastModified:a.mtime,filePath:e};return i.length>0&&Object.assign(l,{rawMdx:i}),s.yamlFrontMatter!=null&&Object.assign(l,{frontMatter:s.yamlFrontMatter}),c!=null&&Object.assign(l,{prompt:c}),l}catch(n){throw this.logger.error(k({code:`LOCALIZED_SOURCE_PROMPT_READ_FAILED`,title:`Failed to read localized source prompt`,diagnosticText:Iy(n,{operation:`Failed to read localized source prompt.`,promptKind:i,logicalName:r,distPath:e}),details:{promptKind:i,locale:t,filePath:e}})),n}}async readDistContent(e,t,n,r){if(!this.exists(e))return null;try{let r=this.fs.readFileSync(e,`utf8`),i=this.fs.statSync(e),a=await av(r,{globalScope:this.globalScope,extractMetadata:!0,basePath:this.path.dirname(e),filePath:e});Ny(a.content,e);let o=mp(r),s=await t(a.content,`zh`,n,a.metadata.fields),c={content:a.content,lastModified:i.mtime,prompt:s,filePath:e,rawMdx:r};return o.yamlFrontMatter!=null&&Object.assign(c,{frontMatter:o.yamlFrontMatter}),c}catch(t){throw this.logger.error(this.buildDistReadDiagnostic(t,e,r)),t}}buildDistReadDiagnostic(e,t,n){let r=Py(this.path,t,{preferredSourcePath:t===n.entryDistPath?n.srcPath:void 0,distRootDir:this.path.dirname(n.entryDistPath),srcRootDir:n.srcPath==null?void 0:this.path.dirname(n.srcPath)});return k({code:`LOCALIZED_DIST_PROMPT_READ_FAILED`,title:`Failed to read localized dist prompt`,diagnosticText:Iy(e,{operation:`Failed to read dist content.`,promptKind:n.promptKind,logicalName:n.logicalName,entryDistPath:n.entryDistPath,distPath:t,srcPath:r}),details:{promptKind:n.promptKind,logicalName:n.logicalName,filePath:t,srcPath:r}})}scanChildren(e,t,n){let r=[];if(!this.exists(e))return r;let i=new Set(n.map(e=>`${t}${e}`));try{let t=(e,a)=>{let o=this.fs.readdirSync(e,{withFileTypes:!0});for(let s of o){let o=this.path.join(e,s.name),c=a?this.path.join(a,s.name):s.name;if(s.isDirectory())t(o,c);else{let e=this.findMatchingExtension(s.name,n);if(e==null||i.has(s.name))continue;let t=s.name.slice(0,-e.length),a=this.path.dirname(c),o=a===`.`?t:this.path.join(a,t);r.push(o)}}};t(e,``)}catch(t){this.logger.warn(E({code:`LOCALIZED_PROMPT_CHILD_SCAN_FAILED`,title:`Failed to scan localized prompt child documents`,operation:`scan`,targetKind:`localized prompt child directory`,path:e,error:t}))}return r}exists(e){try{return this.fs.existsSync(e)}catch{return!1}}normalizeExtensions(e){return typeof e==`string`?[e]:e}findMatchingExtension(e,t){return t.find(t=>e.endsWith(t))}resolveLocalizedPath(e,t,n){let r=e===``?`${t}${n[0]}`:this.path.join(e,`${t}${n[0]}`);for(let r of n){let n=e===``?`${t}${r}`:this.path.join(e,`${t}${r}`);if(this.exists(n))return n}return r}};function zy(e,t,n,r){return new Ry(e,t,n,r)}function By(e,t){let n=new Map;for(let r of e)if(r.mcpConfig!=null)for(let[e,i]of Object.entries(r.mcpConfig.mcpServers))n.set(e,i),t?.debug(`mcp server collected`,{skill:r.yamlFrontMatter.name,mcpName:e});return n}function Vy(e,t){let n={};for(let[r,i]of e)n[r]=t(i);return n}function Hy(e){let t={};if(e.command!=null)return t.command=e.command,e.args!=null&&(t.args=e.args),e.env!=null&&(t.env=e.env),t;let n=e,r=n.url??n.serverUrl;if(r==null)return t;t.url=r;let{headers:i}=n;return i!=null&&(t.headers=i),t}function Uy(e){let t={};if(e.command!=null){t.type=`local`;let n=[e.command];e.args!=null&&n.push(...e.args),t.command=n,e.env!=null&&(t.environment=e.env)}else{t.type=`remote`;let n=e;n.url==null?n.serverUrl!=null&&(t.url=n.serverUrl):t.url=n.url}return t.enabled=e.disabled!==!0,t}var Wy=class{name;inner;constructor(e){this.inner=e,this.name=`json:${e.name}`}async execute(e){ve();let t=await this.inner.execute(e),n=Gy(t,ye());return d.default.stdout.write(`${JSON.stringify(n)}\n`),t}};function Gy(e,t=ye()){let{warnings:n,errors:r}=j(t);return{success:e.success,filesAffected:e.filesAffected,dirsAffected:e.dirsAffected,...e.message!=null&&{message:e.message},pluginResults:[],warnings:n,errors:r}}let Ky=function(e){return e[e.Flags=0]=`Flags`,e[e.Unknown=1]=`Unknown`,e[e.Subcommand=2]=`Subcommand`,e}({});var qy=class{factories=[];register(e){this.factories.push(e),this.factories.sort((e,t)=>e.priority-t.priority)}registerWithPriority(e,t){let n={priority:t,canHandle:t=>e.canHandle(t),createCommand:t=>e.createCommand(t)};this.factories.push(n),this.factories.sort((e,t)=>e.priority-t.priority)}resolve(e){for(let t of this.factories)if(t.priority<=Ky.Unknown&&t.canHandle(e))return t.createCommand(e);for(let t of this.factories)if(t.priority===Ky.Subcommand&&t.canHandle(e))return t.createCommand(e);for(let t of this.factories)if(t.canHandle(e))return t.createCommand(e);throw Error(`No command factory found for the given arguments`)}};function Jy(e){let t=d.default.env.XDG_DATA_HOME;return typeof t==`string`&&t.trim().length>0?t:u.default.join(e,`.local`,`share`)}function Yy(){let e=d.default.platform,t=p.default.homedir();if(e===`win32`)return d.default.env.LOCALAPPDATA??u.default.join(t,`AppData`,`Local`);if(e===`darwin`)return u.default.join(t,`Library`,`Application Support`);if(e===`linux`)return Jy(t);throw Error(`Unsupported platform: ${d.default.platform}`)}function Xy(e){if(!l.existsSync(e))return;let t=l.lstatSync(e);t.isSymbolicLink()?d.default.platform===`win32`?l.rmSync(e,{recursive:!0,force:!0}):l.unlinkSync(e):t.isDirectory()?l.rmSync(e,{recursive:!0,force:!0}):l.unlinkSync(e)}function Zy(e){let t=0,n=[];for(let r of e)try{l.existsSync(r)&&(Xy(r),t++)}catch(e){n.push({path:r,error:e})}return{deleted:t,errors:n}}function Qy(e){let t=0,n=[],r=[...e].sort((e,t)=>t.length-e.length);for(let e of r)try{l.existsSync(e)&&(l.rmSync(e,{recursive:!0,force:!0}),t++)}catch(t){n.push({path:e,error:t})}return{deleted:t,errors:n}}var $y=class extends Error{conflicts;constructor(e){super(cb(e)),this.name=`CleanupProtectionConflictError`,this.conflicts=e}};const eb=[`**/node_modules/**`,`**/.git/**`,`**/.turbo/**`,`**/.pnpm-store/**`,`**/.yarn/**`,`**/.next/**`];function tb(e){return wh(e).replaceAll(`\\`,`/`)}function nb(e){let{root:t}=u.parse(e);return e===t?e:e.endsWith(u.sep)?e.slice(0,-1):e}function rb(e,t){let n=nb(e),r=nb(t);return n===r?!0:n.startsWith(`${r}${u.sep}`)}function ib(e,t){let n=tb(e);return Pm.default.sync(n,{onlyFiles:!1,dot:!0,absolute:!0,followSymbolicLinks:!1,ignore:[...t]})}function ab(e,t){if(t.excludeBasenames==null||t.excludeBasenames.length===0)return!1;let n=u.basename(e);return t.excludeBasenames.includes(n)}async function ob(e,t){return e.declareCleanupPaths==null?{}:e.declareCleanupPaths({...t,dryRun:!0})}function sb(e,t){let n=new Map,r=[...t.entries()].sort((e,t)=>e[0].length-t[0].length);for(let[e,t]of r){let r=!1;for(let t of n.keys())if(rb(e,t)){r=!0;break}r||n.set(e,t)}let i=[];for(let[t,r]of e){let e=!1;for(let r of n.keys())if(rb(t,r)){e=!0;break}e||i.push(r)}return i.sort((e,t)=>e.localeCompare(t)),{files:i,dirs:[...n.values()].sort((e,t)=>e.localeCompare(t))}}function cb(e){let t=e.map(e=>e.outputPath).join(`, `);return`Cleanup protection conflict: ${e.length} output path(s) are also protected: ${t}`}function lb(e,t){let n=[];for(let[r,i]of e.entries()){let e=new Set(Oh(r));for(let a of t.compiledRules)if(a.comparisonKeys.some(t=>e.has(t)))for(let e of i)n.push({outputPath:r,outputPlugin:e,protectedPath:a.path,protectionMode:a.protectionMode,protectedBy:a.source,reason:a.reason})}return n.sort((e,t)=>{let n=e.outputPath.localeCompare(t.outputPath);return n===0?e.protectedPath.localeCompare(t.protectedPath):n})}function ub(e,t){let n=t[0];e.error(S({code:`CLEANUP_PROTECTION_CONFLICT_DETECTED`,title:`Cleanup output paths conflict with protected inputs`,rootCause:y(`tnmsc found ${t.length} output path(s) that also match protected cleanup rules.`,n==null?`No conflict details were captured.`:`Example conflict: "${n.outputPath}" is protected by "${n.protectedPath}".`),exactFix:y(`Separate generated output paths from protected source or reserved workspace paths before running cleanup again.`),possibleFixes:[y(`Update cleanup protect declarations so they do not overlap generated outputs.`),y(`Move the conflicting output target to a generated-only directory.`)],details:{count:t.length,conflicts:t.map(e=>({outputPath:e.outputPath,outputPlugin:e.outputPlugin,protectedPath:e.protectedPath,protectionMode:e.protectionMode,protectedBy:e.protectedBy,reason:e.reason}))}}))}async function db(e,t){let n=new Set,r=new Set,i=new Map,a=new Set(eb),o=new Map,s=[],c=(e,t)=>{t===`directory`?r.add(wh(e)):n.add(wh(e))},u=(e,t,n,r,a=`path`)=>{let o=wh(e);i.set(`${a}:${t}:${o}`,{path:o,protectionMode:t,reason:n,source:r,matcher:a})},d=e=>e.protectionMode==null?e.kind===`file`?`direct`:`recursive`:e.protectionMode;for(let e of Vh(t.collectedOutputContext))u(e.path,e.protectionMode,e.reason,e.source);if(t.collectedOutputContext.aindexDir!=null&&t.pluginOptions!=null)for(let e of Bh(t.pluginOptions,t.collectedOutputContext.aindexDir,{workspaceDir:t.collectedOutputContext.workspace.directory.path}))u(e.path,e.protectionMode,e.reason,e.source,e.matcher);for(let e of t.pluginOptions?.cleanupProtection?.rules??[])u(e.path,e.protectionMode,e.reason??`configured cleanup protection rule`,`configured-cleanup-protection`,e.matcher??`path`);for(let n of e){let e=await n.declareOutputFiles({...t,dryRun:!0});for(let t of e){let e=wh(t.path);c(e,`file`);let r=o.get(e);r==null?o.set(e,[n.name]):r.includes(n.name)||r.push(n.name)}let r=await ob(n,t);for(let e of r.excludeScanGlobs??[])a.add(tb(e));s.push({plugin:n,cleanup:r})}let f=[...a],p=e=>{for(let t of ib(e.path,f))if(!ab(t,e))try{l.lstatSync(t).isDirectory()?c(t,`directory`):c(t,`file`)}catch{}},m=(e,t)=>{let n=d(e),r=e.label==null?`plugin cleanup protect declaration`:`plugin cleanup protect declaration (${e.label})`;for(let i of ib(e.path,f))u(i,n,r,`plugin-cleanup-protect:${t}`)};for(let{plugin:e,cleanup:t}of s){for(let n of t.protect??[]){if(n.kind===`glob`){m(n,e.name);continue}u(n.path,d(n),n.label==null?`plugin cleanup protect declaration`:`plugin cleanup protect declaration (${n.label})`,`plugin-cleanup-protect:${e.name}`)}for(let e of t.delete??[]){if(e.kind===`glob`){p(e);continue}e.kind===`directory`?c(e.path,`directory`):c(e.path,`file`)}}let h=Uh({workspaceDir:t.collectedOutputContext.workspace.directory.path,projectRoots:Wh(t.collectedOutputContext),rules:[...i.values()],...t.collectedOutputContext.aindexDir==null?{}:{aindexDir:t.collectedOutputContext.aindexDir}}),g=lb(o,h);if(g.length>0)throw new $y(g);let _=qh([...n],h),v=qh([...r],h),y=sb(new Map(_.safePaths.map(e=>[e,e])),new Map(v.safePaths.map(e=>[e,e])));return{filesToDelete:y.files,dirsToDelete:y.dirs,violations:[..._.violations,...v.violations].sort((e,t)=>e.targetPath.localeCompare(t.targetPath)),conflicts:[],excludedScanGlobs:[...a].sort((e,t)=>e.localeCompare(t))}}function fb(e,t){let n=e.map(e=>u.isAbsolute(e)?e:u.resolve(e)),r=Zy(n);for(let e of n)r.errors.some(t=>t.path===e)||t.debug({action:`delete`,type:`file`,path:e});let i=r.errors.map(e=>{let n=e.error instanceof Error?e.error.message:String(e.error);return t.warn(E({code:`CLEANUP_FILE_DELETE_FAILED`,title:`Cleanup could not delete a file`,operation:`delete`,targetKind:`file`,path:e.path,error:n,details:{phase:`cleanup`}})),{path:e.path,type:`file`,error:e.error}});return{deleted:r.deleted,errors:i}}function pb(e,t){let n=e.map(e=>u.isAbsolute(e)?e:u.resolve(e)),r=Qy(n);for(let e of n)r.errors.some(t=>t.path===e)||t.debug({action:`delete`,type:`directory`,path:e});let i=r.errors.map(e=>{let n=e.error instanceof Error?e.error.message:String(e.error);return t.warn(E({code:`CLEANUP_DIRECTORY_DELETE_FAILED`,title:`Cleanup could not delete a directory`,operation:`delete`,targetKind:`directory`,path:e.path,error:n,details:{phase:`cleanup`}})),{path:e.path,type:`directory`,error:e.error}});return{deleted:r.deleted,errors:i}}function mb(e,t){e.debug(`cleanup plan built`,{filesToDelete:t.filesToDelete.length,dirsToDelete:t.dirsToDelete.length,violations:t.violations.length,conflicts:t.conflicts.length,excludedScanGlobs:t.excludedScanGlobs})}async function hb(e,t,n){let r=await py(e,t);n.debug(`Collected outputs for cleanup`,{projectDirs:r.projectDirs.length,projectFiles:r.projectFiles.length,globalDirs:r.globalDirs.length,globalFiles:r.globalFiles.length});let i;try{i=await db(e,t)}catch(e){if(e instanceof $y)return ub(n,e.conflicts),{deletedFiles:0,deletedDirs:0,errors:[],violations:[],conflicts:e.conflicts,message:e.message};throw e}let a={filesToDelete:i.filesToDelete,dirsToDelete:i.dirsToDelete,violations:i.violations,conflicts:i.conflicts,excludedScanGlobs:i.excludedScanGlobs};if(mb(n,a),a.violations.length>0)return Yh(n,`cleanup`,a.violations),{deletedFiles:0,deletedDirs:0,errors:[],violations:a.violations,conflicts:[],message:`Protected deletion guard blocked cleanup for ${a.violations.length} path(s)`};let o=fb(a.filesToDelete,n),s=pb(a.dirsToDelete,n);return{deletedFiles:o.deleted,deletedDirs:s.deleted,errors:[...o.errors,...s.errors],violations:[],conflicts:[]}}var gb=class{name=`clean`;async execute(e){let{logger:t,outputPlugins:n,createCleanContext:r}=e;t.info(`running clean pipeline`,{command:`clean`});let i=await hb(n,r(!1),t);return i.violations.length>0||i.conflicts.length>0?{success:!1,filesAffected:0,dirsAffected:0,...i.message==null?{}:{message:i.message}}:(t.info(`clean complete`,{deletedFiles:i.deletedFiles,deletedDirs:i.deletedDirs}),{success:!0,filesAffected:i.deletedFiles,dirsAffected:i.deletedDirs})}},_b=class{name=`dry-run-clean`;async execute(e){let{logger:t,outputPlugins:n,createCleanContext:r}=e;t.info(`running clean pipeline`,{command:`dry-run-clean`,dryRun:!0});let i=r(!0),a=await py(n,i);t.info(`collected outputs for cleanup`,{dryRun:!0,projectDirs:a.projectDirs.length,projectFiles:a.projectFiles.length,globalDirs:a.globalDirs.length,globalFiles:a.globalFiles.length});let{filesToDelete:o,dirsToDelete:s,violations:c,excludedScanGlobs:l}=await db(n,i);return c.length>0?(Yh(t,`dry-run-cleanup`,c),{success:!1,filesAffected:0,dirsAffected:0,message:`Protected deletion guard blocked cleanup for ${c.length} path(s)`}):(this.logDryRunFiles(o,t),this.logDryRunDirectories(s,t),t.info(`clean complete`,{dryRun:!0,filesAffected:o.length,dirsAffected:s.length,violations:0,excludedScanGlobs:l}),{success:!0,filesAffected:o.length,dirsAffected:s.length,message:`Dry-run complete, no files were deleted`})}logDryRunFiles(e,t){for(let n of e){let e=u.isAbsolute(n)?n:u.resolve(n);t.info(`would delete file`,{path:e,dryRun:!0})}}logDryRunDirectories(e,t){let n=[...e].sort((e,t)=>t.length-e.length);for(let e of n){let n=u.isAbsolute(e)?e:u.resolve(e);t.info(`would delete directory`,{path:n,dryRun:!0})}}},vb=class{canHandle(e){return e.subcommand===`clean`}createCommand(e){return e.dryRun?new _b:new gb}};const yb=`.tnmsc.json`,bb=`.aindex`;function xb(){return u.join(p.homedir(),bb,yb)}var Sb=class{logger;constructor(e={}){this.logger=be(`ConfigLoader`)}getSearchPaths(e=d.default.cwd()){return[xb()]}loadFromFile(e){let t=this.resolveTilde(e);try{if(!l.existsSync(t))return{config:{},source:null,found:!1};let e=l.readFileSync(t,`utf8`),n=this.parseConfig(e,t);return this.logger.debug(`loaded`,{source:t}),{config:n,source:t,found:!0}}catch(e){return this.logger.warn(E({code:`CONFIG_FILE_LOAD_FAILED`,title:`Failed to load config file`,operation:`read`,targetKind:`config file`,path:t,error:e})),{config:{},source:null,found:!1}}}load(e=d.default.cwd()){let t=this.getSearchPaths(e),n=[];for(let e of t){let t=this.loadFromFile(e);t.found&&n.push(t)}return{config:this.mergeConfigs(n.map(e=>e.config)),sources:n.map(e=>e.source).filter(e=>e!==null),found:n.length>0}}parseConfig(e,t){let n;try{n=JSON.parse(e)}catch(e){throw e instanceof SyntaxError?Error(`Invalid JSON in ${t}: ${e.message}`):e}let r=Jv.safeParse(n);if(r.success)return r.data;let i=r.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`);throw Error(`Config validation failed in ${t}:\n${i.join(`
222
+ `)}`)}mergeConfigs(e){if(e.length===0)return{};let t=e[0];return e.length===1&&t!=null?t:[...e].reverse().reduce((e,t)=>{let n=this.mergeAindex(e.aindex,t.aindex),r=this.mergeOutputScopeOptions(e.outputScopes,t.outputScopes),i=this.mergeFrontMatterOptions(e.frontMatter,t.frontMatter),a=this.mergeCleanupProtectionOptions(e.cleanupProtection,t.cleanupProtection);return{...e,...t,...n==null?{}:{aindex:n},...r==null?{}:{outputScopes:r},...i==null?{}:{frontMatter:i},...a==null?{}:{cleanupProtection:a}}},{})}mergeAindex(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{dir:t.dir??e.dir,skills:{...e.skills,...t.skills},commands:{...e.commands,...t.commands},subAgents:{...e.subAgents,...t.subAgents},rules:{...e.rules,...t.rules},globalPrompt:{...e.globalPrompt,...t.globalPrompt},workspacePrompt:{...e.workspacePrompt,...t.workspacePrompt},app:{...e.app,...t.app},ext:{...e.ext,...t.ext},arch:{...e.arch,...t.arch}}}mergeOutputScopeTopics(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{...e,...t}}mergeOutputScopeOptions(e,t){if(e==null&&t==null)return;if(e==null)return t;if(t==null)return e;let n={};for(let[t,r]of Object.entries(e.plugins??{}))r!=null&&(n[t]={...r});for(let[e,r]of Object.entries(t.plugins??{})){let t=this.mergeOutputScopeTopics(n[e],r);t!=null&&(n[e]=t)}return Object.keys(n).length===0?{}:{plugins:n}}mergeFrontMatterOptions(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{...e,...t}}mergeCleanupProtectionOptions(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{rules:[...e.rules??[],...t.rules??[]]}}resolveTilde(e){return e.startsWith(`~`)?u.join(p.homedir(),e.slice(1)):e}};let Cb=null;function wb(e){return(e||!Cb)&&(Cb=new Sb(e)),Cb}function Tb(e){return wb().load(e)}function Eb(){let e=be(`ConfigLoader`),t=xb();if(!l.existsSync(t)){let n=`Global config not found at ${t}. Please create it manually.`;return e.error(D({code:`GLOBAL_CONFIG_MISSING`,title:`Global config file is missing`,reason:y(`tnmsc could not find the required global config file at "${t}".`),configPath:t,exactFix:y(`Create the global config file manually before running tnmsc again.`),possibleFixes:[y("Initialize the file with a valid JSON object, for example `{}`.")]})),{valid:!1,exists:!1,errors:[n],shouldExit:!0}}let n;try{n=l.readFileSync(t,`utf8`)}catch(n){let r=n instanceof Error?n.message:String(n);return e.error(E({code:`GLOBAL_CONFIG_READ_FAILED`,title:`Failed to read global config file`,operation:`read`,targetKind:`global config file`,path:t,error:r})),{valid:!1,exists:!0,errors:[`Failed to read config: ${r}`],shouldExit:!0}}let r;try{r=JSON.parse(n)}catch(n){let r=n instanceof Error?n.message:String(n);return e.error(D({code:`GLOBAL_CONFIG_JSON_INVALID`,title:`Global config contains invalid JSON`,reason:y(`tnmsc could not parse the JSON in "${t}".`,`Parser error: ${r}`),configPath:t,exactFix:y(`Fix the JSON syntax in the global config file so it parses as a single JSON object.`),possibleFixes:[y(`Validate the file with a JSON parser and remove trailing commas or invalid tokens.`)]})),{valid:!1,exists:!0,errors:[`Invalid JSON: ${r}`],shouldExit:!0}}if(typeof r!=`object`||!r||Array.isArray(r))return e.error(D({code:`GLOBAL_CONFIG_NOT_OBJECT`,title:`Global config must be a JSON object`,reason:y(`tnmsc parsed "${t}" successfully, but the top-level value is not a JSON object.`),configPath:t,exactFix:y("Replace the top-level JSON value with an object like `{}` or a valid config object.")})),{valid:!1,exists:!0,errors:[`Config must be a JSON object`],shouldExit:!0};let i=Jv.safeParse(r);if(!i.success){let n=i.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`);for(let r of n)e.error(D({code:`GLOBAL_CONFIG_VALIDATION_FAILED`,title:`Global config validation failed`,reason:x(r),configPath:t,exactFix:y(`Update the invalid config field so it matches the tnmsc schema.`),possibleFixes:[y(`Compare the field name and value against the current config schema or examples.`)],details:{validationError:r}}));return{valid:!1,exists:!0,errors:n,shouldExit:!0}}return{valid:!0,exists:!0,errors:[],shouldExit:!1}}const Db=[`workspaceDir`,`aindex.skills.src`,`aindex.skills.dist`,`aindex.commands.src`,`aindex.commands.dist`,`aindex.subAgents.src`,`aindex.subAgents.dist`,`aindex.rules.src`,`aindex.rules.dist`,`aindex.globalPrompt.src`,`aindex.globalPrompt.dist`,`aindex.workspacePrompt.src`,`aindex.workspacePrompt.dist`,`aindex.app.src`,`aindex.app.dist`,`aindex.ext.src`,`aindex.ext.dist`,`aindex.arch.src`,`aindex.arch.dist`,`logLevel`];function Ob(e){return Db.includes(e)}function kb(e){return[`trace`,`debug`,`info`,`warn`,`error`].includes(e)}function Ab(){return u.join(p.homedir(),bb,yb)}function jb(){let e=Ab();if(!l.existsSync(e))return{};try{let t=l.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return{}}}function Mb(e){let t=Ab(),n=u.dirname(t);l.existsSync(n)||l.mkdirSync(n,{recursive:!0}),l.writeFileSync(t,`${JSON.stringify(e,null,2)}\n`,`utf8`)}function Nb(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e++){let t=r[e],n=i[t];(typeof n!=`object`||!n||Array.isArray(n))&&(i[t]={}),i=i[t]}i[r.at(-1)]=n}function Pb(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r||Array.isArray(r))return;r=r[e]}return r}var Fb=class{name=`config`;constructor(e){this.options=e}async execute(e){let{logger:t}=e;if(this.options.length===0)return t.error(O({code:`CONFIG_COMMAND_ARGUMENTS_MISSING`,title:`Config command requires at least one key=value pair`,rootCause:y(`tnmsc config was invoked without any configuration assignments.`),exactFix:y("Run `tnmsc config key=value` with at least one supported configuration key."),possibleFixes:[y(`Use one of the supported keys: ${Db.join(`, `)}`)],details:{validKeys:[...Db]}})),t.info(`Usage: tnmsc config key=value`),t.info(`Valid keys: ${Db.join(`, `)}`),{success:!1,filesAffected:0,dirsAffected:0,message:`No options provided`};let n=jb(),r=[],i=[];for(let[e,a]of this.options){if(!Ob(e)){r.push(`Invalid key: ${e}`),t.error(O({code:`CONFIG_COMMAND_KEY_INVALID`,title:`Unsupported config key: ${e}`,rootCause:y(`The config command received "${e}", which is not a supported configuration key.`),exactFix:y(`Use one of the supported config keys and rerun the command.`),possibleFixes:[y(`Supported keys: ${Db.join(`, `)}`)],details:{key:e,validKeys:[...Db]}}));continue}if(e===`logLevel`&&!kb(a)){r.push(`Invalid logLevel value: ${a}`),t.error(O({code:`CONFIG_COMMAND_LOG_LEVEL_INVALID`,title:`Unsupported logLevel value: ${a}`,rootCause:y(`The config command received "${a}" for logLevel, but tnmsc does not support that level.`),exactFix:y(`Set logLevel to one of: trace, debug, info, warn, or error.`),details:{key:e,value:a,validLevels:[`trace`,`debug`,`info`,`warn`,`error`]}}));continue}let o=Pb(n,e);Nb(n,e,a),o!==a&&i.push(`${e}=${a}`),t.info(`configuration updated`,{key:e,value:a})}i.length>0&&(Mb(n),t.info(`global config written`,{path:Ab()}));let a=r.length===0,o=a?`Configuration updated: ${i.join(`, `)}`:`Partial update: ${i.join(`, `)}. Errors: ${r.join(`, `)}`;return{success:a,filesAffected:i.length>0?1:0,dirsAffected:0,message:o}}},Ib=class{name=`config-show`;async execute(e){let{logger:t}=e,n=new Sb,r=n.load(),i=r.sources.map(e=>({path:e,layer:`global`,config:n.loadFromFile(e).config})),a={merged:r.config,sources:i};return d.default.stdout.write(`${JSON.stringify(a)}\n`),t.info(`config shown`,{sources:r.sources.length}),{success:!0,filesAffected:0,dirsAffected:0,message:`Configuration displayed (${i.length} source(s))`}}},Lb=class{canHandle(e){return e.subcommand===`config`}createCommand(e){if(e.showFlag)return new Ib;let t=[];for(let n of e.positional){let e=n.indexOf(`=`);e>0&&t.push([n.slice(0,e),n.slice(e+1)])}return new Fb([...e.setOption,...t])}},Rb=class{name=`dry-run-output`;async execute(e){let{logger:t,outputPlugins:n,createWriteContext:r}=e;t.info(`started`,{command:`dry-run-output`,dryRun:!0});let i=await fy(n,r(!0)),a=0,o=0;for(let[e,n]of i)a+=n.files.length,o+=n.dirs.length,t.info(`plugin result`,{plugin:e,files:n.files.length,dirs:n.dirs.length,dryRun:!0});return t.info(`complete`,{command:`dry-run-output`,totalFiles:a,totalDirs:o,dryRun:!0}),{success:!0,filesAffected:a,dirsAffected:o,message:`Dry-run complete, no files were written`}}},zb=class{canHandle(e){return e.subcommand===`dry-run`}createCommand(e){return new Rb}},Bb=class{name=`execute`;async execute(e){let{logger:t,outputPlugins:n,createCleanContext:r,createWriteContext:i}=e;t.info(`started`,{command:`execute`});let a=await hb(n,r(!1),t);if(a.violations.length>0||a.conflicts.length>0)return{success:!1,filesAffected:0,dirsAffected:0,...a.message==null?{}:{message:a.message}};t.info(`cleanup complete`,{deletedFiles:a.deletedFiles,deletedDirs:a.deletedDirs});let o=await fy(n,i(!1)),s=0,c=0,l=[];for(let e of o.values()){s+=e.files.length,c+=e.dirs.length;for(let t of e.files)t.success||l.push(t.error?.message??`Failed to write ${t.path}`)}return l.length>0?{success:!1,filesAffected:s,dirsAffected:c,message:l.join(`
223
+ `)}:(t.info(`complete`,{command:`execute`,pluginCount:o.size}),{success:!0,filesAffected:s,dirsAffected:c})}},Vb=class{canHandle(e){return!0}createCommand(e){return new Bb}};function Hb(){return`2026.10318.11638`}var Ub=class{name=`version`;async execute(e){return e.logger.info(`tnmsc v${Hb()}`),{success:!0,filesAffected:0,dirsAffected:0,message:`Version displayed`}}};const Wb=`tnmsc`,Gb=`
224
+ ${Wb} v${Hb()} - Memory Sync CLI
111
225
 
112
226
  Synchronize AI memory and configuration files across projects.
113
227
 
114
228
  USAGE:
115
- ${dy} Run the sync pipeline (default)
116
- ${dy} help Show this help message
117
- ${dy} version Show version information
118
- ${dy} init Deprecated; no longer initializes aindex
119
- ${dy} dry-run Preview what would be written
120
- ${dy} clean Remove all generated files
121
- ${dy} clean --dry-run Preview what would be cleaned
122
- ${dy} config key=value Set configuration value
229
+ ${Wb} Run the sync pipeline (default)
230
+ ${Wb} help Show this help message
231
+ ${Wb} version Show version information
232
+ ${Wb} init Deprecated; no longer initializes aindex
233
+ ${Wb} dry-run Preview what would be written
234
+ ${Wb} clean Remove all generated files
235
+ ${Wb} clean --dry-run Preview what would be cleaned
236
+ ${Wb} config key=value Set configuration value
123
237
 
124
238
  SUBCOMMANDS:
125
239
  help Show this help message
@@ -130,10 +244,10 @@ SUBCOMMANDS:
130
244
  config Set configuration values in global config file (~/.aindex/.tnmsc.json)
131
245
 
132
246
  ALIASES:
133
- ${dy} --help, ${dy} -h Same as '${dy} help'
134
- ${dy} --version, ${dy} -v Same as '${dy} version'
135
- ${dy} clean -n Same as '${dy} clean --dry-run'
136
- ${dy} config key=value Set config value in global config file
247
+ ${Wb} --help, ${Wb} -h Same as '${Wb} help'
248
+ ${Wb} --version, ${Wb} -v Same as '${Wb} version'
249
+ ${Wb} clean -n Same as '${Wb} clean --dry-run'
250
+ ${Wb} config key=value Set config value in global config file
137
251
 
138
252
  LOG LEVEL OPTIONS:
139
253
  --trace Most verbose output
@@ -159,30 +273,30 @@ CONFIG OPTIONS:
159
273
  aindex.arch.src, aindex.arch.dist
160
274
 
161
275
  Examples:
162
- ${dy} config workspaceDir=~/my-project
163
- ${dy} config aindex.skills.src=skills
164
- ${dy} config logLevel=debug
276
+ ${Wb} config workspaceDir=~/my-project
277
+ ${Wb} config aindex.skills.src=skills
278
+ ${Wb} config logLevel=debug
165
279
 
166
280
  CONFIGURATION:
167
281
  Configure via plugin.config.ts in your project root.
168
282
  See documentation for detailed configuration options.
169
- `.trim();var py=class{name=`help`;async execute(e){return e.logger.info(fy),{success:!0,filesAffected:0,dirsAffected:0,message:`Help displayed`}}},my=class{priority=pv.Flags;canHandle(e){return e.helpFlag||e.subcommand===`help`}createCommand(e){return new py}},hy=class{name=`init`;async execute(e){let{logger:t}=e;return t.warn(k({code:`INIT_COMMAND_DEPRECATED`,title:`The init command is deprecated`,rootCause:x("`tnmsc init` no longer initializes aindex content or project definitions."),exactFix:x("Maintain the target-relative definitions manually under `~/workspace/aindex/public/`."),possibleFixes:[x("Run `tnmsc help` to find a supported replacement command for your workflow.")],details:{command:`init`}})),{success:!1,filesAffected:0,dirsAffected:0,message:"`tnmsc init` is deprecated and no longer initializes aindex. Maintain the public target-relative definitions manually under `~/workspace/aindex/public/`."}}},gy=class{canHandle(e){return e.subcommand===`init`}createCommand(e){return new hy}},_y=class{name=`plugins`;async execute(e){let{logger:t,outputPlugins:n,userConfigOptions:r}=e,i=r.plugins,a=[];for(let e of i)a.push({name:e.name,kind:`Output`,description:e.name,dependencies:[...e.dependsOn??[]]});let o=new Set(a.map(e=>e.name));for(let e of n)o.has(e.name)||a.push({name:e.name,kind:`Output`,description:e.name,dependencies:[...e.dependsOn??[]]});return f.default.stdout.write(`${JSON.stringify(a)}\n`),t.info(`plugins listed`,{count:a.length}),{success:!0,filesAffected:0,dirsAffected:0,message:`Listed ${a.length} plugin(s)`}}},vy=class{canHandle(e){return e.subcommand===`plugins`}createCommand(e){return new _y}},yy=class{name=`unknown`;constructor(e){this.unknownCmd=e}async execute(e){return e.logger.error(k({code:`UNKNOWN_COMMAND`,title:`Unknown tnmsc command: ${this.unknownCmd}`,rootCause:x(`tnmsc does not recognize the "${this.unknownCmd}" subcommand.`),exactFix:x("Run `tnmsc help` and invoke one of the supported commands."),possibleFixes:[x(`Check the command spelling and remove unsupported aliases or flags.`)],details:{command:this.unknownCmd}})),e.logger.info(`run "tnmsc help" for available commands`),{success:!1,filesAffected:0,dirsAffected:0,message:`Unknown command: ${this.unknownCmd}`}}},by=class{priority=pv.Unknown;canHandle(e){return e.unknownCommand!=null}createCommand(e){return new yy(e.unknownCommand)}},xy=class{priority=pv.Flags;canHandle(e){return e.versionFlag||e.subcommand===`version`}createCommand(e){return new uy}};const Sy=new Set([`help`,`version`,`init`,`dry-run`,`clean`,`config`,`plugins`]),Cy=new Map([[`--trace`,`trace`],[`--debug`,`debug`],[`--info`,`info`],[`--warn`,`warn`],[`--error`,`error`]]),wy=new Map([[`trace`,0],[`debug`,1],[`info`,2],[`warn`,3],[`error`,4]]);function Ty(e){let t=[...e],n=t[0];n!=null&&Ey(n)&&t.shift();let r=t[0];return r!=null&&Dy(r)&&t.shift(),t}function Ey(e){let t=[`node`,`nodejs`,`bun`,`deno`,`tsx`,`ts-node`,`npx`,`pnpx`,`yarn`,`pnpm`],n=e.toLowerCase().replaceAll(`\\`,`/`);return t.some(e=>RegExp(`(?:^|/)${e}(?:\\.exe|\\.cmd|\\.ps1)?$`,`i`).test(n)||n===e)}function Dy(e){return/\.(?:m?[jt]s|cjs)$/.test(e)||/[/\\]/.test(e)&&!e.startsWith(`-`)?!0:/^(?:@[\w-]+\/)?[\w-]+$/.test(e)&&!e.startsWith(`-`)}function Oy(e,t){if(e==null)return t;let n=wy.get(e)??4;return(wy.get(t)??4)<n?t:e}function ky(e){let t={subcommand:void 0,helpFlag:!1,versionFlag:!1,dryRun:!1,jsonFlag:!1,showFlag:!1,logLevel:void 0,setOption:[],unknownCommand:void 0,positional:[],unknown:[]},n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i!=null){if(i===`--`){t.positional.push(...e.slice(r+1).filter(e=>e!=null));break}if(i.startsWith(`--`)){let n=i.split(`=`),a=n[0]??``,o=Cy.get(a);if(o!=null){t.logLevel=Oy(t.logLevel,o);continue}switch(a){case`--help`:t.helpFlag=!0;break;case`--version`:t.versionFlag=!0;break;case`--dry-run`:t.dryRun=!0;break;case`--json`:t.jsonFlag=!0;break;case`--show`:t.showFlag=!0;break;case`--set`:if(n.length>1){let e=n.slice(1).join(`=`),r=e.indexOf(`=`);r>0&&t.setOption.push([e.slice(0,r),e.slice(r+1)])}else{let n=e[r+1];if(n!=null){let e=n.indexOf(`=`);e>0&&(t.setOption.push([n.slice(0,e),n.slice(e+1)]),r++)}}break;default:t.unknown.push(i)}continue}if(i.startsWith(`-`)&&i.length>1){let e=i.slice(1);for(let n of e)switch(n){case`h`:t.helpFlag=!0;break;case`v`:t.versionFlag=!0;break;case`n`:t.dryRun=!0;break;case`j`:t.jsonFlag=!0;break;default:t.unknown.push(`-${n}`)}continue}if(!n){n=!0,Sy.has(i)?t.subcommand=i:t.unknownCommand=i;continue}t.positional.push(i)}}return t}let Ay;function jy(){let e=new mv;return e.register(new xy),e.register(new my),e.register(new by),e.registerWithPriority(new gy,pv.Subcommand),e.registerWithPriority(new oy,pv.Subcommand),e.registerWithPriority(new zv,pv.Subcommand),e.registerWithPriority(new vy,pv.Subcommand),e.registerWithPriority(new iy,pv.Subcommand),e.registerWithPriority(new cy,pv.Subcommand),e}function My(){return Ay??=jy(),Ay}function Ny(e){return My().resolve(e)}const Py=[`IntelliJIdea`,`WebStorm`,`RustRover`,`PyCharm`,`PyCharmCE`,`PhpStorm`,`GoLand`,`CLion`,`DataGrip`,`RubyMine`,`Rider`,`DataSpell`,`Aqua`];function Fy(e){return Py.some(t=>e.startsWith(t))}function Iy(e){let t=d.join(gv(),`JetBrains`);try{return u.readdirSync(t,{withFileTypes:!0}).filter(e=>e.isDirectory()&&Fy(e.name)).map(e=>d.join(t,e.name,`aia`,`codex`))}catch(n){return e.debug(D({code:`JETBRAINS_CODEX_DIRECTORY_SCAN_SKIPPED`,title:`JetBrains Codex directories are unavailable`,operation:`scan`,targetKind:`JetBrains IDE directory`,path:t,error:n})),[]}}function Ly(e){return{jetbrainsCodexDirs:Iy(e)}}var Ry=class{logger;args;outputPlugins=[];runtimeTargets;constructor(...e){this.args=ky(Ty(e.filter(e=>e!=null)));let t=this.args.logLevel;t!=null&&Te(t),this.logger=M(`PluginPipeline`,t),this.logger.debug(`initialized`,{args:this.args})}registerOutputPlugins(e){return this.outputPlugins.push(...e),this}async run(e){let{context:t,outputPlugins:n,userConfigOptions:r}=e;this.registerOutputPlugins([...n]);let i=Ny(this.args);this.args.jsonFlag&&(Te(`silent`),new Set([`config-show`,`plugins`]).has(i.name)||(i=new dv(i)));let a=this.createCommandContext(t,r);return i.execute(a)}createCommandContext(e,t){return{logger:this.logger,outputPlugins:this.outputPlugins,collectedOutputContext:e,userConfigOptions:t,createCleanContext:n=>this.createCleanContext(e,t,n),createWriteContext:n=>this.createWriteContext(e,t,n)}}createCleanContext(e,t,n){return{logger:this.logger,collectedOutputContext:e,pluginOptions:t,runtimeTargets:this.getRuntimeTargets(),dryRun:n}}createWriteContext(e,t,n){return{logger:this.logger,collectedOutputContext:e,pluginOptions:t,runtimeTargets:this.getRuntimeTargets(),dryRun:n,registeredPluginNames:this.outputPlugins.map(e=>e.name)}}getRuntimeTargets(){return this.runtimeTargets??=Ly(this.logger),this.runtimeTargets}};const zy=`.agents/skills`,By=`SKILL.md`;var Vy=class extends L_{constructor(){super(`GenericSkillsOutputPlugin`,{outputFileName:By,treatWorkspaceRootProjectAsProject:!0,skills:{},cleanup:{delete:{project:{dirs:[zy]},global:{dirs:[zy]}}},capabilities:{skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{skills:n}=e.collectedOutputContext;if(n==null||n.length===0)return t;let r=this.selectSingleScopeItems(n,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),i=this.selectSingleScopeItems(n,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`)),a=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name,a=this.joinPath(e,r);if(t.push({path:this.joinPath(a,By),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:this.joinPath(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:this.joinPath(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},o=(e,n,r)=>{for(let i of r)i.mcpConfig!=null&&t.push({path:this.joinPath(e,i.yamlFrontMatter.name,`mcp.json`),scope:n,source:{kind:`skillMcp`,rawContent:i.mcpConfig.rawContent}})};if(r.selectedScope===`project`||i.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectRootDir(e,t);if(n==null)continue;let s=$(r.items,t.projectConfig,`skills`),c=$(i.items,t.projectConfig,`skills`),l=this.joinPath(n,zy);r.selectedScope===`project`&&s.length>0&&a(l,`project`,s),i.selectedScope===`project`&&o(l,`project`,c)}if(r.selectedScope!==`global`&&i.selectedScope!==`global`)return t;let s=this.joinPath(this.getHomeDir(),zy),c=this.resolvePromptSourceProjectConfig(e);if(r.selectedScope===`global`){let e=$(r.items,c,`skills`);e.length>0&&a(s,`global`,e)}return i.selectedScope===`global`&&o(s,`global`,$(i.items,c,`skills`)),t}async convertContent(e,t){let n=e.source;switch(n.kind){case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillMcp`:return n.rawContent;case`skillChildDoc`:return n.content;case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}};const Hy=`AGENTS.md`;var Uy=class extends L_{constructor(){super(`AgentsOutputPlugin`,{outputFileName:Hy,treatWorkspaceRootProjectAsProject:!0,cleanup:{delete:{project:{files:[Hy]}}},capabilities:{prompt:{scopes:[`project`],singleScope:!1}}})}async declareOutputFiles(e){let t=[],n=this.getProjectPromptOutputProjects(e);if(!new Set(this.selectPromptScopes(e,[`project`])).has(`project`))return t;for(let[r,i]of n.entries()){let n=this.resolveProjectRootDir(e,i);if(i.rootMemoryPrompt!=null&&n!=null&&t.push({path:this.resolvePath(n,Hy),scope:`project`,source:{type:`projectRootMemory`,projectIndex:r}}),i.childMemoryPrompts!=null)for(let[e,n]of i.childMemoryPrompts.entries())t.push({path:this.resolveFullPath(n.dir),scope:`project`,source:{type:`projectChildMemory`,projectIndex:r,childIndex:e}})}return t}async convertContent(e,t){let n=this.getProjectPromptOutputProjects(t),r=e.source,i=r.projectIndex??-1;if(i<0||i>=n.length)throw Error(`Invalid project index in declaration for ${this.name}`);let a=n[i];if(a==null)throw Error(`Project not found for declaration in ${this.name}`);if(r.type===`projectRootMemory`){if(a.rootMemoryPrompt==null)throw Error(`Root memory prompt missing for project index ${i}`);return a.rootMemoryPrompt.content}if(r.type===`projectChildMemory`){let e=r.childIndex??-1,t=a.childMemoryPrompts?.[e];if(t==null)throw Error(`Child memory prompt missing for project ${i}, child ${e}`);return t.content}throw Error(`Unsupported declaration source for ${this.name}`)}};const Wy=`CLAUDE.md`;var Gy=class extends L_{constructor(){super(`ClaudeCodeCLIOutputPlugin`,{globalConfigDir:`.claude`,outputFileName:Wy,treatWorkspaceRootProjectAsProject:!0,toolPreset:`claudeCode`,commands:{subDir:`commands`,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},subagents:{subDir:`agents`,sourceScopes:[`project`],includePrefix:!0,linkSymbol:`-`,ext:`.md`},skills:{subDir:`skills`},rules:{transformFrontMatter:e=>({paths:e.globs.map(mf)})},cleanup:{delete:{project:{files:[Wy],dirs:[`.claude/rules`,`.claude/commands`,`.claude/agents`,`.claude/skills`]},global:{files:[`.claude/CLAUDE.md`],dirs:[`.claude/rules`,`.claude/commands`,`.claude/agents`,`.claude/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},subagents:{scopes:[`project`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}};const Ky=q_.CURSOR,qy=V_.MCP_CONFIG,Jy=H_.COMMANDS,Yy=H_.RULES,Xy=V_.CURSOR_GLOBAL_RULE,Zy=H_.CURSOR_SKILLS,Qy=V_.SKILL,$y=Y_.CURSOR;var eb=class extends L_{constructor(){super(`CursorOutputPlugin`,{globalConfigDir:Ky,outputFileName:``,treatWorkspaceRootProjectAsProject:!0,dependsOn:[B_.AgentsOutput],indexignore:J_.CURSOR,commands:{subDir:Jy,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:Zy},rules:{subDir:Yy,prefix:`rule`,sourceScopes:[`project`,`global`]},cleanup:{delete:{project:{files:[`.cursor/mcp.json`],dirs:[`.cursor/commands`,`.cursor/rules`],globs:[`.cursor/skills-cursor/*`]},global:{files:[`.cursor/mcp.json`],dirs:[`.cursor/commands`,`.cursor/rules`],globs:[`.cursor/skills-cursor/*`]}},protect:{project:{dirs:[...$y].map(e=>`.cursor/skills-cursor/${e}`)},global:{dirs:[...$y].map(e=>`.cursor/skills-cursor/${e}`)}}},capabilities:{prompt:{scopes:[`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareCleanupPaths(e){let t=await super.declareCleanupPaths(e);return{...t,delete:(t.delete??[]).map(e=>e.kind!==`glob`||!e.path.replaceAll(`\\`,`/`).endsWith(`/.cursor/${Zy}/*`)?e:{...e,excludeBasenames:[...$y]})}}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,skills:i,rules:a,aiAgentIgnoreConfigFiles:o}=e.collectedOutputContext,s=this.getGlobalConfigDir(),c=this.resolvePromptSourceProjectConfig(e),l=this.getConcreteProjects(e),u=this.getProjectPromptOutputProjects(e),f=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0}),p=new Set(this.selectPromptScopes(e,[`global`])),m=new Set(a==null?[]:this.selectRuleScopes(e,a)),h=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),g=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`)),_=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),v=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name;if(this.isPreservedSkill(r))continue;let a=d.join(e,Zy,r);if(t.push({path:d.join(a,Qy),scope:n,source:{kind:`skill`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:d.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:d.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},y=(e,n,r)=>{for(let i of r){if(i.mcpConfig==null)continue;let r=d.join(e,Zy,i.yamlFrontMatter.name);t.push({path:d.join(r,qy),scope:n,source:{kind:`skillMcpConfig`,rawContent:i.mcpConfig.rawContent}})}},b=(e,n,r)=>{if(r.length===0)return;let i=sv(r,this.log);i.size!==0&&t.push({path:d.join(e,qy),scope:n,source:{kind:`mcpConfig`,mcpServers:cv(i,lv)}})};if(h.selectedScope===`project`||g.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectConfigDir(e,t);if(n!=null&&(h.selectedScope===`project`&&v(n,`project`,$(h.items,t.projectConfig,`skills`)),g.selectedScope===`project`)){let e=$(g.items,t.projectConfig,`skills`);y(n,`project`,e),b(n,`project`,e)}}if((h.selectedScope===`global`||g.selectedScope===`global`)&&(h.selectedScope===`global`&&v(s,`global`,$(h.items,c,`skills`)),g.selectedScope===`global`)){let e=$(g.items,c,`skills`);y(s,`global`,e),b(s,`global`,e)}if(_.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=$(_.items,n.projectConfig,`commands`);for(let e of i)t.push({path:d.join(r,Jy,this.transformCommandName(e,f)),scope:`project`,source:{kind:`command`,command:e}})}if(_.selectedScope===`global`){let e=$(_.items,c,`commands`);for(let n of e)t.push({path:d.join(s,Jy,this.transformCommandName(n,f)),scope:`global`,source:{kind:`command`,command:n}})}if(a!=null&&a.length>0){let n=a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`global`);if(m.has(`global`))for(let e of n)t.push({path:d.join(s,Yy,this.buildRuleFileName(e)),scope:`global`,source:{kind:`ruleMdc`,rule:e}});if(m.has(`project`))for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=Hg($(a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`project`),n.projectConfig,`rules`),n.projectConfig);for(let e of i)t.push({path:d.join(r,Yy,this.buildRuleFileName(e)),scope:`project`,source:{kind:`ruleMdc`,rule:e}})}}if(n!=null&&p.has(`global`)){let r=this.buildGlobalRuleContent(n.content,e);for(let n of u){let i=this.resolveProjectConfigDir(e,n);i!=null&&t.push({path:d.join(i,Yy,Xy),scope:`project`,source:{kind:`globalRuleContent`,content:r}})}}let x=this.getIgnoreOutputPath(),S=this.indexignore==null?void 0:o?.find(e=>e.fileName===this.indexignore);if(x!=null&&S!=null)for(let e of l){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:d.join(n.basePath,n.path,x),scope:`project`,source:{kind:`ignoreFile`,content:S.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`command`:return this.buildCommandContent(n.command,t);case`mcpConfig`:return JSON.stringify({mcpServers:n.mcpServers},null,2);case`skill`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillMcpConfig`:return n.rawContent;case`skillChildDoc`:case`globalRuleContent`:case`ignoreFile`:return n.content;case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;case`ruleMdc`:return this.buildRuleMdcContent(n.rule,t);default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildGlobalRuleContent(e,t){return this.buildMarkdownContent(e,{description:`Global prompt (synced)`,alwaysApply:!0},t)}isPreservedSkill(e){return $y.has(e)}buildRuleMdcContent(e,t){let n={alwaysApply:!1,globs:e.globs.length>0?e.globs.join(`, `):``};return this.buildMarkdownContent(e.content,n,t).split(`
283
+ `.trim();var Kb=class{name=`help`;async execute(e){return e.logger.info(Gb),{success:!0,filesAffected:0,dirsAffected:0,message:`Help displayed`}}},qb=class{priority=Ky.Flags;canHandle(e){return e.helpFlag||e.subcommand===`help`}createCommand(e){return new Kb}},Jb=class{name=`init`;async execute(e){let{logger:t}=e;return t.warn(O({code:`INIT_COMMAND_DEPRECATED`,title:`The init command is deprecated`,rootCause:y("`tnmsc init` no longer initializes aindex content or project definitions."),exactFix:y("Maintain the target-relative definitions manually under `~/workspace/aindex/public/`."),possibleFixes:[y("Run `tnmsc help` to find a supported replacement command for your workflow.")],details:{command:`init`}})),{success:!1,filesAffected:0,dirsAffected:0,message:"`tnmsc init` is deprecated and no longer initializes aindex. Maintain the public target-relative definitions manually under `~/workspace/aindex/public/`."}}},Yb=class{canHandle(e){return e.subcommand===`init`}createCommand(e){return new Jb}},Xb=class{name=`plugins`;async execute(e){let{logger:t,outputPlugins:n,userConfigOptions:r}=e,i=r.plugins,a=[];for(let e of i)a.push({name:e.name,kind:`Output`,description:e.name,dependencies:[...e.dependsOn??[]]});let o=new Set(a.map(e=>e.name));for(let e of n)o.has(e.name)||a.push({name:e.name,kind:`Output`,description:e.name,dependencies:[...e.dependsOn??[]]});return d.default.stdout.write(`${JSON.stringify(a)}\n`),t.info(`plugins listed`,{count:a.length}),{success:!0,filesAffected:0,dirsAffected:0,message:`Listed ${a.length} plugin(s)`}}},Zb=class{canHandle(e){return e.subcommand===`plugins`}createCommand(e){return new Xb}},Qb=class{name=`unknown`;constructor(e){this.unknownCmd=e}async execute(e){return e.logger.error(O({code:`UNKNOWN_COMMAND`,title:`Unknown tnmsc command: ${this.unknownCmd}`,rootCause:y(`tnmsc does not recognize the "${this.unknownCmd}" subcommand.`),exactFix:y("Run `tnmsc help` and invoke one of the supported commands."),possibleFixes:[y(`Check the command spelling and remove unsupported aliases or flags.`)],details:{command:this.unknownCmd}})),e.logger.info(`run "tnmsc help" for available commands`),{success:!1,filesAffected:0,dirsAffected:0,message:`Unknown command: ${this.unknownCmd}`}}},$b=class{priority=Ky.Unknown;canHandle(e){return e.unknownCommand!=null}createCommand(e){return new Qb(e.unknownCommand)}},ex=class{priority=Ky.Flags;canHandle(e){return e.versionFlag||e.subcommand===`version`}createCommand(e){return new Ub}};const tx=new Set([`help`,`version`,`init`,`dry-run`,`clean`,`config`,`plugins`]),nx=new Map([[`--trace`,`trace`],[`--debug`,`debug`],[`--info`,`info`],[`--warn`,`warn`],[`--error`,`error`]]),rx=new Map([[`trace`,0],[`debug`,1],[`info`,2],[`warn`,3],[`error`,4]]);function ix(e){let t=[...e],n=t[0];n!=null&&ax(n)&&t.shift();let r=t[0];return r!=null&&ox(r)&&t.shift(),t}function ax(e){let t=[`node`,`nodejs`,`bun`,`deno`,`tsx`,`ts-node`,`npx`,`pnpx`,`yarn`,`pnpm`],n=e.toLowerCase().replaceAll(`\\`,`/`);return t.some(e=>RegExp(`(?:^|/)${e}(?:\\.exe|\\.cmd|\\.ps1)?$`,`i`).test(n)||n===e)}function ox(e){return/\.(?:m?[jt]s|cjs)$/.test(e)||/[/\\]/.test(e)&&!e.startsWith(`-`)?!0:/^(?:@[\w-]+\/)?[\w-]+$/.test(e)&&!e.startsWith(`-`)}function sx(e,t){if(e==null)return t;let n=rx.get(e)??4;return(rx.get(t)??4)<n?t:e}function cx(e){let t={subcommand:void 0,helpFlag:!1,versionFlag:!1,dryRun:!1,jsonFlag:!1,showFlag:!1,logLevel:void 0,setOption:[],unknownCommand:void 0,positional:[],unknown:[]},n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i!=null){if(i===`--`){t.positional.push(...e.slice(r+1).filter(e=>e!=null));break}if(i.startsWith(`--`)){let n=i.split(`=`),a=n[0]??``,o=nx.get(a);if(o!=null){t.logLevel=sx(t.logLevel,o);continue}switch(a){case`--help`:t.helpFlag=!0;break;case`--version`:t.versionFlag=!0;break;case`--dry-run`:t.dryRun=!0;break;case`--json`:t.jsonFlag=!0;break;case`--show`:t.showFlag=!0;break;case`--set`:if(n.length>1){let e=n.slice(1).join(`=`),r=e.indexOf(`=`);r>0&&t.setOption.push([e.slice(0,r),e.slice(r+1)])}else{let n=e[r+1];if(n!=null){let e=n.indexOf(`=`);e>0&&(t.setOption.push([n.slice(0,e),n.slice(e+1)]),r++)}}break;default:t.unknown.push(i)}continue}if(i.startsWith(`-`)&&i.length>1){let e=i.slice(1);for(let n of e)switch(n){case`h`:t.helpFlag=!0;break;case`v`:t.versionFlag=!0;break;case`n`:t.dryRun=!0;break;case`j`:t.jsonFlag=!0;break;default:t.unknown.push(`-${n}`)}continue}if(!n){n=!0,tx.has(i)?t.subcommand=i:t.unknownCommand=i;continue}t.positional.push(i)}}return t}let lx;function ux(){let e=new qy;return e.register(new ex),e.register(new qb),e.register(new $b),e.registerWithPriority(new Yb,Ky.Subcommand),e.registerWithPriority(new zb,Ky.Subcommand),e.registerWithPriority(new vb,Ky.Subcommand),e.registerWithPriority(new Zb,Ky.Subcommand),e.registerWithPriority(new Lb,Ky.Subcommand),e.registerWithPriority(new Vb,Ky.Subcommand),e}function dx(){return lx??=ux(),lx}function fx(e){return dx().resolve(e)}const px=[`IntelliJIdea`,`WebStorm`,`RustRover`,`PyCharm`,`PyCharmCE`,`PhpStorm`,`GoLand`,`CLion`,`DataGrip`,`RubyMine`,`Rider`,`DataSpell`,`Aqua`];function mx(e){return px.some(t=>e.startsWith(t))}function hx(e){let t=u.join(Yy(),`JetBrains`);try{return l.readdirSync(t,{withFileTypes:!0}).filter(e=>e.isDirectory()&&mx(e.name)).map(e=>u.join(t,e.name,`aia`,`codex`))}catch(n){return e.debug(E({code:`JETBRAINS_CODEX_DIRECTORY_SCAN_SKIPPED`,title:`JetBrains Codex directories are unavailable`,operation:`scan`,targetKind:`JetBrains IDE directory`,path:t,error:n})),[]}}function gx(e){return{jetbrainsCodexDirs:hx(e)}}var _x=class{logger;args;outputPlugins=[];runtimeTargets;constructor(...e){this.args=cx(ix(e.filter(e=>e!=null)));let t=this.args.logLevel;t!=null&&_e(t),this.logger=be(`PluginPipeline`,t),this.logger.debug(`initialized`,{args:this.args})}registerOutputPlugins(e){return this.outputPlugins.push(...e),this}async run(e){let{context:t,outputPlugins:n,userConfigOptions:r}=e;this.registerOutputPlugins([...n]);let i=fx(this.args);this.args.jsonFlag&&(_e(`silent`),new Set([`config-show`,`plugins`]).has(i.name)||(i=new Wy(i)));let a=this.createCommandContext(t,r);return i.execute(a)}createCommandContext(e,t){return{logger:this.logger,outputPlugins:this.outputPlugins,collectedOutputContext:e,userConfigOptions:t,createCleanContext:n=>this.createCleanContext(e,t,n),createWriteContext:n=>this.createWriteContext(e,t,n)}}createCleanContext(e,t,n){return{logger:this.logger,collectedOutputContext:e,pluginOptions:t,runtimeTargets:this.getRuntimeTargets(),dryRun:n}}createWriteContext(e,t,n){return{logger:this.logger,collectedOutputContext:e,pluginOptions:t,runtimeTargets:this.getRuntimeTargets(),dryRun:n,registeredPluginNames:this.outputPlugins.map(e=>e.name)}}getRuntimeTargets(){return this.runtimeTargets??=gx(this.logger),this.runtimeTargets}};const vx=`.agents/skills`,yx=`SKILL.md`;var bx=class extends gy{constructor(){super(`GenericSkillsOutputPlugin`,{outputFileName:yx,treatWorkspaceRootProjectAsProject:!0,skills:{},cleanup:{delete:{project:{dirs:[vx]},global:{dirs:[vx]}}},capabilities:{skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{skills:n}=e.collectedOutputContext;if(n==null||n.length===0)return t;let r=this.selectSingleScopeItems(n,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),i=this.selectSingleScopeItems(n,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`)),a=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name,a=this.joinPath(e,r);if(t.push({path:this.joinPath(a,yx),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:this.joinPath(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:this.joinPath(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},o=(e,n,r)=>{for(let i of r)i.mcpConfig!=null&&t.push({path:this.joinPath(e,i.yamlFrontMatter.name,`mcp.json`),scope:n,source:{kind:`skillMcp`,rawContent:i.mcpConfig.rawContent}})};if(r.selectedScope===`project`||i.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectRootDir(e,t);if(n==null)continue;let s=$(r.items,t.projectConfig,`skills`),c=$(i.items,t.projectConfig,`skills`),l=this.joinPath(n,vx);r.selectedScope===`project`&&s.length>0&&a(l,`project`,s),i.selectedScope===`project`&&o(l,`project`,c)}if(r.selectedScope!==`global`&&i.selectedScope!==`global`)return t;let s=this.joinPath(this.getHomeDir(),vx),c=this.resolvePromptSourceProjectConfig(e);if(r.selectedScope===`global`){let e=$(r.items,c,`skills`);e.length>0&&a(s,`global`,e)}return i.selectedScope===`global`&&o(s,`global`,$(i.items,c,`skills`)),t}async convertContent(e,t){let n=e.source;switch(n.kind){case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillMcp`:return n.rawContent;case`skillChildDoc`:return n.content;case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}};const xx=`AGENTS.md`;var Sx=class extends gy{constructor(){super(`AgentsOutputPlugin`,{outputFileName:xx,treatWorkspaceRootProjectAsProject:!0,cleanup:{delete:{project:{files:[xx]}}},capabilities:{prompt:{scopes:[`project`],singleScope:!1}}})}async declareOutputFiles(e){let t=[],n=this.getProjectPromptOutputProjects(e);if(!new Set(this.selectPromptScopes(e,[`project`])).has(`project`))return t;for(let[r,i]of n.entries()){let n=this.resolveProjectRootDir(e,i);if(i.rootMemoryPrompt!=null&&n!=null&&t.push({path:this.resolvePath(n,xx),scope:`project`,source:{type:`projectRootMemory`,projectIndex:r}}),i.childMemoryPrompts!=null)for(let[e,n]of i.childMemoryPrompts.entries())t.push({path:this.resolveFullPath(n.dir),scope:`project`,source:{type:`projectChildMemory`,projectIndex:r,childIndex:e}})}return t}async convertContent(e,t){let n=this.getProjectPromptOutputProjects(t),r=e.source,i=r.projectIndex??-1;if(i<0||i>=n.length)throw Error(`Invalid project index in declaration for ${this.name}`);let a=n[i];if(a==null)throw Error(`Project not found for declaration in ${this.name}`);if(r.type===`projectRootMemory`){if(a.rootMemoryPrompt==null)throw Error(`Root memory prompt missing for project index ${i}`);return a.rootMemoryPrompt.content}if(r.type===`projectChildMemory`){let e=r.childIndex??-1,t=a.childMemoryPrompts?.[e];if(t==null)throw Error(`Child memory prompt missing for project ${i}, child ${e}`);return t.content}throw Error(`Unsupported declaration source for ${this.name}`)}};const Cx=`CLAUDE.md`;var wx=class extends gy{constructor(){super(`ClaudeCodeCLIOutputPlugin`,{globalConfigDir:`.claude`,outputFileName:Cx,treatWorkspaceRootProjectAsProject:!0,toolPreset:`claudeCode`,commands:{subDir:`commands`,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},subagents:{subDir:`agents`,sourceScopes:[`project`],includePrefix:!0,linkSymbol:`-`,ext:`.md`},skills:{subDir:`skills`},rules:{transformFrontMatter:e=>({paths:e.globs.map(pp)})},cleanup:{delete:{project:{files:[Cx],dirs:[`.claude/rules`,`.claude/commands`,`.claude/agents`,`.claude/skills`]},global:{files:[`.claude/CLAUDE.md`],dirs:[`.claude/rules`,`.claude/commands`,`.claude/agents`,`.claude/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},subagents:{scopes:[`project`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}};const Tx=Ey.CURSOR,Ex=by.MCP_CONFIG,Dx=xy.COMMANDS,Ox=xy.RULES,kx=by.CURSOR_GLOBAL_RULE,Ax=xy.CURSOR_SKILLS,jx=by.SKILL,Mx=Oy.CURSOR;var Nx=class extends gy{constructor(){super(`CursorOutputPlugin`,{globalConfigDir:Tx,outputFileName:``,treatWorkspaceRootProjectAsProject:!0,dependsOn:[yy.AgentsOutput],indexignore:Dy.CURSOR,commands:{subDir:Dx,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:Ax},rules:{subDir:Ox,prefix:`rule`,sourceScopes:[`project`,`global`]},cleanup:{delete:{project:{files:[`.cursor/mcp.json`],dirs:[`.cursor/commands`,`.cursor/rules`],globs:[`.cursor/skills-cursor/*`]},global:{files:[`.cursor/mcp.json`],dirs:[`.cursor/commands`,`.cursor/rules`],globs:[`.cursor/skills-cursor/*`]}},protect:{project:{dirs:[...Mx].map(e=>`.cursor/skills-cursor/${e}`)},global:{dirs:[...Mx].map(e=>`.cursor/skills-cursor/${e}`)}}},capabilities:{prompt:{scopes:[`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareCleanupPaths(e){let t=await super.declareCleanupPaths(e);return{...t,delete:(t.delete??[]).map(e=>e.kind!==`glob`||!e.path.replaceAll(`\\`,`/`).endsWith(`/.cursor/${Ax}/*`)?e:{...e,excludeBasenames:[...Mx]})}}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,skills:i,rules:a,aiAgentIgnoreConfigFiles:o}=e.collectedOutputContext,s=this.getGlobalConfigDir(),c=this.resolvePromptSourceProjectConfig(e),l=this.getConcreteProjects(e),d=this.getProjectPromptOutputProjects(e),f=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0}),p=new Set(this.selectPromptScopes(e,[`global`])),m=new Set(a==null?[]:this.selectRuleScopes(e,a)),h=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),g=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`)),_=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),v=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name;if(this.isPreservedSkill(r))continue;let a=u.join(e,Ax,r);if(t.push({path:u.join(a,jx),scope:n,source:{kind:`skill`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:u.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:u.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},y=(e,n,r)=>{for(let i of r){if(i.mcpConfig==null)continue;let r=u.join(e,Ax,i.yamlFrontMatter.name);t.push({path:u.join(r,Ex),scope:n,source:{kind:`skillMcpConfig`,rawContent:i.mcpConfig.rawContent}})}},b=(e,n,r)=>{if(r.length===0)return;let i=By(r,this.log);i.size!==0&&t.push({path:u.join(e,Ex),scope:n,source:{kind:`mcpConfig`,mcpServers:Vy(i,Hy)}})};if(h.selectedScope===`project`||g.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectConfigDir(e,t);if(n!=null&&(h.selectedScope===`project`&&v(n,`project`,$(h.items,t.projectConfig,`skills`)),g.selectedScope===`project`)){let e=$(g.items,t.projectConfig,`skills`);y(n,`project`,e),b(n,`project`,e)}}if((h.selectedScope===`global`||g.selectedScope===`global`)&&(h.selectedScope===`global`&&v(s,`global`,$(h.items,c,`skills`)),g.selectedScope===`global`)){let e=$(g.items,c,`skills`);y(s,`global`,e),b(s,`global`,e)}if(_.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=$(_.items,n.projectConfig,`commands`);for(let e of i)t.push({path:u.join(r,Dx,this.transformCommandName(e,f)),scope:`project`,source:{kind:`command`,command:e}})}if(_.selectedScope===`global`){let e=$(_.items,c,`commands`);for(let n of e)t.push({path:u.join(s,Dx,this.transformCommandName(n,f)),scope:`global`,source:{kind:`command`,command:n}})}if(a!=null&&a.length>0){let n=a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`global`);if(m.has(`global`))for(let e of n)t.push({path:u.join(s,Ox,this.buildRuleFileName(e)),scope:`global`,source:{kind:`ruleMdc`,rule:e}});if(m.has(`project`))for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=xv($(a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`project`),n.projectConfig,`rules`),n.projectConfig);for(let e of i)t.push({path:u.join(r,Ox,this.buildRuleFileName(e)),scope:`project`,source:{kind:`ruleMdc`,rule:e}})}}if(n!=null&&p.has(`global`)){let r=this.buildGlobalRuleContent(n.content,e);for(let n of d){let i=this.resolveProjectConfigDir(e,n);i!=null&&t.push({path:u.join(i,Ox,kx),scope:`project`,source:{kind:`globalRuleContent`,content:r}})}}let x=this.getIgnoreOutputPath(),S=this.indexignore==null?void 0:o?.find(e=>e.fileName===this.indexignore);if(x!=null&&S!=null)for(let e of l){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:u.join(n.basePath,n.path,x),scope:`project`,source:{kind:`ignoreFile`,content:S.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`command`:return this.buildCommandContent(n.command,t);case`mcpConfig`:return JSON.stringify({mcpServers:n.mcpServers},null,2);case`skill`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillMcpConfig`:return n.rawContent;case`skillChildDoc`:case`globalRuleContent`:case`ignoreFile`:return n.content;case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;case`ruleMdc`:return this.buildRuleMdcContent(n.rule,t);default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildGlobalRuleContent(e,t){return this.buildMarkdownContent(e,{description:`Global prompt (synced)`,alwaysApply:!0},t)}isPreservedSkill(e){return Mx.has(e)}buildRuleMdcContent(e,t){let n={alwaysApply:!1,globs:e.globs.length>0?e.globs.join(`, `):``};return this.buildMarkdownContent(e.content,n,t).split(`
170
284
  `).map(e=>{let t=/^(\s*globs:\s*)(['"])(.*)\2\s*$/.exec(e);if(t==null)return e;let n=t[1]??`globs: `,r=t[3]??``;return r.trim().length===0?e:`${n}${r}`}).join(`
171
- `)}};const tb=`AGENTS.md`;var nb=class extends L_{constructor(){super(`DroidCLIOutputPlugin`,{globalConfigDir:`.factory`,outputFileName:tb,treatWorkspaceRootProjectAsProject:!0,commands:{transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{},cleanup:{delete:{project:{files:[tb],dirs:[`.factory/commands`,`.factory/skills`]},global:{files:[`.factory/AGENTS.md`],dirs:[`.factory/commands`,`.factory/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}buildSkillMainContent(e,t){let n=e.yamlFrontMatter==null?void 0:{name:e.yamlFrontMatter.name,description:e.yamlFrontMatter.description};return this.buildMarkdownContent(e.content,n,t)}};const rb=`.editorconfig`;var ib=class extends L_{constructor(){super(`EditorConfigOutputPlugin`,{cleanup:{delete:{project:{files:[rb]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{projects:n}=e.collectedOutputContext.workspace,{editorConfigFiles:r}=e.collectedOutputContext;if(r==null||r.length===0)return t;for(let e of n){let n=e.dirFromWorkspacePath;if(n!=null)for(let e of r)t.push({path:this.resolvePath(n.basePath,n.path,rb),scope:`project`,source:{content:e.content}})}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};const ab=`GEMINI.md`;var ob=class extends L_{constructor(){super(`GeminiCLIOutputPlugin`,{globalConfigDir:`.gemini`,outputFileName:ab,treatWorkspaceRootProjectAsProject:!0,cleanup:{delete:{project:{globs:[ab]},global:{files:[`.gemini/GEMINI.md`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1}}})}},sb=class extends L_{constructor(){super(`GitExcludeOutputPlugin`,{capabilities:{}})}async declareOutputFiles(e){let t=[],{workspace:n,globalGitIgnore:r,shadowGitExclude:i}=e.collectedOutputContext,a=this.buildManagedContent(r,i);if(a.length===0)return t;let o=this.normalizeContent(a),s=new Set,{projects:c}=n;for(let e of c){if(e.dirFromWorkspacePath==null)continue;let n=e.dirFromWorkspacePath.getAbsolutePath(),r=[n,...Wg(n)];for(let e of r){let n=Ug(e);if(n==null)continue;let r=d.join(n,`exclude`);s.has(r)||(s.add(r),t.push({path:r,scope:`project`,source:{content:o}}))}}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}buildManagedContent(e,t){let n=[];if(e!=null&&e.trim().length>0){let t=this.sanitizeContent(e);t.length>0&&n.push(t)}if(t!=null&&t.trim().length>0){let e=this.sanitizeContent(t);e.length>0&&n.push(e)}return n.length===0?``:n.join(`
285
+ `)}};const Px=`AGENTS.md`;var Fx=class extends gy{constructor(){super(`DroidCLIOutputPlugin`,{globalConfigDir:`.factory`,outputFileName:Px,treatWorkspaceRootProjectAsProject:!0,commands:{transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{},cleanup:{delete:{project:{files:[Px],dirs:[`.factory/commands`,`.factory/skills`]},global:{files:[`.factory/AGENTS.md`],dirs:[`.factory/commands`,`.factory/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}buildSkillMainContent(e,t){let n=e.yamlFrontMatter==null?void 0:{name:e.yamlFrontMatter.name,description:e.yamlFrontMatter.description};return this.buildMarkdownContent(e.content,n,t)}};const Ix=`.editorconfig`;var Lx=class extends gy{constructor(){super(`EditorConfigOutputPlugin`,{cleanup:{delete:{project:{files:[Ix]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{projects:n}=e.collectedOutputContext.workspace,{editorConfigFiles:r}=e.collectedOutputContext;if(r==null||r.length===0)return t;for(let e of n){let n=e.dirFromWorkspacePath;if(n!=null)for(let e of r)t.push({path:this.resolvePath(n.basePath,n.path,Ix),scope:`project`,source:{content:e.content}})}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};const Rx=`GEMINI.md`;var zx=class extends gy{constructor(){super(`GeminiCLIOutputPlugin`,{globalConfigDir:`.gemini`,outputFileName:Rx,treatWorkspaceRootProjectAsProject:!0,cleanup:{delete:{project:{globs:[Rx]},global:{files:[`.gemini/GEMINI.md`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1}}})}},Bx=class extends gy{constructor(){super(`GitExcludeOutputPlugin`,{capabilities:{}})}async declareOutputFiles(e){let t=[],{workspace:n,globalGitIgnore:r,shadowGitExclude:i}=e.collectedOutputContext,a=this.buildManagedContent(r,i);if(a.length===0)return t;let o=this.normalizeContent(a),s=new Set,{projects:c}=n;for(let e of c){if(e.dirFromWorkspacePath==null)continue;let n=e.dirFromWorkspacePath.getAbsolutePath(),r=[n,...Cv(n)];for(let e of r){let n=Sv(e);if(n==null)continue;let r=u.join(n,`exclude`);s.has(r)||(s.add(r),t.push({path:r,scope:`project`,source:{content:o}}))}}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}buildManagedContent(e,t){let n=[];if(e!=null&&e.trim().length>0){let t=this.sanitizeContent(e);t.length>0&&n.push(t)}if(t!=null&&t.trim().length>0){let e=this.sanitizeContent(t);e.length>0&&n.push(e)}return n.length===0?``:n.join(`
172
286
  `)}sanitizeContent(e){return e.split(/\r?\n/).filter(e=>{let t=e.trim();return t.length===0?!0:!(t.startsWith(`#`)&&!t.startsWith(`\\#`))}).join(`
173
- `).trim()}normalizeContent(e){let t=e.trim();return t.length===0?``:`${t}\n`}};const cb=`AGENTS.md`,lb=`prompts`,ub=`skills`,db=`.aiassistant`;var fb=class extends L_{constructor(){super(`JetBrainsAIAssistantCodexOutputPlugin`,{outputFileName:cb,treatWorkspaceRootProjectAsProject:!0,commands:{subDir:lb,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:ub},dependsOn:[B_.AgentsOutput],indexignore:`.aiignore`,cleanup:{delete:{project:{dirs:[`.aiassistant/rules`,`.aiassistant/codex/prompts`,`.aiassistant/codex/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,skills:i,aiAgentIgnoreConfigFiles:a}=e.collectedOutputContext,o=this.getConcreteProjects(e),s=this.getProjectPromptOutputProjects(e),c=this.getJetBrainsCodexDirs(e),l=new Set(this.selectPromptScopes(e,[`project`,`global`])),u=this.resolvePromptSourceProjectConfig(e),f=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),p=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),m=this.getTransformOptionsFromContext(e);if(l.has(`project`))for(let n of s){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=d.join(r,db,`rules`);if(n.rootMemoryPrompt!=null&&t.push({path:d.join(i,`always.md`),scope:`project`,source:{kind:`projectRuleContent`,content:this.buildAlwaysRuleContent(n.rootMemoryPrompt.content,e)}}),n.childMemoryPrompts!=null)for(let r of n.childMemoryPrompts)t.push({path:d.join(i,this.buildChildRuleFileName(r)),scope:`project`,source:{kind:`projectRuleContent`,content:this.buildGlobRuleContent(r,e)}})}let h=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter?.name??i.dir.getDirectoryName(),a=d.join(e,ub,r);if(t.push({path:d.join(a,`SKILL.md`),scope:n,source:{kind:`skill`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:d.join(a,e.dir.path.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillReference`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:d.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}};if(f.selectedScope===`project`||p.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=d.join(r,db,`codex`);if(f.selectedScope===`project`){let e=$(f.items,n.projectConfig,`commands`);for(let n of e)t.push({path:d.join(i,lb,this.transformCommandName(n,m)),scope:`project`,source:{kind:`command`,command:n}})}p.selectedScope===`project`&&h(i,`project`,$(p.items,n.projectConfig,`skills`))}if(c.length>0){if(n!=null&&l.has(`global`))for(let e of c)t.push({path:d.join(e,cb),scope:`global`,source:{kind:`globalMemory`,content:n.content}});let e=f.selectedScope===`global`?$(f.items,u,`commands`):[],r=p.selectedScope===`global`?$(p.items,u,`skills`):[];for(let n of c){for(let r of e)t.push({path:d.join(n,lb,this.transformCommandName(r,m)),scope:`global`,source:{kind:`command`,command:r}});h(n,`global`,r)}}let g=this.getIgnoreOutputPath(),_=this.indexignore==null?void 0:a?.find(e=>e.fileName===this.indexignore);if(g!=null&&_!=null)for(let e of o){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:d.join(n.basePath,n.path,g),scope:`project`,source:{kind:`ignoreFile`,content:_.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`projectRuleContent`:case`globalMemory`:case`skillReference`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`skill`:return this.buildCodexSkillContent(n.skill,t);case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}async declareCleanupPaths(e){let t=await super.declareCleanupPaths(e),n=this.getJetBrainsCodexDirs(e);if(n.length===0)return t;let r=n.flatMap(e=>[{path:d.join(e,cb),kind:`file`,scope:`global`},{path:d.join(e,lb),kind:`directory`,scope:`global`},{path:d.join(e,ub),kind:`directory`,scope:`global`}]),i=t.delete??[];return{...t,delete:[...i,...r]}}getJetBrainsCodexDirs(e){return e.runtimeTargets.jetbrainsCodexDirs}buildChildRuleFileName(e){let t=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``).replaceAll(`/`,`-`);return`glob-${t.length>0?t:`root`}.md`}buildChildRulePattern(e){let t=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``);return t.length===0?`**/*`:`${t}/**`}buildAlwaysRuleContent(e,t){return this.buildMarkdownContent(e,{apply:`始终`},t)}buildGlobRuleContent(e,t){let n={apply:`按文件模式`,模式:this.buildChildRulePattern(e)};return this.buildMarkdownContent(e.content,n,t)}buildCodexSkillContent(e,t){let n=e.yamlFrontMatter,r=this.normalizeSkillName(n.name,64),i=this.normalizeToSingleLine(n.description,1024),a={};n.displayName!=null&&(a[`short-description`]=n.displayName),n.version!=null&&(a.version=n.version),n.author!=null&&(a.author=n.author),n.keywords!=null&&n.keywords.length>0&&(a.keywords=[...n.keywords]);let o={name:r,description:i};return Object.keys(a).length>0&&(o.metadata=a),n.allowTools!=null&&n.allowTools.length>0&&(o[`allowed-tools`]=n.allowTools.join(` `)),this.buildMarkdownContent(e.content,o,t)}normalizeSkillName(e,t){let n=e.toLowerCase().replaceAll(/[^a-z0-9-]/g,`-`).replaceAll(/-+/g,`-`).replaceAll(/^-+|-+$/g,``);return n.length>t&&(n=n.slice(0,t).replace(/-+$/,``)),n}normalizeToSingleLine(e,t){let n=e.replaceAll(/[\r\n]+/g,` `).replaceAll(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t-3)}...`:n}};const pb=`.idea`;var mb=class extends L_{constructor(){super(`JetBrainsIDECodeStyleConfigOutputPlugin`,{cleanup:{delete:{project:{files:[`.editorconfig`,`.idea/codeStyles/Project.xml`,`.idea/codeStyles/codeStyleConfig.xml`,`.idea/.gitignore`]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{projects:n}=e.collectedOutputContext.workspace,{jetbrainsConfigFiles:r,editorConfigFiles:i}=e.collectedOutputContext,a=[...r??[],...i??[]];for(let e of n){let n=e.dirFromWorkspacePath;if(n!=null)for(let e of a){let r=this.getTargetRelativePath(e);t.push({path:this.resolvePath(n.basePath,n.path,r),scope:`project`,source:{content:e.content}})}}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}getTargetRelativePath(e){let t=e.dir.path;if(e.type===Gp.EditorConfig)return`.editorconfig`;if(e.type!==Gp.IntellijIDEA)return this.basename(t);let n=t.indexOf(pb);return n===-1?this.joinPath(pb,`codeStyles`,this.basename(t)):t.slice(Math.max(0,n))}};const hb=`AGENTS.md`,gb=`prompts`;var _b=class extends L_{constructor(){super(`CodexCLIOutputPlugin`,{globalConfigDir:`.codex`,outputFileName:hb,commands:{subDir:gb,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},cleanup:{delete:{global:{files:[`.codex/AGENTS.md`],dirs:[`.codex/prompts`]}},protect:{global:{dirs:[`.codex/skills/.system`]}}},dependsOn:[B_.AgentsOutput],capabilities:{prompt:{scopes:[`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let{globalMemory:t,commands:n}=e.collectedOutputContext,r=this.getGlobalConfigDir(),i=[],a=new Set(this.selectPromptScopes(e,[`global`]));if(t!=null&&a.has(`global`)&&i.push({path:d.join(r,hb),scope:`global`,source:{kind:`globalMemory`,content:t.content}}),n==null||n.length===0)return i;let o=this.resolvePromptSourceProjectConfig(e),s=this.getTransformOptionsFromContext(e),c=this.selectSingleScopeItems(n,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`));if(c.items.length===0)return i;let l=$(c.items,o,`commands`);for(let e of l){let t=this.transformCommandName(e,s);i.push({path:d.join(r,gb,t),scope:`global`,source:{kind:`command`,command:e}})}return i}async convertContent(e,t){let n=e.source;if(n.kind===`globalMemory`)return n.content;if(n.kind===`command`)return this.buildCommandContent(n.command,t);throw Error(`Unsupported declaration source for ${this.name}`)}};const vb=`AGENTS.md`,yb=`commands`,bb=`agents`,xb=`skills`;function Sb(e,t){let n={},r=t.sourceFrontMatter;if(r?.description!=null&&(n.description=r.description),r?.agent!=null&&(n.agent=r.agent),r?.model!=null&&(n.model=r.model),r?.allowTools!=null&&Array.isArray(r.allowTools)){let e={};for(let t of r.allowTools)e[String(t)]=!0;n.tools=e}for(let[e,t]of Object.entries(r??{}))[`description`,`agent`,`model`,`allowTools`,`namingCase`,`argumentHint`].includes(e)||(n[e]=t);return n}var Cb=class extends L_{constructor(){super(`OpencodeCLIOutputPlugin`,{globalConfigDir:`.config/opencode`,outputFileName:vb,treatWorkspaceRootProjectAsProject:!0,commands:{subDir:yb,transformFrontMatter:Sb},subagents:{subDir:bb},skills:{subDir:xb},cleanup:{delete:{project:{files:[vb,`.opencode/opencode.json`],dirs:[`.opencode/commands`,`.opencode/agents`,`.opencode/skills`]},global:{files:[`.config/opencode/AGENTS.md`,`.config/opencode/opencode.json`],dirs:[`.config/opencode/commands`,`.config/opencode/agents`,`.config/opencode/skills`]},xdgConfig:{files:[`opencode/AGENTS.md`,`opencode/opencode.json`],dirs:[`opencode/commands`,`opencode/agents`,`opencode/skills`]}}},dependsOn:[B_.AgentsOutput],capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},subagents:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,subAgents:i,skills:a}=e.collectedOutputContext,o=this.getGlobalConfigDir(),s=new Set(this.selectPromptScopes(e,[`project`,`global`])),c=this.getProjectPromptOutputProjects(e),l=this.resolvePromptSourceProjectConfig(e),u=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),f=i==null?{items:[]}:this.selectSingleScopeItems(i,this.subAgentsConfig.sourceScopes,e=>this.resolveSubAgentSourceScope(e),this.getTopicScopeOverride(e,`subagents`)),p=a==null?{items:[]}:this.selectSingleScopeItems(a,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),m=a==null?{items:[]}:this.selectSingleScopeItems(a,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`));n!=null&&s.has(`global`)&&t.push({path:d.join(o,vb),scope:`global`,source:{kind:`globalMemory`,content:n.content}});let h=(e,n,r)=>{if(r.length===0)return;let i=sv(r,this.log);i.size!==0&&t.push({path:d.join(e,`opencode.json`),scope:n,source:{kind:`mcpConfig`,mcpServers:cv(i,uv)}})},g=(e,n,r)=>{for(let i of r){let r=this.validateAndNormalizeSkillName(i.yamlFrontMatter?.name??i.dir.getDirectoryName()),a=d.join(e,xb,r);if(t.push({path:d.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i,normalizedSkillName:r}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:d.join(a,e.dir.path.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillReference`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:d.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},_=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0});for(let n of c){let r=this.resolveProjectRootDir(e,n);if(r!=null&&(n.rootMemoryPrompt!=null&&s.has(`project`)&&t.push({path:d.join(r,vb),scope:`project`,source:{kind:`projectRootMemory`,content:n.rootMemoryPrompt.content}}),n.childMemoryPrompts!=null&&s.has(`project`)))for(let e of n.childMemoryPrompts)t.push({path:this.resolveFullPath(e.dir),scope:`project`,source:{kind:`projectChildMemory`,content:e.content}})}if(u.selectedScope===`project`||f.selectedScope===`project`||p.selectedScope===`project`||m.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=d.join(r,`.opencode`),a=$(u.items,n.projectConfig,`commands`);if(u.selectedScope===`project`)for(let e of a)t.push({path:d.join(i,yb,this.transformCommandName(e,_)),scope:`project`,source:{kind:`command`,command:e}});let o=$(f.items,n.projectConfig,`subAgents`);if(f.selectedScope===`project`)for(let e of o)t.push({path:d.join(i,bb,this.transformSubAgentName(e)),scope:`project`,source:{kind:`subAgent`,agent:e}});let s=$(p.items,n.projectConfig,`skills`);p.selectedScope===`project`&&g(i,`project`,s);let c=$(m.items,n.projectConfig,`skills`);m.selectedScope===`project`&&h(i,`project`,c)}if(u.selectedScope===`global`){let e=$(u.items,l,`commands`);for(let n of e)t.push({path:d.join(o,yb,this.transformCommandName(n,_)),scope:`global`,source:{kind:`command`,command:n}})}if(f.selectedScope===`global`){let e=$(f.items,l,`subAgents`);for(let n of e)t.push({path:d.join(o,bb,this.transformSubAgentName(n)),scope:`global`,source:{kind:`subAgent`,agent:n}})}return p.selectedScope===`global`&&g(o,`global`,$(p.items,l,`skills`)),m.selectedScope===`global`&&h(o,`global`,$(m.items,l,`skills`)),t}async convertContent(e,t){let n=e.source;switch(n.kind){case`globalMemory`:case`projectRootMemory`:case`projectChildMemory`:case`skillReference`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`subAgent`:{let e=this.buildOpencodeAgentFrontMatter(n.agent);return this.buildMarkdownContent(n.agent.content,e,t)}case`skillMain`:{let e=this.buildOpencodeSkillFrontMatter(n.skill,n.normalizedSkillName);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;case`mcpConfig`:return JSON.stringify({$schema:`https://opencode.ai/config.json`,plugin:[`opencode-rules@latest`],mcp:n.mcpServers},null,2);default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildOpencodeAgentFrontMatter(e){let t={},n=e.yamlFrontMatter;if(n?.description!=null&&(t.description=n.description),t.mode=n?.mode??`subagent`,n?.model!=null&&(t.model=n.model),n?.temperature!=null&&(t.temperature=n.temperature),n?.maxSteps!=null&&(t.maxSteps=n.maxSteps),n?.hidden!=null&&(t.hidden=n.hidden),n?.allowTools!=null&&Array.isArray(n.allowTools)){let e={};for(let t of n.allowTools)e[String(t)]=!0;t.tools=e}n?.permission!=null&&typeof n.permission==`object`&&(t.permission=n.permission);for(let[e,r]of Object.entries(n??{}))[`description`,`mode`,`model`,`temperature`,`maxSteps`,`hidden`,`allowTools`,`permission`,`namingCase`,`name`,`color`].includes(e)||(t[e]=r);return t}buildOpencodeSkillFrontMatter(e,t){let n={},r=e.yamlFrontMatter;n.name=t,r?.description!=null&&(n.description=r.description),n.license=r?.license??`MIT`,n.compatibility=r?.compatibility??`opencode`;let i={};for(let e of[`author`,`version`,`keywords`,`category`,`repository`,`displayName`])r?.[e]!=null&&(i[e]=r[e]);let a=new Set([`name`,`description`,`license`,`compatibility`,`namingCase`,`allowTools`,`keywords`,`displayName`,`author`,`version`]);for(let[e,t]of Object.entries(r??{}))a.has(e)||(i[e]=t);return Object.keys(i).length>0&&(n.metadata=i),n}validateAndNormalizeSkillName(e){let t=e.toLowerCase();return t=t.replaceAll(/[^a-z0-9-]+/g,`-`),t=t.replaceAll(/-+/g,`-`),t=t.replaceAll(/^-|-$/g,``),t.length===0?t=`skill`:t.length>64&&(t=t.slice(0,64),t=t.replace(/-$/,``)),t}};const wb=`rules`,Tb=`commands`,Eb=`skills`,Db=`glob`,Ob=`glob`;function kb(e,t){let n=t.sourceFrontMatter,r={description:`Fast command`,type:`user_command`};return n?.description!=null&&(r.description=n.description),n?.argumentHint!=null&&(r.argumentHint=n.argumentHint),n?.allowTools!=null&&Array.isArray(n.allowTools)&&n.allowTools.length>0&&(r.allowTools=n.allowTools),r}var Ab=class extends L_{constructor(){super(`QoderIDEPluginOutputPlugin`,{globalConfigDir:`.qoder`,treatWorkspaceRootProjectAsProject:!0,indexignore:`.qoderignore`,commands:{subDir:Tb,transformFrontMatter:kb},skills:{subDir:Eb},rules:{subDir:wb,sourceScopes:[`project`,`global`]},cleanup:{delete:{project:{dirs:[`.qoder/commands`,`.qoder/rules`,`.qoder/skills`]},global:{dirs:[`.qoder/commands`,`.qoder/rules`,`.qoder/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,skills:i,rules:a,aiAgentIgnoreConfigFiles:o}=e.collectedOutputContext,s=this.getGlobalConfigDir(),c=this.resolvePromptSourceProjectConfig(e),l=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0}),u=new Set(a==null?[]:this.selectRuleScopes(e,a)),f=new Set(this.selectPromptScopes(e,[`project`,`global`])),p=this.getProjectPromptOutputProjects(e),m=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),h=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),g=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`)),_=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name,a=d.join(e,Eb,r);if(t.push({path:d.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:d.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:d.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},v=(e,n,r)=>{for(let i of r){if(i.mcpConfig==null)continue;let r=d.join(e,Eb,i.yamlFrontMatter.name);t.push({path:d.join(r,`mcp.json`),scope:n,source:{kind:`skillMcpConfig`,rawContent:i.mcpConfig.rawContent}})}};if(m.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=$(m.items,n.projectConfig,`commands`);for(let e of i)t.push({path:d.join(r,Tb,this.transformCommandName(e,l)),scope:`project`,source:{kind:`command`,command:e}})}if(m.selectedScope===`global`){let e=$(m.items,c,`commands`);for(let n of e)t.push({path:d.join(s,Tb,this.transformCommandName(n,l)),scope:`global`,source:{kind:`command`,command:n}})}if(h.selectedScope===`project`||g.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectConfigDir(e,t);n!=null&&(h.selectedScope===`project`&&_(n,`project`,$(h.items,t.projectConfig,`skills`)),g.selectedScope===`project`&&v(n,`project`,$(g.items,t.projectConfig,`skills`)))}if((h.selectedScope===`global`||g.selectedScope===`global`)&&(h.selectedScope===`global`&&_(s,`global`,$(h.items,c,`skills`)),g.selectedScope===`global`&&v(s,`global`,$(g.items,c,`skills`))),n!=null&&f.has(`global`))for(let r of p){let i=this.resolveProjectConfigDir(e,r);i!=null&&t.push({path:d.join(i,wb,`global.md`),scope:`project`,source:{kind:`ruleContent`,content:this.buildAlwaysRuleContent(n.content,e)}})}if(f.has(`project`))for(let n of p){let r=this.resolveProjectConfigDir(e,n);if(r!=null&&(n.rootMemoryPrompt!=null&&t.push({path:d.join(r,wb,`always.md`),scope:`project`,source:{kind:`ruleContent`,content:this.buildAlwaysRuleContent(n.rootMemoryPrompt.content,e)}}),n.childMemoryPrompts!=null))for(let i of n.childMemoryPrompts)t.push({path:d.join(r,wb,this.buildChildRuleFileName(i)),scope:`project`,source:{kind:`ruleContent`,content:this.buildGlobRuleContent(i,e)}})}if(a!=null&&a.length>0&&u.has(`project`))for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=Hg($(a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`project`),n.projectConfig,`rules`),n.projectConfig);for(let e of i)t.push({path:d.join(r,wb,this.buildRuleFileName(e)),scope:`project`,source:{kind:`rulePrompt`,rule:e}})}if(a!=null&&a.length>0&&u.has(`global`)){let e=a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`global`);for(let n of e)t.push({path:d.join(s,wb,this.buildRuleFileName(n)),scope:`global`,source:{kind:`rulePrompt`,rule:n}})}let y=this.getIgnoreOutputPath(),b=this.indexignore==null?void 0:o?.find(e=>e.fileName===this.indexignore);if(y!=null&&b!=null)for(let n of this.getConcreteProjects(e)){let e=n.dirFromWorkspacePath;e==null||n.isPromptSourceProject===!0||t.push({path:d.join(e.basePath,e.path,y),scope:`project`,source:{kind:`ignoreFile`,content:b.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`command`:return this.buildCommandContent(n.command,t);case`ruleContent`:return n.content;case`rulePrompt`:return this.buildRuleContent(n.rule,t);case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillMcpConfig`:return n.rawContent;case`skillChildDoc`:case`ignoreFile`:return n.content;case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildChildRuleFileName(e){let t=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``).replaceAll(`/`,`-`);return`glob-${t.length>0?t:`root`}.md`}buildAlwaysRuleContent(e,t){return this.buildMarkdownContent(e,{trigger:`always_on`,type:`user_command`},t)}buildGlobRuleContent(e,t){let n=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``),r=n.length===0?`**/*`:`${n}/**`;return this.buildMarkdownContent(e.content,{trigger:Db,[Ob]:r,type:`user_command`},t)}buildSkillFrontMatter(e){let t=e.yamlFrontMatter;return{name:t.name,description:t.description,type:`user_command`,...t.displayName!=null&&{displayName:t.displayName},...t.keywords!=null&&t.keywords.length>0&&{keywords:t.keywords},...t.author!=null&&{author:t.author},...t.version!=null&&{version:t.version},...t.allowTools!=null&&t.allowTools.length>0&&{allowTools:t.allowTools}}}buildRuleFileName(e,t=`rule-`){return`${t}${e.prefix}-${e.ruleName}.md`}buildRuleContent(e,t){let n={trigger:Db,[Ob]:e.globs.length>0?e.globs.join(`, `):`**/*`,type:`user_command`};return this.buildMarkdownContent(e.content,n,t)}normalizeRuleScope(e){return e.scope??`global`}};function jb(e){return T_[e??`Readme`].out}var Mb=class extends L_{constructor(){super(`ReadmeMdConfigFileOutputPlugin`,{outputFileName:`README.md`,cleanup:{delete:{project:{files:[`README.md`,`CODE_OF_CONDUCT.md`,`SECURITY.md`]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{readmePrompts:n}=e.collectedOutputContext;if(n==null||n.length===0)return t;for(let e of n){let n=jb(e.fileKind),r=d.join(e.targetDir.basePath,e.targetDir.path,n);t.push({path:r,scope:`project`,source:{content:e.content}})}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};const Nb=`GLOBAL.md`,Pb=`.trae`,Fb=`commands`,Ib=`skills`;var Lb=class extends L_{constructor(){super(`TraeIDEOutputPlugin`,{globalConfigDir:Pb,outputFileName:Nb,treatWorkspaceRootProjectAsProject:!0,indexignore:`.traeignore`,commands:{subDir:Fb,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:Ib},cleanup:{delete:{project:{dirs:[`.trae/rules`,`.trae/commands`,`.trae/skills`]},global:{dirs:[`.trae/steering`,`.trae/commands`,`.trae/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}getIgnoreOutputPath(){if(this.indexignore!=null)return d.join(`.trae`,`.ignore`)}getGlobalSteeringDir(){return this.joinPath(this.getGlobalConfigDir(),`steering`)}async declareOutputFiles(e){let t=[],{commands:n,skills:r,globalMemory:i,aiAgentIgnoreConfigFiles:a}=e.collectedOutputContext,o=this.getConcreteProjects(e),s=this.getProjectPromptOutputProjects(e),c=this.resolvePromptSourceProjectConfig(e),l=new Set(this.selectPromptScopes(e,[`project`,`global`])),u=n==null?{items:[]}:this.selectSingleScopeItems(n,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),f=r==null?{items:[]}:this.selectSingleScopeItems(r,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),p=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0});i!=null&&l.has(`global`)&&t.push({path:this.joinPath(this.getGlobalSteeringDir(),Nb),scope:`global`,source:{kind:`globalMemory`,content:i.content}});for(let n of s){let r=this.resolveProjectRootDir(e,n);if(r!=null&&n.childMemoryPrompts!=null&&l.has(`project`))for(let i of n.childMemoryPrompts){let n=(i.workingChildDirectoryPath?.path??i.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``),a=this.buildProjectRelativeGlobPattern(n),o=this.buildMarkdownContent([this.buildPathGuardHint(n),``,i.content].join(`
174
- `),{alwaysApply:!1,globs:a},e);t.push({path:d.join(r,Pb,`rules`,this.buildSteeringFileName(i)),scope:`project`,source:{kind:`steeringRule`,content:o}})}}if(u.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=$(u.items,n.projectConfig,`commands`);for(let e of i)t.push({path:d.join(r,Fb,this.transformCommandName(e,p)),scope:`project`,source:{kind:`command`,command:e}})}if(u.selectedScope===`global`){let e=this.getGlobalConfigDir(),n=$(u.items,c,`commands`);for(let r of n)t.push({path:d.join(e,Fb,this.transformCommandName(r,p)),scope:`global`,source:{kind:`command`,command:r}})}let m=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name,a=d.join(e,Ib,r);if(t.push({path:d.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:d.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:d.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}};if(f.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectConfigDir(e,t);n!=null&&m(n,`project`,$(f.items,t.projectConfig,`skills`))}f.selectedScope===`global`&&m(this.getGlobalConfigDir(),`global`,$(f.items,c,`skills`));let h=this.getIgnoreOutputPath(),g=this.indexignore==null?void 0:a?.find(e=>e.fileName===this.indexignore);if(h!=null&&g!=null)for(let e of o){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:d.join(n.basePath,n.path,h),scope:`project`,source:{kind:`ignoreFile`,content:g.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`globalMemory`:case`steeringRule`:case`skillChildDoc`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildSkillFrontMatter(e){let t={description:e.yamlFrontMatter.description??``};return e.yamlFrontMatter.displayName!=null&&(t.name=e.yamlFrontMatter.displayName),t}buildSteeringFileName(e){return`trae-${(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``).replaceAll(`/`,`-`)}.md`}buildPathGuardHint(e){return e.length===0?`Scope guard: apply this rule to project source files only; do not apply to generated output directories (for example dist/, build/, out/, .next/, target/).`:[`Scope guard: this rule is for the project-root path "${e}/" only.`,`Do not apply this rule to generated output paths such as "dist/${e}/", "build/${e}/", "out/${e}/", ".next/${e}/", or "target/${e}/".`].join(`
175
- `)}buildProjectRelativeGlobPattern(e){return e.length===0?`**/*`:`${e}/**`}};const Rb=`.vscode`;var zb=class extends L_{constructor(){super(`VisualStudioCodeIDEConfigOutputPlugin`,{cleanup:{delete:{project:{files:[`.vscode/settings.json`,`.vscode/extensions.json`]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{projects:n}=e.collectedOutputContext.workspace,{vscodeConfigFiles:r}=e.collectedOutputContext,i=r??[];for(let e of n){let n=e.dirFromWorkspacePath;if(n!=null)for(let e of i){let r=this.getTargetRelativePath(e);t.push({path:this.resolvePath(n.basePath,n.path,r),scope:`project`,source:{content:e.content}})}}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}getTargetRelativePath(e){let t=e.dir.path;if(e.type!==Gp.VSCode)return this.basename(t);let n=t.indexOf(Rb);return n===-1?this.joinPath(Rb,this.basename(t)):t.slice(Math.max(0,n))}};const Bb=`WARP.md`;var Vb=class extends L_{constructor(){super(`WarpIDEOutputPlugin`,{outputFileName:Bb,treatWorkspaceRootProjectAsProject:!0,indexignore:`.warpindexignore`,cleanup:{delete:{project:{files:[Bb]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,aiAgentIgnoreConfigFiles:r}=e.collectedOutputContext,i=this.getConcreteProjects(e),a=this.getProjectPromptOutputProjects(e),o=this.shouldSkipDueToPlugin(e,B_.AgentsOutput),s=new Set(this.selectPromptScopes(e,[`project`,`global`])),c=this.extractGlobalMemoryContent(e);if(o){if(n!=null&&s.has(`global`))for(let r of a){let i=this.resolveProjectRootDir(e,r);i!=null&&t.push({path:d.join(i,Bb),scope:`project`,source:{content:n.content}})}}else for(let n of a){let r=this.resolveProjectRootDir(e,n);if(r!=null){if(n.rootMemoryPrompt!=null&&s.has(`project`)){let e=this.combineGlobalWithContent(c,n.rootMemoryPrompt.content);t.push({path:d.join(r,Bb),scope:`project`,source:{content:e}})}if(n.childMemoryPrompts!=null&&s.has(`project`))for(let e of n.childMemoryPrompts)t.push({path:this.resolveFullPath(e.dir),scope:`project`,source:{content:e.content}})}}let l=this.getIgnoreOutputPath(),u=this.indexignore==null?void 0:r?.find(e=>e.fileName===this.indexignore);if(l!=null&&u!=null)for(let e of i){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:this.resolvePath(n.basePath,n.path,l),scope:`project`,source:{content:u.content}})}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};const Hb=`.codeium/windsurf`,Ub=`global_workflows`,Wb=`memories`,Gb=`skills`,Kb=`.windsurf`;var qb=class extends L_{constructor(){super(`WindsurfOutputPlugin`,{globalConfigDir:Hb,outputFileName:``,treatWorkspaceRootProjectAsProject:!0,dependsOn:[B_.AgentsOutput],indexignore:`.codeiumignore`,commands:{subDir:Ub,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:Gb},rules:{sourceScopes:[`project`,`global`]},cleanup:{delete:{project:{dirs:[`.windsurf/rules`,`.windsurf/workflows`,`.windsurf/global_workflows`,`.windsurf/skills`,`.codeium/windsurf/global_workflows`,`.codeium/windsurf/skills`]},global:{dirs:[`.codeium/windsurf/global_workflows`,`.codeium/windsurf/memories`,`.codeium/windsurf/skills`]}}},capabilities:{prompt:{scopes:[`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{commands:n,skills:r,globalMemory:i,rules:a,aiAgentIgnoreConfigFiles:o}=e.collectedOutputContext,s=this.resolvePromptSourceProjectConfig(e),c=this.getCodeiumWindsurfDir(),l=new Set(this.selectPromptScopes(e,[`global`])),u=n==null?{items:[]}:this.selectSingleScopeItems(n,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),f=r==null?{items:[]}:this.selectSingleScopeItems(r,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),p=this.getConcreteProjects(e);i!=null&&l.has(`global`)&&t.push({path:d.join(c,Wb,`global_rules.md`),scope:`global`,source:{kind:`globalMemory`,content:i.content}});let m=(e,n,r)=>{let i=r.yamlFrontMatter.name,a=d.join(e,Gb,i);if(t.push({path:d.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:r}}),r.childDocs!=null)for(let e of r.childDocs)t.push({path:d.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(r.resources!=null)for(let e of r.resources)t.push({path:d.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})};if(f.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectRootDir(e,t),r=n==null?void 0:d.join(n,Kb);if(r==null)continue;let i=$(f.items,t.projectConfig,`skills`);for(let e of i)m(r,`project`,e)}if(f.selectedScope===`global`){let e=$(f.items,s,`skills`);for(let t of e)m(c,`global`,t)}let h=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0});if(u.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n),i=r==null?void 0:d.join(r,Kb);if(i==null)continue;let a=$(u.items,n.projectConfig,`commands`);for(let e of a)t.push({path:d.join(i,`workflows`,this.transformCommandName(e,h)),scope:`project`,source:{kind:`command`,command:e}})}if(u.selectedScope===`global`){let e=$(u.items,s,`commands`);for(let n of e)t.push({path:d.join(c,Ub,this.transformCommandName(n,h)),scope:`global`,source:{kind:`command`,command:n}})}if(a!=null&&a.length>0){let n=new Set(this.selectRuleScopes(e,a)),r=a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`global`);if(n.has(`global`))for(let e of r)t.push({path:d.join(c,Wb,this.buildRuleFileName(e)),scope:`global`,source:{kind:`rule`,rule:e}});if(n.has(`project`))for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=Hg($(a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`project`),n.projectConfig,`rules`),n.projectConfig);for(let e of i)t.push({path:d.join(r,Kb,`rules`,this.buildRuleFileName(e)),scope:`project`,source:{kind:`rule`,rule:e}})}}let g=this.getIgnoreOutputPath(),_=this.indexignore==null?void 0:o?.find(e=>e.fileName===this.indexignore);if(g!=null&&_!=null)for(let e of p){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:d.join(n.basePath,n.path,g),scope:`project`,source:{kind:`ignoreFile`,content:_.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`globalMemory`:case`skillChildDoc`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillResource`:return n.encoding===`base64`?v.Buffer.from(n.content,`base64`):n.content;case`rule`:return this.buildRuleContent(n.rule,t);default:throw Error(`Unsupported declaration source for ${this.name}`)}}getCodeiumWindsurfDir(){return d.join(this.getHomeDir(),Hb)}buildRuleFileName(e,t=`rule-`){return`${t}${e.prefix}-${e.ruleName}.md`}buildRuleContent(e,t){let n={trigger:`glob`,globs:e.globs.length>0?e.globs.join(`, `):``};return this.buildMarkdownContent(e.content,n,t).split(`
287
+ `).trim()}normalizeContent(e){let t=e.trim();return t.length===0?``:`${t}\n`}};const Vx=`AGENTS.md`,Hx=`prompts`,Ux=`skills`,Wx=`.aiassistant`;var Gx=class extends gy{constructor(){super(`JetBrainsAIAssistantCodexOutputPlugin`,{outputFileName:Vx,treatWorkspaceRootProjectAsProject:!0,commands:{subDir:Hx,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:Ux},dependsOn:[yy.AgentsOutput],indexignore:`.aiignore`,cleanup:{delete:{project:{dirs:[`.aiassistant/rules`,`.aiassistant/codex/prompts`,`.aiassistant/codex/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,skills:i,aiAgentIgnoreConfigFiles:a}=e.collectedOutputContext,o=this.getConcreteProjects(e),s=this.getProjectPromptOutputProjects(e),c=this.getJetBrainsCodexDirs(e),l=new Set(this.selectPromptScopes(e,[`project`,`global`])),d=this.resolvePromptSourceProjectConfig(e),f=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),p=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),m=this.getTransformOptionsFromContext(e);if(l.has(`project`))for(let n of s){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=u.join(r,Wx,`rules`);if(n.rootMemoryPrompt!=null&&t.push({path:u.join(i,`always.md`),scope:`project`,source:{kind:`projectRuleContent`,content:this.buildAlwaysRuleContent(n.rootMemoryPrompt.content,e)}}),n.childMemoryPrompts!=null)for(let r of n.childMemoryPrompts)t.push({path:u.join(i,this.buildChildRuleFileName(r)),scope:`project`,source:{kind:`projectRuleContent`,content:this.buildGlobRuleContent(r,e)}})}let h=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter?.name??i.dir.getDirectoryName(),a=u.join(e,Ux,r);if(t.push({path:u.join(a,`SKILL.md`),scope:n,source:{kind:`skill`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:u.join(a,e.dir.path.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillReference`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:u.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}};if(f.selectedScope===`project`||p.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=u.join(r,Wx,`codex`);if(f.selectedScope===`project`){let e=$(f.items,n.projectConfig,`commands`);for(let n of e)t.push({path:u.join(i,Hx,this.transformCommandName(n,m)),scope:`project`,source:{kind:`command`,command:n}})}p.selectedScope===`project`&&h(i,`project`,$(p.items,n.projectConfig,`skills`))}if(c.length>0){if(n!=null&&l.has(`global`))for(let e of c)t.push({path:u.join(e,Vx),scope:`global`,source:{kind:`globalMemory`,content:n.content}});let e=f.selectedScope===`global`?$(f.items,d,`commands`):[],r=p.selectedScope===`global`?$(p.items,d,`skills`):[];for(let n of c){for(let r of e)t.push({path:u.join(n,Hx,this.transformCommandName(r,m)),scope:`global`,source:{kind:`command`,command:r}});h(n,`global`,r)}}let g=this.getIgnoreOutputPath(),_=this.indexignore==null?void 0:a?.find(e=>e.fileName===this.indexignore);if(g!=null&&_!=null)for(let e of o){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:u.join(n.basePath,n.path,g),scope:`project`,source:{kind:`ignoreFile`,content:_.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`projectRuleContent`:case`globalMemory`:case`skillReference`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`skill`:return this.buildCodexSkillContent(n.skill,t);case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}async declareCleanupPaths(e){let t=await super.declareCleanupPaths(e),n=this.getJetBrainsCodexDirs(e);if(n.length===0)return t;let r=n.flatMap(e=>[{path:u.join(e,Vx),kind:`file`,scope:`global`},{path:u.join(e,Hx),kind:`directory`,scope:`global`},{path:u.join(e,Ux),kind:`directory`,scope:`global`}]),i=t.delete??[];return{...t,delete:[...i,...r]}}getJetBrainsCodexDirs(e){return e.runtimeTargets.jetbrainsCodexDirs}buildChildRuleFileName(e){let t=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``).replaceAll(`/`,`-`);return`glob-${t.length>0?t:`root`}.md`}buildChildRulePattern(e){let t=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``);return t.length===0?`**/*`:`${t}/**`}buildAlwaysRuleContent(e,t){return this.buildMarkdownContent(e,{apply:`始终`},t)}buildGlobRuleContent(e,t){let n={apply:`按文件模式`,模式:this.buildChildRulePattern(e)};return this.buildMarkdownContent(e.content,n,t)}buildCodexSkillContent(e,t){let n=e.yamlFrontMatter,r=this.normalizeSkillName(n.name,64),i=this.normalizeToSingleLine(n.description,1024),a={};n.displayName!=null&&(a[`short-description`]=n.displayName),n.version!=null&&(a.version=n.version),n.author!=null&&(a.author=n.author),n.keywords!=null&&n.keywords.length>0&&(a.keywords=[...n.keywords]);let o={name:r,description:i};return Object.keys(a).length>0&&(o.metadata=a),n.allowTools!=null&&n.allowTools.length>0&&(o[`allowed-tools`]=n.allowTools.join(` `)),this.buildMarkdownContent(e.content,o,t)}normalizeSkillName(e,t){let n=e.toLowerCase().replaceAll(/[^a-z0-9-]/g,`-`).replaceAll(/-+/g,`-`).replaceAll(/^-+|-+$/g,``);return n.length>t&&(n=n.slice(0,t).replace(/-+$/,``)),n}normalizeToSingleLine(e,t){let n=e.replaceAll(/[\r\n]+/g,` `).replaceAll(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t-3)}...`:n}};const Kx=`.idea`;var qx=class extends gy{constructor(){super(`JetBrainsIDECodeStyleConfigOutputPlugin`,{cleanup:{delete:{project:{files:[`.editorconfig`,`.idea/codeStyles/Project.xml`,`.idea/codeStyles/codeStyleConfig.xml`,`.idea/.gitignore`]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{projects:n}=e.collectedOutputContext.workspace,{jetbrainsConfigFiles:r,editorConfigFiles:i}=e.collectedOutputContext,a=[...r??[],...i??[]];for(let e of n){let n=e.dirFromWorkspacePath;if(n!=null)for(let e of a){let r=this.getTargetRelativePath(e);t.push({path:this.resolvePath(n.basePath,n.path,r),scope:`project`,source:{content:e.content}})}}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}getTargetRelativePath(e){let t=e.dir.path;if(e.type===Zm.EditorConfig)return`.editorconfig`;if(e.type!==Zm.IntellijIDEA)return this.basename(t);let n=t.indexOf(Kx);return n===-1?this.joinPath(Kx,`codeStyles`,this.basename(t)):t.slice(Math.max(0,n))}};const Jx=`AGENTS.md`,Yx=`prompts`;var Xx=class extends gy{constructor(){super(`CodexCLIOutputPlugin`,{globalConfigDir:`.codex`,outputFileName:Jx,commands:{subDir:Yx,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},cleanup:{delete:{global:{files:[`.codex/AGENTS.md`],dirs:[`.codex/prompts`]}},protect:{global:{dirs:[`.codex/skills/.system`]}}},dependsOn:[yy.AgentsOutput],capabilities:{prompt:{scopes:[`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let{globalMemory:t,commands:n}=e.collectedOutputContext,r=this.getGlobalConfigDir(),i=[],a=new Set(this.selectPromptScopes(e,[`global`]));if(t!=null&&a.has(`global`)&&i.push({path:u.join(r,Jx),scope:`global`,source:{kind:`globalMemory`,content:t.content}}),n==null||n.length===0)return i;let o=this.resolvePromptSourceProjectConfig(e),s=this.getTransformOptionsFromContext(e),c=this.selectSingleScopeItems(n,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`));if(c.items.length===0)return i;let l=$(c.items,o,`commands`);for(let e of l){let t=this.transformCommandName(e,s);i.push({path:u.join(r,Yx,t),scope:`global`,source:{kind:`command`,command:e}})}return i}async convertContent(e,t){let n=e.source;if(n.kind===`globalMemory`)return n.content;if(n.kind===`command`)return this.buildCommandContent(n.command,t);throw Error(`Unsupported declaration source for ${this.name}`)}};const Zx=`AGENTS.md`,Qx=`commands`,$x=`agents`,eS=`skills`;function tS(e,t){let n={},r=t.sourceFrontMatter;if(r?.description!=null&&(n.description=r.description),r?.agent!=null&&(n.agent=r.agent),r?.model!=null&&(n.model=r.model),r?.allowTools!=null&&Array.isArray(r.allowTools)){let e={};for(let t of r.allowTools)e[String(t)]=!0;n.tools=e}for(let[e,t]of Object.entries(r??{}))[`description`,`agent`,`model`,`allowTools`,`namingCase`,`argumentHint`].includes(e)||(n[e]=t);return n}var nS=class extends gy{constructor(){super(`OpencodeCLIOutputPlugin`,{globalConfigDir:`.config/opencode`,outputFileName:Zx,treatWorkspaceRootProjectAsProject:!0,commands:{subDir:Qx,transformFrontMatter:tS},subagents:{subDir:$x},skills:{subDir:eS},cleanup:{delete:{project:{files:[Zx,`.opencode/opencode.json`],dirs:[`.opencode/commands`,`.opencode/agents`,`.opencode/skills`]},global:{files:[`.config/opencode/AGENTS.md`,`.config/opencode/opencode.json`],dirs:[`.config/opencode/commands`,`.config/opencode/agents`,`.config/opencode/skills`]},xdgConfig:{files:[`opencode/AGENTS.md`,`opencode/opencode.json`],dirs:[`opencode/commands`,`opencode/agents`,`opencode/skills`]}}},dependsOn:[yy.AgentsOutput],capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},subagents:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,subAgents:i,skills:a}=e.collectedOutputContext,o=this.getGlobalConfigDir(),s=new Set(this.selectPromptScopes(e,[`project`,`global`])),c=this.getProjectPromptOutputProjects(e),l=this.resolvePromptSourceProjectConfig(e),d=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),f=i==null?{items:[]}:this.selectSingleScopeItems(i,this.subAgentsConfig.sourceScopes,e=>this.resolveSubAgentSourceScope(e),this.getTopicScopeOverride(e,`subagents`)),p=a==null?{items:[]}:this.selectSingleScopeItems(a,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),m=a==null?{items:[]}:this.selectSingleScopeItems(a,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`));n!=null&&s.has(`global`)&&t.push({path:u.join(o,Zx),scope:`global`,source:{kind:`globalMemory`,content:n.content}});let h=(e,n,r)=>{if(r.length===0)return;let i=By(r,this.log);i.size!==0&&t.push({path:u.join(e,`opencode.json`),scope:n,source:{kind:`mcpConfig`,mcpServers:Vy(i,Uy)}})},g=(e,n,r)=>{for(let i of r){let r=this.validateAndNormalizeSkillName(i.yamlFrontMatter?.name??i.dir.getDirectoryName()),a=u.join(e,eS,r);if(t.push({path:u.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i,normalizedSkillName:r}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:u.join(a,e.dir.path.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillReference`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:u.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},_=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0});for(let n of c){let r=this.resolveProjectRootDir(e,n);if(r!=null&&(n.rootMemoryPrompt!=null&&s.has(`project`)&&t.push({path:u.join(r,Zx),scope:`project`,source:{kind:`projectRootMemory`,content:n.rootMemoryPrompt.content}}),n.childMemoryPrompts!=null&&s.has(`project`)))for(let e of n.childMemoryPrompts)t.push({path:this.resolveFullPath(e.dir),scope:`project`,source:{kind:`projectChildMemory`,content:e.content}})}if(d.selectedScope===`project`||f.selectedScope===`project`||p.selectedScope===`project`||m.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=u.join(r,`.opencode`),a=$(d.items,n.projectConfig,`commands`);if(d.selectedScope===`project`)for(let e of a)t.push({path:u.join(i,Qx,this.transformCommandName(e,_)),scope:`project`,source:{kind:`command`,command:e}});let o=$(f.items,n.projectConfig,`subAgents`);if(f.selectedScope===`project`)for(let e of o)t.push({path:u.join(i,$x,this.transformSubAgentName(e)),scope:`project`,source:{kind:`subAgent`,agent:e}});let s=$(p.items,n.projectConfig,`skills`);p.selectedScope===`project`&&g(i,`project`,s);let c=$(m.items,n.projectConfig,`skills`);m.selectedScope===`project`&&h(i,`project`,c)}if(d.selectedScope===`global`){let e=$(d.items,l,`commands`);for(let n of e)t.push({path:u.join(o,Qx,this.transformCommandName(n,_)),scope:`global`,source:{kind:`command`,command:n}})}if(f.selectedScope===`global`){let e=$(f.items,l,`subAgents`);for(let n of e)t.push({path:u.join(o,$x,this.transformSubAgentName(n)),scope:`global`,source:{kind:`subAgent`,agent:n}})}return p.selectedScope===`global`&&g(o,`global`,$(p.items,l,`skills`)),m.selectedScope===`global`&&h(o,`global`,$(m.items,l,`skills`)),t}async convertContent(e,t){let n=e.source;switch(n.kind){case`globalMemory`:case`projectRootMemory`:case`projectChildMemory`:case`skillReference`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`subAgent`:{let e=this.buildOpencodeAgentFrontMatter(n.agent);return this.buildMarkdownContent(n.agent.content,e,t)}case`skillMain`:{let e=this.buildOpencodeSkillFrontMatter(n.skill,n.normalizedSkillName);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;case`mcpConfig`:return JSON.stringify({$schema:`https://opencode.ai/config.json`,plugin:[`opencode-rules@latest`],mcp:n.mcpServers},null,2);default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildOpencodeAgentFrontMatter(e){let t={},n=e.yamlFrontMatter;if(n?.description!=null&&(t.description=n.description),t.mode=n?.mode??`subagent`,n?.model!=null&&(t.model=n.model),n?.temperature!=null&&(t.temperature=n.temperature),n?.maxSteps!=null&&(t.maxSteps=n.maxSteps),n?.hidden!=null&&(t.hidden=n.hidden),n?.allowTools!=null&&Array.isArray(n.allowTools)){let e={};for(let t of n.allowTools)e[String(t)]=!0;t.tools=e}n?.permission!=null&&typeof n.permission==`object`&&(t.permission=n.permission);for(let[e,r]of Object.entries(n??{}))[`description`,`mode`,`model`,`temperature`,`maxSteps`,`hidden`,`allowTools`,`permission`,`namingCase`,`name`,`color`].includes(e)||(t[e]=r);return t}buildOpencodeSkillFrontMatter(e,t){let n={},r=e.yamlFrontMatter;n.name=t,r?.description!=null&&(n.description=r.description),n.license=r?.license??`MIT`,n.compatibility=r?.compatibility??`opencode`;let i={};for(let e of[`author`,`version`,`keywords`,`category`,`repository`,`displayName`])r?.[e]!=null&&(i[e]=r[e]);let a=new Set([`name`,`description`,`license`,`compatibility`,`namingCase`,`allowTools`,`keywords`,`displayName`,`author`,`version`]);for(let[e,t]of Object.entries(r??{}))a.has(e)||(i[e]=t);return Object.keys(i).length>0&&(n.metadata=i),n}validateAndNormalizeSkillName(e){let t=e.toLowerCase();return t=t.replaceAll(/[^a-z0-9-]+/g,`-`),t=t.replaceAll(/-+/g,`-`),t=t.replaceAll(/^-|-$/g,``),t.length===0?t=`skill`:t.length>64&&(t=t.slice(0,64),t=t.replace(/-$/,``)),t}};const rS=`rules`,iS=`commands`,aS=`skills`,oS=`glob`,sS=`glob`;function cS(e,t){let n=t.sourceFrontMatter,r={description:`Fast command`,type:`user_command`};return n?.description!=null&&(r.description=n.description),n?.argumentHint!=null&&(r.argumentHint=n.argumentHint),n?.allowTools!=null&&Array.isArray(n.allowTools)&&n.allowTools.length>0&&(r.allowTools=n.allowTools),r}var lS=class extends gy{constructor(){super(`QoderIDEPluginOutputPlugin`,{globalConfigDir:`.qoder`,treatWorkspaceRootProjectAsProject:!0,indexignore:`.qoderignore`,commands:{subDir:iS,transformFrontMatter:cS},skills:{subDir:aS},rules:{subDir:rS,sourceScopes:[`project`,`global`]},cleanup:{delete:{project:{dirs:[`.qoder/commands`,`.qoder/rules`,`.qoder/skills`]},global:{dirs:[`.qoder/commands`,`.qoder/rules`,`.qoder/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0},mcp:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,commands:r,skills:i,rules:a,aiAgentIgnoreConfigFiles:o}=e.collectedOutputContext,s=this.getGlobalConfigDir(),c=this.resolvePromptSourceProjectConfig(e),l=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0}),d=new Set(a==null?[]:this.selectRuleScopes(e,a)),f=new Set(this.selectPromptScopes(e,[`project`,`global`])),p=this.getProjectPromptOutputProjects(e),m=r==null?{items:[]}:this.selectSingleScopeItems(r,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),h=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),g=i==null?{items:[]}:this.selectSingleScopeItems(i,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`mcp`)??this.getTopicScopeOverride(e,`skills`)),_=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name,a=u.join(e,aS,r);if(t.push({path:u.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:u.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:u.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}},v=(e,n,r)=>{for(let i of r){if(i.mcpConfig==null)continue;let r=u.join(e,aS,i.yamlFrontMatter.name);t.push({path:u.join(r,`mcp.json`),scope:n,source:{kind:`skillMcpConfig`,rawContent:i.mcpConfig.rawContent}})}};if(m.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=$(m.items,n.projectConfig,`commands`);for(let e of i)t.push({path:u.join(r,iS,this.transformCommandName(e,l)),scope:`project`,source:{kind:`command`,command:e}})}if(m.selectedScope===`global`){let e=$(m.items,c,`commands`);for(let n of e)t.push({path:u.join(s,iS,this.transformCommandName(n,l)),scope:`global`,source:{kind:`command`,command:n}})}if(h.selectedScope===`project`||g.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectConfigDir(e,t);n!=null&&(h.selectedScope===`project`&&_(n,`project`,$(h.items,t.projectConfig,`skills`)),g.selectedScope===`project`&&v(n,`project`,$(g.items,t.projectConfig,`skills`)))}if((h.selectedScope===`global`||g.selectedScope===`global`)&&(h.selectedScope===`global`&&_(s,`global`,$(h.items,c,`skills`)),g.selectedScope===`global`&&v(s,`global`,$(g.items,c,`skills`))),n!=null&&f.has(`global`))for(let r of p){let i=this.resolveProjectConfigDir(e,r);i!=null&&t.push({path:u.join(i,rS,`global.md`),scope:`project`,source:{kind:`ruleContent`,content:this.buildAlwaysRuleContent(n.content,e)}})}if(f.has(`project`))for(let n of p){let r=this.resolveProjectConfigDir(e,n);if(r!=null&&(n.rootMemoryPrompt!=null&&t.push({path:u.join(r,rS,`always.md`),scope:`project`,source:{kind:`ruleContent`,content:this.buildAlwaysRuleContent(n.rootMemoryPrompt.content,e)}}),n.childMemoryPrompts!=null))for(let i of n.childMemoryPrompts)t.push({path:u.join(r,rS,this.buildChildRuleFileName(i)),scope:`project`,source:{kind:`ruleContent`,content:this.buildGlobRuleContent(i,e)}})}if(a!=null&&a.length>0&&d.has(`project`))for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=xv($(a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`project`),n.projectConfig,`rules`),n.projectConfig);for(let e of i)t.push({path:u.join(r,rS,this.buildRuleFileName(e)),scope:`project`,source:{kind:`rulePrompt`,rule:e}})}if(a!=null&&a.length>0&&d.has(`global`)){let e=a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`global`);for(let n of e)t.push({path:u.join(s,rS,this.buildRuleFileName(n)),scope:`global`,source:{kind:`rulePrompt`,rule:n}})}let y=this.getIgnoreOutputPath(),b=this.indexignore==null?void 0:o?.find(e=>e.fileName===this.indexignore);if(y!=null&&b!=null)for(let n of this.getConcreteProjects(e)){let e=n.dirFromWorkspacePath;e==null||n.isPromptSourceProject===!0||t.push({path:u.join(e.basePath,e.path,y),scope:`project`,source:{kind:`ignoreFile`,content:b.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`command`:return this.buildCommandContent(n.command,t);case`ruleContent`:return n.content;case`rulePrompt`:return this.buildRuleContent(n.rule,t);case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillMcpConfig`:return n.rawContent;case`skillChildDoc`:case`ignoreFile`:return n.content;case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildChildRuleFileName(e){let t=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``).replaceAll(`/`,`-`);return`glob-${t.length>0?t:`root`}.md`}buildAlwaysRuleContent(e,t){return this.buildMarkdownContent(e,{trigger:`always_on`,type:`user_command`},t)}buildGlobRuleContent(e,t){let n=(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``),r=n.length===0?`**/*`:`${n}/**`;return this.buildMarkdownContent(e.content,{trigger:oS,[sS]:r,type:`user_command`},t)}buildSkillFrontMatter(e){let t=e.yamlFrontMatter;return{name:t.name,description:t.description,type:`user_command`,...t.displayName!=null&&{displayName:t.displayName},...t.keywords!=null&&t.keywords.length>0&&{keywords:t.keywords},...t.author!=null&&{author:t.author},...t.version!=null&&{version:t.version},...t.allowTools!=null&&t.allowTools.length>0&&{allowTools:t.allowTools}}}buildRuleFileName(e,t=`rule-`){return`${t}${e.prefix}-${e.ruleName}.md`}buildRuleContent(e,t){let n={trigger:oS,[sS]:e.globs.length>0?e.globs.join(`, `):`**/*`,type:`user_command`};return this.buildMarkdownContent(e.content,n,t)}normalizeRuleScope(e){return e.scope??`global`}};function uS(e){return iy[e??`Readme`].out}var dS=class extends gy{constructor(){super(`ReadmeMdConfigFileOutputPlugin`,{outputFileName:`README.md`,cleanup:{delete:{project:{files:[`README.md`,`CODE_OF_CONDUCT.md`,`SECURITY.md`]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{readmePrompts:n}=e.collectedOutputContext;if(n==null||n.length===0)return t;for(let e of n){let n=uS(e.fileKind),r=u.join(e.targetDir.basePath,e.targetDir.path,n);t.push({path:r,scope:`project`,source:{content:e.content}})}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};const fS=`GLOBAL.md`,pS=`.trae`,mS=`commands`,hS=`skills`;var gS=class extends gy{constructor(){super(`TraeIDEOutputPlugin`,{globalConfigDir:pS,outputFileName:fS,treatWorkspaceRootProjectAsProject:!0,indexignore:`.traeignore`,commands:{subDir:mS,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:hS},cleanup:{delete:{project:{dirs:[`.trae/rules`,`.trae/commands`,`.trae/skills`]},global:{dirs:[`.trae/steering`,`.trae/commands`,`.trae/skills`]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}getIgnoreOutputPath(){if(this.indexignore!=null)return u.join(`.trae`,`.ignore`)}getGlobalSteeringDir(){return this.joinPath(this.getGlobalConfigDir(),`steering`)}async declareOutputFiles(e){let t=[],{commands:n,skills:r,globalMemory:i,aiAgentIgnoreConfigFiles:a}=e.collectedOutputContext,o=this.getConcreteProjects(e),s=this.getProjectPromptOutputProjects(e),c=this.resolvePromptSourceProjectConfig(e),l=new Set(this.selectPromptScopes(e,[`project`,`global`])),d=n==null?{items:[]}:this.selectSingleScopeItems(n,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),f=r==null?{items:[]}:this.selectSingleScopeItems(r,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),p=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0});i!=null&&l.has(`global`)&&t.push({path:this.joinPath(this.getGlobalSteeringDir(),fS),scope:`global`,source:{kind:`globalMemory`,content:i.content}});for(let n of s){let r=this.resolveProjectRootDir(e,n);if(r!=null&&n.childMemoryPrompts!=null&&l.has(`project`))for(let i of n.childMemoryPrompts){let n=(i.workingChildDirectoryPath?.path??i.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``),a=this.buildProjectRelativeGlobPattern(n),o=this.buildMarkdownContent([this.buildPathGuardHint(n),``,i.content].join(`
288
+ `),{alwaysApply:!1,globs:a},e);t.push({path:u.join(r,pS,`rules`,this.buildSteeringFileName(i)),scope:`project`,source:{kind:`steeringRule`,content:o}})}}if(d.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectConfigDir(e,n);if(r==null)continue;let i=$(d.items,n.projectConfig,`commands`);for(let e of i)t.push({path:u.join(r,mS,this.transformCommandName(e,p)),scope:`project`,source:{kind:`command`,command:e}})}if(d.selectedScope===`global`){let e=this.getGlobalConfigDir(),n=$(d.items,c,`commands`);for(let r of n)t.push({path:u.join(e,mS,this.transformCommandName(r,p)),scope:`global`,source:{kind:`command`,command:r}})}let m=(e,n,r)=>{for(let i of r){let r=i.yamlFrontMatter.name,a=u.join(e,hS,r);if(t.push({path:u.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:i}}),i.childDocs!=null)for(let e of i.childDocs)t.push({path:u.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(i.resources!=null)for(let e of i.resources)t.push({path:u.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})}};if(f.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectConfigDir(e,t);n!=null&&m(n,`project`,$(f.items,t.projectConfig,`skills`))}f.selectedScope===`global`&&m(this.getGlobalConfigDir(),`global`,$(f.items,c,`skills`));let h=this.getIgnoreOutputPath(),g=this.indexignore==null?void 0:a?.find(e=>e.fileName===this.indexignore);if(h!=null&&g!=null)for(let e of o){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:u.join(n.basePath,n.path,h),scope:`project`,source:{kind:`ignoreFile`,content:g.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`globalMemory`:case`steeringRule`:case`skillChildDoc`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;default:throw Error(`Unsupported declaration source for ${this.name}`)}}buildSkillFrontMatter(e){let t={description:e.yamlFrontMatter.description??``};return e.yamlFrontMatter.displayName!=null&&(t.name=e.yamlFrontMatter.displayName),t}buildSteeringFileName(e){return`trae-${(e.workingChildDirectoryPath?.path??e.dir.path).replaceAll(`\\`,`/`).replaceAll(/^\/+|\/+$/g,``).replaceAll(`/`,`-`)}.md`}buildPathGuardHint(e){return e.length===0?`Scope guard: apply this rule to project source files only; do not apply to generated output directories (for example dist/, build/, out/, .next/, target/).`:[`Scope guard: this rule is for the project-root path "${e}/" only.`,`Do not apply this rule to generated output paths such as "dist/${e}/", "build/${e}/", "out/${e}/", ".next/${e}/", or "target/${e}/".`].join(`
289
+ `)}buildProjectRelativeGlobPattern(e){return e.length===0?`**/*`:`${e}/**`}};const _S=`.vscode`;var vS=class extends gy{constructor(){super(`VisualStudioCodeIDEConfigOutputPlugin`,{cleanup:{delete:{project:{files:[`.vscode/settings.json`,`.vscode/extensions.json`]}}},capabilities:{}})}async declareOutputFiles(e){let t=[],{projects:n}=e.collectedOutputContext.workspace,{vscodeConfigFiles:r}=e.collectedOutputContext,i=r??[];for(let e of n){let n=e.dirFromWorkspacePath;if(n!=null)for(let e of i){let r=this.getTargetRelativePath(e);t.push({path:this.resolvePath(n.basePath,n.path,r),scope:`project`,source:{content:e.content}})}}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}getTargetRelativePath(e){let t=e.dir.path;if(e.type!==Zm.VSCode)return this.basename(t);let n=t.indexOf(_S);return n===-1?this.joinPath(_S,this.basename(t)):t.slice(Math.max(0,n))}};const yS=`WARP.md`;var bS=class extends gy{constructor(){super(`WarpIDEOutputPlugin`,{outputFileName:yS,treatWorkspaceRootProjectAsProject:!0,indexignore:`.warpindexignore`,cleanup:{delete:{project:{files:[yS]}}},capabilities:{prompt:{scopes:[`project`,`global`],singleScope:!1}}})}async declareOutputFiles(e){let t=[],{globalMemory:n,aiAgentIgnoreConfigFiles:r}=e.collectedOutputContext,i=this.getConcreteProjects(e),a=this.getProjectPromptOutputProjects(e),o=this.shouldSkipDueToPlugin(e,yy.AgentsOutput),s=new Set(this.selectPromptScopes(e,[`project`,`global`])),c=this.extractGlobalMemoryContent(e);if(o){if(n!=null&&s.has(`global`))for(let r of a){let i=this.resolveProjectRootDir(e,r);i!=null&&t.push({path:u.join(i,yS),scope:`project`,source:{content:n.content}})}}else for(let n of a){let r=this.resolveProjectRootDir(e,n);if(r!=null){if(n.rootMemoryPrompt!=null&&s.has(`project`)){let e=this.combineGlobalWithContent(c,n.rootMemoryPrompt.content);t.push({path:u.join(r,yS),scope:`project`,source:{content:e}})}if(n.childMemoryPrompts!=null&&s.has(`project`))for(let e of n.childMemoryPrompts)t.push({path:this.resolveFullPath(e.dir),scope:`project`,source:{content:e.content}})}}let l=this.getIgnoreOutputPath(),d=this.indexignore==null?void 0:r?.find(e=>e.fileName===this.indexignore);if(l!=null&&d!=null)for(let e of i){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:this.resolvePath(n.basePath,n.path,l),scope:`project`,source:{content:d.content}})}return t}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};const xS=`.codeium/windsurf`,SS=`global_workflows`,CS=`memories`,wS=`skills`,TS=`.windsurf`;var ES=class extends gy{constructor(){super(`WindsurfOutputPlugin`,{globalConfigDir:xS,outputFileName:``,treatWorkspaceRootProjectAsProject:!0,dependsOn:[yy.AgentsOutput],indexignore:`.codeiumignore`,commands:{subDir:SS,transformFrontMatter:(e,t)=>t.sourceFrontMatter??{}},skills:{subDir:wS},rules:{sourceScopes:[`project`,`global`]},cleanup:{delete:{project:{dirs:[`.windsurf/rules`,`.windsurf/workflows`,`.windsurf/global_workflows`,`.windsurf/skills`,`.codeium/windsurf/global_workflows`,`.codeium/windsurf/skills`]},global:{dirs:[`.codeium/windsurf/global_workflows`,`.codeium/windsurf/memories`,`.codeium/windsurf/skills`]}}},capabilities:{prompt:{scopes:[`global`],singleScope:!1},rules:{scopes:[`project`,`global`],singleScope:!1},commands:{scopes:[`project`,`global`],singleScope:!0},skills:{scopes:[`project`,`global`],singleScope:!0}}})}async declareOutputFiles(e){let t=[],{commands:n,skills:r,globalMemory:i,rules:a,aiAgentIgnoreConfigFiles:o}=e.collectedOutputContext,s=this.resolvePromptSourceProjectConfig(e),c=this.getCodeiumWindsurfDir(),l=new Set(this.selectPromptScopes(e,[`global`])),d=n==null?{items:[]}:this.selectSingleScopeItems(n,this.commandsConfig.sourceScopes,e=>this.resolveCommandSourceScope(e),this.getTopicScopeOverride(e,`commands`)),f=r==null?{items:[]}:this.selectSingleScopeItems(r,this.skillsConfig.sourceScopes,e=>this.resolveSkillSourceScope(e),this.getTopicScopeOverride(e,`skills`)),p=this.getConcreteProjects(e);i!=null&&l.has(`global`)&&t.push({path:u.join(c,CS,`global_rules.md`),scope:`global`,source:{kind:`globalMemory`,content:i.content}});let m=(e,n,r)=>{let i=r.yamlFrontMatter.name,a=u.join(e,wS,i);if(t.push({path:u.join(a,`SKILL.md`),scope:n,source:{kind:`skillMain`,skill:r}}),r.childDocs!=null)for(let e of r.childDocs)t.push({path:u.join(a,e.relativePath.replace(/\.mdx$/,`.md`)),scope:n,source:{kind:`skillChildDoc`,content:e.content}});if(r.resources!=null)for(let e of r.resources)t.push({path:u.join(a,e.relativePath),scope:n,source:{kind:`skillResource`,content:e.content,encoding:e.encoding}})};if(f.selectedScope===`project`)for(let t of this.getProjectOutputProjects(e)){let n=this.resolveProjectRootDir(e,t),r=n==null?void 0:u.join(n,TS);if(r==null)continue;let i=$(f.items,t.projectConfig,`skills`);for(let e of i)m(r,`project`,e)}if(f.selectedScope===`global`){let e=$(f.items,s,`skills`);for(let t of e)m(c,`global`,t)}let h=this.getTransformOptionsFromContext(e,{includeSeriesPrefix:!0});if(d.selectedScope===`project`)for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n),i=r==null?void 0:u.join(r,TS);if(i==null)continue;let a=$(d.items,n.projectConfig,`commands`);for(let e of a)t.push({path:u.join(i,`workflows`,this.transformCommandName(e,h)),scope:`project`,source:{kind:`command`,command:e}})}if(d.selectedScope===`global`){let e=$(d.items,s,`commands`);for(let n of e)t.push({path:u.join(c,SS,this.transformCommandName(n,h)),scope:`global`,source:{kind:`command`,command:n}})}if(a!=null&&a.length>0){let n=new Set(this.selectRuleScopes(e,a)),r=a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`global`);if(n.has(`global`))for(let e of r)t.push({path:u.join(c,CS,this.buildRuleFileName(e)),scope:`global`,source:{kind:`rule`,rule:e}});if(n.has(`project`))for(let n of this.getProjectOutputProjects(e)){let r=this.resolveProjectRootDir(e,n);if(r==null)continue;let i=xv($(a.filter(e=>this.normalizeSourceScope(this.normalizeRuleScope(e))===`project`),n.projectConfig,`rules`),n.projectConfig);for(let e of i)t.push({path:u.join(r,TS,`rules`,this.buildRuleFileName(e)),scope:`project`,source:{kind:`rule`,rule:e}})}}let g=this.getIgnoreOutputPath(),_=this.indexignore==null?void 0:o?.find(e=>e.fileName===this.indexignore);if(g!=null&&_!=null)for(let e of p){let n=e.dirFromWorkspacePath;n==null||e.isPromptSourceProject===!0||t.push({path:u.join(n.basePath,n.path,g),scope:`project`,source:{kind:`ignoreFile`,content:_.content}})}return t}async convertContent(e,t){let n=e.source;switch(n.kind){case`globalMemory`:case`skillChildDoc`:case`ignoreFile`:return n.content;case`command`:return this.buildCommandContent(n.command,t);case`skillMain`:{let e=this.buildSkillFrontMatter(n.skill);return this.buildMarkdownContent(n.skill.content,e,t)}case`skillResource`:return n.encoding===`base64`?g.Buffer.from(n.content,`base64`):n.content;case`rule`:return this.buildRuleContent(n.rule,t);default:throw Error(`Unsupported declaration source for ${this.name}`)}}getCodeiumWindsurfDir(){return u.join(this.getHomeDir(),xS)}buildRuleFileName(e,t=`rule-`){return`${t}${e.prefix}-${e.ruleName}.md`}buildRuleContent(e,t){let n={trigger:`glob`,globs:e.globs.length>0?e.globs.join(`, `):``};return this.buildMarkdownContent(e.content,n,t).split(`
176
290
  `).map(e=>{let t=/^(\s*globs:\s*)(['"])(.*)\2\s*$/.exec(e);if(t==null)return e;let n=t[1]??`globs: `,r=t[3]??``;return r.trim().length===0?e:`${n}${r}`}).join(`
177
- `)}},Jb=class extends Wm{constructor(){super(`MarkdownWhitespaceCleanupEffectInputCapability`),this.registerEffect(`markdown-whitespace-cleanup`,this.cleanupWhitespace.bind(this),30)}async cleanupWhitespace(e){let{fs:t,path:n,aindexDir:r,dryRun:i,logger:a}=e,o=[],s=[],c=[],l=[n.join(r,`src`),n.join(r,`app`),n.join(r,`dist`)];for(let n of l){if(!t.existsSync(n)){a.debug({action:`whitespace-cleanup`,message:`Directory does not exist, skipping`,dir:n});continue}this.processDirectory(e,n,o,s,c,i??!1)}let u=c.length>0;return{success:!u,description:i?`Would modify ${o.length} files, skip ${s.length} files`:`Modified ${o.length} files, skipped ${s.length} files`,modifiedFiles:o,skippedFiles:s,...u&&{error:Error(`${c.length} errors occurred during cleanup`)}}}processDirectory(e,t,n,r,i,a){let{fs:o,path:s,logger:c}=e,l;try{l=o.readdirSync(t,{withFileTypes:!0})}catch(e){i.push({path:t,error:e}),c.warn(D({code:`WHITESPACE_CLEANUP_DIRECTORY_READ_FAILED`,title:`Whitespace cleanup could not read a directory`,operation:`read`,targetKind:`cleanup directory`,path:t,error:e}));return}for(let o of l){let c=s.join(t,o.name);o.isDirectory()?this.processDirectory(e,c,n,r,i,a):o.isFile()&&o.name.endsWith(`.md`)&&this.processMarkdownFile(e,c,n,r,i,a)}}processMarkdownFile(e,t,n,r,i,a){let{fs:o,logger:s}=e;try{let e=o.readFileSync(t,`utf8`),i=this.cleanMarkdownContent(e);if(e===i){r.push(t),s.debug({action:`whitespace-cleanup`,skipped:t,reason:`no changes needed`});return}a?(s.debug({action:`whitespace-cleanup`,dryRun:!0,wouldModify:t}),n.push(t)):(o.writeFileSync(t,i,`utf8`),n.push(t),s.debug({action:`whitespace-cleanup`,modified:t}))}catch(e){i.push({path:t,error:e}),s.warn(D({code:`WHITESPACE_CLEANUP_FILE_PROCESS_FAILED`,title:`Whitespace cleanup could not process a markdown file`,operation:`process`,targetKind:`markdown file`,path:t,error:e}))}}cleanMarkdownContent(e){let t=this.detectLineEnding(e),n=e.split(/\r?\n/).map(e=>e.replace(/[ \t]+$/,``)),r=[],i=0;for(let e of n)e===``?(i++,i<=2&&r.push(e)):(i=0,r.push(e));return r.join(t)}detectLineEnding(e){return e.includes(`\r
291
+ `)}},DS=class extends Xh{constructor(){super(`MarkdownWhitespaceCleanupEffectInputCapability`),this.registerEffect(`markdown-whitespace-cleanup`,this.cleanupWhitespace.bind(this),30)}async cleanupWhitespace(e){let{fs:t,path:n,aindexDir:r,dryRun:i,logger:a}=e,o=[],s=[],c=[],l=[n.join(r,`src`),n.join(r,`app`),n.join(r,`dist`)];for(let n of l){if(!t.existsSync(n)){a.debug({action:`whitespace-cleanup`,message:`Directory does not exist, skipping`,dir:n});continue}this.processDirectory(e,n,o,s,c,i??!1)}let u=c.length>0;return{success:!u,description:i?`Would modify ${o.length} files, skip ${s.length} files`:`Modified ${o.length} files, skipped ${s.length} files`,modifiedFiles:o,skippedFiles:s,...u&&{error:Error(`${c.length} errors occurred during cleanup`)}}}processDirectory(e,t,n,r,i,a){let{fs:o,path:s,logger:c}=e,l;try{l=o.readdirSync(t,{withFileTypes:!0})}catch(e){i.push({path:t,error:e}),c.warn(E({code:`WHITESPACE_CLEANUP_DIRECTORY_READ_FAILED`,title:`Whitespace cleanup could not read a directory`,operation:`read`,targetKind:`cleanup directory`,path:t,error:e}));return}for(let o of l){let c=s.join(t,o.name);o.isDirectory()?this.processDirectory(e,c,n,r,i,a):o.isFile()&&o.name.endsWith(`.md`)&&this.processMarkdownFile(e,c,n,r,i,a)}}processMarkdownFile(e,t,n,r,i,a){let{fs:o,logger:s}=e;try{let e=o.readFileSync(t,`utf8`),i=this.cleanMarkdownContent(e);if(e===i){r.push(t),s.debug({action:`whitespace-cleanup`,skipped:t,reason:`no changes needed`});return}a?(s.debug({action:`whitespace-cleanup`,dryRun:!0,wouldModify:t}),n.push(t)):(o.writeFileSync(t,i,`utf8`),n.push(t),s.debug({action:`whitespace-cleanup`,modified:t}))}catch(e){i.push({path:t,error:e}),s.warn(E({code:`WHITESPACE_CLEANUP_FILE_PROCESS_FAILED`,title:`Whitespace cleanup could not process a markdown file`,operation:`process`,targetKind:`markdown file`,path:t,error:e}))}}cleanMarkdownContent(e){let t=this.detectLineEnding(e),n=e.split(/\r?\n/).map(e=>e.replace(/[ \t]+$/,``)),r=[],i=0;for(let e of n)e===``?(i++,i<=2&&r.push(e)):(i=0,r.push(e));return r.join(t)}detectLineEnding(e){return e.includes(`\r
178
292
  `)?`\r
179
293
  `:`
180
- `}collect(e){return{}}};const Yb=[`skills`,`commands`,`agents`,`app`];var Xb=class extends Wm{constructor(){super(`OrphanFileCleanupEffectInputCapability`),this.registerEffect(`orphan-file-cleanup`,this.cleanupOrphanFiles.bind(this),20)}buildProtectedDeletionGuard(e){return Lm({workspaceDir:e.workspaceDir,aindexDir:e.aindexDir,rules:[...Pm(e.userConfigOptions,e.aindexDir,{workspaceDir:e.workspaceDir}),...(e.userConfigOptions.cleanupProtection?.rules??[]).map(e=>({path:e.path,protectionMode:e.protectionMode,reason:e.reason??`configured cleanup protection rule`,source:`configured-cleanup-protection`,matcher:e.matcher??`path`}))]})}buildDeletionPlan(e,t,n){let r=[],i=[],a=[];for(let o of Yb){let s=e.path.join(t,o);e.fs.existsSync(s)&&e.fs.statSync(s).isDirectory()&&this.collectDirectoryPlan(e,s,o,n[o],r,i,a)}return{filesToDelete:r,dirsToDelete:i,errors:a}}async cleanupOrphanFiles(e){let{fs:t,path:n,aindexDir:r,logger:i,userConfigOptions:a,dryRun:o}=e,s=n.join(r,`dist`);if(!t.existsSync(s))return i.debug({action:`orphan-cleanup`,message:`dist/ directory does not exist, skipping`,distDir:s}),{success:!0,description:`dist/ directory does not exist, nothing to clean`,deletedFiles:[],deletedDirs:[]};let c=a.aindex,l={skills:c?.skills?.src??`skills`,commands:c?.commands?.src??`commands`,agents:c?.subAgents?.src??`subagents`,app:c?.app?.src??`app`},u=this.buildDeletionPlan(e,s,l),d=this.buildProtectedDeletionGuard(e),f=Vm(u.filesToDelete,d),p=Vm(u.dirsToDelete,d),m=[...f.violations,...p.violations].sort((e,t)=>e.targetPath.localeCompare(t.targetPath));if(m.length>0)return{success:!1,description:`Protected deletion guard blocked orphan cleanup for ${m.length} path(s)`,deletedFiles:[],deletedDirs:[],error:new lm(`orphan-file-cleanup`,m)};if(o)return{success:!0,description:`Would delete ${f.safePaths.length} files and ${p.safePaths.length} directories`,deletedFiles:[...f.safePaths],deletedDirs:[...p.safePaths].sort((e,t)=>t.length-e.length)};let h=[],g=[],_=[...u.errors];for(let e of f.safePaths)try{t.unlinkSync(e),h.push(e),i.debug({action:`orphan-cleanup`,deleted:e})}catch(t){_.push({path:e,error:t}),i.warn(D({code:`ORPHAN_CLEANUP_FILE_DELETE_FAILED`,title:`Orphan cleanup could not delete a file`,operation:`delete`,targetKind:`orphan file`,path:e,error:t}))}for(let e of[...p.safePaths].sort((e,t)=>t.length-e.length))try{t.rmdirSync(e),g.push(e),i.debug({action:`orphan-cleanup`,deletedDir:e})}catch(t){_.push({path:e,error:t}),i.warn(D({code:`ORPHAN_CLEANUP_DIRECTORY_DELETE_FAILED`,title:`Orphan cleanup could not delete a directory`,operation:`delete`,targetKind:`orphan directory`,path:e,error:t}))}let v=_.length>0;return{success:!v,description:`Deleted ${h.length} files and ${g.length} directories`,deletedFiles:h,deletedDirs:g,...v&&{error:Error(`${_.length} errors occurred during cleanup`)}}}collectDirectoryPlan(e,t,n,r,i,a,o){let{fs:s,path:c,aindexDir:l,logger:u}=e,d;try{d=s.readdirSync(t,{withFileTypes:!0})}catch(e){return o.push({path:t,error:e}),u.warn(D({code:`ORPHAN_CLEANUP_DIRECTORY_READ_FAILED`,title:`Orphan cleanup could not read a directory`,operation:`read`,targetKind:`dist cleanup directory`,path:t,error:e})),!1}let f=!1;for(let s of d){let u=c.join(t,s.name);if(s.isDirectory()){this.collectDirectoryPlan(e,u,n,r,i,a,o)?a.push(u):f=!0;continue}if(!s.isFile()){f=!0;continue}this.isOrphanFile(e,u,n,r,l)?i.push(u):f=!0}return!f}isOrphanFile(e,t,n,r,i){let{fs:a,path:o}=e,s=o.basename(t),c=s.endsWith(`.mdx`),l=o.join(i,`dist`,n),u=o.relative(l,t),d=o.dirname(u),f=s.replace(/\.mdx$/,``);return c?!this.getPossibleSourcePaths(o,i,n,r,f,d).some(e=>a.existsSync(e)):!a.existsSync(o.join(i,r,u))}getPossibleSourcePaths(e,t,n,r,i,a){switch(n){case`skills`:{let n=(a===`.`?[i]:a.split(e.sep))[0]??i,o=a===`.`?``:a.slice(n.length+1);return o===``?[...W_.map(i=>e.join(t,r,n,`SKILL${i}`)),...W_.map(i=>e.join(t,r,n,`skill${i}`))]:W_.map(a=>e.join(t,r,n,o,`${i}${a}`))}case`commands`:case`agents`:case`app`:return a===`.`?W_.map(n=>e.join(t,r,`${i}${n}`)):W_.map(n=>e.join(t,r,a,`${i}${n}`));default:return[]}}collect(e){return{}}},Zb=class extends Wm{constructor(){super(`SkillDistCleanupEffectInputCapability`),this.registerEffect(`skill-dist-cleanup`,this.cleanupDistSkillArtifacts.bind(this),10)}async cleanupDistSkillArtifacts(e){let{fs:t,logger:n,userConfigOptions:r,aindexDir:i,dryRun:a}=e,o=this.resolveAindexPath(r.aindex.skills.src,i),s=this.resolveAindexPath(r.aindex.skills.dist,i);if(!t.existsSync(s))return n.debug({action:`skill-dist-cleanup`,message:`dist skills directory does not exist, skipping`,srcSkillsDir:o,distSkillsDir:s}),{success:!0,description:`dist skills directory does not exist, nothing to clean`,deletedFiles:[],deletedDirs:[]};let c=this.buildCleanupPlan(e,s);if(a)return{success:!0,description:`Would delete ${c.filesToDelete.length} files and ${c.dirsToDelete.length} directories`,deletedFiles:[...c.filesToDelete],deletedDirs:[...c.dirsToDelete].sort((e,t)=>t.length-e.length)};let l=[],u=[],d=[...c.errors];for(let e of c.filesToDelete)try{t.unlinkSync(e),l.push(e),n.debug({action:`skill-dist-cleanup`,deleted:e})}catch(t){d.push({path:e,error:t}),n.warn(D({code:`SKILL_DIST_CLEANUP_FILE_DELETE_FAILED`,title:`Skill dist cleanup could not delete a file`,operation:`delete`,targetKind:`skill dist file`,path:e,error:t}))}for(let e of[...c.dirsToDelete].sort((e,t)=>t.length-e.length))try{t.rmdirSync(e),u.push(e),n.debug({action:`skill-dist-cleanup`,deletedDir:e})}catch(t){d.push({path:e,error:t}),n.warn(D({code:`SKILL_DIST_CLEANUP_DIRECTORY_DELETE_FAILED`,title:`Skill dist cleanup could not delete a directory`,operation:`delete`,targetKind:`skill dist directory`,path:e,error:t}))}let f=d.length>0;return{success:!f,description:`Deleted ${l.length} files and ${u.length} directories`,deletedFiles:l,deletedDirs:u,...f&&{error:Error(`${d.length} errors occurred during cleanup`)}}}buildCleanupPlan(e,t){let n=[],r=[],i=[];return this.collectCleanupPlan(e,t,n,r,i),{filesToDelete:n,dirsToDelete:r,errors:i}}collectCleanupPlan(e,t,n,r,i){let{fs:a,path:o,logger:s}=e,c;try{c=a.readdirSync(t,{withFileTypes:!0})}catch(e){return i.push({path:t,error:e}),s.warn(D({code:`SKILL_DIST_CLEANUP_DIRECTORY_READ_FAILED`,title:`Skill dist cleanup could not read a directory`,operation:`read`,targetKind:`skill dist directory`,path:t,error:e})),!1}let l=!1;for(let a of c){let s=o.join(t,a.name);if(a.isDirectory()){this.collectCleanupPlan(e,s,n,r,i)?r.push(s):l=!0;continue}if(!a.isFile()){l=!0;continue}if(this.shouldRetainCompiledSkillFile(a.name)){l=!0;continue}n.push(s)}return!l}shouldRetainCompiledSkillFile(e){return e.endsWith(`.mdx`)&&!K_(e)}collect(e){return{}}};const Qb=/export\s+default\s*\{([\s\S]*?)\}/u,$b=/description\s*:\s*['"`]([^'"`]+)['"`]/u,ex=/name\s*:\s*['"`]([^'"`]+)['"`]/u,tx=/displayName\s*:\s*['"`]([^'"`]+)['"`]/u,nx=/keywords\s*:\s*\[([^\]]+)\]/u,rx=/author\s*:\s*['"`]([^'"`]+)['"`]/u,ix=/version\s*:\s*['"`]([^'"`]+)['"`]/u;function ax(e){let t={},n=Qb.exec(e);if(n?.[1]==null)return t;let r=n[1],i=$b.exec(r);i?.[1]!=null&&(t.description=i[1]);let a=ex.exec(r);a?.[1]!=null&&(t.name=a[1]);let o=tx.exec(r);o?.[1]!=null&&(t.displayName=o[1]);let s=nx.exec(r);s?.[1]!=null&&(t.keywords=s[1].split(`,`).map(e=>e.trim().replaceAll(/['"]/gu,``)).filter(e=>e.length>0));let c=rx.exec(r);c?.[1]!=null&&(t.author=c[1]);let l=ix.exec(r);return l?.[1]!=null&&(t.version=l[1]),t}function ox(...e){let t={};for(let n of e)if(n!=null)for(let[e,r]of Object.entries(n))r!==void 0&&(t[e]=r);return t}const sx={".ts":`text/typescript`,".tsx":`text/typescript`,".js":`text/javascript`,".jsx":`text/javascript`,".json":`application/json`,".py":`text/x-python`,".java":`text/x-java`,".kt":`text/x-kotlin`,".go":`text/x-go`,".rs":`text/x-rust`,".c":`text/x-c`,".cpp":`text/x-c++`,".cs":`text/x-csharp`,".rb":`text/x-ruby`,".php":`text/x-php`,".swift":`text/x-swift`,".scala":`text/x-scala`,".sql":`application/sql`,".xml":`application/xml`,".yaml":`text/yaml`,".yml":`text/yaml`,".toml":`text/toml`,".csv":`text/csv`,".graphql":`application/graphql`,".txt":`text/plain`,".pdf":`application/pdf`,".docx":`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,".xlsx":`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,".html":`text/html`,".css":`text/css`,".svg":`image/svg+xml`,".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".webp":`image/webp`,".ico":`image/x-icon`,".bmp":`image/bmp`},cx=new Set(`.png,.jpg,.jpeg,.gif,.webp,.ico,.bmp,.tiff,.svg,.exe,.dll,.so,.dylib,.bin,.wasm,.class,.jar,.war,.pyd,.pyc,.pyo,.zip,.tar,.gz,.bz2,.7z,.rar,.ttf,.otf,.woff,.woff2,.eot,.db,.sqlite,.sqlite3,.pdf,.docx,.doc,.xlsx,.xls,.pptx,.ppt,.odt,.ods,.odp`.split(`,`));function lx(e){return cx.has(e.toLowerCase())}function ux(e){return sx[e.toLowerCase()]}function dx(...e){return d.join(...e).replaceAll(`\\`,`/`)}var fx=class{ctx;constructor(e){this.ctx=e}async processDirectory(e,t,n){let r=t?`${t}/${e.name}`:e.name;return this.scanSkillDirectoryAsync(n,r)}async processFile(e,t,n){let r=t?`${t}/${e.name}`:e.name;if(this.ctx.scanMode===`distChildDocs`){if(t===``&&e.name===`skill.mdx`||K_(e.name)||!e.name.endsWith(`.mdx`))return{childDocs:[],resources:[]};let i=await this.processChildDoc(r,n);return{childDocs:i?[i]:[],resources:[]}}if(t===``&&e.name===`mcp.json`||K_(e.name)||e.name.endsWith(`.mdx`))return{childDocs:[],resources:[]};let i=this.processResourceFile(e.name,r,n);return{childDocs:[],resources:i?[i]:[]}}async processChildDoc(e,t){try{let n=this.ctx.fs.readFileSync(t,`utf8`),r=hf(n),i=gf((await Eg(n,{globalScope:this.ctx.globalScope,extractMetadata:!0,basePath:d.dirname(t),filePath:t})).content);return ev(i,t),{type:Wp.SkillChildDoc,content:i,length:i.length,filePathKind:Q.Relative,markdownAst:r.markdownAst,markdownContents:r.markdownContents,...r.rawFrontMatter!=null&&{rawFrontMatter:r.rawFrontMatter},relativePath:e,dir:{pathKind:Q.Relative,path:e,basePath:this.ctx.skillDir,getDirectoryName:()=>d.dirname(e),getAbsolutePath:()=>t}}}catch(n){throw this.ctx.logger.error(A({code:`SKILL_CHILD_DOC_COMPILE_FAILED`,title:`Failed to compile skill child doc`,diagnosticText:rv(n,{operation:`Failed to compile skill child doc.`,promptKind:`skill-child-doc`,logicalName:`${d.basename(this.ctx.skillDir)}/${e.replace(/\.mdx$/u,``)}`,distPath:t,srcPath:tv(d,t,{distRootDir:this.ctx.skillDir,srcRootDir:this.ctx.sourceSkillDir})}),details:{skillDir:this.ctx.skillDir,relativePath:e,filePath:t}})),n}}processResourceFile(e,t,n){let r=d.extname(e);try{let{content:i,encoding:a,length:o}=this.readFileContent(n,r),s=ux(r);return{type:Wp.SkillResource,extension:r,fileName:e,relativePath:t,sourcePath:n,content:i,encoding:a,length:o,...s!=null&&{mimeType:s}}}catch(r){return this.ctx.logger.warn(D({code:`SKILL_RESOURCE_READ_FAILED`,title:`Failed to read skill resource file`,operation:`read`,targetKind:`skill resource file`,path:n,error:r,details:{relativePath:t,fileName:e,skillDir:this.ctx.skillDir}})),null}}readFileContent(e,t){if(lx(t)){let t=this.ctx.fs.readFileSync(e);return{content:t.toString(`base64`),encoding:`base64`,length:t.length}}let n=this.ctx.fs.readFileSync(e,`utf8`);return{content:n,encoding:`text`,length:v.Buffer.from(n,`utf8`).length}}async scanSkillDirectoryAsync(e,t=``){let n=[],r=[],i;try{i=this.ctx.fs.readdirSync(e,{withFileTypes:!0})}catch(t){return this.ctx.logger.warn(D({code:`SKILL_DIRECTORY_SCAN_FAILED`,title:`Failed to scan skill directory`,operation:`scan`,targetKind:`skill directory`,path:e,error:t,details:{skillDir:this.ctx.skillDir,scanMode:this.ctx.scanMode}})),{childDocs:n,resources:r}}for(let a of i){let i=dx(e,a.name);if(a.isDirectory()){let e=await this.processDirectory(a,t,i);n.push(...e.childDocs),r.push(...e.resources);continue}if(!a.isFile())continue;let o=await this.processFile(a,t,i);n.push(...o.childDocs),r.push(...o.resources)}return{childDocs:n,resources:r}}};function px(e,t,n,r=``){let i=[],a=r===``?e:dx(e,r),o;try{o=t.readdirSync(a,{withFileTypes:!0})}catch(e){return n.warn(D({code:`SKILL_SOURCE_CHILD_SCAN_FAILED`,title:`Failed to scan skill source child docs`,operation:`scan`,targetKind:`skill source child doc directory`,path:a,error:e})),i}for(let a of o){let o=r?`${r}/${a.name}`:a.name;if(a.isDirectory()){i.push(...px(e,t,n,o));continue}!a.isFile()||!K_(a.name)||r===``&&a.name===`skill.src.mdx`||i.push(o.replace(/\.src\.mdx$/u,`.mdx`))}return i}function mx(e,t,n,r,i){if(r.existsSync(t))for(let a of px(t,r,i)){let i=d.join(n,a);if(!r.existsSync(i))throw new X_({kind:`skill child doc`,name:`${e}/${a}`,sourcePath:d.join(t,a.replace(/\.mdx$/u,`.src.mdx`)),expectedDistPath:i})}}function hx(e,t,n){let r=d.join(e,`mcp.json`);if(t.existsSync(r)){if(!t.statSync(r).isFile()){n.warn(te({code:`SKILL_MCP_CONFIG_NOT_FILE`,title:`Skill MCP config path is not a file`,path:r,expectedKind:`mcp.json file`,actualState:`path exists but is not a regular file`,details:{skillDir:e}}));return}try{let i=t.readFileSync(r,`utf8`),a=JSON.parse(i);if(a.mcpServers==null||typeof a.mcpServers!=`object`){n.warn(O({code:`SKILL_MCP_CONFIG_INVALID`,title:`Skill MCP config is missing mcpServers`,reason:x(`The skill MCP config at "${r}" does not contain a top-level mcpServers object.`),configPath:r,exactFix:x("Add a top-level `mcpServers` object to mcp.json before retrying tnmsc."),details:{skillDir:e}}));return}return{type:Wp.SkillMcpConfig,mcpServers:a.mcpServers,rawContent:i}}catch(t){n.warn(O({code:`SKILL_MCP_CONFIG_PARSE_FAILED`,title:`Failed to parse skill MCP config`,reason:x(`tnmsc could not parse the MCP config file at "${r}".`,`Underlying error: ${t instanceof Error?t.message:String(t)}`),configPath:r,exactFix:x(`Fix the JSON syntax in mcp.json and rerun tnmsc.`),details:{skillDir:e,errorMessage:t instanceof Error?t.message:String(t)}}));return}}}async function gx(e,t,n,r,i,a,o,s=[],c=[],l,u){let{logger:f,globalScope:p,fs:m}=a,h=d.join(i,`skill.mdx`),g=e,_,v;if(m.existsSync(h)){g=m.readFileSync(h,`utf8`),_=hf(g);let t=await Eg(g,{globalScope:p,extractMetadata:!0,basePath:i,filePath:h});e=gf(t.content),ev(e,h),v=t.metadata.fields}let y=ox(ax(g),u,v),b=_?.yamlFrontMatter?.description??y?.description;if(b==null||b.trim().length===0)throw f.error(w({code:`SKILL_VALIDATION_FAILED`,title:`Skill description is required`,rootCause:x(`The skill "${n}" does not provide a non-empty description in its compiled metadata or front matter.`),exactFix:x(`Add a non-empty description field to the skill front matter or exported metadata and rebuild the skill.`),possibleFixes:[x("Set `description` in `SKILL.md` front matter."),x(`If you export metadata from code, ensure the exported description is non-empty.`)],details:{skill:n,skillDir:r,yamlDescription:_?.yamlFrontMatter?.description,exportDescription:y?.description}})),Error(`Skill "${n}" validation failed: description is required and cannot be empty`);let S={...y,..._?.yamlFrontMatter??{},name:n,description:b},C=b_(S,h);if(!C.valid)throw Error(C.errors.join(`
181
- `));return{type:Wp.Skill,content:e,length:e.length,filePathKind:Q.Relative,yamlFrontMatter:S,markdownAst:_?.markdownAst,markdownContents:_?.markdownContents??[],dir:{pathKind:Q.Relative,path:n,basePath:r,getDirectoryName:()=>n,getAbsolutePath:()=>d.join(r,n)},..._?.rawFrontMatter!=null&&{rawFrontMatter:_.rawFrontMatter},...o!=null&&{mcpConfig:o},...s!=null&&s.length>0&&{childDocs:s},...c!=null&&c.length>0&&{resources:c},...l!=null&&{seriName:l}}}var _x=class extends Wm{constructor(){super(`SkillInputCapability`)}readMcpConfig(e,t,n){return hx(e,t,n)}async scanSkillDirectory(e,t,n,r=``,i=`srcResources`,a,o){return new fx({fs:t,logger:n,skillDir:e,scanMode:i,...a!=null&&{globalScope:a},...o!=null&&{sourceSkillDir:o}}).scanSkillDirectoryAsync(e,r)}async collect(e){let{userConfigOptions:t,logger:n,fs:r,path:i,globalScope:a}=e,{aindexDir:o}=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.skills.src,o),c=this.resolveAindexPath(t.aindex.skills.dist,o),l=[],u=ov(r,i,n,a),d=new Map,f=async e=>{let t=d.get(e);if(t!=null)return t;let o=i.join(s,e),l=i.join(c,e),u=r.existsSync(l)?(await this.scanSkillDirectory(l,r,n,``,`distChildDocs`,a,o)).childDocs:[],f=r.existsSync(o)?(await this.scanSkillDirectory(o,r,n,``,`srcResources`,a)).resources:[],p=hx(o,r,n);mx(e,o,l,r,n);let m={childDocs:u,resources:f,...p!=null&&{mcpConfig:p}};return d.set(e,m),m},{prompts:p,errors:m}=await u.readDirectoryStructure(s,c,{kind:Wp.Skill,entryFileName:`skill`,localeExtensions:G_,isDirectoryStructure:!0,createPrompt:async(t,n,r,a)=>{let o=i.join(c,r),{childDocs:s,resources:l,mcpConfig:u}=await f(r);return gx(t,n,r,c,o,e,u,s,l,void 0,a)}});for(let e of m)n.warn(D({code:`SKILL_PROMPT_READ_FAILED`,title:`Failed to read skill prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`skill prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(m.length>0)throw Error(m.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
182
- `));for(let e of p){let t=e.dist?.prompt;t!=null&&l.push(t)}return{skills:l}}},vx=class e extends Wm{static projectConfigFileName=`project.json5`;constructor(){super(`AindexInputCapability`)}loadProjectConfig(t,n,r,i,a,o){let s=a.join(n,r,t,e.projectConfigFileName);if(i.existsSync(s))try{let n=i.readFileSync(s,`utf8`);try{return b.default.parse(n)}catch(n){o.warn(O({code:`AINDEX_PROJECT_JSON5_INVALID`,title:`Failed to parse ${e.projectConfigFileName} for ${t}`,reason:x(`tnmsc could not parse the ${e.projectConfigFileName} file for "${t}".`,`Underlying error: ${n instanceof Error?n.message:String(n)}`),configPath:s,exactFix:x(`Fix the JSON5 syntax in ${e.projectConfigFileName} and rerun tnmsc.`),details:{projectName:t,errorMessage:n instanceof Error?n.message:String(n)}}));return}}catch(n){o.warn(O({code:`AINDEX_PROJECT_JSON5_READ_FAILED`,title:`Failed to load ${e.projectConfigFileName} for ${t}`,reason:x(`tnmsc could not read the ${e.projectConfigFileName} file for "${t}".`,`Underlying error: ${n instanceof Error?n.message:String(n)}`),configPath:s,exactFix:x(`Ensure ${e.projectConfigFileName} exists, is readable, and contains valid JSON5.`),details:{projectName:t,errorMessage:n instanceof Error?n.message:String(n)}}));return}}collect(e){let{userConfigOptions:t,logger:n,fs:r,path:i}=e,{workspaceDir:a,aindexDir:o}=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.app.dist,o),c=i.basename(o),l=[];if(r.existsSync(s)&&r.statSync(s).isDirectory())try{let e=r.readdirSync(s,{withFileTypes:!0});for(let s of e)if(s.isDirectory()){let e=s.name===c,u=this.loadProjectConfig(s.name,o,t.aindex.app.src,r,i,n);l.push({name:s.name,...e&&{isPromptSourceProject:!0},...u!=null&&{projectConfig:u},dirFromWorkspacePath:{pathKind:Q.Relative,path:s.name,basePath:a,getDirectoryName:()=>s.name,getAbsolutePath:()=>i.resolve(a,s.name)}})}}catch(e){n.error(D({code:`AINDEX_PROJECT_DIRECTORY_SCAN_FAILED`,title:`Failed to scan aindex projects directory`,operation:`scan`,targetKind:`aindex projects directory`,path:s,error:e}))}if(l.length===0&&r.existsSync(a)&&r.statSync(a).isDirectory()){n.debug(`no projects in dist/app/, falling back to workspace scan`,{workspaceDir:a});try{let e=r.readdirSync(a,{withFileTypes:!0});for(let s of e)if(s.isDirectory()&&!s.name.startsWith(`.`)){let e=s.name===c,u=this.loadProjectConfig(s.name,o,t.aindex.app.src,r,i,n);l.push({name:s.name,...e&&{isPromptSourceProject:!0},...u!=null&&{projectConfig:u},dirFromWorkspacePath:{pathKind:Q.Relative,path:s.name,basePath:a,getDirectoryName:()=>s.name,getAbsolutePath:()=>i.resolve(a,s.name)}})}}catch(e){n.error(D({code:`WORKSPACE_DIRECTORY_SCAN_FAILED`,title:`Failed to scan workspace directory`,operation:`scan`,targetKind:`workspace directory`,path:a,error:e}))}}return{workspace:{directory:{pathKind:Q.Absolute,path:a,getDirectoryName:()=>i.basename(a)},projects:l}}}},yx=class extends Wm{constructor(){super(`CommandInputCapability`)}createCommandPrompt(e,t,n,r,i,a){let{path:o}=i,s=n.replaceAll(`\\`,`/`),c=s.indexOf(`/`),l=c===-1?void 0:s.slice(0,c),u=(c===-1?s:s.slice(c+1)).replace(/\.mdx$/,``),d=u.indexOf(`_`),f=l??(d===-1?void 0:u.slice(0,Math.max(0,d))),p=l!=null||d===-1?u:u.slice(Math.max(0,d+1)),m=o.join(r,`${n}.mdx`),h=`${n}.mdx`,g=a,_={type:Wp.Command,content:e,length:e.length,filePathKind:Q.Relative,dir:{pathKind:Q.Relative,path:h,basePath:r,getDirectoryName:()=>h.replace(/\.mdx$/,``),getAbsolutePath:()=>m},...f!=null&&{commandPrefix:f},commandName:p};if(g==null)return _;let v=x_(g,m);if(!v.valid)throw Error(v.errors.join(`
183
- `));return Object.assign(_,{yamlFrontMatter:g}),g.seriName!=null&&Object.assign(_,{seriName:g.seriName}),g.scope===`global`&&Object.assign(_,{globalOnly:!0}),_}async collect(e){let{userConfigOptions:t,logger:n,path:r,fs:i,globalScope:a}=e,o=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.commands.src,o.aindexDir),c=this.resolveAindexPath(t.aindex.commands.dist,o.aindexDir);n.debug(`CommandInputCapability collecting`,{srcDir:s,distDir:c,aindexDir:o.aindexDir});let{prompts:l,errors:u}=await ov(i,r,n,a).readFlatFiles(s,c,{kind:Wp.Command,localeExtensions:G_,isDirectoryStructure:!1,createPrompt:(t,n,r,i)=>this.createCommandPrompt(t,n,r,c,e,i)});n.debug(`CommandInputCapability read complete`,{commandCount:l.length,errorCount:u.length});for(let e of u)n.warn(D({code:`COMMAND_PROMPT_READ_FAILED`,title:`Failed to read command prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`command prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(u.length>0)throw Error(u.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
184
- `));let d=[];for(let e of l){let t=e.dist;if(t?.prompt==null)continue;let{prompt:n,rawMdx:r}=t;d.push(r==null?n:{...n,rawMdxContent:r})}return n.debug(`CommandInputCapability flattened commands`,{count:d.length,commands:d.map(e=>e.commandName)}),{commands:d}}},bx=class extends Wm{constructor(){super(`EditorConfigInputCapability`)}collect(e){let{userConfigOptions:t,fs:n}=e,{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(t),a=[],o=cm(Gp.EditorConfig,`.editorconfig`,i,n,{command:e.runtimeCommand,workspaceDir:r});return o!=null&&a.push(o),{editorConfigFiles:a}}},xx=class extends Wm{constructor(){super(`GitExcludeInputCapability`)}collect(e){let{workspaceDir:t,aindexDir:n}=this.resolveBasePaths(e.userConfigOptions),r=om(n,Yp,{command:e.runtimeCommand,workspaceDir:t});if(!e.fs.existsSync(r))return this.log.debug({action:`collect`,message:`File not found`,path:r}),{};let i=e.fs.readFileSync(r,`utf8`);return i.length===0?(this.log.debug({action:`collect`,message:`File is empty`,path:r}),{}):(this.log.debug({action:`collect`,message:`Loaded file content`,path:r,length:i.length}),{shadowGitExclude:i})}},Sx=class extends Wm{constructor(){super(`GitIgnoreInputCapability`)}collect(e){let{workspaceDir:t,aindexDir:n}=this.resolveBasePaths(e.userConfigOptions),r=om(n,Jp,{command:e.runtimeCommand,workspaceDir:t});if(!e.fs.existsSync(r))return this.log.debug({action:`collect`,message:`File not found`,path:r}),{};let i=e.fs.readFileSync(r,`utf8`);return i.length===0?(this.log.debug({action:`collect`,message:`File is empty`,path:r}),{}):(this.log.debug({action:`collect`,message:`Loaded file content`,path:r,length:i.length}),{globalGitIgnore:i})}},Cx=class extends Wm{constructor(){super(`GlobalMemoryInputCapability`)}async collect(e){let{userConfigOptions:t,fs:n,path:r,globalScope:i}=e,{aindexDir:a}=this.resolveBasePaths(t),o=this.resolveAindexPath(t.aindex.globalPrompt.dist,a);if(!n.existsSync(o))return this.log.warn(te({code:`GLOBAL_MEMORY_PROMPT_MISSING`,title:`Global memory prompt is missing`,path:o,expectedKind:`compiled global memory prompt file`,actualState:`path does not exist`})),{};if(!n.statSync(o).isFile())return this.log.warn(te({code:`GLOBAL_MEMORY_PROMPT_NOT_FILE`,title:`Global memory prompt path is not a file`,path:o,expectedKind:`compiled global memory prompt file`,actualState:`path exists but is not a regular file`})),{};let s=n.readFileSync(o,`utf8`),c=hf(s),l;try{l=(await Eg(s,{...i!=null&&{globalScope:i},extractMetadata:!0,basePath:r.dirname(o),filePath:o})).content,ev(l,o)}catch(e){throw e instanceof Qm&&(this.log.error(A({code:`GLOBAL_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile global memory prompt`,diagnosticText:rv(e,{operation:`Failed to compile global memory prompt.`,promptKind:`global-memory`,logicalName:`global-memory`,distPath:o}),details:{promptKind:`global-memory`,distPath:o}})),e instanceof eh&&this.log.error(O({code:`GLOBAL_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Global memory prompt references missing config variables`,reason:x("The global memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:x("Add the missing variables to `~/.aindex/.tnmsc.json` and rerun tnmsc."),possibleFixes:[x("If you reference `{profile.name}`, define `profile.name` in the config file.")],details:{promptPath:o,errorMessage:e.message}})),f.default.exit(1)),e}return this.log.debug({action:`collect`,path:o,contentLength:l.length}),{globalMemory:{type:Wp.GlobalMemory,content:l,length:l.length,filePathKind:Q.Relative,...c.rawFrontMatter!=null&&{rawFrontMatter:c.rawFrontMatter},markdownAst:c.markdownAst,markdownContents:c.markdownContents,dir:{pathKind:Q.Relative,path:r.basename(o),basePath:r.dirname(o),getDirectoryName:()=>r.basename(o),getAbsolutePath:()=>o},parentDirectoryPath:{type:Kp.UserHome,directory:{pathKind:Q.Relative,path:``,basePath:m.homedir(),getDirectoryName:()=>r.basename(m.homedir()),getAbsolutePath:()=>m.homedir()}}}}}},wx=class extends Wm{constructor(){super(`JetBrainsConfigInputCapability`)}collect(e){let{userConfigOptions:t,fs:n}=e,{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(t),a=[`.idea/codeStyles/Project.xml`,`.idea/codeStyles/codeStyleConfig.xml`,`.idea/.gitignore`],o=[];for(let t of a){let a=cm(Gp.IntellijIDEA,t,i,n,{command:e.runtimeCommand,workspaceDir:r});a!=null&&o.push(a)}return{jetbrainsConfigFiles:o}}};const Tx=`agt.mdx`,Ex=[`node_modules`,`.git`];var Dx=class extends Wm{constructor(){super(`ProjectPromptInputCapability`,[`AindexInputCapability`])}async collect(e){let{dependencyContext:t,fs:n,userConfigOptions:r,path:i,globalScope:a}=e,{aindexDir:o}=this.resolveBasePaths(r),s=this.resolveAindexPath(r.aindex.app.dist,o),c=this.resolveAindexPath(r.aindex.workspacePrompt.dist,o),l=t.workspace;if(l==null)return this.log.info(`No workspace found in dependency context, skipping project prompt enhancement`),{};let u=l.projects??[],d=await Promise.all(u.map(async t=>{let r=t.name;if(r==null||t.isWorkspaceRootProject===!0)return t;let o=i.join(s,r);if(!n.existsSync(o)||!n.statSync(o).isDirectory())return t;let c=t.dirFromWorkspacePath?.getAbsolutePath(),l=await this.readRootMemoryPrompt(e,o,a),u=c==null?[]:await this.scanChildMemoryPrompts(e,o,c,a);return{...t,...l!=null&&{rootMemoryPrompt:l},...u.length>0&&{childMemoryPrompts:u}}})),f=await this.readWorkspaceRootProjectPrompt(e,c,a,this.resolveWorkspaceRootProjectConfig(u));return{workspace:{directory:l.directory,projects:f==null?d:[...d,f]}}}async readWorkspaceRootProjectPrompt(e,t,n,r){let{fs:i,path:a,logger:o}=e;if(!(!i.existsSync(t)||!i.statSync(t).isFile()))try{let e=i.readFileSync(t,`utf8`),s=hf(e),c;try{let{content:r}=await Eg(e,{globalScope:n,extractMetadata:!0,basePath:a.dirname(t),filePath:t});c=r,ev(c,t)}catch(e){throw e instanceof Qm&&(o.error(A({code:`WORKSPACE_ROOT_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile workspace root memory prompt`,diagnosticText:rv(e,{operation:`Failed to compile workspace root memory prompt.`,promptKind:`workspace-root-memory`,logicalName:t,distPath:t}),details:{promptKind:`workspace-root-memory`,distPath:t}})),e instanceof eh&&o.error(O({code:`WORKSPACE_ROOT_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Workspace root memory prompt references missing config variables`,reason:x("The workspace root memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:x("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:t,errorMessage:e.message}})),f.default.exit(1)),e}let l={type:Wp.ProjectRootMemory,content:c,length:c.length,filePathKind:Q.Relative,...s.yamlFrontMatter!=null&&{yamlFrontMatter:s.yamlFrontMatter},...s.rawFrontMatter!=null&&{rawFrontMatter:s.rawFrontMatter},markdownAst:s.markdownAst,markdownContents:s.markdownContents,dir:{pathKind:Q.Root,path:``,getDirectoryName:()=>``}};return{name:`__workspace__`,isWorkspaceRootProject:!0,...r!=null&&{projectConfig:r},rootMemoryPrompt:l}}catch(e){o.error(D({code:`WORKSPACE_ROOT_MEMORY_PROMPT_READ_FAILED`,title:`Failed to read workspace root memory prompt`,operation:`read`,targetKind:`workspace root memory prompt`,path:t,error:e}));return}}resolveWorkspaceRootProjectConfig(e){let t=e.filter(e=>e.isWorkspaceRootProject!==!0);return t.find(e=>e.isPromptSourceProject===!0)?.projectConfig??t[0]?.projectConfig}async readRootMemoryPrompt(e,t,n){let{fs:r,path:i,logger:a}=e,o=i.join(t,Tx);if(!(!r.existsSync(o)||!r.statSync(o).isFile()))try{let e=r.readFileSync(o,`utf8`),i=hf(e),s;try{let{content:r}=await Eg(e,{globalScope:n,extractMetadata:!0,basePath:t,filePath:o});s=r,ev(s,o)}catch(e){throw e instanceof Qm&&(a.error(A({code:`PROJECT_ROOT_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile project root memory prompt`,diagnosticText:rv(e,{operation:`Failed to compile project root memory prompt.`,promptKind:`project-root-memory`,logicalName:o,distPath:o}),details:{promptKind:`project-root-memory`,distPath:o}})),e instanceof eh&&a.error(O({code:`PROJECT_ROOT_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Project root memory prompt references missing config variables`,reason:x("The project root memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:x("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:o,errorMessage:e.message}})),f.default.exit(1)),e}return{type:Wp.ProjectRootMemory,content:s,length:s.length,filePathKind:Q.Relative,...i.yamlFrontMatter!=null&&{yamlFrontMatter:i.yamlFrontMatter},...i.rawFrontMatter!=null&&{rawFrontMatter:i.rawFrontMatter},markdownAst:i.markdownAst,markdownContents:i.markdownContents,dir:{pathKind:Q.Root,path:``,getDirectoryName:()=>``}}}catch(e){a.error(D({code:`PROJECT_ROOT_MEMORY_PROMPT_READ_FAILED`,title:`Failed to read project root memory prompt`,operation:`read`,targetKind:`project root memory prompt`,path:o,error:e}));return}}async scanChildMemoryPrompts(e,t,n,r){let{logger:i}=e,a=[];try{await this.scanDirectoryRecursive(e,t,t,n,a,r)}catch(e){i.error(D({code:`PROJECT_CHILD_MEMORY_SCAN_FAILED`,title:`Failed to scan project child memory prompts`,operation:`scan`,targetKind:`project child memory prompt directory`,path:t,error:e}))}return a}async scanDirectoryRecursive(e,t,n,r,i,a){let{fs:o,path:s}=e,c=o.readdirSync(n,{withFileTypes:!0});for(let l of c){if(!l.isDirectory()||Ex.includes(l.name))continue;let c=s.join(n,l.name),u=s.join(c,Tx);if(o.existsSync(u)&&o.statSync(u).isFile()){let n=await this.readChildMemoryPrompt(e,t,c,r,a);n!=null&&i.push(n)}await this.scanDirectoryRecursive(e,t,c,r,i,a)}}async readChildMemoryPrompt(e,t,n,r,i){let{fs:a,path:o,logger:s}=e,c=o.join(n,Tx);try{let e=a.readFileSync(c,`utf8`),l=hf(e),u;try{let{content:t}=await Eg(e,{globalScope:i,extractMetadata:!0,basePath:n,filePath:c});u=t,ev(u,c)}catch(e){throw e instanceof Qm&&(s.error(A({code:`PROJECT_CHILD_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile project child memory prompt`,diagnosticText:rv(e,{operation:`Failed to compile project child memory prompt.`,promptKind:`project-child-memory`,logicalName:c,distPath:c}),details:{promptKind:`project-child-memory`,distPath:c}})),e instanceof eh&&s.error(O({code:`PROJECT_CHILD_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Project child memory prompt references missing config variables`,reason:x("The project child memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:x("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:c,errorMessage:e.message}})),f.default.exit(1)),e}let d=o.relative(t,n),p=o.join(r,d),m=o.basename(n);return{type:Wp.ProjectChildrenMemory,content:u,length:u.length,filePathKind:Q.Relative,...l.yamlFrontMatter!=null&&{yamlFrontMatter:l.yamlFrontMatter},...l.rawFrontMatter!=null&&{rawFrontMatter:l.rawFrontMatter},markdownAst:l.markdownAst,markdownContents:l.markdownContents,dir:{pathKind:Q.Relative,path:d,basePath:r,getDirectoryName:()=>m,getAbsolutePath:()=>p},workingChildDirectoryPath:{pathKind:Q.Relative,path:d,basePath:r,getDirectoryName:()=>m,getAbsolutePath:()=>p}}}catch(e){s.error(D({code:`PROJECT_CHILD_MEMORY_PROMPT_READ_FAILED`,title:`Failed to read project child memory prompt`,operation:`read`,targetKind:`project child memory prompt`,path:c,error:e}));return}}};const Ox=Object.entries(T_);var kx=class extends Wm{constructor(){super(`ReadmeMdInputCapability`,[`AindexInputCapability`])}async collect(e){let{userConfigOptions:t,logger:n,fs:r,path:i,globalScope:a}=e,{workspaceDir:o,aindexDir:s}=this.resolveBasePaths(t),c=this.resolveAindexPath(t.aindex.app.dist,s),l=[];if(!r.existsSync(c)||!r.statSync(c).isDirectory())return n.debug(`aindex projects directory does not exist`,{path:c}),{readmePrompts:l};try{let t=r.readdirSync(c,{withFileTypes:!0});for(let n of t){if(!n.isDirectory())continue;let t=n.name,r=i.join(c,t);await this.collectReadmeFiles(e,r,t,o,``,l,a)}}catch(e){n.error(D({code:`README_PROJECT_SCAN_FAILED`,title:`Failed to scan aindex projects for readme prompts`,operation:`scan`,targetKind:`aindex project directory`,path:c,error:e}))}return{readmePrompts:l}}async collectReadmeFiles(e,t,n,r,i,a,o){let{fs:s,path:c,logger:l}=e,u=i===``;for(let[e,{src:d}]of Ox){let p=c.join(t,d);if(!(!s.existsSync(p)||!s.statSync(p).isFile()))try{let m=s.readFileSync(p,`utf8`),h;try{let{content:e}=await Eg(m,{...o!=null&&{globalScope:o},extractMetadata:!0,basePath:t,filePath:p});h=e,ev(h,p)}catch(t){throw t instanceof Qm&&(l.error(A({code:`README_PROMPT_COMPILE_FAILED`,title:`Failed to compile readme-family prompt`,diagnosticText:rv(t,{operation:`Failed to compile readme-family prompt.`,promptKind:`readme-family`,logicalName:`${n}/${d}`,distPath:p}),details:{promptKind:`readme-family`,distPath:p,projectName:n,fileKind:e}})),t instanceof eh&&l.error(O({code:`README_SCOPE_VARIABLES_MISSING`,title:`Readme-family prompt references missing config variables`,reason:x("The readme-family prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:x("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:p,errorMessage:t.message}})),f.default.exit(1)),t}let g=u?n:c.join(n,i),_={pathKind:Q.Relative,path:g,basePath:r,getDirectoryName:()=>u?n:c.basename(i),getAbsolutePath:()=>c.resolve(r,g)},v={pathKind:Q.Relative,path:c.dirname(p),basePath:r,getDirectoryName:()=>c.basename(c.dirname(p)),getAbsolutePath:()=>c.dirname(p)};a.push({type:Wp.Readme,content:h,length:h.length,filePathKind:Q.Relative,projectName:n,targetDir:_,isRoot:u,fileKind:e,markdownContents:[],dir:v})}catch(t){l.warn(D({code:`README_PROMPT_READ_FAILED`,title:`Failed to read readme-family file`,operation:`read`,targetKind:`readme-family prompt file`,path:p,error:t,details:{fileKind:e}}))}}try{let l=s.readdirSync(t,{withFileTypes:!0});for(let s of l)if(s.isDirectory()){let l=u?s.name:c.join(i,s.name),d=c.join(t,s.name);await this.collectReadmeFiles(e,d,n,r,l,a,o)}}catch(e){l.warn(D({code:`README_DIRECTORY_SCAN_FAILED`,title:`Failed to scan readme-family directory`,operation:`scan`,targetKind:`readme-family directory`,path:t,error:e}))}}},Ax=class extends Wm{constructor(){super(`RuleInputCapability`)}async collect(e){let{userConfigOptions:t,logger:n,path:r,fs:i,globalScope:a}=e,o=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.rules.src,o.aindexDir),c=this.resolveAindexPath(t.aindex.rules.dist,o.aindexDir),{prompts:l,errors:u}=await ov(i,r,n,a).readFlatFiles(s,c,{kind:Wp.Rule,localeExtensions:G_,isDirectoryStructure:!1,createPrompt:async(e,t,n,i)=>{let a=i,o=r.join(c,`${n}.mdx`);if(a!=null){let e=C_(a,o);if(!e.valid)throw Error(e.errors.join(`
185
- `))}let s=a?.globs??[],l=a?.scope??`project`,u=a?.seriName,d=n.replaceAll(`\\`,`/`),f=d.includes(`/`)?d.split(`/`)[0]??``:``,p=d.split(`/`).pop()??d,m={type:Wp.Rule,content:e,length:e.length,filePathKind:Q.Relative,dir:{pathKind:Q.Relative,path:`${n}.mdx`,basePath:c,getDirectoryName:()=>p,getAbsolutePath:()=>o},prefix:f,ruleName:p,globs:s,scope:l,markdownContents:[]};return a!=null&&Object.assign(m,{yamlFrontMatter:a}),u!=null&&Object.assign(m,{seriName:u}),m}});for(let e of u)n.warn(D({code:`RULE_PROMPT_READ_FAILED`,title:`Failed to read rule prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`rule prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(u.length>0)throw Error(u.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
186
- `));return{rules:l.map(e=>e.dist?.prompt).filter(e=>e!=null)}}},jx=class extends Wm{constructor(){super(`AIAgentIgnoreInputCapability`)}collect(e){let{workspaceDir:t,aindexDir:n}=this.resolveBasePaths(e.userConfigOptions),r=[];for(let i of Xp){let a=om(n,i,{command:e.runtimeCommand,workspaceDir:t});if(!e.fs.existsSync(a)){this.log.debug({action:`collect`,message:`Ignore file not found`,path:a});continue}let o=e.fs.readFileSync(a,`utf8`);if(o.length===0){this.log.debug({action:`collect`,message:`Ignore file is empty`,path:a});continue}r.push({fileName:i,content:o,sourcePath:a}),this.log.debug({action:`collect`,message:`Loaded ignore file`,path:a,fileName:i})}return r.length===0?{}:{aiAgentIgnoreConfigFiles:r}}},Mx=class extends Wm{constructor(){super(`SubAgentInputCapability`)}createSubAgentPrompt(e,t,n,r,i,a){let{path:o}=i,s=n.replaceAll(`\\`,`/`),c=s.indexOf(`/`),l=c===-1?void 0:s.slice(0,c),u=(c===-1?s:s.slice(c+1)).replace(/\.mdx$/,``),d=u.indexOf(`_`),f=l??(d===-1?void 0:u.slice(0,Math.max(0,d))),p=l!=null||d===-1?u:u.slice(Math.max(0,d+1)),m=o.join(r,`${n}.mdx`),h=`${n}.mdx`,g=a,_={type:Wp.SubAgent,content:e,length:e.length,filePathKind:Q.Relative,dir:{pathKind:Q.Relative,path:h,basePath:r,getDirectoryName:()=>h.replace(/\.mdx$/,``),getAbsolutePath:()=>m},...f!=null&&{agentPrefix:f},agentName:p};if(g==null)return _;let v=S_(g,m);if(!v.valid)throw Error(v.errors.join(`
187
- `));return Object.assign(_,{yamlFrontMatter:g}),g.seriName!=null&&Object.assign(_,{seriName:g.seriName}),_}async collect(e){let{userConfigOptions:t,logger:n,path:r,fs:i,globalScope:a}=e,o=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.subAgents.src,o.aindexDir),c=this.resolveAindexPath(t.aindex.subAgents.dist,o.aindexDir);n.debug(`SubAgentInputCapability collecting`,{srcDir:s,distDir:c,aindexDir:o.aindexDir});let{prompts:l,errors:u}=await ov(i,r,n,a).readFlatFiles(s,c,{kind:Wp.SubAgent,localeExtensions:G_,isDirectoryStructure:!1,createPrompt:(t,n,r,i)=>this.createSubAgentPrompt(t,n,r,c,e,i)});n.debug(`SubAgentInputCapability read complete`,{subAgentCount:l.length,errorCount:u.length});for(let e of u)n.warn(D({code:`SUBAGENT_PROMPT_READ_FAILED`,title:`Failed to read sub-agent prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`sub-agent prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(u.length>0)throw Error(u.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
188
- `));let d=[];for(let e of l){let t=e.dist;if(t?.prompt==null)continue;let{prompt:n,rawMdx:r}=t;d.push(r==null?n:{...n,rawMdxContent:r})}return n.debug(`SubAgentInputCapability flattened subAgents`,{count:d.length,agents:d.map(e=>e.agentName)}),{subAgents:d}}},Nx=class extends Wm{constructor(){super(`VSCodeConfigInputCapability`)}collect(e){let{userConfigOptions:t,fs:n}=e,{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(t),a=[`.vscode/settings.json`,`.vscode/extensions.json`],o=[];for(let t of a){let a=cm(Gp.VSCode,t,i,n,{command:e.runtimeCommand,workspaceDir:r});a!=null&&o.push(a)}return{vscodeConfigFiles:o}}},Px=class extends Wm{constructor(){super(`WorkspaceInputCapability`)}collect(e){let{userConfigOptions:t}=e,{workspaceDir:n,aindexDir:r}=this.resolveBasePaths(t);return{workspace:{directory:{pathKind:Q.Absolute,path:n,getDirectoryName:()=>d.basename(n)},projects:[]},aindexDir:r}}};const Fx={workspace:{strategy:`mergeProjects`,getter:e=>e.workspace},vscodeConfigFiles:{strategy:`concat`,getter:e=>e.vscodeConfigFiles},jetbrainsConfigFiles:{strategy:`concat`,getter:e=>e.jetbrainsConfigFiles},editorConfigFiles:{strategy:`concat`,getter:e=>e.editorConfigFiles},commands:{strategy:`concat`,getter:e=>e.commands},subAgents:{strategy:`concat`,getter:e=>e.subAgents},skills:{strategy:`concat`,getter:e=>e.skills},rules:{strategy:`concat`,getter:e=>e.rules},aiAgentIgnoreConfigFiles:{strategy:`concat`,getter:e=>e.aiAgentIgnoreConfigFiles},readmePrompts:{strategy:`concat`,getter:e=>e.readmePrompts},globalMemory:{strategy:`override`,getter:e=>e.globalMemory},aindexDir:{strategy:`override`,getter:e=>e.aindexDir},globalGitIgnore:{strategy:`override`,getter:e=>e.globalGitIgnore},shadowGitExclude:{strategy:`override`,getter:e=>e.shadowGitExclude}};function Ix(e,t){return t==null?e??[]:e==null?t:[...e,...t]}function Lx(e,t){let n=new Map;for(let t of e.projects)n.set(t.name,t);for(let e of t.projects)n.set(e.name,e);return{directory:t.directory??e.directory,projects:[...n.values()]}}function Rx(e,t){return t==null?e:e==null?t:Lx(e,t)}function zx(e,t,n){switch(n){case`concat`:return Ix(e,t);case`override`:return t??e;case`mergeProjects`:return Rx(e,t);default:return t??e}}function Bx(e,t){let n={};for(let[r,i]of Object.entries(Fx)){let a=zx(i.getter(e),i.getter(t),i.strategy);a!=null&&(n[r]=a)}return n}function Vx(e,t,n){let r=e.dependsOn??[];if(r.length===0)return{};let i=new Set,a={};for(let e of r){if(i.has(e))continue;i.add(e);let r=t.get(e);r!=null&&(a=n(a,r))}return a}function Hx(e,t){let n=new Set;for(let[e,r]of t)r>0&&n.add(e);let r=new Map;for(let t of e)if(n.has(t.name)){let e=(t.dependsOn??[]).filter(e=>n.has(e));r.set(t.name,e)}let i=new Set,a=[],o=e=>{if(a.includes(e))return a.push(e),!0;if(i.has(e))return!1;i.add(e),a.push(e);for(let t of r.get(e)??[])if(o(t))return!0;return a.pop(),!1};for(let e of n){if(o(e)){let e=a.indexOf(a.at(-1));return a.slice(e)}i.clear(),a.length=0}return[...n]}function Ux(e){let t=new Set(e.map(e=>e.name));for(let n of e){let e=n.dependsOn??[];for(let r of e)if(!t.has(r))throw new F_(n.name,r)}let n=new Map;for(let t of e)n.set(t.name,t);let r=new Map;for(let t of e)r.set(t.name,0);let i=new Map;for(let t of e)i.set(t.name,[]);for(let t of e){let e=t.dependsOn??[];for(let n of e){r.set(t.name,(r.get(t.name)??0)+1);let e=i.get(n)??[];e.push(t.name),i.set(n,e)}}let a=[];for(let t of e)r.get(t.name)===0&&a.push(t.name);let o=[],s=new Map;for(let t=0;t<e.length;t++){let n=e[t];n!=null&&s.set(n.name,t)}for(;a.length>0;){let e=a.shift(),t=n.get(e);o.push(t);let c=(i.get(e)??[]).sort((e,t)=>(s.get(e)??-1)-(s.get(t)??-1));for(let e of c){let t=(r.get(e)??0)-1;r.set(e,t),t===0&&a.push(e)}}if(o.length===e.length)return o;throw new I_(Hx(e,r))}function Wx(){return[new Zb,new Xb,new Jb]}function Gx(){return[new Px,new vx,new Nx,new wx,new bx,new _x,new yx,new Mx,new Ax,new Cx,new Dx,new kx,new Sx,new xx,new jx]}function Kx(e){if(e==null||e.length===0)return`execute`;let t=ky(Ty(e.filter(e=>e!=null)));if(!(t.helpFlag||t.versionFlag||t.unknownCommand!=null)){if(t.subcommand===`clean`)return`clean`;if(t.subcommand===`plugins`)return`plugins`;if(t.subcommand===`dry-run`||t.dryRun)return`dry-run`;if(t.subcommand==null)return`execute`}}async function qx(e){let{pipelineArgs:t,userConfigOptions:n,userConfig:r,capabilities:i,includeBuiltinEffects:a=!0}=e,o=M(`InputRuntime`,n.logLevel),s=Kx(t),c={logger:o,userConfigOptions:n,fs:u,path:d,glob:kp.default},l=Ux([...a?Wx():[],...i??Gx()]),f=new Jg({userConfig:r}).collect(),p=new Xg;p.setGlobalScope(f),o.debug(`global scope collected`,{osInfo:{platform:f.os.platform,arch:f.os.arch,shellKind:f.os.shellKind},hasProfile:Object.keys(f.profile).length>0,hasTool:Object.keys(f.tool).length>0});let m=new Map,h={};for(let e of l){let t=Vx(e,m,Bx),n={...c,dependencyContext:t,...s==null?{}:{runtimeCommand:s},globalScope:f,scopeRegistry:p},r=e;r.executeEffects!=null&&await r.executeEffects(n,!1);let i=await e.collect(n);m.set(e.name,i),h=Bx(h,i);let a=e;if(a.getRegisteredScopes!=null){let t=a.getRegisteredScopes();for(let{namespace:n,values:r}of t)p.register(n,r,Yg.PluginRegistered),o.debug(`input capability scope registered`,{capability:e.name,namespace:n,keys:Object.keys(r)})}}return h}function Jx(e){return`declarativeOutput`in e}function Yx(e){return`collect`in e&&!Jx(e)}const Xx={version:`0.0.0`,workspaceDir:`~/project`,logLevel:`info`,aindex:{dir:`aindex`,skills:{src:`skills`,dist:`dist/skills`},commands:{src:`commands`,dist:`dist/commands`},subAgents:{src:`subagents`,dist:`dist/subagents`},rules:{src:`rules`,dist:`dist/rules`},globalPrompt:{src:`app/global.src.mdx`,dist:`dist/global.mdx`},workspacePrompt:{src:`app/workspace.src.mdx`,dist:`dist/workspace.mdx`},app:{src:`app`,dist:`dist/app`},ext:{src:`ext`,dist:`dist/ext`},arch:{src:`arch`,dist:`dist/arch`}},commandSeriesOptions:{},outputScopes:{},frontMatter:{blankLineAfter:!0},cleanupProtection:{},plugins:[]};function Zx(e){return{...e.version==null?{}:{version:e.version},...e.workspaceDir==null?{}:{workspaceDir:e.workspaceDir},...e.aindex==null?{}:{aindex:e.aindex},...e.commandSeriesOptions==null?{}:{commandSeriesOptions:e.commandSeriesOptions},...e.outputScopes==null?{}:{outputScopes:e.outputScopes},...e.frontMatter==null?{}:{frontMatter:e.frontMatter},...e.cleanupProtection==null?{}:{cleanupProtection:e.cleanupProtection},...e.logLevel==null?{}:{logLevel:e.logLevel}}}function Qx(...e){return e.reduce((e,t)=>$x(e,t),{...Xx})}function $x(e,t){let n=t.plugins,r=t.commandSeriesOptions,i=t.outputScopes,a=t.frontMatter,o=t.cleanupProtection;return{...e,...t,aindex:eS(e.aindex,t.aindex),plugins:[...e.plugins,...n??[]],commandSeriesOptions:tS(e.commandSeriesOptions,r),outputScopes:rS(e.outputScopes,i),frontMatter:iS(e.frontMatter,a),cleanupProtection:aS(e.cleanupProtection,o)}}function eS(e,t){return t==null?e:{dir:t.dir??e.dir,skills:{...e.skills,...t.skills},commands:{...e.commands,...t.commands},subAgents:{...e.subAgents,...t.subAgents},rules:{...e.rules,...t.rules},globalPrompt:{...e.globalPrompt,...t.globalPrompt},workspacePrompt:{...e.workspacePrompt,...t.workspacePrompt},app:{...e.app,...t.app},ext:{...e.ext,...t.ext},arch:{...e.arch,...t.arch}}}function tS(e,t){if(t==null)return e??{};if(e==null)return t;let n={};if(e.pluginOverrides!=null)for(let[t,r]of Object.entries(e.pluginOverrides))n[t]={...r};if(t.pluginOverrides!=null)for(let[e,r]of Object.entries(t.pluginOverrides))n[e]={...n[e],...r};let r=t.includeSeriesPrefix??e.includeSeriesPrefix,i=Object.keys(n).length>0;return r!=null&&i?{includeSeriesPrefix:r,pluginOverrides:n}:r==null?i?{pluginOverrides:n}:{}:{includeSeriesPrefix:r}}function nS(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{...e,...t}}function rS(e,t){if(t==null)return e??{};if(e==null)return t;let n={};if(e.plugins!=null)for(let[t,r]of Object.entries(e.plugins))r!=null&&(n[t]={...r});if(t.plugins!=null)for(let[e,r]of Object.entries(t.plugins)){let t=nS(n[e],r);t!=null&&(n[e]=t)}return Object.keys(n).length===0?{}:{plugins:n}}function iS(e,t){return t==null?e:{...e,...t}}function aS(e,t){return t==null?e??{}:e==null?t:{rules:[...e.rules??[],...t.rules??[]]}}function oS(e){return`pluginOptions`in e||`configLoaderOptions`in e||`loadUserConfig`in e||`cwd`in e||`pipelineArgs`in e}async function sS(e={}){let t,n,r,i,a;oS(e)?({pluginOptions:r={},cwd:n,configLoaderOptions:i,pipelineArgs:a}={pluginOptions:e.pluginOptions,cwd:e.cwd,configLoaderOptions:e.configLoaderOptions,pipelineArgs:e.pipelineArgs},t=e.loadUserConfig??!0):(r=e,t=!0,i=void 0,a=void 0);let o=Object.hasOwn(r,`plugins`),s=r.plugins,c={},l=!1,u=[],d;if(t)try{let e=Gv(i).load(n);l=e.found,u=e.sources,e.found&&(c=Zx(e.config),d=e.config)}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to load user config: ${t}`)}let f=Qx(c,r),{plugins:p=[],logLevel:m}=f,h=M(`defineConfig`,m);l?h.info(`user config loaded`,{sources:u}):h.info(`no user config found, using defaults/programmatic options`,{workspaceDir:f.workspaceDir,aindexDir:f.aindex.dir,logLevel:f.logLevel});let g=p.filter(Jx),_=p.filter(Yx);M_(g,f);let v=await qx({userConfigOptions:f,..._.length>0?{capabilities:_}:{},includeBuiltinEffects:!(_.length>0||o&&(s?.length??0)===0),...a==null?{}:{pipelineArgs:a},...d==null?{}:{userConfig:d}});if(v.workspace==null)throw Error(`Workspace not initialized by any plugin`);let y=w_({workspace:v.workspace,...v.vscodeConfigFiles!=null&&{vscodeConfigFiles:v.vscodeConfigFiles},...v.jetbrainsConfigFiles!=null&&{jetbrainsConfigFiles:v.jetbrainsConfigFiles},...v.editorConfigFiles!=null&&{editorConfigFiles:v.editorConfigFiles},...v.commands!=null&&{commands:v.commands},...v.subAgents!=null&&{subAgents:v.subAgents},...v.skills!=null&&{skills:v.skills},...v.rules!=null&&{rules:v.rules},...v.globalMemory!=null&&{globalMemory:v.globalMemory},...v.aiAgentIgnoreConfigFiles!=null&&{aiAgentIgnoreConfigFiles:v.aiAgentIgnoreConfigFiles},...v.aindexDir!=null&&{aindexDir:v.aindexDir},...v.readmePrompts!=null&&{readmePrompts:v.readmePrompts},...v.globalGitIgnore!=null&&{globalGitIgnore:v.globalGitIgnore},...v.shadowGitExclude!=null&&{shadowGitExclude:v.shadowGitExclude}});return v.aindexDir!=null&&ie(v.aindexDir,h),{context:y,outputPlugins:g,userConfigOptions:f}}const cS=`GLOBAL.md`;var lS=class extends L_{constructor(){super(`TraeCNIDEOutputPlugin`,{globalConfigDir:`.trae-cn`,outputFileName:cS,dependsOn:[`TraeIDEOutputPlugin`],cleanup:{delete:{global:{dirs:[`.trae-cn/user_rules`]}}},capabilities:{prompt:{scopes:[`global`],singleScope:!1}}})}getGlobalUserRulesDir(){return this.joinPath(this.getGlobalConfigDir(),`user_rules`)}async declareOutputFiles(e){if(!new Set(this.selectPromptScopes(e,[`global`])).has(`global`))return[];let{globalMemory:t}=e.collectedOutputContext;return t==null?[]:[{path:this.joinPath(this.getGlobalUserRulesDir(),cS),scope:`global`,source:{content:t.content}}]}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};async function uS(e=f.default.argv){return sS({pipelineArgs:e,pluginOptions:{plugins:[new Uy,new Gy,new _b,new fb,new nb,new ob,new Vy,new Cb,new Ab,new Lb,new lS,new Vb,new qb,new eb,new sb,new mb,new ib,new zb,new Mb]}})}function dS(e){return e.some(e=>e===`--json`||e===`-j`||/^-[^-]*j/.test(e))}function fS(e){let t=e instanceof Error?e.message:String(e);M(`main`,`silent`).error(ne(`main`,e)),f.default.stdout.write(`${JSON.stringify(fv({success:!1,filesAffected:0,dirsAffected:0,message:t},De()))}\n`)}async function pS(e=f.default.argv){try{let t=new Ry(...e),n=await uS(e);return(await t.run(n)).success?0:1}catch(t){return dS(e)?(fS(t),1):(M(`main`,`error`).error(ne(`main`,t)),1)}}const mS=`.src.mdx`,hS=`.mdx`,gS=`skill`,_S=new Set([`project-memory`,`project-child-memory`]);function vS(e){return e.replaceAll(`\\`,`/`)}function yS(e,t){let n=vS(e).trim();if(n.length===0)throw Error(`${t} cannot be empty`);let r=n.split(`/`);for(let e of r)if(e.length===0||e===`.`||e===`..`)throw Error(`${t} contains an invalid path segment`);return r.join(`/`)}function bS(e){return!vS(e).includes(`/`)}function xS(e,t){let n=e;return n.startsWith(R_.USER_HOME)&&(n=n.replace(R_.USER_HOME,m.homedir())),n.includes(R_.WORKSPACE)&&(n=n.replace(R_.WORKSPACE,t)),d.normalize(n)}function SS(e={}){let{cwd:t,loadUserConfig:n=!0,pluginOptions:r={}}=e,i={};if(n){let e=Gv().load(t);e.found&&(i=Zx(e.config))}let a=Qx(i,r),o=xS(a.workspaceDir,``);return{options:a,workspaceDir:o,aindexDir:d.join(o,a.aindex.dir)}}function CS(e){return e.endsWith(mS)?`${e.slice(0,-8)}${hS}`:d.extname(e)===hS?e:`${e}${hS}`}function wS(e){return e.endsWith(mS)?e.slice(0,-8):e.endsWith(hS)?e.slice(0,-4):e}function TS(e,t){return u.existsSync(e)&&u.statSync(e).isDirectory()?kp.default.sync([...t],{cwd:e,dot:!0,onlyFiles:!0}).map(vS):[]}function ES(e){let t=d.join(e.aindexDir,e.options.aindex.globalPrompt.src);return{promptId:`global-memory`,kind:`global-memory`,logicalName:`global-memory`,paths:{zh:t,en:CS(t),dist:d.join(e.aindexDir,e.options.aindex.globalPrompt.dist)}}}function DS(e){let t=d.join(e.aindexDir,e.options.aindex.workspacePrompt.src);return{promptId:`workspace-memory`,kind:`workspace-memory`,logicalName:`workspace-memory`,paths:{zh:t,en:CS(t),dist:d.join(e.aindexDir,e.options.aindex.workspacePrompt.dist)}}}function OS(e,t,n){let r=yS(t,`projectName`);if(!bS(r))throw Error(`projectName must be a single path segment`);let i=n==null?``:yS(n,`relativeName`),a=i.length===0?d.join(e.aindexDir,e.options.aindex.app.src,r):d.join(e.aindexDir,e.options.aindex.app.src,r,i),o=i.length===0?d.join(e.aindexDir,e.options.aindex.app.dist,r):d.join(e.aindexDir,e.options.aindex.app.dist,r,i),s=d.join(a,`agt${hS}`),c=i.length===0?r:`${r}/${i}`;return{promptId:i.length===0?`project-memory:${r}`:`project-child-memory:${c}`,kind:i.length===0?`project-memory`:`project-child-memory`,logicalName:c,paths:{zh:d.join(a,`agt${mS}`),en:s,dist:d.join(o,`agt${hS}`)},legacyZhPath:s}}function kS(e,t){let n=yS(t,`skillName`);if(!bS(n))throw Error(`skillName must be a single path segment`);let r=d.join(e.aindexDir,e.options.aindex.skills.src,n),i=d.join(e.aindexDir,e.options.aindex.skills.dist,n);return{promptId:`skill:${n}`,kind:`skill`,logicalName:n,paths:{zh:d.join(r,`${gS}${mS}`),en:d.join(r,`${gS}${hS}`),dist:d.join(i,`${gS}${hS}`)}}}function AS(e,t,n){let r=yS(t,`skillName`),i=yS(n,`relativeName`);if(!bS(r))throw Error(`skillName must be a single path segment`);let a=d.join(e.aindexDir,e.options.aindex.skills.src,r),o=d.join(e.aindexDir,e.options.aindex.skills.dist,r);return{promptId:`skill-child-doc:${r}/${i}`,kind:`skill-child-doc`,logicalName:`${r}/${i}`,paths:{zh:d.join(a,`${i}${mS}`),en:d.join(a,`${i}${hS}`),dist:d.join(o,`${i}${hS}`)}}}function jS(e,t,n){let r=yS(n,`relativeName`),i=t===`command`?d.join(e.aindexDir,e.options.aindex.commands.src):t===`subagent`?d.join(e.aindexDir,e.options.aindex.subAgents.src):d.join(e.aindexDir,e.options.aindex.rules.src),a=t===`command`?d.join(e.aindexDir,e.options.aindex.commands.dist):t===`subagent`?d.join(e.aindexDir,e.options.aindex.subAgents.dist):d.join(e.aindexDir,e.options.aindex.rules.dist);return{promptId:`${t}:${r}`,kind:t,logicalName:r,paths:{zh:d.join(i,`${r}${mS}`),en:d.join(i,`${r}${hS}`),dist:d.join(a,`${r}${hS}`)}}}function MS(e){switch(e){case`global-memory`:return{kind:`global-memory`};case`workspace-memory`:return{kind:`workspace-memory`};default:break}let t=e.indexOf(`:`);if(t===-1)throw Error(`Unsupported promptId: ${e}`);let n=e.slice(0,t),r=yS(e.slice(t+1),`promptId`);switch(n){case`project-memory`:if(!bS(r))throw Error(`project-memory promptId must include a single project name`);return{kind:n,projectName:r};case`project-child-memory`:{let[e,...t]=r.split(`/`),i=t.join(`/`);if(e==null||i.length===0)throw Error(`project-child-memory promptId must include project and child path`);return{kind:n,projectName:e,relativeName:i}}case`skill`:if(!bS(r))throw Error(`skill promptId must include a single skill name`);return{kind:n,skillName:r};case`skill-child-doc`:{let[e,...t]=r.split(`/`),i=t.join(`/`);if(e==null||i.length===0)throw Error(`skill-child-doc promptId must include skill and child path`);return{kind:n,skillName:e,relativeName:i}}case`command`:case`subagent`:case`rule`:return{kind:n,relativeName:r};default:throw Error(`Unsupported promptId: ${e}`)}}function NS(e,t){let n=MS(e);switch(n.kind){case`global-memory`:return ES(t);case`workspace-memory`:return DS(t);case`project-memory`:return OS(t,n.projectName);case`project-child-memory`:return OS(t,n.projectName,n.relativeName);case`skill`:return kS(t,n.skillName);case`skill-child-doc`:return AS(t,n.skillName,n.relativeName);case`command`:case`subagent`:case`rule`:return jS(t,n.kind,n.relativeName)}}function PS(e,t){let n=t===`command`?d.join(e.aindexDir,e.options.aindex.commands.src):t===`subagent`?d.join(e.aindexDir,e.options.aindex.subAgents.src):d.join(e.aindexDir,e.options.aindex.rules.src),r=t===`command`?d.join(e.aindexDir,e.options.aindex.commands.dist):t===`subagent`?d.join(e.aindexDir,e.options.aindex.subAgents.dist):d.join(e.aindexDir,e.options.aindex.rules.dist),i=new Set;for(let e of TS(n,[`**/*${mS}`,`**/*${hS}`]))i.add(wS(e));for(let e of TS(r,[`**/*${hS}`]))i.add(wS(e));return[...i].sort().map(e=>`${t}:${e}`)}function FS(e){let t=d.join(e.aindexDir,e.options.aindex.skills.src),n=d.join(e.aindexDir,e.options.aindex.skills.dist),r=new Set;if(u.existsSync(t)&&u.statSync(t).isDirectory())for(let e of u.readdirSync(t,{withFileTypes:!0}))e.isDirectory()&&r.add(e.name);if(u.existsSync(n)&&u.statSync(n).isDirectory())for(let e of u.readdirSync(n,{withFileTypes:!0}))e.isDirectory()&&r.add(e.name);let i=[];for(let e of[...r].sort()){i.push(`skill:${e}`);let r=d.join(t,e),a=d.join(n,e),o=new Set;for(let e of TS(r,[`**/*${mS}`,`**/*${hS}`])){let t=wS(e);t!==gS&&o.add(t)}for(let e of TS(a,[`**/*${hS}`])){let t=wS(e);t!==gS&&o.add(t)}for(let t of[...o].sort())i.push(`skill-child-doc:${e}/${t}`)}return i}function IS(e){let t=d.join(e.aindexDir,e.options.aindex.app.src),n=d.join(e.aindexDir,e.options.aindex.app.dist),r=new Set;for(let e of TS(t,[`**/agt${mS}`,`**/agt${hS}`])){let t=vS(d.posix.dirname(vS(e)));t!==`.`&&r.add(t)}for(let e of TS(n,[`**/agt${hS}`])){let t=vS(d.posix.dirname(vS(e)));t!==`.`&&r.add(t)}let i=[];for(let e of[...r].sort()){let[t,...n]=e.split(`/`),r=n.join(`/`);t==null||t.length===0||i.push(r.length===0?`project-memory:${t}`:`project-child-memory:${t}/${r}`)}return i}function LS(e){let t=new Set,n=ES(e),r=DS(e);(u.existsSync(n.paths.zh)||u.existsSync(n.paths.en)||u.existsSync(n.paths.dist))&&t.add(n.promptId),(u.existsSync(r.paths.zh)||u.existsSync(r.paths.en)||u.existsSync(r.paths.dist))&&t.add(r.promptId);for(let n of IS(e))t.add(n);for(let n of FS(e))t.add(n);for(let n of PS(e,`command`))t.add(n);for(let n of PS(e,`subagent`))t.add(n);for(let n of PS(e,`rule`))t.add(n);return[...t].sort()}function RS(e){try{return hf(e).yamlFrontMatter}catch{return}}function zS(e,t,n=!1){if(!(u.existsSync(e)&&u.statSync(e).isFile()))return;let r=u.statSync(e),i=t?u.readFileSync(e,`utf8`):void 0,a={path:e,exists:!0,mtime:r.mtime.toISOString(),mtimeMs:r.mtimeMs,size:r.size,...n?{legacySource:!0}:{},...i==null?{}:{content:i}},o=i==null?void 0:RS(i);return o!=null&&Object.assign(a,{frontMatter:o}),a}function BS(e,t){return t==null?`missing`:e!=null&&t.mtimeMs<e.mtimeMs?`stale`:`ready`}function VS(e,t){let n=u.existsSync(e.paths.zh),{legacyZhPath:r}=e,i=!n&&r!=null&&u.existsSync(r),a=n?e.paths.zh:i?r:void 0,o=a==null?void 0:zS(a,t,i),s=n||r!==e.paths.en?zS(e.paths.en,t):void 0,c=zS(e.paths.dist,t);if(o==null&&s==null&&c==null)return null;let l=[o,s,c].filter(e=>e!=null).sort((e,t)=>t.mtimeMs-e.mtimeMs)[0]?.mtime,d={promptId:e.promptId,kind:e.kind,logicalName:e.logicalName,paths:e.paths,exists:{zh:o!=null,en:s!=null,dist:c!=null},enStatus:BS(o,s),distStatus:BS(o,c),...l==null?{}:{updatedAt:l},...o?.legacySource===!0?{legacyZhSource:!0}:{},src:{...o==null?{}:{zh:o},...s==null?{}:{en:s}}};c!=null&&Object.assign(d,{dist:c});let f=o?.frontMatter??s?.frontMatter??c?.frontMatter;return f!=null&&Object.assign(d,{frontMatter:f}),d}function HS(e,t){return t==null||t.length===0?!0:t.includes(e)}function US(e,t){if(t==null||t.trim().length===0)return!0;let n=t.trim().toLowerCase();return e.promptId.toLowerCase().includes(n)||e.logicalName.toLowerCase().includes(n)}function WS(e){return{promptId:e.promptId,kind:e.kind,logicalName:e.logicalName,paths:e.paths,exists:e.exists,enStatus:e.enStatus,distStatus:e.distStatus,...e.updatedAt==null?{}:{updatedAt:e.updatedAt},...e.legacyZhSource===!0?{legacyZhSource:!0}:{}}}function GS(e){return _S.has(e.kind)}function KS(e,t){u.mkdirSync(d.dirname(e),{recursive:!0}),u.writeFileSync(e,t,`utf8`)}function qS(e){if(!GS(e)||u.existsSync(e.paths.zh)||e.legacyZhPath==null||!u.existsSync(e.legacyZhPath))return;let t=u.readFileSync(e.legacyZhPath,`utf8`);KS(e.paths.zh,t)}function JS(e){GS(e)&&(e.legacyZhPath==null||e.legacyZhPath===e.paths.zh||u.existsSync(e.legacyZhPath)&&u.rmSync(e.legacyZhPath,{force:!0}))}async function YS(e={}){let t=SS(e);return LS(t).map(e=>VS(NS(e,t),!1)).filter(e=>e!=null).map(WS).filter(t=>HS(t.kind,e.kinds)).filter(t=>HS(t.enStatus,e.enStatus)).filter(t=>HS(t.distStatus,e.distStatus)).filter(t=>US(t,e.query)).sort((e,t)=>e.promptId.localeCompare(t.promptId))}async function XS(e,t={}){return VS(NS(e,SS(t)),!0)}async function ZS(e){let t=SS(e),n=e.locale??`zh`,r=NS(e.promptId,t);n===`zh`?(KS(r.paths.zh,e.content),JS(r)):(qS(r),KS(r.paths.en,e.content));let i=VS(r,!0);if(i==null)throw Error(`Failed to load prompt after write: ${e.promptId}`);return i}async function QS(e){if(e.enContent==null&&e.distContent==null)throw Error(`writePromptArtifacts requires enContent or distContent`);let t=SS(e),n=NS(e.promptId,t);e.enContent!=null&&(qS(n),KS(n.paths.en,e.enContent)),e.distContent!=null&&KS(n.paths.dist,e.distContent);let r=VS(n,!0);if(r==null)throw Error(`Failed to load prompt after write: ${e.promptId}`);return r}async function $S(e,t={}){return NS(e,SS(t)).paths}exports.ConfigLoader=Uv,exports.DEFAULT_CONFIG_FILE_NAME=Bv,exports.DEFAULT_GLOBAL_CONFIG_DIR=Vv,exports.DEFAULT_USER_CONFIG=z_,exports.PathPlaceholders=R_,exports.PluginPipeline=Ry,exports.checkVersionControl=ie,exports.createDefaultPluginConfig=uS,exports.defineConfig=sS,exports.generateAindex=oe,exports.getConfigLoader=Gv,exports.getGlobalConfigPath=Hv,exports.getPrompt=XS,exports.isJsonMode=dS,exports.listPrompts=YS,exports.loadUserConfig=Kv,exports.mergeConfig=Qx,exports.resolvePromptDefinition=$S,exports.runCli=pS,exports.upsertPromptSource=ZS,exports.userConfigToPluginOptions=Zx,exports.validateGlobalConfig=qv,exports.writePromptArtifacts=QS;
294
+ `}collect(e){return{}}};const OS=[`skills`,`commands`,`agents`,`app`];var kS=class extends Xh{constructor(){super(`OrphanFileCleanupEffectInputCapability`),this.registerEffect(`orphan-file-cleanup`,this.cleanupOrphanFiles.bind(this),20)}buildProtectedDeletionGuard(e){return Uh({workspaceDir:e.workspaceDir,aindexDir:e.aindexDir,rules:[...Bh(e.userConfigOptions,e.aindexDir,{workspaceDir:e.workspaceDir}),...(e.userConfigOptions.cleanupProtection?.rules??[]).map(e=>({path:e.path,protectionMode:e.protectionMode,reason:e.reason??`configured cleanup protection rule`,source:`configured-cleanup-protection`,matcher:e.matcher??`path`}))]})}buildDeletionPlan(e,t,n){let r=[],i=[],a=[];for(let o of OS){let s=e.path.join(t,o);e.fs.existsSync(s)&&e.fs.statSync(s).isDirectory()&&this.collectDirectoryPlan(e,s,o,n[o],r,i,a)}return{filesToDelete:r,dirsToDelete:i,errors:a}}async cleanupOrphanFiles(e){let{fs:t,path:n,aindexDir:r,logger:i,userConfigOptions:a,dryRun:o}=e,s=n.join(r,`dist`);if(!t.existsSync(s))return i.debug({action:`orphan-cleanup`,message:`dist/ directory does not exist, skipping`,distDir:s}),{success:!0,description:`dist/ directory does not exist, nothing to clean`,deletedFiles:[],deletedDirs:[]};let c=a.aindex,l={skills:c?.skills?.src??`skills`,commands:c?.commands?.src??`commands`,agents:c?.subAgents?.src??`subagents`,app:c?.app?.src??`app`},u=this.buildDeletionPlan(e,s,l),d=this.buildProtectedDeletionGuard(e),f=qh(u.filesToDelete,d),p=qh(u.dirsToDelete,d),m=[...f.violations,...p.violations].sort((e,t)=>e.targetPath.localeCompare(t.targetPath));if(m.length>0)return{success:!1,description:`Protected deletion guard blocked orphan cleanup for ${m.length} path(s)`,deletedFiles:[],deletedDirs:[],error:new hh(`orphan-file-cleanup`,m)};if(o)return{success:!0,description:`Would delete ${f.safePaths.length} files and ${p.safePaths.length} directories`,deletedFiles:[...f.safePaths],deletedDirs:[...p.safePaths].sort((e,t)=>t.length-e.length)};let h=[],g=[],_=[...u.errors];for(let e of f.safePaths)try{t.unlinkSync(e),h.push(e),i.debug({action:`orphan-cleanup`,deleted:e})}catch(t){_.push({path:e,error:t}),i.warn(E({code:`ORPHAN_CLEANUP_FILE_DELETE_FAILED`,title:`Orphan cleanup could not delete a file`,operation:`delete`,targetKind:`orphan file`,path:e,error:t}))}for(let e of[...p.safePaths].sort((e,t)=>t.length-e.length))try{t.rmdirSync(e),g.push(e),i.debug({action:`orphan-cleanup`,deletedDir:e})}catch(t){_.push({path:e,error:t}),i.warn(E({code:`ORPHAN_CLEANUP_DIRECTORY_DELETE_FAILED`,title:`Orphan cleanup could not delete a directory`,operation:`delete`,targetKind:`orphan directory`,path:e,error:t}))}let v=_.length>0;return{success:!v,description:`Deleted ${h.length} files and ${g.length} directories`,deletedFiles:h,deletedDirs:g,...v&&{error:Error(`${_.length} errors occurred during cleanup`)}}}collectDirectoryPlan(e,t,n,r,i,a,o){let{fs:s,path:c,aindexDir:l,logger:u}=e,d;try{d=s.readdirSync(t,{withFileTypes:!0})}catch(e){return o.push({path:t,error:e}),u.warn(E({code:`ORPHAN_CLEANUP_DIRECTORY_READ_FAILED`,title:`Orphan cleanup could not read a directory`,operation:`read`,targetKind:`dist cleanup directory`,path:t,error:e})),!1}let f=!1;for(let s of d){let u=c.join(t,s.name);if(s.isDirectory()){this.collectDirectoryPlan(e,u,n,r,i,a,o)?a.push(u):f=!0;continue}if(!s.isFile()){f=!0;continue}this.isOrphanFile(e,u,n,r,l)?i.push(u):f=!0}return!f}isOrphanFile(e,t,n,r,i){let{fs:a,path:o}=e,s=o.basename(t),c=s.endsWith(`.mdx`),l=o.join(i,`dist`,n),u=o.relative(l,t),d=o.dirname(u),f=s.replace(/\.mdx$/,``);return c?!this.getPossibleSourcePaths(o,i,n,r,f,d).some(e=>a.existsSync(e)):!a.existsSync(o.join(i,r,u))}getPossibleSourcePaths(e,t,n,r,i,a){switch(n){case`skills`:{let n=(a===`.`?[i]:a.split(e.sep))[0]??i,o=a===`.`?``:a.slice(n.length+1);return o===``?[...Cy.map(i=>e.join(t,r,n,`SKILL${i}`)),...Cy.map(i=>e.join(t,r,n,`skill${i}`))]:Cy.map(a=>e.join(t,r,n,o,`${i}${a}`))}case`commands`:case`agents`:case`app`:return a===`.`?Cy.map(n=>e.join(t,r,`${i}${n}`)):Cy.map(n=>e.join(t,r,a,`${i}${n}`));default:return[]}}collect(e){return{}}},AS=class extends Xh{constructor(){super(`SkillDistCleanupEffectInputCapability`),this.registerEffect(`skill-dist-cleanup`,this.cleanupDistSkillArtifacts.bind(this),10)}async cleanupDistSkillArtifacts(e){let{fs:t,logger:n,userConfigOptions:r,aindexDir:i,dryRun:a}=e,o=this.resolveAindexPath(r.aindex.skills.src,i),s=this.resolveAindexPath(r.aindex.skills.dist,i);if(!t.existsSync(s))return n.debug({action:`skill-dist-cleanup`,message:`dist skills directory does not exist, skipping`,srcSkillsDir:o,distSkillsDir:s}),{success:!0,description:`dist skills directory does not exist, nothing to clean`,deletedFiles:[],deletedDirs:[]};let c=this.buildCleanupPlan(e,s);if(a)return{success:!0,description:`Would delete ${c.filesToDelete.length} files and ${c.dirsToDelete.length} directories`,deletedFiles:[...c.filesToDelete],deletedDirs:[...c.dirsToDelete].sort((e,t)=>t.length-e.length)};let l=[],u=[],d=[...c.errors];for(let e of c.filesToDelete)try{t.unlinkSync(e),l.push(e),n.debug({action:`skill-dist-cleanup`,deleted:e})}catch(t){d.push({path:e,error:t}),n.warn(E({code:`SKILL_DIST_CLEANUP_FILE_DELETE_FAILED`,title:`Skill dist cleanup could not delete a file`,operation:`delete`,targetKind:`skill dist file`,path:e,error:t}))}for(let e of[...c.dirsToDelete].sort((e,t)=>t.length-e.length))try{t.rmdirSync(e),u.push(e),n.debug({action:`skill-dist-cleanup`,deletedDir:e})}catch(t){d.push({path:e,error:t}),n.warn(E({code:`SKILL_DIST_CLEANUP_DIRECTORY_DELETE_FAILED`,title:`Skill dist cleanup could not delete a directory`,operation:`delete`,targetKind:`skill dist directory`,path:e,error:t}))}let f=d.length>0;return{success:!f,description:`Deleted ${l.length} files and ${u.length} directories`,deletedFiles:l,deletedDirs:u,...f&&{error:Error(`${d.length} errors occurred during cleanup`)}}}buildCleanupPlan(e,t){let n=[],r=[],i=[];return this.collectCleanupPlan(e,t,n,r,i),{filesToDelete:n,dirsToDelete:r,errors:i}}collectCleanupPlan(e,t,n,r,i){let{fs:a,path:o,logger:s}=e,c;try{c=a.readdirSync(t,{withFileTypes:!0})}catch(e){return i.push({path:t,error:e}),s.warn(E({code:`SKILL_DIST_CLEANUP_DIRECTORY_READ_FAILED`,title:`Skill dist cleanup could not read a directory`,operation:`read`,targetKind:`skill dist directory`,path:t,error:e})),!1}let l=!1;for(let a of c){let s=o.join(t,a.name);if(a.isDirectory()){this.collectCleanupPlan(e,s,n,r,i)?r.push(s):l=!0;continue}if(!a.isFile()){l=!0;continue}if(this.shouldRetainCompiledSkillFile(a.name)){l=!0;continue}n.push(s)}return!l}shouldRetainCompiledSkillFile(e){return e.endsWith(`.mdx`)&&!Ty(e)}collect(e){return{}}};const jS=/export\s+default\s*\{([\s\S]*?)\}/u,MS=/description\s*:\s*['"`]([^'"`]+)['"`]/u,NS=/name\s*:\s*['"`]([^'"`]+)['"`]/u,PS=/displayName\s*:\s*['"`]([^'"`]+)['"`]/u,FS=/keywords\s*:\s*\[([^\]]+)\]/u,IS=/author\s*:\s*['"`]([^'"`]+)['"`]/u,LS=/version\s*:\s*['"`]([^'"`]+)['"`]/u;function RS(e){let t={},n=jS.exec(e);if(n?.[1]==null)return t;let r=n[1],i=MS.exec(r);i?.[1]!=null&&(t.description=i[1]);let a=NS.exec(r);a?.[1]!=null&&(t.name=a[1]);let o=PS.exec(r);o?.[1]!=null&&(t.displayName=o[1]);let s=FS.exec(r);s?.[1]!=null&&(t.keywords=s[1].split(`,`).map(e=>e.trim().replaceAll(/['"]/gu,``)).filter(e=>e.length>0));let c=IS.exec(r);c?.[1]!=null&&(t.author=c[1]);let l=LS.exec(r);return l?.[1]!=null&&(t.version=l[1]),t}function zS(...e){let t={};for(let n of e)if(n!=null)for(let[e,r]of Object.entries(n))r!==void 0&&(t[e]=r);return t}const BS={".ts":`text/typescript`,".tsx":`text/typescript`,".js":`text/javascript`,".jsx":`text/javascript`,".json":`application/json`,".py":`text/x-python`,".java":`text/x-java`,".kt":`text/x-kotlin`,".go":`text/x-go`,".rs":`text/x-rust`,".c":`text/x-c`,".cpp":`text/x-c++`,".cs":`text/x-csharp`,".rb":`text/x-ruby`,".php":`text/x-php`,".swift":`text/x-swift`,".scala":`text/x-scala`,".sql":`application/sql`,".xml":`application/xml`,".yaml":`text/yaml`,".yml":`text/yaml`,".toml":`text/toml`,".csv":`text/csv`,".graphql":`application/graphql`,".txt":`text/plain`,".pdf":`application/pdf`,".docx":`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,".xlsx":`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,".html":`text/html`,".css":`text/css`,".svg":`image/svg+xml`,".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".webp":`image/webp`,".ico":`image/x-icon`,".bmp":`image/bmp`},VS=new Set(`.png,.jpg,.jpeg,.gif,.webp,.ico,.bmp,.tiff,.svg,.exe,.dll,.so,.dylib,.bin,.wasm,.class,.jar,.war,.pyd,.pyc,.pyo,.zip,.tar,.gz,.bz2,.7z,.rar,.ttf,.otf,.woff,.woff2,.eot,.db,.sqlite,.sqlite3,.pdf,.docx,.doc,.xlsx,.xls,.pptx,.ppt,.odt,.ods,.odp`.split(`,`));function HS(e){return VS.has(e.toLowerCase())}function US(e){return BS[e.toLowerCase()]}function WS(...e){return u.join(...e).replaceAll(`\\`,`/`)}var GS=class{ctx;constructor(e){this.ctx=e}async processDirectory(e,t,n){let r=t?`${t}/${e.name}`:e.name;return this.scanSkillDirectoryAsync(n,r)}async processFile(e,t,n){let r=t?`${t}/${e.name}`:e.name;if(this.ctx.scanMode===`distChildDocs`){if(t===``&&e.name===`skill.mdx`||Ty(e.name)||!e.name.endsWith(`.mdx`))return{childDocs:[],resources:[]};let i=await this.processChildDoc(r,n);return{childDocs:i?[i]:[],resources:[]}}if(t===``&&e.name===`mcp.json`||Ty(e.name)||e.name.endsWith(`.mdx`))return{childDocs:[],resources:[]};let i=this.processResourceFile(e.name,r,n);return{childDocs:[],resources:i?[i]:[]}}async processChildDoc(e,t){try{let n=this.ctx.fs.readFileSync(t,`utf8`),r=mp(n),i=hp((await av(n,{globalScope:this.ctx.globalScope,extractMetadata:!0,basePath:u.dirname(t),filePath:t})).content);return Ny(i,t),{type:Ym.SkillChildDoc,content:i,length:i.length,filePathKind:Xm.Relative,markdownAst:r.markdownAst,markdownContents:r.markdownContents,...r.rawFrontMatter!=null&&{rawFrontMatter:r.rawFrontMatter},relativePath:e,dir:{pathKind:Xm.Relative,path:e,basePath:this.ctx.skillDir,getDirectoryName:()=>u.dirname(e),getAbsolutePath:()=>t}}}catch(n){throw this.ctx.logger.error(k({code:`SKILL_CHILD_DOC_COMPILE_FAILED`,title:`Failed to compile skill child doc`,diagnosticText:Iy(n,{operation:`Failed to compile skill child doc.`,promptKind:`skill-child-doc`,logicalName:`${u.basename(this.ctx.skillDir)}/${e.replace(/\.mdx$/u,``)}`,distPath:t,srcPath:Py(u,t,{distRootDir:this.ctx.skillDir,srcRootDir:this.ctx.sourceSkillDir})}),details:{skillDir:this.ctx.skillDir,relativePath:e,filePath:t}})),n}}processResourceFile(e,t,n){let r=u.extname(e);try{let{content:i,encoding:a,length:o}=this.readFileContent(n,r),s=US(r);return{type:Ym.SkillResource,extension:r,fileName:e,relativePath:t,sourcePath:n,content:i,encoding:a,length:o,...s!=null&&{mimeType:s}}}catch(r){return this.ctx.logger.warn(E({code:`SKILL_RESOURCE_READ_FAILED`,title:`Failed to read skill resource file`,operation:`read`,targetKind:`skill resource file`,path:n,error:r,details:{relativePath:t,fileName:e,skillDir:this.ctx.skillDir}})),null}}readFileContent(e,t){if(HS(t)){let t=this.ctx.fs.readFileSync(e);return{content:t.toString(`base64`),encoding:`base64`,length:t.length}}let n=this.ctx.fs.readFileSync(e,`utf8`);return{content:n,encoding:`text`,length:g.Buffer.from(n,`utf8`).length}}async scanSkillDirectoryAsync(e,t=``){let n=[],r=[],i;try{i=this.ctx.fs.readdirSync(e,{withFileTypes:!0})}catch(t){return this.ctx.logger.warn(E({code:`SKILL_DIRECTORY_SCAN_FAILED`,title:`Failed to scan skill directory`,operation:`scan`,targetKind:`skill directory`,path:e,error:t,details:{skillDir:this.ctx.skillDir,scanMode:this.ctx.scanMode}})),{childDocs:n,resources:r}}for(let a of i){let i=WS(e,a.name);if(a.isDirectory()){let e=await this.processDirectory(a,t,i);n.push(...e.childDocs),r.push(...e.resources);continue}if(!a.isFile())continue;let o=await this.processFile(a,t,i);n.push(...o.childDocs),r.push(...o.resources)}return{childDocs:n,resources:r}}};function KS(e,t,n,r=``){let i=[],a=r===``?e:WS(e,r),o;try{o=t.readdirSync(a,{withFileTypes:!0})}catch(e){return n.warn(E({code:`SKILL_SOURCE_CHILD_SCAN_FAILED`,title:`Failed to scan skill source child docs`,operation:`scan`,targetKind:`skill source child doc directory`,path:a,error:e})),i}for(let a of o){let o=r?`${r}/${a.name}`:a.name;if(a.isDirectory()){i.push(...KS(e,t,n,o));continue}!a.isFile()||!Ty(a.name)||r===``&&a.name===`skill.src.mdx`||i.push(o.replace(/\.src\.mdx$/u,`.mdx`))}return i}function qS(e,t,n,r,i){if(r.existsSync(t))for(let a of KS(t,r,i)){let i=u.join(n,a);if(!r.existsSync(i))throw new ky({kind:`skill child doc`,name:`${e}/${a}`,sourcePath:u.join(t,a.replace(/\.mdx$/u,`.src.mdx`)),expectedDistPath:i})}}function JS(e,t,n){let r=u.join(e,`mcp.json`);if(t.existsSync(r)){if(!t.statSync(r).isFile()){n.warn(ee({code:`SKILL_MCP_CONFIG_NOT_FILE`,title:`Skill MCP config path is not a file`,path:r,expectedKind:`mcp.json file`,actualState:`path exists but is not a regular file`,details:{skillDir:e}}));return}try{let i=t.readFileSync(r,`utf8`),a=JSON.parse(i);if(a.mcpServers==null||typeof a.mcpServers!=`object`){n.warn(D({code:`SKILL_MCP_CONFIG_INVALID`,title:`Skill MCP config is missing mcpServers`,reason:y(`The skill MCP config at "${r}" does not contain a top-level mcpServers object.`),configPath:r,exactFix:y("Add a top-level `mcpServers` object to mcp.json before retrying tnmsc."),details:{skillDir:e}}));return}return{type:Ym.SkillMcpConfig,mcpServers:a.mcpServers,rawContent:i}}catch(t){n.warn(D({code:`SKILL_MCP_CONFIG_PARSE_FAILED`,title:`Failed to parse skill MCP config`,reason:y(`tnmsc could not parse the MCP config file at "${r}".`,`Underlying error: ${t instanceof Error?t.message:String(t)}`),configPath:r,exactFix:y(`Fix the JSON syntax in mcp.json and rerun tnmsc.`),details:{skillDir:e,errorMessage:t instanceof Error?t.message:String(t)}}));return}}}async function YS(e,t,n,r,i,a,o,s=[],c=[],l,d){let{logger:f,globalScope:p,fs:m}=a,h=u.join(i,`skill.mdx`),g=e,_,v;if(m.existsSync(h)){g=m.readFileSync(h,`utf8`),_=mp(g);let t=await av(g,{globalScope:p,extractMetadata:!0,basePath:i,filePath:h});e=hp(t.content),Ny(e,h),v=t.metadata.fields}let b=zS(RS(g),d,v),x=_?.yamlFrontMatter?.description??b?.description;if(x==null||x.trim().length===0)throw f.error(S({code:`SKILL_VALIDATION_FAILED`,title:`Skill description is required`,rootCause:y(`The skill "${n}" does not provide a non-empty description in its compiled metadata or front matter.`),exactFix:y(`Add a non-empty description field to the skill front matter or exported metadata and rebuild the skill.`),possibleFixes:[y("Set `description` in `SKILL.md` front matter."),y(`If you export metadata from code, ensure the exported description is non-empty.`)],details:{skill:n,skillDir:r,yamlDescription:_?.yamlFrontMatter?.description,exportDescription:b?.description}})),Error(`Skill "${n}" validation failed: description is required and cannot be empty`);let C={...b,..._?.yamlFrontMatter??{},name:n,description:x},w=$v(C,h);if(!w.valid)throw Error(w.errors.join(`
295
+ `));return{type:Ym.Skill,content:e,length:e.length,filePathKind:Xm.Relative,yamlFrontMatter:C,markdownAst:_?.markdownAst,markdownContents:_?.markdownContents??[],dir:{pathKind:Xm.Relative,path:n,basePath:r,getDirectoryName:()=>n,getAbsolutePath:()=>u.join(r,n)},..._?.rawFrontMatter!=null&&{rawFrontMatter:_.rawFrontMatter},...o!=null&&{mcpConfig:o},...s!=null&&s.length>0&&{childDocs:s},...c!=null&&c.length>0&&{resources:c},...l!=null&&{seriName:l}}}var XS=class extends Xh{constructor(){super(`SkillInputCapability`)}readMcpConfig(e,t,n){return JS(e,t,n)}async scanSkillDirectory(e,t,n,r=``,i=`srcResources`,a,o){return new GS({fs:t,logger:n,skillDir:e,scanMode:i,...a!=null&&{globalScope:a},...o!=null&&{sourceSkillDir:o}}).scanSkillDirectoryAsync(e,r)}async collect(e){let{userConfigOptions:t,logger:n,fs:r,path:i,globalScope:a}=e,{aindexDir:o}=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.skills.src,o),c=this.resolveAindexPath(t.aindex.skills.dist,o),l=[],u=zy(r,i,n,a),d=new Map,f=async e=>{let t=d.get(e);if(t!=null)return t;let o=i.join(s,e),l=i.join(c,e),u=r.existsSync(l)?(await this.scanSkillDirectory(l,r,n,``,`distChildDocs`,a,o)).childDocs:[],f=r.existsSync(o)?(await this.scanSkillDirectory(o,r,n,``,`srcResources`,a)).resources:[],p=JS(o,r,n);qS(e,o,l,r,n);let m={childDocs:u,resources:f,...p!=null&&{mcpConfig:p}};return d.set(e,m),m},{prompts:p,errors:m}=await u.readDirectoryStructure(s,c,{kind:Ym.Skill,entryFileName:`skill`,localeExtensions:wy,isDirectoryStructure:!0,createPrompt:async(t,n,r,a)=>{let o=i.join(c,r),{childDocs:s,resources:l,mcpConfig:u}=await f(r);return YS(t,n,r,c,o,e,u,s,l,void 0,a)}});for(let e of m)n.warn(E({code:`SKILL_PROMPT_READ_FAILED`,title:`Failed to read skill prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`skill prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(m.length>0)throw Error(m.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
296
+ `));for(let e of p){let t=e.dist?.prompt;t!=null&&l.push(t)}return{skills:l}}},ZS=class e extends Xh{static projectConfigFileName=`project.json5`;constructor(){super(`AindexInputCapability`)}loadProjectConfig(t,n,r,i,a,o){let s=a.join(n,r,t,e.projectConfigFileName);if(i.existsSync(s))try{let n=i.readFileSync(s,`utf8`);try{return v.default.parse(n)}catch(n){o.warn(D({code:`AINDEX_PROJECT_JSON5_INVALID`,title:`Failed to parse ${e.projectConfigFileName} for ${t}`,reason:y(`tnmsc could not parse the ${e.projectConfigFileName} file for "${t}".`,`Underlying error: ${n instanceof Error?n.message:String(n)}`),configPath:s,exactFix:y(`Fix the JSON5 syntax in ${e.projectConfigFileName} and rerun tnmsc.`),details:{projectName:t,errorMessage:n instanceof Error?n.message:String(n)}}));return}}catch(n){o.warn(D({code:`AINDEX_PROJECT_JSON5_READ_FAILED`,title:`Failed to load ${e.projectConfigFileName} for ${t}`,reason:y(`tnmsc could not read the ${e.projectConfigFileName} file for "${t}".`,`Underlying error: ${n instanceof Error?n.message:String(n)}`),configPath:s,exactFix:y(`Ensure ${e.projectConfigFileName} exists, is readable, and contains valid JSON5.`),details:{projectName:t,errorMessage:n instanceof Error?n.message:String(n)}}));return}}collect(e){let{userConfigOptions:t,logger:n,fs:r,path:i}=e,{workspaceDir:a,aindexDir:o}=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.app.dist,o),c=i.basename(o),l=[];if(r.existsSync(s)&&r.statSync(s).isDirectory())try{let e=r.readdirSync(s,{withFileTypes:!0});for(let s of e)if(s.isDirectory()){let e=s.name===c,u=this.loadProjectConfig(s.name,o,t.aindex.app.src,r,i,n);l.push({name:s.name,...e&&{isPromptSourceProject:!0},...u!=null&&{projectConfig:u},dirFromWorkspacePath:{pathKind:Xm.Relative,path:s.name,basePath:a,getDirectoryName:()=>s.name,getAbsolutePath:()=>i.resolve(a,s.name)}})}}catch(e){n.error(E({code:`AINDEX_PROJECT_DIRECTORY_SCAN_FAILED`,title:`Failed to scan aindex projects directory`,operation:`scan`,targetKind:`aindex projects directory`,path:s,error:e}))}if(l.length===0&&r.existsSync(a)&&r.statSync(a).isDirectory()){n.debug(`no projects in dist/app/, falling back to workspace scan`,{workspaceDir:a});try{let e=r.readdirSync(a,{withFileTypes:!0});for(let s of e)if(s.isDirectory()&&!s.name.startsWith(`.`)){let e=s.name===c,u=this.loadProjectConfig(s.name,o,t.aindex.app.src,r,i,n);l.push({name:s.name,...e&&{isPromptSourceProject:!0},...u!=null&&{projectConfig:u},dirFromWorkspacePath:{pathKind:Xm.Relative,path:s.name,basePath:a,getDirectoryName:()=>s.name,getAbsolutePath:()=>i.resolve(a,s.name)}})}}catch(e){n.error(E({code:`WORKSPACE_DIRECTORY_SCAN_FAILED`,title:`Failed to scan workspace directory`,operation:`scan`,targetKind:`workspace directory`,path:a,error:e}))}}return{workspace:{directory:{pathKind:Xm.Absolute,path:a,getDirectoryName:()=>i.basename(a)},projects:l}}}},QS=class extends Xh{constructor(){super(`CommandInputCapability`)}createCommandPrompt(e,t,n,r,i,a){let{path:o}=i,s=n.replaceAll(`\\`,`/`),c=s.indexOf(`/`),l=c===-1?void 0:s.slice(0,c),u=(c===-1?s:s.slice(c+1)).replace(/\.mdx$/,``),d=u.indexOf(`_`),f=l??(d===-1?void 0:u.slice(0,Math.max(0,d))),p=l!=null||d===-1?u:u.slice(Math.max(0,d+1)),m=o.join(r,`${n}.mdx`),h=`${n}.mdx`,g=a,_={type:Ym.Command,content:e,length:e.length,filePathKind:Xm.Relative,dir:{pathKind:Xm.Relative,path:h,basePath:r,getDirectoryName:()=>h.replace(/\.mdx$/,``),getAbsolutePath:()=>m},...f!=null&&{commandPrefix:f},commandName:p};if(g==null)return _;let v=ey(g,m);if(!v.valid)throw Error(v.errors.join(`
297
+ `));return Object.assign(_,{yamlFrontMatter:g}),g.seriName!=null&&Object.assign(_,{seriName:g.seriName}),g.scope===`global`&&Object.assign(_,{globalOnly:!0}),_}async collect(e){let{userConfigOptions:t,logger:n,path:r,fs:i,globalScope:a}=e,o=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.commands.src,o.aindexDir),c=this.resolveAindexPath(t.aindex.commands.dist,o.aindexDir);n.debug(`CommandInputCapability collecting`,{srcDir:s,distDir:c,aindexDir:o.aindexDir});let{prompts:l,errors:u}=await zy(i,r,n,a).readFlatFiles(s,c,{kind:Ym.Command,localeExtensions:wy,isDirectoryStructure:!1,createPrompt:(t,n,r,i)=>this.createCommandPrompt(t,n,r,c,e,i)});n.debug(`CommandInputCapability read complete`,{commandCount:l.length,errorCount:u.length});for(let e of u)n.warn(E({code:`COMMAND_PROMPT_READ_FAILED`,title:`Failed to read command prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`command prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(u.length>0)throw Error(u.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
298
+ `));let d=[];for(let e of l){let t=e.dist;if(t?.prompt==null)continue;let{prompt:n,rawMdx:r}=t;d.push(r==null?n:{...n,rawMdxContent:r})}return n.debug(`CommandInputCapability flattened commands`,{count:d.length,commands:d.map(e=>e.commandName)}),{commands:d}}},$S=class extends Xh{constructor(){super(`EditorConfigInputCapability`)}collect(e){let{userConfigOptions:t,fs:n}=e,{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(t),a=[],o=mh(Zm.EditorConfig,`.editorconfig`,i,n,{command:e.runtimeCommand,workspaceDir:r});return o!=null&&a.push(o),{editorConfigFiles:a}}},eC=class extends Xh{constructor(){super(`GitExcludeInputCapability`)}collect(e){let{workspaceDir:t,aindexDir:n}=this.resolveBasePaths(e.userConfigOptions),r=fh(n,th,{command:e.runtimeCommand,workspaceDir:t});if(!e.fs.existsSync(r))return this.log.debug({action:`collect`,message:`File not found`,path:r}),{};let i=e.fs.readFileSync(r,`utf8`);return i.length===0?(this.log.debug({action:`collect`,message:`File is empty`,path:r}),{}):(this.log.debug({action:`collect`,message:`Loaded file content`,path:r,length:i.length}),{shadowGitExclude:i})}},tC=class extends Xh{constructor(){super(`GitIgnoreInputCapability`)}collect(e){let{workspaceDir:t,aindexDir:n}=this.resolveBasePaths(e.userConfigOptions),r=fh(n,eh,{command:e.runtimeCommand,workspaceDir:t});if(!e.fs.existsSync(r))return this.log.debug({action:`collect`,message:`File not found`,path:r}),{};let i=e.fs.readFileSync(r,`utf8`);return i.length===0?(this.log.debug({action:`collect`,message:`File is empty`,path:r}),{}):(this.log.debug({action:`collect`,message:`Loaded file content`,path:r,length:i.length}),{globalGitIgnore:i})}},nC=class extends Xh{constructor(){super(`GlobalMemoryInputCapability`)}async collect(e){let{userConfigOptions:t,fs:n,path:r,globalScope:i}=e,{aindexDir:a}=this.resolveBasePaths(t),o=this.resolveAindexPath(t.aindex.globalPrompt.dist,a);if(!n.existsSync(o))return this.log.warn(ee({code:`GLOBAL_MEMORY_PROMPT_MISSING`,title:`Global memory prompt is missing`,path:o,expectedKind:`compiled global memory prompt file`,actualState:`path does not exist`})),{};if(!n.statSync(o).isFile())return this.log.warn(ee({code:`GLOBAL_MEMORY_PROMPT_NOT_FILE`,title:`Global memory prompt path is not a file`,path:o,expectedKind:`compiled global memory prompt file`,actualState:`path exists but is not a regular file`})),{};let s=n.readFileSync(o,`utf8`),c=mp(s),l;try{l=(await av(s,{...i!=null&&{globalScope:i},extractMetadata:!0,basePath:r.dirname(o),filePath:o})).content,Ny(l,o)}catch(e){throw e instanceof ig&&(this.log.error(k({code:`GLOBAL_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile global memory prompt`,diagnosticText:Iy(e,{operation:`Failed to compile global memory prompt.`,promptKind:`global-memory`,logicalName:`global-memory`,distPath:o}),details:{promptKind:`global-memory`,distPath:o}})),e instanceof og&&this.log.error(D({code:`GLOBAL_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Global memory prompt references missing config variables`,reason:y("The global memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:y("Add the missing variables to `~/.aindex/.tnmsc.json` and rerun tnmsc."),possibleFixes:[y("If you reference `{profile.name}`, define `profile.name` in the config file.")],details:{promptPath:o,errorMessage:e.message}})),d.default.exit(1)),e}return this.log.debug({action:`collect`,path:o,contentLength:l.length}),{globalMemory:{type:Ym.GlobalMemory,content:l,length:l.length,filePathKind:Xm.Relative,...c.rawFrontMatter!=null&&{rawFrontMatter:c.rawFrontMatter},markdownAst:c.markdownAst,markdownContents:c.markdownContents,dir:{pathKind:Xm.Relative,path:r.basename(o),basePath:r.dirname(o),getDirectoryName:()=>r.basename(o),getAbsolutePath:()=>o},parentDirectoryPath:{type:Qm.UserHome,directory:{pathKind:Xm.Relative,path:``,basePath:p.homedir(),getDirectoryName:()=>r.basename(p.homedir()),getAbsolutePath:()=>p.homedir()}}}}}},rC=class extends Xh{constructor(){super(`JetBrainsConfigInputCapability`)}collect(e){let{userConfigOptions:t,fs:n}=e,{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(t),a=[`.idea/codeStyles/Project.xml`,`.idea/codeStyles/codeStyleConfig.xml`,`.idea/.gitignore`],o=[];for(let t of a){let a=mh(Zm.IntellijIDEA,t,i,n,{command:e.runtimeCommand,workspaceDir:r});a!=null&&o.push(a)}return{jetbrainsConfigFiles:o}}};const iC=`agt.mdx`,aC=[`node_modules`,`.git`];var oC=class extends Xh{constructor(){super(`ProjectPromptInputCapability`,[`AindexInputCapability`])}async collect(e){let{dependencyContext:t,fs:n,userConfigOptions:r,path:i,globalScope:a}=e,{aindexDir:o}=this.resolveBasePaths(r),s=this.resolveAindexPath(r.aindex.app.dist,o),c=this.resolveAindexPath(r.aindex.workspacePrompt.dist,o),l=t.workspace;if(l==null)return this.log.info(`No workspace found in dependency context, skipping project prompt enhancement`),{};let u=l.projects??[],d=await Promise.all(u.map(async t=>{let r=t.name;if(r==null||t.isWorkspaceRootProject===!0)return t;let o=i.join(s,r);if(!n.existsSync(o)||!n.statSync(o).isDirectory())return t;let c=t.dirFromWorkspacePath?.getAbsolutePath(),l=await this.readRootMemoryPrompt(e,o,a),u=c==null?[]:await this.scanChildMemoryPrompts(e,o,c,a);return{...t,...l!=null&&{rootMemoryPrompt:l},...u.length>0&&{childMemoryPrompts:u}}})),f=await this.readWorkspaceRootProjectPrompt(e,c,a,this.resolveWorkspaceRootProjectConfig(u));return{workspace:{directory:l.directory,projects:f==null?d:[...d,f]}}}async readWorkspaceRootProjectPrompt(e,t,n,r){let{fs:i,path:a,logger:o}=e;if(!(!i.existsSync(t)||!i.statSync(t).isFile()))try{let e=i.readFileSync(t,`utf8`),s=mp(e),c;try{let{content:r}=await av(e,{globalScope:n,extractMetadata:!0,basePath:a.dirname(t),filePath:t});c=r,Ny(c,t)}catch(e){throw e instanceof ig&&(o.error(k({code:`WORKSPACE_ROOT_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile workspace root memory prompt`,diagnosticText:Iy(e,{operation:`Failed to compile workspace root memory prompt.`,promptKind:`workspace-root-memory`,logicalName:t,distPath:t}),details:{promptKind:`workspace-root-memory`,distPath:t}})),e instanceof og&&o.error(D({code:`WORKSPACE_ROOT_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Workspace root memory prompt references missing config variables`,reason:y("The workspace root memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:y("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:t,errorMessage:e.message}})),d.default.exit(1)),e}let l={type:Ym.ProjectRootMemory,content:c,length:c.length,filePathKind:Xm.Relative,...s.yamlFrontMatter!=null&&{yamlFrontMatter:s.yamlFrontMatter},...s.rawFrontMatter!=null&&{rawFrontMatter:s.rawFrontMatter},markdownAst:s.markdownAst,markdownContents:s.markdownContents,dir:{pathKind:Xm.Root,path:``,getDirectoryName:()=>``}};return{name:`__workspace__`,isWorkspaceRootProject:!0,...r!=null&&{projectConfig:r},rootMemoryPrompt:l}}catch(e){o.error(E({code:`WORKSPACE_ROOT_MEMORY_PROMPT_READ_FAILED`,title:`Failed to read workspace root memory prompt`,operation:`read`,targetKind:`workspace root memory prompt`,path:t,error:e}));return}}resolveWorkspaceRootProjectConfig(e){let t=e.filter(e=>e.isWorkspaceRootProject!==!0);return t.find(e=>e.isPromptSourceProject===!0)?.projectConfig??t[0]?.projectConfig}async readRootMemoryPrompt(e,t,n){let{fs:r,path:i,logger:a}=e,o=i.join(t,iC);if(!(!r.existsSync(o)||!r.statSync(o).isFile()))try{let e=r.readFileSync(o,`utf8`),i=mp(e),s;try{let{content:r}=await av(e,{globalScope:n,extractMetadata:!0,basePath:t,filePath:o});s=r,Ny(s,o)}catch(e){throw e instanceof ig&&(a.error(k({code:`PROJECT_ROOT_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile project root memory prompt`,diagnosticText:Iy(e,{operation:`Failed to compile project root memory prompt.`,promptKind:`project-root-memory`,logicalName:o,distPath:o}),details:{promptKind:`project-root-memory`,distPath:o}})),e instanceof og&&a.error(D({code:`PROJECT_ROOT_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Project root memory prompt references missing config variables`,reason:y("The project root memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:y("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:o,errorMessage:e.message}})),d.default.exit(1)),e}return{type:Ym.ProjectRootMemory,content:s,length:s.length,filePathKind:Xm.Relative,...i.yamlFrontMatter!=null&&{yamlFrontMatter:i.yamlFrontMatter},...i.rawFrontMatter!=null&&{rawFrontMatter:i.rawFrontMatter},markdownAst:i.markdownAst,markdownContents:i.markdownContents,dir:{pathKind:Xm.Root,path:``,getDirectoryName:()=>``}}}catch(e){a.error(E({code:`PROJECT_ROOT_MEMORY_PROMPT_READ_FAILED`,title:`Failed to read project root memory prompt`,operation:`read`,targetKind:`project root memory prompt`,path:o,error:e}));return}}async scanChildMemoryPrompts(e,t,n,r){let{logger:i}=e,a=[];try{await this.scanDirectoryRecursive(e,t,t,n,a,r)}catch(e){i.error(E({code:`PROJECT_CHILD_MEMORY_SCAN_FAILED`,title:`Failed to scan project child memory prompts`,operation:`scan`,targetKind:`project child memory prompt directory`,path:t,error:e}))}return a}async scanDirectoryRecursive(e,t,n,r,i,a){let{fs:o,path:s}=e,c=o.readdirSync(n,{withFileTypes:!0});for(let l of c){if(!l.isDirectory()||aC.includes(l.name))continue;let c=s.join(n,l.name),u=s.join(c,iC);if(o.existsSync(u)&&o.statSync(u).isFile()){let n=await this.readChildMemoryPrompt(e,t,c,r,a);n!=null&&i.push(n)}await this.scanDirectoryRecursive(e,t,c,r,i,a)}}async readChildMemoryPrompt(e,t,n,r,i){let{fs:a,path:o,logger:s}=e,c=o.join(n,iC);try{let e=a.readFileSync(c,`utf8`),l=mp(e),u;try{let{content:t}=await av(e,{globalScope:i,extractMetadata:!0,basePath:n,filePath:c});u=t,Ny(u,c)}catch(e){throw e instanceof ig&&(s.error(k({code:`PROJECT_CHILD_MEMORY_PROMPT_COMPILE_FAILED`,title:`Failed to compile project child memory prompt`,diagnosticText:Iy(e,{operation:`Failed to compile project child memory prompt.`,promptKind:`project-child-memory`,logicalName:c,distPath:c}),details:{promptKind:`project-child-memory`,distPath:c}})),e instanceof og&&s.error(D({code:`PROJECT_CHILD_MEMORY_SCOPE_VARIABLES_MISSING`,title:`Project child memory prompt references missing config variables`,reason:y("The project child memory prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:y("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:c,errorMessage:e.message}})),d.default.exit(1)),e}let f=o.relative(t,n),p=o.join(r,f),m=o.basename(n);return{type:Ym.ProjectChildrenMemory,content:u,length:u.length,filePathKind:Xm.Relative,...l.yamlFrontMatter!=null&&{yamlFrontMatter:l.yamlFrontMatter},...l.rawFrontMatter!=null&&{rawFrontMatter:l.rawFrontMatter},markdownAst:l.markdownAst,markdownContents:l.markdownContents,dir:{pathKind:Xm.Relative,path:f,basePath:r,getDirectoryName:()=>m,getAbsolutePath:()=>p},workingChildDirectoryPath:{pathKind:Xm.Relative,path:f,basePath:r,getDirectoryName:()=>m,getAbsolutePath:()=>p}}}catch(e){s.error(E({code:`PROJECT_CHILD_MEMORY_PROMPT_READ_FAILED`,title:`Failed to read project child memory prompt`,operation:`read`,targetKind:`project child memory prompt`,path:c,error:e}));return}}};const sC=Object.entries(iy);var cC=class extends Xh{constructor(){super(`ReadmeMdInputCapability`,[`AindexInputCapability`])}async collect(e){let{userConfigOptions:t,logger:n,fs:r,path:i,globalScope:a}=e,{workspaceDir:o,aindexDir:s}=this.resolveBasePaths(t),c=this.resolveAindexPath(t.aindex.app.dist,s),l=[];if(!r.existsSync(c)||!r.statSync(c).isDirectory())return n.debug(`aindex projects directory does not exist`,{path:c}),{readmePrompts:l};try{let t=r.readdirSync(c,{withFileTypes:!0});for(let n of t){if(!n.isDirectory())continue;let t=n.name,r=i.join(c,t);await this.collectReadmeFiles(e,r,t,o,``,l,a)}}catch(e){n.error(E({code:`README_PROJECT_SCAN_FAILED`,title:`Failed to scan aindex projects for readme prompts`,operation:`scan`,targetKind:`aindex project directory`,path:c,error:e}))}return{readmePrompts:l}}async collectReadmeFiles(e,t,n,r,i,a,o){let{fs:s,path:c,logger:l}=e,u=i===``;for(let[e,{src:f}]of sC){let p=c.join(t,f);if(!(!s.existsSync(p)||!s.statSync(p).isFile()))try{let m=s.readFileSync(p,`utf8`),h;try{let{content:e}=await av(m,{...o!=null&&{globalScope:o},extractMetadata:!0,basePath:t,filePath:p});h=e,Ny(h,p)}catch(t){throw t instanceof ig&&(l.error(k({code:`README_PROMPT_COMPILE_FAILED`,title:`Failed to compile readme-family prompt`,diagnosticText:Iy(t,{operation:`Failed to compile readme-family prompt.`,promptKind:`readme-family`,logicalName:`${n}/${f}`,distPath:p}),details:{promptKind:`readme-family`,distPath:p,projectName:n,fileKind:e}})),t instanceof og&&l.error(D({code:`README_SCOPE_VARIABLES_MISSING`,title:`Readme-family prompt references missing config variables`,reason:y("The readme-family prompt uses scope variables that are not defined in `~/.aindex/.tnmsc.json`."),configPath:`~/.aindex/.tnmsc.json`,exactFix:y("Define the missing variables in `~/.aindex/.tnmsc.json` and rerun tnmsc."),details:{promptPath:p,errorMessage:t.message}})),d.default.exit(1)),t}let g=u?n:c.join(n,i),_={pathKind:Xm.Relative,path:g,basePath:r,getDirectoryName:()=>u?n:c.basename(i),getAbsolutePath:()=>c.resolve(r,g)},v={pathKind:Xm.Relative,path:c.dirname(p),basePath:r,getDirectoryName:()=>c.basename(c.dirname(p)),getAbsolutePath:()=>c.dirname(p)};a.push({type:Ym.Readme,content:h,length:h.length,filePathKind:Xm.Relative,projectName:n,targetDir:_,isRoot:u,fileKind:e,markdownContents:[],dir:v})}catch(t){l.warn(E({code:`README_PROMPT_READ_FAILED`,title:`Failed to read readme-family file`,operation:`read`,targetKind:`readme-family prompt file`,path:p,error:t,details:{fileKind:e}}))}}try{let l=s.readdirSync(t,{withFileTypes:!0});for(let s of l)if(s.isDirectory()){let l=u?s.name:c.join(i,s.name),d=c.join(t,s.name);await this.collectReadmeFiles(e,d,n,r,l,a,o)}}catch(e){l.warn(E({code:`README_DIRECTORY_SCAN_FAILED`,title:`Failed to scan readme-family directory`,operation:`scan`,targetKind:`readme-family directory`,path:t,error:e}))}}},lC=class extends Xh{constructor(){super(`RuleInputCapability`)}async collect(e){let{userConfigOptions:t,logger:n,path:r,fs:i,globalScope:a}=e,o=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.rules.src,o.aindexDir),c=this.resolveAindexPath(t.aindex.rules.dist,o.aindexDir),{prompts:l,errors:u}=await zy(i,r,n,a).readFlatFiles(s,c,{kind:Ym.Rule,localeExtensions:wy,isDirectoryStructure:!1,createPrompt:async(e,t,n,i)=>{let a=i,o=r.join(c,`${n}.mdx`);if(a!=null){let e=ny(a,o);if(!e.valid)throw Error(e.errors.join(`
299
+ `))}let s=a?.globs??[],l=a?.scope??`project`,u=a?.seriName,d=n.replaceAll(`\\`,`/`),f=d.includes(`/`)?d.split(`/`)[0]??``:``,p=d.split(`/`).pop()??d,m={type:Ym.Rule,content:e,length:e.length,filePathKind:Xm.Relative,dir:{pathKind:Xm.Relative,path:`${n}.mdx`,basePath:c,getDirectoryName:()=>p,getAbsolutePath:()=>o},prefix:f,ruleName:p,globs:s,scope:l,markdownContents:[]};return a!=null&&Object.assign(m,{yamlFrontMatter:a}),u!=null&&Object.assign(m,{seriName:u}),m}});for(let e of u)n.warn(E({code:`RULE_PROMPT_READ_FAILED`,title:`Failed to read rule prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`rule prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(u.length>0)throw Error(u.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
300
+ `));return{rules:l.map(e=>e.dist?.prompt).filter(e=>e!=null)}}},uC=class extends Xh{constructor(){super(`AIAgentIgnoreInputCapability`)}collect(e){let{workspaceDir:t,aindexDir:n}=this.resolveBasePaths(e.userConfigOptions),r=[];for(let i of nh){let a=fh(n,i,{command:e.runtimeCommand,workspaceDir:t});if(!e.fs.existsSync(a)){this.log.debug({action:`collect`,message:`Ignore file not found`,path:a});continue}let o=e.fs.readFileSync(a,`utf8`);if(o.length===0){this.log.debug({action:`collect`,message:`Ignore file is empty`,path:a});continue}r.push({fileName:i,content:o,sourcePath:a}),this.log.debug({action:`collect`,message:`Loaded ignore file`,path:a,fileName:i})}return r.length===0?{}:{aiAgentIgnoreConfigFiles:r}}},dC=class extends Xh{constructor(){super(`SubAgentInputCapability`)}createSubAgentPrompt(e,t,n,r,i,a){let{path:o}=i,s=n.replaceAll(`\\`,`/`),c=s.indexOf(`/`),l=c===-1?void 0:s.slice(0,c),u=(c===-1?s:s.slice(c+1)).replace(/\.mdx$/,``),d=u.indexOf(`_`),f=l??(d===-1?void 0:u.slice(0,Math.max(0,d))),p=l!=null||d===-1?u:u.slice(Math.max(0,d+1)),m=o.join(r,`${n}.mdx`),h=`${n}.mdx`,g=a,_={type:Ym.SubAgent,content:e,length:e.length,filePathKind:Xm.Relative,dir:{pathKind:Xm.Relative,path:h,basePath:r,getDirectoryName:()=>h.replace(/\.mdx$/,``),getAbsolutePath:()=>m},...f!=null&&{agentPrefix:f},agentName:p};if(g==null)return _;let v=ty(g,m);if(!v.valid)throw Error(v.errors.join(`
301
+ `));return Object.assign(_,{yamlFrontMatter:g}),g.seriName!=null&&Object.assign(_,{seriName:g.seriName}),_}async collect(e){let{userConfigOptions:t,logger:n,path:r,fs:i,globalScope:a}=e,o=this.resolveBasePaths(t),s=this.resolveAindexPath(t.aindex.subAgents.src,o.aindexDir),c=this.resolveAindexPath(t.aindex.subAgents.dist,o.aindexDir);n.debug(`SubAgentInputCapability collecting`,{srcDir:s,distDir:c,aindexDir:o.aindexDir});let{prompts:l,errors:u}=await zy(i,r,n,a).readFlatFiles(s,c,{kind:Ym.SubAgent,localeExtensions:wy,isDirectoryStructure:!1,createPrompt:(t,n,r,i)=>this.createSubAgentPrompt(t,n,r,c,e,i)});n.debug(`SubAgentInputCapability read complete`,{subAgentCount:l.length,errorCount:u.length});for(let e of u)n.warn(E({code:`SUBAGENT_PROMPT_READ_FAILED`,title:`Failed to read sub-agent prompt`,operation:e.phase===`scan`?`scan`:`read`,targetKind:`sub-agent prompt`,path:e.path,error:e.error,details:{phase:e.phase}}));if(u.length>0)throw Error(u.map(e=>e.error instanceof Error?e.error.message:String(e.error)).join(`
302
+ `));let d=[];for(let e of l){let t=e.dist;if(t?.prompt==null)continue;let{prompt:n,rawMdx:r}=t;d.push(r==null?n:{...n,rawMdxContent:r})}return n.debug(`SubAgentInputCapability flattened subAgents`,{count:d.length,agents:d.map(e=>e.agentName)}),{subAgents:d}}},fC=class extends Xh{constructor(){super(`VSCodeConfigInputCapability`)}collect(e){let{userConfigOptions:t,fs:n}=e,{workspaceDir:r,aindexDir:i}=this.resolveBasePaths(t),a=[`.vscode/settings.json`,`.vscode/extensions.json`],o=[];for(let t of a){let a=mh(Zm.VSCode,t,i,n,{command:e.runtimeCommand,workspaceDir:r});a!=null&&o.push(a)}return{vscodeConfigFiles:o}}},pC=class extends Xh{constructor(){super(`WorkspaceInputCapability`)}collect(e){let{userConfigOptions:t}=e,{workspaceDir:n,aindexDir:r}=this.resolveBasePaths(t);return{workspace:{directory:{pathKind:Xm.Absolute,path:n,getDirectoryName:()=>u.basename(n)},projects:[]},aindexDir:r}}};const mC={workspace:{strategy:`mergeProjects`,getter:e=>e.workspace},vscodeConfigFiles:{strategy:`concat`,getter:e=>e.vscodeConfigFiles},jetbrainsConfigFiles:{strategy:`concat`,getter:e=>e.jetbrainsConfigFiles},editorConfigFiles:{strategy:`concat`,getter:e=>e.editorConfigFiles},commands:{strategy:`concat`,getter:e=>e.commands},subAgents:{strategy:`concat`,getter:e=>e.subAgents},skills:{strategy:`concat`,getter:e=>e.skills},rules:{strategy:`concat`,getter:e=>e.rules},aiAgentIgnoreConfigFiles:{strategy:`concat`,getter:e=>e.aiAgentIgnoreConfigFiles},readmePrompts:{strategy:`concat`,getter:e=>e.readmePrompts},globalMemory:{strategy:`override`,getter:e=>e.globalMemory},aindexDir:{strategy:`override`,getter:e=>e.aindexDir},globalGitIgnore:{strategy:`override`,getter:e=>e.globalGitIgnore},shadowGitExclude:{strategy:`override`,getter:e=>e.shadowGitExclude}};function hC(e,t){return t==null?e??[]:e==null?t:[...e,...t]}function gC(e,t){let n=new Map;for(let t of e.projects)n.set(t.name,t);for(let e of t.projects)n.set(e.name,e);return{directory:t.directory??e.directory,projects:[...n.values()]}}function _C(e,t){return t==null?e:e==null?t:gC(e,t)}function vC(e,t,n){switch(n){case`concat`:return hC(e,t);case`override`:return t??e;case`mergeProjects`:return _C(e,t);default:return t??e}}function yC(e,t){let n={};for(let[r,i]of Object.entries(mC)){let a=vC(i.getter(e),i.getter(t),i.strategy);a!=null&&(n[r]=a)}return n}function bC(e,t,n){let r=e.dependsOn??[];if(r.length===0)return{};let i=new Set,a={};for(let e of r){if(i.has(e))continue;i.add(e);let r=t.get(e);r!=null&&(a=n(a,r))}return a}function xC(e,t){let n=new Set;for(let[e,r]of t)r>0&&n.add(e);let r=new Map;for(let t of e)if(n.has(t.name)){let e=(t.dependsOn??[]).filter(e=>n.has(e));r.set(t.name,e)}let i=new Set,a=[],o=e=>{if(a.includes(e))return a.push(e),!0;if(i.has(e))return!1;i.add(e),a.push(e);for(let t of r.get(e)??[])if(o(t))return!0;return a.pop(),!1};for(let e of n){if(o(e)){let e=a.indexOf(a.at(-1));return a.slice(e)}i.clear(),a.length=0}return[...n]}function SC(e){let t=new Set(e.map(e=>e.name));for(let n of e){let e=n.dependsOn??[];for(let r of e)if(!t.has(r))throw new my(n.name,r)}let n=new Map;for(let t of e)n.set(t.name,t);let r=new Map;for(let t of e)r.set(t.name,0);let i=new Map;for(let t of e)i.set(t.name,[]);for(let t of e){let e=t.dependsOn??[];for(let n of e){r.set(t.name,(r.get(t.name)??0)+1);let e=i.get(n)??[];e.push(t.name),i.set(n,e)}}let a=[];for(let t of e)r.get(t.name)===0&&a.push(t.name);let o=[],s=new Map;for(let t=0;t<e.length;t++){let n=e[t];n!=null&&s.set(n.name,t)}for(;a.length>0;){let e=a.shift(),t=n.get(e);o.push(t);let c=(i.get(e)??[]).sort((e,t)=>(s.get(e)??-1)-(s.get(t)??-1));for(let e of c){let t=(r.get(e)??0)-1;r.set(e,t),t===0&&a.push(e)}}if(o.length===e.length)return o;throw new hy(xC(e,r))}function CC(){return[new AS,new kS,new DS]}function wC(){return[new pC,new ZS,new fC,new rC,new $S,new XS,new QS,new dC,new lC,new nC,new oC,new cC,new tC,new eC,new uC]}function TC(e){if(e==null||e.length===0)return`execute`;let t=cx(ix(e.filter(e=>e!=null)));if(!(t.helpFlag||t.versionFlag||t.unknownCommand!=null)){if(t.subcommand===`clean`)return`clean`;if(t.subcommand===`plugins`)return`plugins`;if(t.subcommand===`dry-run`||t.dryRun)return`dry-run`;if(t.subcommand==null)return`execute`}}async function EC(e){let{pipelineArgs:t,userConfigOptions:n,userConfig:r,capabilities:i,includeBuiltinEffects:a=!0}=e,o=be(`InputRuntime`,n.logLevel),s=TC(t),c={logger:o,userConfigOptions:n,fs:l,path:u,glob:Pm.default},d=SC([...a?CC():[],...i??wC()]),f=new Dv({userConfig:r}).collect(),p=new kv;p.setGlobalScope(f),o.debug(`global scope collected`,{osInfo:{platform:f.os.platform,arch:f.os.arch,shellKind:f.os.shellKind},hasProfile:Object.keys(f.profile).length>0,hasTool:Object.keys(f.tool).length>0});let m=new Map,h={};for(let e of d){let t=bC(e,m,yC),n={...c,dependencyContext:t,...s==null?{}:{runtimeCommand:s},globalScope:f,scopeRegistry:p},r=e;r.executeEffects!=null&&await r.executeEffects(n,!1);let i=await e.collect(n);m.set(e.name,i),h=yC(h,i);let a=e;if(a.getRegisteredScopes!=null){let t=a.getRegisteredScopes();for(let{namespace:n,values:r}of t)p.register(n,r,Ov.PluginRegistered),o.debug(`input capability scope registered`,{capability:e.name,namespace:n,keys:Object.keys(r)})}}return h}function DC(e){return`declarativeOutput`in e}function OC(e){return`collect`in e&&!DC(e)}const kC={version:`0.0.0`,workspaceDir:`~/project`,logLevel:`info`,aindex:{dir:`aindex`,skills:{src:`skills`,dist:`dist/skills`},commands:{src:`commands`,dist:`dist/commands`},subAgents:{src:`subagents`,dist:`dist/subagents`},rules:{src:`rules`,dist:`dist/rules`},globalPrompt:{src:`app/global.src.mdx`,dist:`dist/global.mdx`},workspacePrompt:{src:`app/workspace.src.mdx`,dist:`dist/workspace.mdx`},app:{src:`app`,dist:`dist/app`},ext:{src:`ext`,dist:`dist/ext`},arch:{src:`arch`,dist:`dist/arch`}},commandSeriesOptions:{},outputScopes:{},frontMatter:{blankLineAfter:!0},cleanupProtection:{},plugins:[]};function AC(e){return{...e.version==null?{}:{version:e.version},...e.workspaceDir==null?{}:{workspaceDir:e.workspaceDir},...e.aindex==null?{}:{aindex:e.aindex},...e.commandSeriesOptions==null?{}:{commandSeriesOptions:e.commandSeriesOptions},...e.outputScopes==null?{}:{outputScopes:e.outputScopes},...e.frontMatter==null?{}:{frontMatter:e.frontMatter},...e.cleanupProtection==null?{}:{cleanupProtection:e.cleanupProtection},...e.logLevel==null?{}:{logLevel:e.logLevel}}}function jC(...e){return e.reduce((e,t)=>MC(e,t),{...kC})}function MC(e,t){let n=t.plugins,r=t.commandSeriesOptions,i=t.outputScopes,a=t.frontMatter,o=t.cleanupProtection;return{...e,...t,aindex:NC(e.aindex,t.aindex),plugins:[...e.plugins,...n??[]],commandSeriesOptions:PC(e.commandSeriesOptions,r),outputScopes:IC(e.outputScopes,i),frontMatter:LC(e.frontMatter,a),cleanupProtection:RC(e.cleanupProtection,o)}}function NC(e,t){return t==null?e:{dir:t.dir??e.dir,skills:{...e.skills,...t.skills},commands:{...e.commands,...t.commands},subAgents:{...e.subAgents,...t.subAgents},rules:{...e.rules,...t.rules},globalPrompt:{...e.globalPrompt,...t.globalPrompt},workspacePrompt:{...e.workspacePrompt,...t.workspacePrompt},app:{...e.app,...t.app},ext:{...e.ext,...t.ext},arch:{...e.arch,...t.arch}}}function PC(e,t){if(t==null)return e??{};if(e==null)return t;let n={};if(e.pluginOverrides!=null)for(let[t,r]of Object.entries(e.pluginOverrides))n[t]={...r};if(t.pluginOverrides!=null)for(let[e,r]of Object.entries(t.pluginOverrides))n[e]={...n[e],...r};let r=t.includeSeriesPrefix??e.includeSeriesPrefix,i=Object.keys(n).length>0;return r!=null&&i?{includeSeriesPrefix:r,pluginOverrides:n}:r==null?i?{pluginOverrides:n}:{}:{includeSeriesPrefix:r}}function FC(e,t){if(!(e==null&&t==null))return e==null?t:t==null?e:{...e,...t}}function IC(e,t){if(t==null)return e??{};if(e==null)return t;let n={};if(e.plugins!=null)for(let[t,r]of Object.entries(e.plugins))r!=null&&(n[t]={...r});if(t.plugins!=null)for(let[e,r]of Object.entries(t.plugins)){let t=FC(n[e],r);t!=null&&(n[e]=t)}return Object.keys(n).length===0?{}:{plugins:n}}function LC(e,t){return t==null?e:{...e,...t}}function RC(e,t){return t==null?e??{}:e==null?t:{rules:[...e.rules??[],...t.rules??[]]}}function zC(e){return`pluginOptions`in e||`configLoaderOptions`in e||`loadUserConfig`in e||`cwd`in e||`pipelineArgs`in e}async function BC(e={}){let t,n,r,i,a;zC(e)?({pluginOptions:r={},cwd:n,configLoaderOptions:i,pipelineArgs:a}={pluginOptions:e.pluginOptions,cwd:e.cwd,configLoaderOptions:e.configLoaderOptions,pipelineArgs:e.pipelineArgs},t=e.loadUserConfig??!0):(r=e,t=!0,i=void 0,a=void 0);let o=Object.hasOwn(r,`plugins`),s=r.plugins,c={},l=!1,u=[],d;if(t)try{let e=wb(i).load(n);l=e.found,u=e.sources,e.found&&(c=AC(e.config),d=e.config)}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to load user config: ${t}`)}let f=jC(c,r),{plugins:p=[],logLevel:m}=f,h=be(`defineConfig`,m);l?h.info(`user config loaded`,{sources:u}):h.info(`no user config found, using defaults/programmatic options`,{workspaceDir:f.workspaceDir,aindexDir:f.aindex.dir,logLevel:f.logLevel});let g=p.filter(DC),_=p.filter(OC);dy(g,f);let v=await EC({userConfigOptions:f,..._.length>0?{capabilities:_}:{},includeBuiltinEffects:!(_.length>0||o&&(s?.length??0)===0),...a==null?{}:{pipelineArgs:a},...d==null?{}:{userConfig:d}});if(v.workspace==null)throw Error(`Workspace not initialized by any plugin`);let y=ry({workspace:v.workspace,...v.vscodeConfigFiles!=null&&{vscodeConfigFiles:v.vscodeConfigFiles},...v.jetbrainsConfigFiles!=null&&{jetbrainsConfigFiles:v.jetbrainsConfigFiles},...v.editorConfigFiles!=null&&{editorConfigFiles:v.editorConfigFiles},...v.commands!=null&&{commands:v.commands},...v.subAgents!=null&&{subAgents:v.subAgents},...v.skills!=null&&{skills:v.skills},...v.rules!=null&&{rules:v.rules},...v.globalMemory!=null&&{globalMemory:v.globalMemory},...v.aiAgentIgnoreConfigFiles!=null&&{aiAgentIgnoreConfigFiles:v.aiAgentIgnoreConfigFiles},...v.aindexDir!=null&&{aindexDir:v.aindexDir},...v.readmePrompts!=null&&{readmePrompts:v.readmePrompts},...v.globalGitIgnore!=null&&{globalGitIgnore:v.globalGitIgnore},...v.shadowGitExclude!=null&&{shadowGitExclude:v.shadowGitExclude}});return v.aindexDir!=null&&ne(v.aindexDir,h),{context:y,outputPlugins:g,userConfigOptions:f}}const VC=`GLOBAL.md`;var HC=class extends gy{constructor(){super(`TraeCNIDEOutputPlugin`,{globalConfigDir:`.trae-cn`,outputFileName:VC,dependsOn:[`TraeIDEOutputPlugin`],cleanup:{delete:{global:{dirs:[`.trae-cn/user_rules`]}}},capabilities:{prompt:{scopes:[`global`],singleScope:!1}}})}getGlobalUserRulesDir(){return this.joinPath(this.getGlobalConfigDir(),`user_rules`)}async declareOutputFiles(e){if(!new Set(this.selectPromptScopes(e,[`global`])).has(`global`))return[];let{globalMemory:t}=e.collectedOutputContext;return t==null?[]:[{path:this.joinPath(this.getGlobalUserRulesDir(),VC),scope:`global`,source:{content:t.content}}]}async convertContent(e,t){let n=e.source;if(n.content==null)throw Error(`Unsupported declaration source for ${this.name}`);return n.content}};async function UC(e=d.default.argv){return BC({pipelineArgs:e,pluginOptions:{plugins:[new Sx,new wx,new Xx,new Gx,new Fx,new zx,new bx,new nS,new lS,new gS,new HC,new bS,new ES,new Nx,new Bx,new qx,new Lx,new vS,new dS]}})}function WC(e){return e.some(e=>e===`--json`||e===`-j`||/^-[^-]*j/.test(e))}function GC(e){let t=e instanceof Error?e.message:String(e);be(`main`,`silent`).error(A(`main`,e)),d.default.stdout.write(`${JSON.stringify(Gy({success:!1,filesAffected:0,dirsAffected:0,message:t},ye()))}\n`)}async function KC(e=d.default.argv){try{let t=new _x(...e),n=await UC(e);return(await t.run(n)).success?0:1}catch(t){return WC(e)?(GC(t),1):(be(`main`,`error`).error(A(`main`,t)),1)}}const qC=`.src.mdx`,JC=`.mdx`,YC=`skill`,XC=new Set([`project-memory`,`project-child-memory`]);function ZC(e){return e.replaceAll(`\\`,`/`)}function QC(e,t){let n=ZC(e).trim();if(n.length===0)throw Error(`${t} cannot be empty`);let r=n.split(`/`);for(let e of r)if(e.length===0||e===`.`||e===`..`)throw Error(`${t} contains an invalid path segment`);return r.join(`/`)}function $C(e){return!ZC(e).includes(`/`)}function ew(e,t){let n=e;return n.startsWith(_y.USER_HOME)&&(n=n.replace(_y.USER_HOME,p.homedir())),n.includes(_y.WORKSPACE)&&(n=n.replace(_y.WORKSPACE,t)),u.normalize(n)}function tw(e={}){let{cwd:t,loadUserConfig:n=!0,pluginOptions:r={}}=e,i={};if(n){let e=wb().load(t);e.found&&(i=AC(e.config))}let a=jC(i,r),o=ew(a.workspaceDir,``);return{options:a,workspaceDir:o,aindexDir:u.join(o,a.aindex.dir)}}function nw(e){return e.endsWith(qC)?`${e.slice(0,-8)}${JC}`:u.extname(e)===JC?e:`${e}${JC}`}function rw(e){return e.endsWith(qC)?e.slice(0,-8):e.endsWith(JC)?e.slice(0,-4):e}function iw(e,t){return l.existsSync(e)&&l.statSync(e).isDirectory()?Pm.default.sync([...t],{cwd:e,dot:!0,onlyFiles:!0}).map(ZC):[]}function aw(e){let t=u.join(e.aindexDir,e.options.aindex.globalPrompt.src);return{promptId:`global-memory`,kind:`global-memory`,logicalName:`global-memory`,paths:{zh:t,en:nw(t),dist:u.join(e.aindexDir,e.options.aindex.globalPrompt.dist)}}}function ow(e){let t=u.join(e.aindexDir,e.options.aindex.workspacePrompt.src);return{promptId:`workspace-memory`,kind:`workspace-memory`,logicalName:`workspace-memory`,paths:{zh:t,en:nw(t),dist:u.join(e.aindexDir,e.options.aindex.workspacePrompt.dist)}}}function sw(e,t,n){let r=QC(t,`projectName`);if(!$C(r))throw Error(`projectName must be a single path segment`);let i=n==null?``:QC(n,`relativeName`),a=i.length===0?u.join(e.aindexDir,e.options.aindex.app.src,r):u.join(e.aindexDir,e.options.aindex.app.src,r,i),o=i.length===0?u.join(e.aindexDir,e.options.aindex.app.dist,r):u.join(e.aindexDir,e.options.aindex.app.dist,r,i),s=u.join(a,`agt${JC}`),c=i.length===0?r:`${r}/${i}`;return{promptId:i.length===0?`project-memory:${r}`:`project-child-memory:${c}`,kind:i.length===0?`project-memory`:`project-child-memory`,logicalName:c,paths:{zh:u.join(a,`agt${qC}`),en:s,dist:u.join(o,`agt${JC}`)},legacyZhPath:s}}function cw(e,t){let n=QC(t,`skillName`);if(!$C(n))throw Error(`skillName must be a single path segment`);let r=u.join(e.aindexDir,e.options.aindex.skills.src,n),i=u.join(e.aindexDir,e.options.aindex.skills.dist,n);return{promptId:`skill:${n}`,kind:`skill`,logicalName:n,paths:{zh:u.join(r,`${YC}${qC}`),en:u.join(r,`${YC}${JC}`),dist:u.join(i,`${YC}${JC}`)}}}function lw(e,t,n){let r=QC(t,`skillName`),i=QC(n,`relativeName`);if(!$C(r))throw Error(`skillName must be a single path segment`);let a=u.join(e.aindexDir,e.options.aindex.skills.src,r),o=u.join(e.aindexDir,e.options.aindex.skills.dist,r);return{promptId:`skill-child-doc:${r}/${i}`,kind:`skill-child-doc`,logicalName:`${r}/${i}`,paths:{zh:u.join(a,`${i}${qC}`),en:u.join(a,`${i}${JC}`),dist:u.join(o,`${i}${JC}`)}}}function uw(e,t,n){let r=QC(n,`relativeName`),i=t===`command`?u.join(e.aindexDir,e.options.aindex.commands.src):t===`subagent`?u.join(e.aindexDir,e.options.aindex.subAgents.src):u.join(e.aindexDir,e.options.aindex.rules.src),a=t===`command`?u.join(e.aindexDir,e.options.aindex.commands.dist):t===`subagent`?u.join(e.aindexDir,e.options.aindex.subAgents.dist):u.join(e.aindexDir,e.options.aindex.rules.dist);return{promptId:`${t}:${r}`,kind:t,logicalName:r,paths:{zh:u.join(i,`${r}${qC}`),en:u.join(i,`${r}${JC}`),dist:u.join(a,`${r}${JC}`)}}}function dw(e){switch(e){case`global-memory`:return{kind:`global-memory`};case`workspace-memory`:return{kind:`workspace-memory`};default:break}let t=e.indexOf(`:`);if(t===-1)throw Error(`Unsupported promptId: ${e}`);let n=e.slice(0,t),r=QC(e.slice(t+1),`promptId`);switch(n){case`project-memory`:if(!$C(r))throw Error(`project-memory promptId must include a single project name`);return{kind:n,projectName:r};case`project-child-memory`:{let[e,...t]=r.split(`/`),i=t.join(`/`);if(e==null||i.length===0)throw Error(`project-child-memory promptId must include project and child path`);return{kind:n,projectName:e,relativeName:i}}case`skill`:if(!$C(r))throw Error(`skill promptId must include a single skill name`);return{kind:n,skillName:r};case`skill-child-doc`:{let[e,...t]=r.split(`/`),i=t.join(`/`);if(e==null||i.length===0)throw Error(`skill-child-doc promptId must include skill and child path`);return{kind:n,skillName:e,relativeName:i}}case`command`:case`subagent`:case`rule`:return{kind:n,relativeName:r};default:throw Error(`Unsupported promptId: ${e}`)}}function fw(e,t){let n=dw(e);switch(n.kind){case`global-memory`:return aw(t);case`workspace-memory`:return ow(t);case`project-memory`:return sw(t,n.projectName);case`project-child-memory`:return sw(t,n.projectName,n.relativeName);case`skill`:return cw(t,n.skillName);case`skill-child-doc`:return lw(t,n.skillName,n.relativeName);case`command`:case`subagent`:case`rule`:return uw(t,n.kind,n.relativeName)}}function pw(e,t){let n=t===`command`?u.join(e.aindexDir,e.options.aindex.commands.src):t===`subagent`?u.join(e.aindexDir,e.options.aindex.subAgents.src):u.join(e.aindexDir,e.options.aindex.rules.src),r=t===`command`?u.join(e.aindexDir,e.options.aindex.commands.dist):t===`subagent`?u.join(e.aindexDir,e.options.aindex.subAgents.dist):u.join(e.aindexDir,e.options.aindex.rules.dist),i=new Set;for(let e of iw(n,[`**/*${qC}`,`**/*${JC}`]))i.add(rw(e));for(let e of iw(r,[`**/*${JC}`]))i.add(rw(e));return[...i].sort().map(e=>`${t}:${e}`)}function mw(e){let t=u.join(e.aindexDir,e.options.aindex.skills.src),n=u.join(e.aindexDir,e.options.aindex.skills.dist),r=new Set;if(l.existsSync(t)&&l.statSync(t).isDirectory())for(let e of l.readdirSync(t,{withFileTypes:!0}))e.isDirectory()&&r.add(e.name);if(l.existsSync(n)&&l.statSync(n).isDirectory())for(let e of l.readdirSync(n,{withFileTypes:!0}))e.isDirectory()&&r.add(e.name);let i=[];for(let e of[...r].sort()){i.push(`skill:${e}`);let r=u.join(t,e),a=u.join(n,e),o=new Set;for(let e of iw(r,[`**/*${qC}`,`**/*${JC}`])){let t=rw(e);t!==YC&&o.add(t)}for(let e of iw(a,[`**/*${JC}`])){let t=rw(e);t!==YC&&o.add(t)}for(let t of[...o].sort())i.push(`skill-child-doc:${e}/${t}`)}return i}function hw(e){let t=u.join(e.aindexDir,e.options.aindex.app.src),n=u.join(e.aindexDir,e.options.aindex.app.dist),r=new Set;for(let e of iw(t,[`**/agt${qC}`,`**/agt${JC}`])){let t=ZC(u.posix.dirname(ZC(e)));t!==`.`&&r.add(t)}for(let e of iw(n,[`**/agt${JC}`])){let t=ZC(u.posix.dirname(ZC(e)));t!==`.`&&r.add(t)}let i=[];for(let e of[...r].sort()){let[t,...n]=e.split(`/`),r=n.join(`/`);t==null||t.length===0||i.push(r.length===0?`project-memory:${t}`:`project-child-memory:${t}/${r}`)}return i}function gw(e){let t=new Set,n=aw(e),r=ow(e);(l.existsSync(n.paths.zh)||l.existsSync(n.paths.en)||l.existsSync(n.paths.dist))&&t.add(n.promptId),(l.existsSync(r.paths.zh)||l.existsSync(r.paths.en)||l.existsSync(r.paths.dist))&&t.add(r.promptId);for(let n of hw(e))t.add(n);for(let n of mw(e))t.add(n);for(let n of pw(e,`command`))t.add(n);for(let n of pw(e,`subagent`))t.add(n);for(let n of pw(e,`rule`))t.add(n);return[...t].sort()}function _w(e){try{return mp(e).yamlFrontMatter}catch{return}}function vw(e,t,n=!1){if(!(l.existsSync(e)&&l.statSync(e).isFile()))return;let r=l.statSync(e),i=t?l.readFileSync(e,`utf8`):void 0,a={path:e,exists:!0,mtime:r.mtime.toISOString(),mtimeMs:r.mtimeMs,size:r.size,...n?{legacySource:!0}:{},...i==null?{}:{content:i}},o=i==null?void 0:_w(i);return o!=null&&Object.assign(a,{frontMatter:o}),a}function yw(e,t){return t==null?`missing`:e!=null&&t.mtimeMs<e.mtimeMs?`stale`:`ready`}function bw(e,t){let n=l.existsSync(e.paths.zh),{legacyZhPath:r}=e,i=!n&&r!=null&&l.existsSync(r),a=n?e.paths.zh:i?r:void 0,o=a==null?void 0:vw(a,t,i),s=n||r!==e.paths.en?vw(e.paths.en,t):void 0,c=vw(e.paths.dist,t);if(o==null&&s==null&&c==null)return null;let u=[o,s,c].filter(e=>e!=null).sort((e,t)=>t.mtimeMs-e.mtimeMs)[0]?.mtime,d={promptId:e.promptId,kind:e.kind,logicalName:e.logicalName,paths:e.paths,exists:{zh:o!=null,en:s!=null,dist:c!=null},enStatus:yw(o,s),distStatus:yw(o,c),...u==null?{}:{updatedAt:u},...o?.legacySource===!0?{legacyZhSource:!0}:{},src:{...o==null?{}:{zh:o},...s==null?{}:{en:s}}};c!=null&&Object.assign(d,{dist:c});let f=o?.frontMatter??s?.frontMatter??c?.frontMatter;return f!=null&&Object.assign(d,{frontMatter:f}),d}function xw(e,t){return t==null||t.length===0?!0:t.includes(e)}function Sw(e,t){if(t==null||t.trim().length===0)return!0;let n=t.trim().toLowerCase();return e.promptId.toLowerCase().includes(n)||e.logicalName.toLowerCase().includes(n)}function Cw(e){return{promptId:e.promptId,kind:e.kind,logicalName:e.logicalName,paths:e.paths,exists:e.exists,enStatus:e.enStatus,distStatus:e.distStatus,...e.updatedAt==null?{}:{updatedAt:e.updatedAt},...e.legacyZhSource===!0?{legacyZhSource:!0}:{}}}function ww(e){return XC.has(e.kind)}function Tw(e,t){l.mkdirSync(u.dirname(e),{recursive:!0}),l.writeFileSync(e,t,`utf8`)}function Ew(e){if(!ww(e)||l.existsSync(e.paths.zh)||e.legacyZhPath==null||!l.existsSync(e.legacyZhPath))return;let t=l.readFileSync(e.legacyZhPath,`utf8`);Tw(e.paths.zh,t)}function Dw(e){ww(e)&&(e.legacyZhPath==null||e.legacyZhPath===e.paths.zh||l.existsSync(e.legacyZhPath)&&l.rmSync(e.legacyZhPath,{force:!0}))}async function Ow(e={}){let t=tw(e);return gw(t).map(e=>bw(fw(e,t),!1)).filter(e=>e!=null).map(Cw).filter(t=>xw(t.kind,e.kinds)).filter(t=>xw(t.enStatus,e.enStatus)).filter(t=>xw(t.distStatus,e.distStatus)).filter(t=>Sw(t,e.query)).sort((e,t)=>e.promptId.localeCompare(t.promptId))}async function kw(e,t={}){return bw(fw(e,tw(t)),!0)}async function Aw(e){let t=tw(e),n=e.locale??`zh`,r=fw(e.promptId,t);n===`zh`?(Tw(r.paths.zh,e.content),Dw(r)):(Ew(r),Tw(r.paths.en,e.content));let i=bw(r,!0);if(i==null)throw Error(`Failed to load prompt after write: ${e.promptId}`);return i}async function jw(e){if(e.enContent==null&&e.distContent==null)throw Error(`writePromptArtifacts requires enContent or distContent`);let t=tw(e),n=fw(e.promptId,t);e.enContent!=null&&(Ew(n),Tw(n.paths.en,e.enContent)),e.distContent!=null&&Tw(n.paths.dist,e.distContent);let r=bw(n,!0);if(r==null)throw Error(`Failed to load prompt after write: ${e.promptId}`);return r}async function Mw(e,t={}){return fw(e,tw(t)).paths}exports.ConfigLoader=Sb,exports.DEFAULT_CONFIG_FILE_NAME=yb,exports.DEFAULT_GLOBAL_CONFIG_DIR=bb,exports.DEFAULT_USER_CONFIG=vy,exports.PathPlaceholders=_y,exports.PluginPipeline=_x,exports.checkVersionControl=ne,exports.createDefaultPluginConfig=UC,exports.defineConfig=BC,exports.generateAindex=ie,exports.getConfigLoader=wb,exports.getGlobalConfigPath=xb,exports.getPrompt=kw,exports.isJsonMode=WC,exports.listPrompts=Ow,exports.loadUserConfig=Tb,exports.mergeConfig=jC,exports.resolvePromptDefinition=Mw,exports.runCli=KC,exports.upsertPromptSource=Aw,exports.userConfigToPluginOptions=AC,exports.validateGlobalConfig=Eb,exports.writePromptArtifacts=jw;