codemod 0.10.1 → 0.10.2
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 +3 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -106,7 +106,7 @@ ${q.join(`
|
|
|
106
106
|
`;L.forEach(q=>{R+=q}),t.fail(R)}};let b={};c.conflicts=function(w,L){e2("<string|object> [array|string]",[w,L],arguments.length),typeof w=="object"?Object.keys(w).forEach(R=>{c.conflicts(R,w[R])}):(e.global(w),b[w]||(b[w]=[]),Array.isArray(L)?L.forEach(R=>c.conflicts(w,R)):b[w].push(L))},c.getConflicting=()=>b,c.conflicting=function(w){Object.keys(w).forEach(L=>{b[L]&&b[L].forEach(R=>{R&&w[L]!==void 0&&w[R]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",L,R))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(b).forEach(L=>{b[L].forEach(R=>{R&&w[r.Parser.camelCase(L)]!==void 0&&w[r.Parser.camelCase(R)]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",L,R))})})},c.recommendCommands=function(w,L){L=L.sort((Z,ue)=>ue.length-Z.length);let q=null,K=1/0;for(let Z=0,ue;(ue=L[Z])!==void 0;Z++){let V=van(w,ue);V<=3&&V<K&&(K=V,q=ue)}q&&t.fail(n("Did you mean %s?",q))},c.reset=function(w){return l=Bot(l,L=>!w[L]),b=Bot(b,L=>!w[L]),c};let E=[];return c.freeze=function(){E.push({implied:l,conflicting:b})},c.unfreeze=function(){let w=E.pop();Ige(w,void 0,r),{implied:l,conflicting:b}=w},c}var Ean,Tan=wi(()=>{SWt();oSt();ban();AWt();Ean=["$0","--","_"]});function M5t(e,t,r,n){R5t=n;let s={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return s;let c=/\.json|\..*rc$/.test(e.extends),l=null;if(c)l=owi(t,e.extends);else try{l=require.resolve(e.extends)}catch{return e}swi(l),mEr.push(l),s=c?JSON.parse(R5t.readFileSync(l,"utf8")):require(e.extends),delete e.extends,s=M5t(s,R5t.path.dirname(l),r,R5t)}return mEr=[],r?Can(s,e):Object.assign({},s,e)}function swi(e){if(mEr.indexOf(e)>-1)throw new JB(`Circular extended configurations: '${e}'.`)}function owi(e,t){return R5t.path.resolve(e,t)}function Can(e,t){let r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,e);for(let s of Object.keys(t))n(t[s])&&n(r[s])?r[s]=Can(e[s],t[s]):r[s]=t[s];return r}var mEr,R5t,hEr=wi(()=>{iSt();mEr=[]});function Wan(e){return(t=[],r=e.process.cwd(),n)=>{let s=new DEr(t,r,n,e);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}function fan(e){return!!e&&typeof e.getInternalMethods=="function"}var C2,Mo,RQ,dht,B5t,cwe,mAe,kWt,Uot,_ht,wWt,uwe,PWt,lwe,MGe,hAe,fwe,IWt,lSt,yoe,cb,NWt,OWt,gAe,mht,fSt,hht,qot,FWt,GT,ght,yht,xht,sC,LWt,BGe,iX,Aan,Dan,gEr,kan,wan,Pan,vht,Ian,yEr,Nan,Oan,xEr,Got,pSt,vEr,bEr,EEr,SEr,TEr,Fan,Lan,Ran,Man,Ban,jan,Uan,qan,RWt,Gan,bht,Van,CEr,j5t,AEr,Han,Eht,DEr,fEr=wi(()=>{lEr();oSt();iSt();_an();SWt();xan();Tan();AWt();hEr();sEr();cSt();oEr();pEr();C2=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},Mo=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)};Aan=Symbol("copyDoubleDash"),Dan=Symbol("copyDoubleDash"),gEr=Symbol("deleteFromParserHintObject"),kan=Symbol("emitWarning"),wan=Symbol("freeze"),Pan=Symbol("getDollarZero"),vht=Symbol("getParserConfiguration"),Ian=Symbol("getUsageConfiguration"),yEr=Symbol("guessLocale"),Nan=Symbol("guessVersion"),Oan=Symbol("parsePositionalNumbers"),xEr=Symbol("pkgUp"),Got=Symbol("populateParserHintArray"),pSt=Symbol("populateParserHintSingleValueDictionary"),vEr=Symbol("populateParserHintArrayDictionary"),bEr=Symbol("populateParserHintDictionary"),EEr=Symbol("sanitizeKey"),SEr=Symbol("setKey"),TEr=Symbol("unfreeze"),Fan=Symbol("validateAsync"),Lan=Symbol("getCommandInstance"),Ran=Symbol("getContext"),Man=Symbol("getHasOutput"),Ban=Symbol("getLoggerInstance"),jan=Symbol("getParseContext"),Uan=Symbol("getUsageInstance"),qan=Symbol("getValidationInstance"),RWt=Symbol("hasParseCallback"),Gan=Symbol("isGlobalContext"),bht=Symbol("postProcess"),Van=Symbol("rebase"),CEr=Symbol("reset"),j5t=Symbol("runYargsParserAndExecuteCommands"),AEr=Symbol("runValidation"),Han=Symbol("setHasOutput"),Eht=Symbol("kTrackManuallySetKeys"),DEr=class{constructor(t=[],r,n,s){this.customScriptName=!1,this.parsed=!1,RQ.set(this,void 0),dht.set(this,void 0),B5t.set(this,{commands:[],fullCommands:[]}),cwe.set(this,null),mAe.set(this,null),kWt.set(this,"show-hidden"),Uot.set(this,null),_ht.set(this,!0),wWt.set(this,{}),uwe.set(this,!0),PWt.set(this,[]),lwe.set(this,void 0),MGe.set(this,{}),hAe.set(this,!1),fwe.set(this,null),IWt.set(this,!0),lSt.set(this,void 0),yoe.set(this,""),cb.set(this,void 0),NWt.set(this,void 0),OWt.set(this,{}),gAe.set(this,null),mht.set(this,null),fSt.set(this,{}),hht.set(this,{}),qot.set(this,void 0),FWt.set(this,!1),GT.set(this,void 0),ght.set(this,!1),yht.set(this,!1),xht.set(this,!1),sC.set(this,void 0),LWt.set(this,{}),BGe.set(this,null),iX.set(this,void 0),C2(this,GT,s,"f"),C2(this,qot,t,"f"),C2(this,dht,r,"f"),C2(this,NWt,n,"f"),C2(this,lwe,new TWt(this),"f"),this.$0=this[Pan](),this[CEr](),C2(this,RQ,Mo(this,RQ,"f"),"f"),C2(this,sC,Mo(this,sC,"f"),"f"),C2(this,iX,Mo(this,iX,"f"),"f"),C2(this,cb,Mo(this,cb,"f"),"f"),Mo(this,cb,"f").showHiddenOpt=Mo(this,kWt,"f"),C2(this,lSt,this[Dan](),"f")}addHelpOpt(t,r){let n="help";return e2("[string|boolean] [string]",[t,r],arguments.length),Mo(this,fwe,"f")&&(this[gEr](Mo(this,fwe,"f")),C2(this,fwe,null,"f")),t===!1&&r===void 0?this:(C2(this,fwe,typeof t=="string"?t:n,"f"),this.boolean(Mo(this,fwe,"f")),this.describe(Mo(this,fwe,"f"),r||Mo(this,sC,"f").deferY18nLookup("Show help")),this)}help(t,r){return this.addHelpOpt(t,r)}addShowHiddenOpt(t,r){if(e2("[string|boolean] [string]",[t,r],arguments.length),t===!1&&r===void 0)return this;let n=typeof t=="string"?t:Mo(this,kWt,"f");return this.boolean(n),this.describe(n,r||Mo(this,sC,"f").deferY18nLookup("Show hidden options")),Mo(this,cb,"f").showHiddenOpt=n,this}showHidden(t,r){return this.addShowHiddenOpt(t,r)}alias(t,r){return e2("<object|string|array> [string|array]",[t,r],arguments.length),this[vEr](this.alias.bind(this),"alias",t,r),this}array(t){return e2("<array|string>",[t],arguments.length),this[Got]("array",t),this[Eht](t),this}boolean(t){return e2("<array|string>",[t],arguments.length),this[Got]("boolean",t),this[Eht](t),this}check(t,r){return e2("<function> [boolean]",[t,r],arguments.length),this.middleware((n,s)=>pht(()=>t(n,s.getOptions()),c=>(c?(typeof c=="string"||c instanceof Error)&&Mo(this,sC,"f").fail(c.toString(),c):Mo(this,sC,"f").fail(Mo(this,GT,"f").y18n.__("Argument check failed: %s",t.toString())),n),c=>(Mo(this,sC,"f").fail(c.message?c.message:c.toString(),c),n)),!1,r),this}choices(t,r){return e2("<object|string|array> [string|array]",[t,r],arguments.length),this[vEr](this.choices.bind(this),"choices",t,r),this}coerce(t,r){if(e2("<object|string|array> [function]",[t,r],arguments.length),Array.isArray(t)){if(!r)throw new JB("coerce callback must be provided");for(let n of t)this.coerce(n,r);return this}else if(typeof t=="object"){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!r)throw new JB("coerce callback must be provided");return Mo(this,cb,"f").key[t]=!0,Mo(this,lwe,"f").addCoerceMiddleware((n,s)=>{let c;return Object.prototype.hasOwnProperty.call(n,t)?pht(()=>(c=s.getAliases(),r(n[t])),h=>{n[t]=h;let b=s.getInternalMethods().getParserConfiguration()["strip-aliased"];if(c[t]&&b!==!0)for(let E of c[t])n[E]=h;return n},h=>{throw new JB(h.message)}):n},t),this}conflicts(t,r){return e2("<string|object> [string|array]",[t,r],arguments.length),Mo(this,iX,"f").conflicts(t,r),this}config(t="config",r,n){return e2("[object|string] [string|function] [function]",[t,r,n],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=M5t(t,Mo(this,dht,"f"),this[vht]()["deep-merge-config"]||!1,Mo(this,GT,"f")),Mo(this,cb,"f").configObjects=(Mo(this,cb,"f").configObjects||[]).concat(t),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(t,r||Mo(this,sC,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(s=>{Mo(this,cb,"f").config[s]=n||!0}),this)}completion(t,r,n){return e2("[string] [string|boolean|function] [function]",[t,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),C2(this,mAe,t||Mo(this,mAe,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(Mo(this,mAe,"f"),r),n&&Mo(this,cwe,"f").registerFunction(n),this}command(t,r,n,s,c,l){return e2("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,r,n,s,c,l],arguments.length),Mo(this,RQ,"f").addHandler(t,r,n,s,c,l),this}commands(t,r,n,s,c,l){return this.command(t,r,n,s,c,l)}commandDir(t,r){e2("<string> [object]",[t,r],arguments.length);let n=Mo(this,NWt,"f")||Mo(this,GT,"f").require;return Mo(this,RQ,"f").addDirectory(t,n,Mo(this,GT,"f").getCallerFile(),r),this}count(t){return e2("<array|string>",[t],arguments.length),this[Got]("count",t),this[Eht](t),this}default(t,r,n){return e2("<object|string|array> [*] [string]",[t,r,n],arguments.length),n&&(aEr(t,Mo(this,GT,"f")),Mo(this,cb,"f").defaultDescription[t]=n),typeof r=="function"&&(aEr(t,Mo(this,GT,"f")),Mo(this,cb,"f").defaultDescription[t]||(Mo(this,cb,"f").defaultDescription[t]=Mo(this,sC,"f").functionDescription(r)),r=r.call()),this[pSt](this.default.bind(this),"default",t,r),this}defaults(t,r,n){return this.default(t,r,n)}demandCommand(t=1,r,n,s){return e2("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,r,n,s],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),Mo(this,cb,"f").demandedCommands._={min:t,max:r,minMsg:n,maxMsg:s},this}demand(t,r,n){return Array.isArray(r)?(r.forEach(s=>{Ige(n,!0,Mo(this,GT,"f")),this.demandOption(s,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof t=="number"?(Ige(n,!0,Mo(this,GT,"f")),this.demandCommand(t,r,n,n)):Array.isArray(t)?t.forEach(s=>{Ige(n,!0,Mo(this,GT,"f")),this.demandOption(s,n)}):typeof n=="string"?this.demandOption(t,n):(n===!0||typeof n>"u")&&this.demandOption(t),this}demandOption(t,r){return e2("<object|string|array> [string]",[t,r],arguments.length),this[pSt](this.demandOption.bind(this),"demandedOptions",t,r),this}deprecateOption(t,r){return e2("<string> [string|boolean]",[t,r],arguments.length),Mo(this,cb,"f").deprecatedOptions[t]=r,this}describe(t,r){return e2("<object|string|array> [string]",[t,r],arguments.length),this[SEr](t,!0),Mo(this,sC,"f").describe(t,r),this}detectLocale(t){return e2("<boolean>",[t],arguments.length),C2(this,_ht,t,"f"),this}env(t){return e2("[string|boolean]",[t],arguments.length),t===!1?delete Mo(this,cb,"f").envPrefix:Mo(this,cb,"f").envPrefix=t||"",this}epilogue(t){return e2("<string>",[t],arguments.length),Mo(this,sC,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,r){return e2("<string|array> [string]",[t,r],arguments.length),Array.isArray(t)?t.forEach(n=>this.example(...n)):Mo(this,sC,"f").example(t,r),this}exit(t,r){C2(this,hAe,!0,"f"),C2(this,Uot,r,"f"),Mo(this,uwe,"f")&&Mo(this,GT,"f").process.exit(t)}exitProcess(t=!0){return e2("[boolean]",[t],arguments.length),C2(this,uwe,t,"f"),this}fail(t){if(e2("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new JB("Invalid first argument. Expected function or boolean 'false'");return Mo(this,sC,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,r){return e2("<array> [function]",[t,r],arguments.length),r?Mo(this,cwe,"f").getCompletion(t,r):new Promise((n,s)=>{Mo(this,cwe,"f").getCompletion(t,(c,l)=>{c?s(c):n(l)})})}getDemandedOptions(){return e2([],0),Mo(this,cb,"f").demandedOptions}getDemandedCommands(){return e2([],0),Mo(this,cb,"f").demandedCommands}getDeprecatedOptions(){return e2([],0),Mo(this,cb,"f").deprecatedOptions}getDetectLocale(){return Mo(this,_ht,"f")}getExitProcess(){return Mo(this,uwe,"f")}getGroups(){return Object.assign({},Mo(this,MGe,"f"),Mo(this,hht,"f"))}getHelp(){if(C2(this,hAe,!0,"f"),!Mo(this,sC,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[j5t](Mo(this,qot,"f"),void 0,void 0,0,!0);if(JG(r))return r.then(()=>Mo(this,sC,"f").help())}let t=Mo(this,RQ,"f").runDefaultBuilderOn(this);if(JG(t))return t.then(()=>Mo(this,sC,"f").help())}return Promise.resolve(Mo(this,sC,"f").help())}getOptions(){return Mo(this,cb,"f")}getStrict(){return Mo(this,ght,"f")}getStrictCommands(){return Mo(this,yht,"f")}getStrictOptions(){return Mo(this,xht,"f")}global(t,r){return e2("<string|array> [boolean]",[t,r],arguments.length),t=[].concat(t),r!==!1?Mo(this,cb,"f").local=Mo(this,cb,"f").local.filter(n=>t.indexOf(n)===-1):t.forEach(n=>{Mo(this,cb,"f").local.includes(n)||Mo(this,cb,"f").local.push(n)}),this}group(t,r){e2("<string|array> <string>",[t,r],arguments.length);let n=Mo(this,hht,"f")[r]||Mo(this,MGe,"f")[r];Mo(this,hht,"f")[r]&&delete Mo(this,hht,"f")[r];let s={};return Mo(this,MGe,"f")[r]=(n||[]).concat(t).filter(c=>s[c]?!1:s[c]=!0),this}hide(t){return e2("<string>",[t],arguments.length),Mo(this,cb,"f").hiddenOptions.push(t),this}implies(t,r){return e2("<string|object> [number|string|array]",[t,r],arguments.length),Mo(this,iX,"f").implies(t,r),this}locale(t){return e2("[string]",[t],arguments.length),t===void 0?(this[yEr](),Mo(this,GT,"f").y18n.getLocale()):(C2(this,_ht,!1,"f"),Mo(this,GT,"f").y18n.setLocale(t),this)}middleware(t,r,n){return Mo(this,lwe,"f").addMiddleware(t,!!r,n)}nargs(t,r){return e2("<string|object|array> [number]",[t,r],arguments.length),this[pSt](this.nargs.bind(this),"narg",t,r),this}normalize(t){return e2("<array|string>",[t],arguments.length),this[Got]("normalize",t),this}number(t){return e2("<array|string>",[t],arguments.length),this[Got]("number",t),this[Eht](t),this}option(t,r){if(e2("<string|object> [object]",[t,r],arguments.length),typeof t=="object")Object.keys(t).forEach(n=>{this.options(n,t[n])});else{typeof r!="object"&&(r={}),this[Eht](t),Mo(this,BGe,"f")&&(t==="version"||r?.alias==="version")&&this[kan](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
107
107
|
`),void 0,"versionWarning"),Mo(this,cb,"f").key[t]=!0,r.alias&&this.alias(t,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(t,n);let s=r.demand||r.required||r.require;s&&this.demand(t,s),r.demandOption&&this.demandOption(t,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(t,r.conflicts),"default"in r&&this.default(t,r.default),r.implies!==void 0&&this.implies(t,r.implies),r.nargs!==void 0&&this.nargs(t,r.nargs),r.config&&this.config(t,r.configParser),r.normalize&&this.normalize(t),r.choices&&this.choices(t,r.choices),r.coerce&&this.coerce(t,r.coerce),r.group&&this.group(t,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(t),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(t),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(t),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(t),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(t),typeof r.global=="boolean"&&this.global(t,r.global),r.defaultDescription&&(Mo(this,cb,"f").defaultDescription[t]=r.defaultDescription),r.skipValidation&&this.skipValidation(t);let c=r.describe||r.description||r.desc,l=Mo(this,sC,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(l,t)||typeof c=="string")&&this.describe(t,c),r.hidden&&this.hide(t),r.requiresArg&&this.requiresArg(t)}return this}options(t,r){return this.option(t,r)}parse(t,r,n){e2("[string|array] [function|boolean|object] [function]",[t,r,n],arguments.length),this[wan](),typeof t>"u"&&(t=Mo(this,qot,"f")),typeof r=="object"&&(C2(this,mht,r,"f"),r=n),typeof r=="function"&&(C2(this,gAe,r,"f"),r=!1),r||C2(this,qot,t,"f"),Mo(this,gAe,"f")&&C2(this,uwe,!1,"f");let s=this[j5t](t,!!r),c=this.parsed;return Mo(this,cwe,"f").setParsed(this.parsed),JG(s)?s.then(l=>(Mo(this,gAe,"f")&&Mo(this,gAe,"f").call(this,Mo(this,Uot,"f"),l,Mo(this,yoe,"f")),l)).catch(l=>{throw Mo(this,gAe,"f")&&Mo(this,gAe,"f")(l,this.parsed.argv,Mo(this,yoe,"f")),l}).finally(()=>{this[TEr](),this.parsed=c}):(Mo(this,gAe,"f")&&Mo(this,gAe,"f").call(this,Mo(this,Uot,"f"),s,Mo(this,yoe,"f")),this[TEr](),this.parsed=c,s)}parseAsync(t,r,n){let s=this.parse(t,r,n);return JG(s)?s:Promise.resolve(s)}parseSync(t,r,n){let s=this.parse(t,r,n);if(JG(s))throw new JB(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return s}parserConfiguration(t){return e2("<object>",[t],arguments.length),C2(this,OWt,t,"f"),this}pkgConf(t,r){e2("<string> [string]",[t,r],arguments.length);let n=null,s=this[xEr](r||Mo(this,dht,"f"));return s[t]&&typeof s[t]=="object"&&(n=M5t(s[t],r||Mo(this,dht,"f"),this[vht]()["deep-merge-config"]||!1,Mo(this,GT,"f")),Mo(this,cb,"f").configObjects=(Mo(this,cb,"f").configObjects||[]).concat(n)),this}positional(t,r){e2("<string> <object>",[t,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=Bot(r,(l,h)=>l==="type"&&!["string","number","boolean"].includes(h)?!1:n.includes(l));let s=Mo(this,B5t,"f").fullCommands[Mo(this,B5t,"f").fullCommands.length-1],c=s?Mo(this,RQ,"f").cmdToParseOptions(s):{array:[],alias:{},default:{},demand:{}};return sSt(c).forEach(l=>{let h=c[l];Array.isArray(h)?h.indexOf(t)!==-1&&(r[l]=!0):h[t]&&!(l in r)&&(r[l]=h[t])}),this.group(t,Mo(this,sC,"f").getPositionalGroupName()),this.option(t,r)}recommendCommands(t=!0){return e2("[boolean]",[t],arguments.length),C2(this,FWt,t,"f"),this}required(t,r,n){return this.demand(t,r,n)}require(t,r,n){return this.demand(t,r,n)}requiresArg(t){return e2("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&Mo(this,cb,"f").narg[t]?this:(this[pSt](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,r){return e2("[string] [string]",[t,r],arguments.length),t=t||this.$0,Mo(this,lSt,"f").log(Mo(this,cwe,"f").generateCompletionScript(t,r||Mo(this,mAe,"f")||"completion")),this}showHelp(t){if(e2("[string|function]",[t],arguments.length),C2(this,hAe,!0,"f"),!Mo(this,sC,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[j5t](Mo(this,qot,"f"),void 0,void 0,0,!0);if(JG(n))return n.then(()=>{Mo(this,sC,"f").showHelp(t)}),this}let r=Mo(this,RQ,"f").runDefaultBuilderOn(this);if(JG(r))return r.then(()=>{Mo(this,sC,"f").showHelp(t)}),this}return Mo(this,sC,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,r){return e2("[boolean|string] [string]",[t,r],arguments.length),Mo(this,sC,"f").showHelpOnFail(t,r),this}showVersion(t){return e2("[string|function]",[t],arguments.length),Mo(this,sC,"f").showVersion(t),this}skipValidation(t){return e2("<array|string>",[t],arguments.length),this[Got]("skipValidation",t),this}strict(t){return e2("[boolean]",[t],arguments.length),C2(this,ght,t!==!1,"f"),this}strictCommands(t){return e2("[boolean]",[t],arguments.length),C2(this,yht,t!==!1,"f"),this}strictOptions(t){return e2("[boolean]",[t],arguments.length),C2(this,xht,t!==!1,"f"),this}string(t){return e2("<array|string>",[t],arguments.length),this[Got]("string",t),this[Eht](t),this}terminalWidth(){return e2([],0),Mo(this,GT,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return e2("<object>",[t],arguments.length),C2(this,_ht,!1,"f"),Mo(this,GT,"f").y18n.updateLocale(t),this}usage(t,r,n,s){if(e2("<string|null|undefined> [string|boolean] [function|object] [function]",[t,r,n,s],arguments.length),r!==void 0){if(Ige(t,null,Mo(this,GT,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,r,n,s);throw new JB(".usage() description must start with $0 if being used as alias for .command()")}else return Mo(this,sC,"f").usage(t),this}usageConfiguration(t){return e2("<object>",[t],arguments.length),C2(this,LWt,t,"f"),this}version(t,r,n){let s="version";if(e2("[boolean|string] [string] [string]",[t,r,n],arguments.length),Mo(this,BGe,"f")&&(this[gEr](Mo(this,BGe,"f")),Mo(this,sC,"f").version(void 0),C2(this,BGe,null,"f")),arguments.length===0)n=this[Nan](),t=s;else if(arguments.length===1){if(t===!1)return this;n=t,t=s}else arguments.length===2&&(n=r,r=void 0);return C2(this,BGe,typeof t=="string"?t:s,"f"),r=r||Mo(this,sC,"f").deferY18nLookup("Show version number"),Mo(this,sC,"f").version(n||void 0),this.boolean(Mo(this,BGe,"f")),this.describe(Mo(this,BGe,"f"),r),this}wrap(t){return e2("<number|null|undefined>",[t],arguments.length),Mo(this,sC,"f").wrap(t),this}[(RQ=new WeakMap,dht=new WeakMap,B5t=new WeakMap,cwe=new WeakMap,mAe=new WeakMap,kWt=new WeakMap,Uot=new WeakMap,_ht=new WeakMap,wWt=new WeakMap,uwe=new WeakMap,PWt=new WeakMap,lwe=new WeakMap,MGe=new WeakMap,hAe=new WeakMap,fwe=new WeakMap,IWt=new WeakMap,lSt=new WeakMap,yoe=new WeakMap,cb=new WeakMap,NWt=new WeakMap,OWt=new WeakMap,gAe=new WeakMap,mht=new WeakMap,fSt=new WeakMap,hht=new WeakMap,qot=new WeakMap,FWt=new WeakMap,GT=new WeakMap,ght=new WeakMap,yht=new WeakMap,xht=new WeakMap,sC=new WeakMap,LWt=new WeakMap,BGe=new WeakMap,iX=new WeakMap,Aan)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch{}return t}[Dan](){return{log:(...t)=>{this[RWt]()||console.log(...t),C2(this,hAe,!0,"f"),Mo(this,yoe,"f").length&&C2(this,yoe,Mo(this,yoe,"f")+`
|
|
108
108
|
`,"f"),C2(this,yoe,Mo(this,yoe,"f")+t.join(" "),"f")},error:(...t)=>{this[RWt]()||console.error(...t),C2(this,hAe,!0,"f"),Mo(this,yoe,"f").length&&C2(this,yoe,Mo(this,yoe,"f")+`
|
|
109
|
-
`,"f"),C2(this,yoe,Mo(this,yoe,"f")+t.join(" "),"f")}}}[gEr](t){sSt(Mo(this,cb,"f")).forEach(r=>{if((s=>s==="configObjects")(r))return;let n=Mo(this,cb,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete Mo(this,sC,"f").getDescriptions()[t]}[kan](t,r,n){Mo(this,wWt,"f")[n]||(Mo(this,GT,"f").process.emitWarning(t,r),Mo(this,wWt,"f")[n]=!0)}[wan](){Mo(this,PWt,"f").push({options:Mo(this,cb,"f"),configObjects:Mo(this,cb,"f").configObjects.slice(0),exitProcess:Mo(this,uwe,"f"),groups:Mo(this,MGe,"f"),strict:Mo(this,ght,"f"),strictCommands:Mo(this,yht,"f"),strictOptions:Mo(this,xht,"f"),completionCommand:Mo(this,mAe,"f"),output:Mo(this,yoe,"f"),exitError:Mo(this,Uot,"f"),hasOutput:Mo(this,hAe,"f"),parsed:this.parsed,parseFn:Mo(this,gAe,"f"),parseContext:Mo(this,mht,"f")}),Mo(this,sC,"f").freeze(),Mo(this,iX,"f").freeze(),Mo(this,RQ,"f").freeze(),Mo(this,lwe,"f").freeze()}[Pan](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(Mo(this,GT,"f").process.argv()[0])?r=Mo(this,GT,"f").process.argv().slice(1,2):r=Mo(this,GT,"f").process.argv().slice(0,1),t=r.map(n=>{let s=this[Van](Mo(this,dht,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&s.length<n.length?s:n}).join(" ").trim(),Mo(this,GT,"f").getEnv("_")&&Mo(this,GT,"f").getProcessArgvBin()===Mo(this,GT,"f").getEnv("_")&&(t=Mo(this,GT,"f").getEnv("_").replace(`${Mo(this,GT,"f").path.dirname(Mo(this,GT,"f").process.execPath())}/`,"")),t}[vht](){return Mo(this,OWt,"f")}[Ian](){return Mo(this,LWt,"f")}[yEr](){if(!Mo(this,_ht,"f"))return;let t=Mo(this,GT,"f").getEnv("LC_ALL")||Mo(this,GT,"f").getEnv("LC_MESSAGES")||Mo(this,GT,"f").getEnv("LANG")||Mo(this,GT,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[Nan](){return this[xEr]().version||"unknown"}[Oan](t){let r=t["--"]?t["--"]:t._;for(let n=0,s;(s=r[n])!==void 0;n++)Mo(this,GT,"f").Parser.looksLikeNumber(s)&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))&&(r[n]=Number(s));return t}[xEr](t){let r=t||"*";if(Mo(this,fSt,"f")[r])return Mo(this,fSt,"f")[r];let n={};try{let s=t||Mo(this,GT,"f").mainFilename;!t&&Mo(this,GT,"f").path.extname(s)&&(s=Mo(this,GT,"f").path.dirname(s));let c=Mo(this,GT,"f").findUp(s,(l,h)=>{if(h.includes("package.json"))return"package.json"});Ige(c,void 0,Mo(this,GT,"f")),n=JSON.parse(Mo(this,GT,"f").readFileSync(c,"utf8"))}catch{}return Mo(this,fSt,"f")[r]=n||{},Mo(this,fSt,"f")[r]}[Got](t,r){r=[].concat(r),r.forEach(n=>{n=this[EEr](n),Mo(this,cb,"f")[t].push(n)})}[pSt](t,r,n,s){this[bEr](t,r,n,s,(c,l,h)=>{Mo(this,cb,"f")[c][l]=h})}[vEr](t,r,n,s){this[bEr](t,r,n,s,(c,l,h)=>{Mo(this,cb,"f")[c][l]=(Mo(this,cb,"f")[c][l]||[]).concat(h)})}[bEr](t,r,n,s,c){if(Array.isArray(n))n.forEach(l=>{t(l,s)});else if((l=>typeof l=="object")(n))for(let l of sSt(n))t(l,n[l]);else c(r,this[EEr](n),s)}[EEr](t){return t==="__proto__"?"___proto___":t}[SEr](t,r){return this[pSt](this[SEr].bind(this),"key",t,r),this}[TEr](){var t,r,n,s,c,l,h,b,E,S,w,L;let R=Mo(this,PWt,"f").pop();Ige(R,void 0,Mo(this,GT,"f"));let q;t=this,r=this,n=this,s=this,c=this,l=this,h=this,b=this,E=this,S=this,w=this,L=this,{options:{set value(K){C2(t,cb,K,"f")}}.value,configObjects:q,exitProcess:{set value(K){C2(r,uwe,K,"f")}}.value,groups:{set value(K){C2(n,MGe,K,"f")}}.value,output:{set value(K){C2(s,yoe,K,"f")}}.value,exitError:{set value(K){C2(c,Uot,K,"f")}}.value,hasOutput:{set value(K){C2(l,hAe,K,"f")}}.value,parsed:this.parsed,strict:{set value(K){C2(h,ght,K,"f")}}.value,strictCommands:{set value(K){C2(b,yht,K,"f")}}.value,strictOptions:{set value(K){C2(E,xht,K,"f")}}.value,completionCommand:{set value(K){C2(S,mAe,K,"f")}}.value,parseFn:{set value(K){C2(w,gAe,K,"f")}}.value,parseContext:{set value(K){C2(L,mht,K,"f")}}.value}=R,Mo(this,cb,"f").configObjects=q,Mo(this,sC,"f").unfreeze(),Mo(this,iX,"f").unfreeze(),Mo(this,RQ,"f").unfreeze(),Mo(this,lwe,"f").unfreeze()}[Fan](t,r){return pht(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[Lan].bind(this),getContext:this[Ran].bind(this),getHasOutput:this[Man].bind(this),getLoggerInstance:this[Ban].bind(this),getParseContext:this[jan].bind(this),getParserConfiguration:this[vht].bind(this),getUsageConfiguration:this[Ian].bind(this),getUsageInstance:this[Uan].bind(this),getValidationInstance:this[qan].bind(this),hasParseCallback:this[RWt].bind(this),isGlobalContext:this[Gan].bind(this),postProcess:this[bht].bind(this),reset:this[CEr].bind(this),runValidation:this[AEr].bind(this),runYargsParserAndExecuteCommands:this[j5t].bind(this),setHasOutput:this[Han].bind(this)}}[Lan](){return Mo(this,RQ,"f")}[Ran](){return Mo(this,B5t,"f")}[Man](){return Mo(this,hAe,"f")}[Ban](){return Mo(this,lSt,"f")}[jan](){return Mo(this,mht,"f")||{}}[Uan](){return Mo(this,sC,"f")}[qan](){return Mo(this,iX,"f")}[RWt](){return!!Mo(this,gAe,"f")}[Gan](){return Mo(this,IWt,"f")}[bht](t,r,n,s){return n||JG(t)||(r||(t=this[Aan](t)),(this[vht]()["parse-positional-numbers"]||this[vht]()["parse-positional-numbers"]===void 0)&&(t=this[Oan](t)),s&&(t=fht(t,this,Mo(this,lwe,"f").getMiddleware(),!1))),t}[CEr](t={}){C2(this,cb,Mo(this,cb,"f")||{},"f");let r={};r.local=Mo(this,cb,"f").local||[],r.configObjects=Mo(this,cb,"f").configObjects||[];let n={};r.local.forEach(l=>{n[l]=!0,(t[l]||[]).forEach(h=>{n[h]=!0})}),Object.assign(Mo(this,hht,"f"),Object.keys(Mo(this,MGe,"f")).reduce((l,h)=>{let b=Mo(this,MGe,"f")[h].filter(E=>!(E in n));return b.length>0&&(l[h]=b),l},{})),C2(this,MGe,{},"f");let s=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],c=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return s.forEach(l=>{r[l]=(Mo(this,cb,"f")[l]||[]).filter(h=>!n[h])}),c.forEach(l=>{r[l]=Bot(Mo(this,cb,"f")[l],h=>!n[h])}),r.envPrefix=Mo(this,cb,"f").envPrefix,C2(this,cb,r,"f"),C2(this,sC,Mo(this,sC,"f")?Mo(this,sC,"f").reset(n):dan(this,Mo(this,GT,"f")),"f"),C2(this,iX,Mo(this,iX,"f")?Mo(this,iX,"f").reset(n):San(this,Mo(this,sC,"f"),Mo(this,GT,"f")),"f"),C2(this,RQ,Mo(this,RQ,"f")?Mo(this,RQ,"f").reset():lan(Mo(this,sC,"f"),Mo(this,iX,"f"),Mo(this,lwe,"f"),Mo(this,GT,"f")),"f"),Mo(this,cwe,"f")||C2(this,cwe,yan(this,Mo(this,sC,"f"),Mo(this,RQ,"f"),Mo(this,GT,"f")),"f"),Mo(this,lwe,"f").reset(),C2(this,mAe,null,"f"),C2(this,yoe,"","f"),C2(this,Uot,null,"f"),C2(this,hAe,!1,"f"),this.parsed=!1,this}[Van](t,r){return Mo(this,GT,"f").path.relative(t,r)}[j5t](t,r,n,s=0,c=!1){let l=!!n||c;t=t||Mo(this,qot,"f"),Mo(this,cb,"f").__=Mo(this,GT,"f").y18n.__,Mo(this,cb,"f").configuration=this[vht]();let h=!!Mo(this,cb,"f").configuration["populate--"],b=Object.assign({},Mo(this,cb,"f").configuration,{"populate--":!0}),E=Mo(this,GT,"f").Parser.detailed(t,Object.assign({},Mo(this,cb,"f"),{configuration:{"parse-positional-numbers":!1,...b}})),S=Object.assign(E.argv,Mo(this,mht,"f")),w,L=E.aliases,R=!1,q=!1;Object.keys(S).forEach(K=>{K===Mo(this,fwe,"f")&&S[K]?R=!0:K===Mo(this,BGe,"f")&&S[K]&&(q=!0)}),S.$0=this.$0,this.parsed=E,s===0&&Mo(this,sC,"f").clearCachedHelpMessage();try{if(this[yEr](),r)return this[bht](S,h,!!n,!1);Mo(this,fwe,"f")&&[Mo(this,fwe,"f")].concat(L[Mo(this,fwe,"f")]||[]).filter(ye=>ye.length>1).includes(""+S._[S._.length-1])&&(S._.pop(),R=!0),C2(this,IWt,!1,"f");let K=Mo(this,RQ,"f").getCommands(),Z=Mo(this,cwe,"f").completionKey in S,ue=R||Z||c;if(S._.length){if(K.length){let V;for(let ye=s||0,pe;S._[ye]!==void 0;ye++)if(pe=String(S._[ye]),K.includes(pe)&&pe!==Mo(this,mAe,"f")){let Te=Mo(this,RQ,"f").runCommand(pe,this,E,ye+1,c,R||q||c);return this[bht](Te,h,!!n,!1)}else if(!V&&pe!==Mo(this,mAe,"f")){V=pe;break}!Mo(this,RQ,"f").hasDefaultCommand()&&Mo(this,FWt,"f")&&V&&!ue&&Mo(this,iX,"f").recommendCommands(V,K)}Mo(this,mAe,"f")&&S._.includes(Mo(this,mAe,"f"))&&!Z&&(Mo(this,uwe,"f")&&jot(!0),this.showCompletionScript(),this.exit(0))}if(Mo(this,RQ,"f").hasDefaultCommand()&&!ue){let V=Mo(this,RQ,"f").runCommand(null,this,E,0,c,R||q||c);return this[bht](V,h,!!n,!1)}if(Z){Mo(this,uwe,"f")&&jot(!0),t=[].concat(t);let V=t.slice(t.indexOf(`--${Mo(this,cwe,"f").completionKey}`)+1);return Mo(this,cwe,"f").getCompletion(V,(ye,pe)=>{if(ye)throw new JB(ye.message);(pe||[]).forEach(Te=>{Mo(this,lSt,"f").log(Te)}),this.exit(0)}),this[bht](S,!h,!!n,!1)}if(Mo(this,hAe,"f")||(R?(Mo(this,uwe,"f")&&jot(!0),l=!0,this.showHelp("log"),this.exit(0)):q&&(Mo(this,uwe,"f")&&jot(!0),l=!0,Mo(this,sC,"f").showVersion("log"),this.exit(0))),!l&&Mo(this,cb,"f").skipValidation.length>0&&(l=Object.keys(S).some(V=>Mo(this,cb,"f").skipValidation.indexOf(V)>=0&&S[V]===!0)),!l){if(E.error)throw new JB(E.error.message);if(!Z){let V=this[AEr](L,{},E.error);n||(w=fht(S,this,Mo(this,lwe,"f").getMiddleware(),!0)),w=this[Fan](V,w??S),JG(w)&&!n&&(w=w.then(()=>fht(S,this,Mo(this,lwe,"f").getMiddleware(),!1)))}}}catch(K){if(K instanceof JB)Mo(this,sC,"f").fail(K.message,K);else throw K}return this[bht](w??S,h,!!n,!0)}[AEr](t,r,n,s){let c={...this.getDemandedOptions()};return l=>{if(n)throw new JB(n.message);Mo(this,iX,"f").nonOptionCount(l),Mo(this,iX,"f").requiredArguments(l,c);let h=!1;Mo(this,yht,"f")&&(h=Mo(this,iX,"f").unknownCommands(l)),Mo(this,ght,"f")&&!h?Mo(this,iX,"f").unknownArguments(l,t,r,!!s):Mo(this,xht,"f")&&Mo(this,iX,"f").unknownArguments(l,t,{},!1,!1),Mo(this,iX,"f").limitedChoices(l),Mo(this,iX,"f").implications(l),Mo(this,iX,"f").conflicting(l)}}[Han](){C2(this,hAe,!0,"f")}[Eht](t){if(typeof t=="string")Mo(this,cb,"f").key[t]=!0;else for(let r of t)Mo(this,cb,"f").key[r]=!0}}});var cwi,Jan,zan=wi(()=>{"use strict";iEr();fEr();cwi=Wan(nEr),Jan=cwi});var Kan=wi(()=>{hEr();tEr();Zbr();iEr()});var Xan,$an=wi(()=>{Xan="0.10.1"});var MWt,Yan,BWt,U5t,q5t,jWt,UWt,Qan,Zan,esn,G5t=wi(()=>{"use strict";MWt=["**/node_modules/**/*.*"],Yan=process.cwd(),BWt=!1,U5t=!1,q5t=!1,jWt=!1,UWt=4,Qan=!1,Zan="InstrumentationKey=d9f8ad27-50df-46e3-8acf-81ea279c8444;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/",esn="CLI"});var Q9e,qWt,tsn,rsn=wi(()=>{"use strict";G5t();Q9e=e=>e.option("json",{alias:"j",type:"boolean",description:"Respond with JSON",default:jWt}),qWt=e=>e.option("no-cache",{type:"boolean",description:"Disable cache for HTTP(S) requests",default:U5t}),tsn=e=>qWt(Q9e(e.option("include",{alias:"i",type:"string",array:!0,description:"Glob pattern(s) for files to include"}).option("exclude",{alias:"e",type:"string",array:!0,description:"Glob pattern(s) for files to exclude",default:MWt}).option("target",{alias:"t",type:"string",description:"Input directory path"}).option("source",{alias:"s",type:"string",description:"Source path of the local codemod to run"}).option("engine",{type:"string",description:'The engine to use with the local codemod: "jscodeshift", "ts-morph", "filemod", "ast-grep"'}).option("raw",{alias:"r",type:"boolean",description:"Disable formatting output with Prettier",default:BWt}).option("threads",{alias:"n",type:"number",description:"Number of worker threads",default:UWt}).option("dry",{alias:"d",type:"boolean",description:"Perform a dry run",default:Qan}).option("telemetryDisable",{type:"boolean",description:"Disable telemetry"}).option("skip-install",{type:"boolean",description:"Disable packages installation for the codemod run if there is `deps` field declared in its configuration.",default:q5t})))});function rp(e,t,r,n,s,c,l,h,b){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return r(t(e));case 4:return n(r(t(e)));case 5:return s(n(r(t(e))));case 6:return c(s(n(r(t(e)))));case 7:return l(c(s(n(r(t(e))))));case 8:return h(l(c(s(n(r(t(e)))))));case 9:return b(h(l(c(s(n(r(t(e))))))));default:{let E=arguments[0];for(let S=1;S<arguments.length;S++)E=arguments[S](E);return E}}}var kEr,Ql,X9,V5t,GWt,dSt,VWt,wEr,Jb=wi(()=>{kEr=e=>typeof e=="function",Ql=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):r=>t(r,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(r,n){return arguments.length>=2?t(r,n):function(s){return t(s,r)}};case 3:return function(r,n,s){return arguments.length>=3?t(r,n,s):function(c){return t(c,r,n)}};case 4:return function(r,n,s,c){return arguments.length>=4?t(r,n,s,c):function(l){return t(l,r,n,s)}};case 5:return function(r,n,s,c,l){return arguments.length>=5?t(r,n,s,c,l):function(h){return t(h,r,n,s,c)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let r=arguments;return function(n){return t(n,...r)}}}},X9=e=>e,V5t=e=>()=>e,GWt=V5t(!0),dSt=V5t(!1),VWt=V5t(void 0),wEr=VWt});var Sht,HWt=wi(()=>{Sht="2.0.0-next.59"});var IEr,PEr,OC,Ube=wi(()=>{HWt();IEr=Symbol.for(`effect/GlobalValue/globalStoreId/${Sht}`);IEr in globalThis||(globalThis[IEr]=new Map);PEr=globalThis[IEr],OC=(e,t)=>(PEr.has(e)||PEr.set(e,t()),PEr.get(e))});var Tht,vW,mSt,Z9e,hSt,TQe,NEr,nsn,isn,gSt,Lx,WWt,Cht,asn,ssn,JWt,osn,OEr,csn,eI=wi(()=>{Jb();Tht=e=>typeof e=="string",vW=e=>typeof e=="number",mSt=e=>typeof e=="boolean",Z9e=e=>typeof e=="bigint",hSt=e=>typeof e=="symbol",TQe=kEr,NEr=e=>e===void 0,nsn=e=>!1,isn=e=>typeof e=="object"&&e!==null,gSt=e=>isn(e)||TQe(e),Lx=Ql(2,(e,t)=>gSt(e)&&t in e),WWt=Ql(2,(e,t)=>Lx(e,"_tag")&&e._tag===t),Cht=e=>e==null,asn=e=>e!=null,ssn=e=>e instanceof Uint8Array,JWt=e=>e instanceof Date,osn=e=>Lx(e,Symbol.iterator),OEr=e=>isn(e)&&!Array.isArray(e),csn=e=>Lx(e,"then")&&"catch"in e&&TQe(e.then)&&TQe(e.catch)});function hwi(e,t,r,n,s){let c=(r>>>16)*(s&65535)>>>0,l=(r&65535)*(s>>>16)>>>0,h=(r&65535)*(s&65535)>>>0,b=(r>>>16)*(s>>>16)+((l>>>16)+(c>>>16))>>>0;l=l<<16>>>0,h=h+l>>>0,h>>>0<l>>>0&&(b=b+1>>>0),c=c<<16>>>0,h=h+c>>>0,h>>>0<c>>>0&&(b=b+1>>>0),b=b+Math.imul(r,n)>>>0,b=b+Math.imul(t,s)>>>0,e[0]=b,e[1]=h}function fsn(e,t,r,n,s){let c=t+n>>>0,l=r+s>>>0;l>>>0<r>>>0&&(c=c+1|0),e[0]=c,e[1]=l}var usn,lsn,W5t,lwi,fwi,pwi,dwi,_wi,mwi,ySt,FEr=wi(()=>{Jb();eI();usn=Symbol.for("effect/Gen/GenKind"),lsn=class{value;constructor(t){this.value=t}get _F(){return X9}get _R(){return t=>t}get _O(){return t=>t}get _E(){return t=>t}[usn]=usn;[Symbol.iterator](){return new W5t(this)}},W5t=class{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new W5t(this.self)}},lwi=335903614,fwi=4150755663,pwi=1481765933,dwi=1284865837,_wi=9007199254740992,mwi=134217728,ySt=class{_state;constructor(t,r,n,s){return Cht(r)&&Cht(t)?(r=Math.random()*4294967295>>>0,t=0):Cht(r)&&(r=t,t=0),Cht(s)&&Cht(n)?(s=this._state?this._state[3]:fwi,n=this._state?this._state[2]:lwi):Cht(s)&&(s=n,n=0),this._state=new Int32Array([0,0,n>>>0,((s||0)|1)>>>0]),this._next(),fsn(this._state,this._state[0],this._state[1],t>>>0,r>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){if(!t)return this._next();if(t=t>>>0,!(t&t-1))return this._next()&t-1;let r=0,n=(-t>>>0)%t>>>0;for(r=this._next();r<n;r=this._next());return r%t}number(){let t=(this._next()&67108863)*1,r=(this._next()&134217727)*1;return(t*mwi+r)/_wi}_next(){let t=this._state[0]>>>0,r=this._state[1]>>>0;hwi(this._state,t,r,pwi,dwi),fsn(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let n=t>>>18,s=(r>>>18|t<<14)>>>0;n=(n^t)>>>0,s=(s^r)>>>0;let c=(s>>>27|n<<5)>>>0,l=t>>>27,h=(-l>>>0&31)>>>0;return(c>>>l|c<<h)>>>0}}});var LEr,ywi,kx,h1,Vot,yv,zWt,xwi,xSt,MQ,vwi,KWt,Nge,zG=wi(()=>{Jb();Ube();eI();FEr();LEr=OC(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),ywi=OC(Symbol.for("effect/Hash/pcgr"),()=>new ySt),kx=Symbol.for("effect/Hash"),h1=e=>{switch(typeof e){case"number":return xSt(e);case"bigint":return MQ(e.toString(10));case"boolean":return MQ(String(e));case"symbol":return MQ(String(e));case"string":return MQ(e);case"undefined":return MQ("undefined");case"function":case"object":return e===null?MQ("null"):xwi(e)?e[kx]():Vot(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Vot=e=>(LEr.has(e)||LEr.set(e,xSt(ywi.integer(Number.MAX_SAFE_INTEGER))),LEr.get(e)),yv=e=>t=>t*53^e,zWt=e=>e&3221225471|e>>>1&1073741824,xwi=e=>Lx(e,kx),xSt=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return zWt(e)},MQ=e=>{let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return zWt(t)},vwi=(e,t)=>{let r=12289;for(let n=0;n<t.length;n++)r^=rp(MQ(t[n]),yv(h1(e[t[n]])));return zWt(r)},KWt=e=>vwi(e,Object.keys(e)),Nge=e=>{let t=6151;for(let r=0;r<e.length;r++)t=rp(t,yv(h1(e[r])));return zWt(t)}});function Zg(){return arguments.length===1?e=>psn(e,arguments[0]):psn(arguments[0],arguments[1])}function psn(e,t){if(e===t)return!0;let r=typeof e;return r!==typeof t?!1:(r==="object"||r==="function")&&e!==null&&t!==null&&vSt(e)&&vSt(t)?h1(e)===h1(t)&&e[Iy](t):!1}var Iy,vSt,J5t,_w=wi(()=>{zG();eI();Iy=Symbol.for("effect/Equal");vSt=e=>Lx(e,Iy),J5t=()=>(e,t)=>Zg(e,t)});var CQe,bwi,REr,Ewi,MEr,dsn,_sn,Aht=wi(()=>{Jb();CQe=e=>(t,r)=>t===r||e(t,r),bwi=(e,t)=>e===t,REr=()=>bwi,Ewi=REr(),MEr=Ql(2,(e,t)=>CQe((r,n)=>e(t(r),t(n)))),dsn=MEr(Ewi,e=>e.getTime()),_sn=e=>CQe((t,r)=>{if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(!e(t[n],r[n]))return!1;return!0})});var bD,xk,rI,xoe=wi(()=>{eI();bD=Symbol.for("nodejs.util.inspect.custom"),xk=e=>Lx(e,"toJSON")&&TQe(e.toJSON)&&e.toJSON.length===0?e.toJSON():Array.isArray(e)?e.map(xk):e,rI=e=>JSON.stringify(e,null,2)});var tg,Y9=wi(()=>{tg=(e,t)=>{switch(t.length){case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let r=e;for(let n=0,s=t.length;n<s;n++)r=t[n](r);return r}}}});var ESt,$Wt,yAe,z5t,SSt,TSt,xAe,XWt,msn,Dht,CSt,YWt,ASt,K5t,QWt=wi(()=>{ESt="Async",$Wt="Commit",yAe="Failure",z5t="OnFailure",SSt="OnSuccess",TSt="OnSuccessAndFailure",xAe="Success",XWt="Sync",msn="Tag",Dht="UpdateRuntimeFlags",CSt="While",YWt="WithRuntime",ASt="Yield",K5t="RevertFlags"});var jEr,hsn,gsn,ysn,Hot,Twi,Cwi,Wot,$5t,xsn,UEr,Jot=wi(()=>{_w();zG();Y9();QWt();HWt();jEr=Symbol.for("effect/Effect"),hsn=Symbol.for("effect/Stream"),gsn=Symbol.for("effect/Sink"),ysn=Symbol.for("effect/Channel"),Hot={_R:e=>e,_E:e=>e,_A:e=>e,_V:Sht},Twi={_R:e=>e,_E:e=>e,_In:e=>e,_L:e=>e,_Z:e=>e},Cwi={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},Wot={[jEr]:Hot,[hsn]:Hot,[gsn]:Twi,[ysn]:Cwi,[Iy](e){return this===e},[kx](){return Vot(this)},pipe(){return tg(this,arguments)}},$5t={[kx](){return KWt(this)},[Iy](e){let t=Object.keys(this),r=Object.keys(e);if(t.length!==r.length)return!1;for(let n of t)if(!(n in e&&Zg(this[n],e[n])))return!1;return!0}},xsn={...Wot,_op:$Wt},UEr={...xsn,...$5t}});var vsn,bsn,Dwi,kwi,ZWt,qEr,GEr,eJt,tJt,VEr=wi(()=>{_w();zG();xoe();eI();Jot();vsn=Symbol.for("effect/Option"),bsn={...Wot,[vsn]:{_A:e=>e},[bD](){return this.toJSON()},toString(){return rI(this.toJSON())}},Dwi=Object.assign(Object.create(bsn),{_tag:"Some",_op:"Some",[Iy](e){return ZWt(e)&&GEr(e)&&Zg(e.value,this.value)},[kx](){return yv(h1(this._tag))(h1(this.value))},toJSON(){return{_id:"Option",_tag:this._tag,value:xk(this.value)}}}),kwi=Object.assign(Object.create(bsn),{_tag:"None",_op:"None",[Iy](e){return ZWt(e)&&qEr(e)},[kx](){return yv(h1(this._tag))},toJSON(){return{_id:"Option",_tag:this._tag}}}),ZWt=e=>Lx(e,vsn),qEr=e=>e._tag==="None",GEr=e=>e._tag==="Some",eJt=Object.create(kwi),tJt=e=>{let t=Object.create(Dwi);return t.value=e,t}});var HEr,Ssn,wwi,Pwi,WEr,JEr,zEr,Tsn,Csn,Asn=wi(()=>{_w();zG();xoe();eI();Jot();HEr=Symbol.for("effect/Either"),Ssn={...Wot,[HEr]:{_A:e=>e},[bD](){return this.toJSON()},toString(){return rI(this.toJSON())}},wwi=Object.assign(Object.create(Ssn),{_tag:"Right",_op:"Right",[Iy](e){return WEr(e)&&zEr(e)&&Zg(e.right,this.right)},[kx](){return yv(h1(this._tag))(h1(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:xk(this.right)}}}),Pwi=Object.assign(Object.create(Ssn),{_tag:"Left",_op:"Left",[Iy](e){return WEr(e)&&JEr(e)&&Zg(e.left,this.left)},[kx](){return yv(h1(this._tag))(h1(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:xk(this.left)}}}),WEr=e=>Lx(e,HEr),JEr=e=>e._tag==="Left",zEr=e=>e._tag==="Right",Tsn=e=>{let t=Object.create(Pwi);return t.left=e,t},Csn=e=>{let t=Object.create(wwi);return t.right=e,t}});var rJt,Dsn,ksn,X5t,Nwi,wsn,KEr,$Er,nJt=wi(()=>{Jb();rJt=e=>(t,r)=>t===r?0:e(t,r),Dsn=rJt((e,t)=>e<t?-1:1),ksn=e=>rJt((t,r)=>e(r,t)),X5t=Ql(2,(e,t)=>rJt((r,n)=>e(t(r),t(n)))),Nwi=e=>rJt((t,r)=>{let n=Math.min(t.length,r.length),s=0;for(let c of e){if(s>=n)break;let l=c(t[s],r[s]);if(l!==0)return l;s++}return 0}),wsn=(...e)=>Nwi(e),KEr=e=>Ql(2,(t,r)=>e(t,r)===1),$Er=e=>Ql(2,(t,r)=>t===r||e(t,r)>-1?t:r)});var t2,_E,Psn,aM,zB,lte,KG,DSt,jGe,AQe,$de,Y5t,Isn,Nsn,Fwi,Lwi,Osn,EW=wi(()=>{_w();Aht();Jb();VEr();t2=()=>eJt,_E=tJt,Psn=ZWt,aM=qEr,zB=GEr,lte=Ql(2,(e,{onNone:t,onSome:r})=>aM(e)?t():r(e.value)),KG=Ql(2,(e,t)=>aM(e)?t():e.value),DSt=Ql(2,(e,t)=>aM(e)?t():e),jGe=e=>e==null?t2():_E(e),AQe=KG(VWt),$de=Ql(2,(e,t)=>aM(e)?t2():_E(t(e.value))),Y5t=Ql(2,(e,t)=>aM(e)?t2():t(e.value)),Isn=Y5t(X9),Nsn=e=>CQe((t,r)=>t===r||(aM(t)?aM(r):aM(r)?!1:e(t.value,r.value))),Fwi=e=>Ql(2,(t,r)=>aM(t)?!1:e(t.value,r)),Lwi=J5t(),Osn=Fwi(Lwi)});var YEr,Rwi,QEr,kSt,ZEr,Fsn,Mwi,eSr,Lsn,tSr,Bwi,rSr,Rsn=wi(()=>{_w();Aht();Jb();zG();xoe();Y9();eI();YEr=Symbol.for("effect/BigDecimal"),Rwi={[YEr]:YEr,[kx](){let e=eSr(this);return rp(h1(e.value),yv(xSt(e.scale)))},[Iy](e){return QEr(e)&&Bwi(this,e)},toString(){return`BigDecimal(${rSr(this)})`},toJSON(){return{_id:"BigDecimal",value:String(this.value),scale:this.scale}},[bD](){return this.toJSON()},pipe(){return tg(this,arguments)}},QEr=e=>Lx(e,YEr),kSt=(e,t)=>{let r=Object.create(Rwi);return r.value=e,r.scale=t,r},ZEr=BigInt(0),Fsn=BigInt(10),Mwi=kSt(ZEr,0),eSr=e=>{if(e.normalized===void 0)if(e.value===ZEr)e.normalized=Mwi;else{let t=`${e.value}`,r=0;for(let c=t.length-1;c>=0&&t[c]==="0";c--)r++;r===0&&(e.normalized=e);let n=BigInt(t.substring(0,t.length-r)),s=e.scale-r;e.normalized=kSt(n,s)}return e.normalized},Lsn=(e,t)=>t>e.scale?kSt(e.value*Fsn**BigInt(t-e.scale),t):t<e.scale?kSt(e.value/Fsn**BigInt(e.scale-t),t):e,tSr=CQe((e,t)=>e.scale>t.scale?Lsn(t,e.scale).value===e.value:e.scale<t.scale?Lsn(e,t.scale).value===t.value:e.value===t.value),Bwi=Ql(2,(e,t)=>tSr(e,t)),rSr=e=>{let t=e.value<ZEr,r=t?`${e.value}`.substring(1):`${e.value}`,n,s;if(e.scale>=r.length)n="0",s="0".repeat(e.scale-r.length)+r;else{let l=r.length-e.scale;if(l>r.length){let h=l-r.length;n=`${r}${"0".repeat(h)}`,s=""}else s=r.slice(l),n=r.slice(0,l)}let c=s===""?n:`${n}.${s}`;return t?`-${c}`:c}});var fie,voe,pie,eFe,Uwi,Msn,zot=wi(()=>{Jb();Asn();fie=Csn,voe=Tsn,pie=JEr,eFe=zEr,Uwi=Ql(2,(e,{onLeft:t,onRight:r})=>pie(e)?t(e.left):r(e.right)),Msn=Uwi({onLeft:X9,onRight:X9})});var nSr,Bsn=wi(()=>{nSr=e=>e.length>0});var jsn,Usn=wi(()=>{jsn=(...e)=>e});var iSr,SW,wSt,qsn,iJt,Vwi,Hwi,PSt,fte,Gsn,Wwi,Jwi,aSr,Kot,Xde,aJt,sSr,UGe,zwi,Vsn,Hsn,oSr,qGe,cSr,Wsn,Kwi,$wi,Xwi,Ywi,Qwi,wht,DQe,Oge,efe,Q5t,uSr,Pht,lSr,$ot,Jsn,fSr,GGe,aX=wi(()=>{_w();Aht();Jb();Bsn();EW();Usn();iSr=(e,t)=>{let r=Math.max(1,Math.floor(e)),n=[t(0)];for(let s=1;s<r;s++)n.push(t(s));return n},SW=e=>Array.isArray(e)?e:Array.from(e),wSt=Ql(2,(e,t)=>[t,...e]),qsn=Ql(2,(e,t)=>[...e,t]),iJt=Ql(2,(e,t)=>SW(e).concat(SW(t))),Vwi=e=>e.length===0,Hwi=Vwi,PSt=nSr,fte=nSr,Gsn=(e,t)=>e<0||e>=t.length,Wwi=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),Jwi=Ql(2,(e,t)=>{let r=Math.floor(t);return Gsn(r,e)?t2():_E(e[r])}),aSr=Ql(2,(e,t)=>{let r=Math.floor(t);if(Gsn(r,e))throw new Error(`Index ${r} out of bounds`);return e[r]}),Kot=Jwi(0),Xde=aSr(0),aJt=e=>fte(e)?_E(sSr(e)):t2(),sSr=e=>e[e.length-1],UGe=e=>e.slice(1),zwi=(e,t)=>{let r=0;for(let n of e){if(!t(n))break;r++}return r},Vsn=Ql(2,(e,t)=>$wi(e,zwi(e,t))),Hsn=Ql(2,(e,t)=>{let r=SW(e);return r.slice(Wwi(t,r),r.length)}),oSr=e=>Array.from(e).reverse(),qGe=Ql(2,(e,t)=>{let r=Array.from(e);return r.sort(t),r}),cSr=Ql(2,(e,t)=>Wsn(e,t,jsn)),Wsn=Ql(3,(e,t,r)=>{let n=SW(e),s=SW(t);if(fte(n)&&fte(s)){let c=[r(Xde(n),Xde(s))],l=Math.min(n.length,s.length);for(let h=1;h<l;h++)c[h]=r(n[h],s[h]);return c}return[]}),Kwi=J5t(),$wi=Ql(2,(e,t)=>{let r=Array.from(e),n=Math.floor(t);return fte(r)?n>=1?Xwi(r,n):[[],r]:[r,[]]}),Xwi=Ql(2,(e,t)=>{let r=Math.max(1,Math.floor(t));return r>=e.length?[Ywi(e),[]]:[wSt(e.slice(1,r),Xde(e)),e.slice(r)]}),Ywi=e=>e.slice(),Qwi=Ql(3,(e,t,r)=>{let n=SW(e),s=SW(t);return fte(n)?fte(s)?Jsn(r)(iJt(n,s)):n:s}),wht=Ql(2,(e,t)=>Qwi(e,t,Kwi)),DQe=()=>[],Oge=e=>[e],efe=Ql(2,(e,t)=>e.map(t)),Q5t=Ql(2,(e,t)=>{if(Hwi(e))return[];let r=[];for(let n=0;n<e.length;n++)r.push(...t(e[n],n));return r}),uSr=Q5t(X9),Pht=Ql(3,(e,t,r)=>SW(e).reduce((n,s,c)=>r(n,s,c),t)),lSr=(e,t)=>{let r=[],n=e,s;for(;zB(s=t(n));){let[c,l]=s.value;r.push(c),n=l}return r},$ot=_sn,Jsn=Ql(2,(e,t)=>{let r=SW(e);if(fte(r)){let n=[Xde(r)],s=UGe(r);for(let c of s)n.every(l=>!t(c,l))&&n.push(c);return n}return[]}),fSr=e=>Jsn(e,J5t()),GGe=Ql(2,(e,t)=>SW(e).join(t))});function e8i(e,t,r,n,s){for(let c=t;c<Math.min(e.length,t+s);c++)r[n+c-t]=e[c];return r}var Ksn,$sn,t8i,r8i,n8i,pte,Xsn,VGe,wQe,Fge,ePt,pSr,Z5t,Xot,_Sr,ISt,Yde,dSr,kQe,Ysn,tFe,mSr,rFe,nFe,Yot=wi(()=>{_w();Aht();Jb();zG();xoe();Y9();eI();aX();Ksn=Symbol.for("effect/Chunk");$sn=[],t8i=e=>CQe((t,r)=>t.length===r.length&&Z5t(t).every((n,s)=>e(n,ISt(r,s)))),r8i=t8i(Zg),n8i={[Ksn]:{_A:e=>e},toString(){return rI(this.toJSON())},toJSON(){return{_id:"Chunk",values:Z5t(this).map(xk)}},[bD](){return this.toJSON()},[Iy](e){return Xsn(e)&&r8i(this,e)},[kx](){return Nge(Z5t(this))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return $sn[Symbol.iterator]();default:return Z5t(this)[Symbol.iterator]()}},pipe(){return tg(this,arguments)}},pte=e=>{let t=Object.create(n8i);switch(t.backing=e,e._tag){case"IEmpty":{t.length=0,t.depth=0,t.left=t,t.right=t;break}case"IConcat":{t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break}case"IArray":{t.length=e.array.length,t.depth=0,t.left=VGe,t.right=VGe;break}case"ISingleton":{t.length=1,t.depth=0,t.left=VGe,t.right=VGe;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=VGe,t.right=VGe;break}}return t},Xsn=e=>Lx(e,Ksn),VGe=pte({_tag:"IEmpty"}),wQe=()=>VGe,Fge=e=>pte({_tag:"ISingleton",a:e}),ePt=e=>Xsn(e)?e:pte({_tag:"IArray",array:SW(e)}),pSr=(e,t,r)=>{switch(e.backing._tag){case"IArray":{e8i(e.backing.array,0,t,r,e.length);break}case"IConcat":{pSr(e.left,t,r),pSr(e.right,t,r+e.left.length);break}case"ISingleton":{t[r]=e.backing.a;break}case"ISlice":{let n=0,s=r;for(;n<e.length;)t[s]=ISt(e,n),n+=1,s+=1;break}}},Z5t=e=>{switch(e.backing._tag){case"IEmpty":return $sn;case"IArray":return e.backing.array;default:{let t=new Array(e.length);return pSr(e,t,0),e.backing={_tag:"IArray",array:t},e.left=VGe,e.right=VGe,e.depth=0,t}}},Xot=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return pte({_tag:"IArray",array:oSr(e.backing.array)});case"IConcat":return pte({_tag:"IConcat",left:Xot(e.backing.right),right:Xot(e.backing.left)});case"ISlice":return _Sr(oSr(Z5t(e)))}},_Sr=e=>pte({_tag:"IArray",array:e}),ISt=Ql(2,(e,t)=>{switch(e.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":{if(t!==0)throw new Error("Index out of bounds");return e.backing.a}case"IArray":{if(t>=e.length||t<0)throw new Error("Index out of bounds");return e.backing.array[t]}case"IConcat":return t<e.left.length?ISt(e.left,t):ISt(e.right,t-e.left.length);case"ISlice":return ISt(e.backing.chunk,t+e.backing.offset)}}),Yde=Ql(2,(e,t)=>kQe(Fge(t),e)),dSr=Ql(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return VGe;switch(e.backing._tag){case"ISlice":return pte({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?dSr(e.right,t-e.left.length):pte({_tag:"IConcat",left:dSr(e.left,t),right:e.right});default:return pte({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),kQe=Ql(2,(e,t)=>{if(e.backing._tag==="IEmpty")return t;if(t.backing._tag==="IEmpty")return e;let r=t.depth-e.depth;if(Math.abs(r)<=1)return pte({_tag:"IConcat",left:e,right:t});if(r<-1)if(e.left.depth>=e.right.depth){let n=kQe(e.right,t);return pte({_tag:"IConcat",left:e.left,right:n})}else{let n=kQe(e.right.right,t);if(n.depth===e.depth-3){let s=pte({_tag:"IConcat",left:e.right.left,right:n});return pte({_tag:"IConcat",left:e.left,right:s})}else{let s=pte({_tag:"IConcat",left:e.left,right:e.right.left});return pte({_tag:"IConcat",left:s,right:n})}}else if(t.right.depth>=t.left.depth){let n=kQe(e,t.left);return pte({_tag:"IConcat",left:n,right:t.right})}else{let n=kQe(e,t.left.left);if(n.depth===t.depth-3){let s=pte({_tag:"IConcat",left:n,right:t.left.right});return pte({_tag:"IConcat",left:s,right:t.right})}else{let s=pte({_tag:"IConcat",left:t.left.right,right:t.right});return pte({_tag:"IConcat",left:n,right:s})}}}),Ysn=e=>e.length===0,tFe=e=>e.length>0,mSr=e=>ISt(e,0),rFe=mSr,nFe=e=>dSr(e,1)});var hSr,Qsn,Zsn,eon,gSr=wi(()=>{hSr=Math.pow(2,5),Qsn=hSr-1,Zsn=hSr/2,eon=hSr/4});function i8i(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function Qot(e,t){return t>>>e&Qsn}function Zot(e){return 1<<e}function sJt(e,t){return i8i(e&t-1)}var ySr=wi(()=>{gSr()});var oJt,ton=wi(()=>{oJt=class{value;previous;constructor(t,r){this.value=t,this.previous=r}}});function Nht(e,t,r,n){let s=n;if(!e){let c=n.length;s=new Array(c);for(let l=0;l<c;++l)s[l]=n[l]}return s[t]=r,s}function xSr(e,t,r){let n=r.length-1,s=0,c=0,l=r;if(e)s=c=t;else for(l=new Array(n);s<t;)l[c++]=r[s++];for(++s;s<=n;)l[c++]=r[s++];return e&&(l.length=n),l}function ron(e,t,r,n){let s=n.length;if(e){let b=s;for(;b>=t;)n[b--]=n[b];return n[t]=r,n}let c=0,l=0,h=new Array(s+1);for(;c<t;)h[l++]=n[c++];for(h[t]=r;c<s;)h[++l]=n[c++];return h}var non=wi(()=>{});function pwe(e){return WWt(e,"EmptyNode")}function a8i(e){return pwe(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function cJt(e,t){return pwe(e)?!1:t===e.edit}function s8i(e,t,r,n){let s=new Array(t-1),c=0,l=0;for(let h=0,b=n.length;h<b;++h)if(h!==r){let E=n[h];E&&!pwe(E)&&(s[c++]=E,l|=1<<h)}return new ect(e,l,s)}function o8i(e,t,r,n,s){let c=[],l=n,h=0;for(let b=0;l;++b)l&1&&(c[b]=s[h++]),l>>>=1;return c[t]=r,new rPt(e,h+1,c)}function c8i(e,t,r,n,s,c){if(r===s)return new tPt(e,r,[c,n]);let l=Qot(t,r),h=Qot(t,s);if(l===h)return b=>new ect(e,Zot(l)|Zot(h),[b]);{let b=l<h?[n,c]:[c,n];return new ect(e,Zot(l)|Zot(h),b)}}function ion(e,t,r,n,s,c){let l,h=t;for(;;){let b=c8i(e,h,r,n,s,c);if(typeof b=="function")l=new oJt(b,l),h=h+5;else{let E=b;for(;l!=null;)E=l.value(E),l=l.previous;return E}}}var iFe,PQe,tPt,ect,rPt,aon=wi(()=>{_w();EW();eI();ton();non();ySr();gSr();iFe=class{_tag="EmptyNode";modify(t,r,n,s,c,l){let h=n(t2());return aM(h)?new iFe:(++l.value,new PQe(t,s,c,h))}};PQe=class{edit;hash;key;value;_tag="LeafNode";constructor(t,r,n,s){this.edit=t,this.hash=r,this.key=n,this.value=s}modify(t,r,n,s,c,l){if(Zg(c,this.key)){let b=n(this.value);return b===this.value?this:aM(b)?(--l.value,new iFe):cJt(this,t)?(this.value=b,this):new PQe(t,s,c,b)}let h=n(t2());return aM(h)?this:(++l.value,ion(t,r,this.hash,this,s,new PQe(t,s,c,h)))}},tPt=class{edit;hash;children;_tag="CollisionNode";constructor(t,r,n){this.edit=t,this.hash=r,this.children=n}modify(t,r,n,s,c,l){if(s===this.hash){let b=cJt(this,t),E=this.updateCollisionList(b,t,this.hash,this.children,n,c,l);return E===this.children?this:E.length>1?new tPt(t,this.hash,E):E[0]}let h=n(t2());return aM(h)?this:(++l.value,ion(t,r,this.hash,this,s,new PQe(t,s,c,h)))}updateCollisionList(t,r,n,s,c,l,h){let b=s.length;for(let S=0;S<b;++S){let w=s[S];if("key"in w&&Zg(l,w.key)){let L=w.value,R=c(L);return R===L?s:aM(R)?(--h.value,xSr(t,S,s)):Nht(t,S,new PQe(r,n,l,R),s)}}let E=c(t2());return aM(E)?s:(++h.value,Nht(t,b,new PQe(r,n,l,E),s))}},ect=class{edit;mask;children;_tag="IndexedNode";constructor(t,r,n){this.edit=t,this.mask=r,this.children=n}modify(t,r,n,s,c,l){let h=this.mask,b=this.children,E=Qot(r,s),S=Zot(E),w=sJt(h,S),L=h&S,R=cJt(this,t);if(!L){let V=new iFe().modify(t,r+5,n,s,c,l);return V?b.length>=Zsn?o8i(t,E,V,h,b):new ect(t,h|S,ron(R,w,V,b)):this}let q=b[w],K=q.modify(t,r+5,n,s,c,l);if(q===K)return this;let Z=h,ue;if(pwe(K)){if(Z&=~S,!Z)return new iFe;if(b.length<=2&&a8i(b[w^1]))return b[w^1];ue=xSr(R,w,b)}else ue=Nht(R,w,K,b);return R?(this.mask=Z,this.children=ue,this):new ect(t,Z,ue)}},rPt=class{edit;size;children;_tag="ArrayNode";constructor(t,r,n){this.edit=t,this.size=r,this.children=n}modify(t,r,n,s,c,l){let h=this.size,b=this.children,E=Qot(r,s),S=b[E],w=(S||new iFe).modify(t,r+5,n,s,c,l);if(S===w)return this;let L=cJt(this,t),R;if(pwe(S)&&!pwe(w))++h,R=Nht(L,E,w,b);else if(!pwe(S)&&pwe(w)){if(--h,h<=eon)return s8i(t,h,E,b);R=Nht(L,E,new iFe,b)}else R=Nht(L,E,w,b);return L?(this.size=h,this.children=R,this):new rPt(t,h,R)}}});var son,uJt,l8i,vSr,OSt,lJt,oon,con,f8i,FSt,uon,bSr,lon,fon,pon,fJt,ESr,Oht,p8i,pJt,LSt,dJt,don,SSr,_on,_Jt,mon,TSr,RSt,CSr=wi(()=>{_w();Jb();Jb();zG();xoe();EW();Y9();eI();ySr();aon();son="effect/HashMap",uJt=Symbol.for(son),l8i={[uJt]:uJt,[Symbol.iterator](){return new OSt(this,(e,t)=>[e,t])},[kx](){let e=h1(son);for(let t of this)e^=rp(h1(t[0]),yv(h1(t[1])));return e},[Iy](e){if(lon(e)){if(e._size!==this._size)return!1;for(let t of this){let r=rp(e,fJt(t[0],h1(t[0])));if(aM(r))return!1;if(!Zg(t[1],r.value))return!1}return!0}return!1},toString(){return rI(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(xk)}},[bD](){return this.toJSON()},pipe(){return tg(this,arguments)}},vSr=(e,t,r,n)=>{let s=Object.create(l8i);return s._editable=e,s._edit=t,s._root=r,s._size=n,s},OSt=class{map;f;v;constructor(t,r){this.map=t,this.f=r,this.v=oon(this.map._root,this.f,void 0)}next(){if(aM(this.v))return{done:!0,value:void 0};let t=this.v.value;return this.v=lJt(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new OSt(this.map,this.f)}},lJt=e=>e?con(e[0],e[1],e[2],e[3],e[4]):t2(),oon=(e,t,r=void 0)=>{switch(e._tag){case"LeafNode":return zB(e.value)?_E({value:t(e.key,e.value.value),cont:r}):lJt(r);case"CollisionNode":case"ArrayNode":case"IndexedNode":{let n=e.children;return con(n.length,n,0,t,r)}default:return lJt(r)}},con=(e,t,r,n,s)=>{for(;r<e;){let c=t[r++];if(c&&!pwe(c))return oon(c,n,[e,t,r,n,s])}return lJt(s)},f8i=vSr(!1,0,new iFe,0),FSt=()=>f8i,uon=(...e)=>bSr(e),bSr=e=>{let t=dJt(FSt());for(let r of e)Oht(t,r[0],r[1]);return don(t)},lon=e=>Lx(e,uJt),fon=e=>e&&pwe(e._root),pon=Ql(2,(e,t)=>fJt(e,t,h1(t))),fJt=Ql(3,(e,t,r)=>{let n=e._root,s=0;for(;;)switch(n._tag){case"LeafNode":return Zg(t,n.key)?n.value:t2();case"CollisionNode":{if(r===n.hash){let c=n.children;for(let l=0,h=c.length;l<h;++l){let b=c[l];if("key"in b&&Zg(t,b.key))return b.value}}return t2()}case"IndexedNode":{let c=Qot(s,r),l=Zot(c);if(n.mask&l){n=n.children[sJt(n.mask,l)],s+=5;break}return t2()}case"ArrayNode":{if(n=n.children[Qot(s,r)],n){s+=5;break}return t2()}default:return t2()}}),ESr=Ql(2,(e,t)=>zB(fJt(e,t,h1(t)))),Oht=Ql(3,(e,t,r)=>SSr(e,t,()=>_E(r))),p8i=Ql(3,(e,t,r)=>e._editable?(e._root=t,e._size=r,e):t===e._root?e:vSr(e._editable,e._edit,t,r)),pJt=e=>new OSt(e,t=>t),LSt=e=>e._size,dJt=e=>vSr(!0,e._edit+1,e._root,e._size),don=e=>(e._editable=!1,e),SSr=Ql(3,(e,t,r)=>_on(e,t,h1(t),r)),_on=Ql(4,(e,t,r,n)=>{let s={value:e._size},c=e._root.modify(e._editable?e._edit:NaN,0,n,r,t,s);return rp(e,p8i(c,s.value))}),_Jt=Ql(2,(e,t)=>SSr(e,t,t2)),mon=Ql(2,(e,t)=>RSt(e,FSt(),(r,n,s)=>Oht(r,s,t(n,s)))),TSr=Ql(2,(e,t)=>RSt(e,void 0,(r,n,s)=>t(n,s))),RSt=Ql(3,(e,t,r)=>{let n=e._root;if(n._tag==="LeafNode")return zB(n.value)?r(t,n.value.value,n.key):t;if(n._tag==="EmptyNode")return t;let s=[n.children],c;for(;c=s.pop();)for(let l=0,h=c.length;l<h;){let b=c[l++];b&&!pwe(b)&&(b._tag==="LeafNode"?zB(b.value)&&(t=r(t,b.value.value,b.key)):s.push(b.children))}return t})});var gon,mJt,d8i,hJt,yon,_8i,nPt,xon,von,bon,Eon,gJt,yJt,ASr,MSt,DSr,Son,Ton,Con,Aon,Don=wi(()=>{_w();Jb();zG();xoe();Y9();eI();CSr();gon="effect/HashSet",mJt=Symbol.for(gon),d8i={[mJt]:mJt,[Symbol.iterator](){return pJt(this._keyMap)},[kx](){return yv(h1(this._keyMap))(h1(gon))},[Iy](e){return yon(e)?LSt(this._keyMap)===LSt(e._keyMap)&&Zg(this._keyMap,e._keyMap):!1},toString(){return rI(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(xk)}},[bD](){return this.toJSON()},pipe(){return tg(this,arguments)}},hJt=e=>{let t=Object.create(d8i);return t._keyMap=e,t},yon=e=>Lx(e,mJt),_8i=hJt(FSt()),nPt=()=>_8i,xon=e=>{let t=gJt(nPt());for(let r of e)MSt(t,r);return yJt(t)},von=(...e)=>{let t=gJt(nPt());for(let r of e)MSt(t,r);return yJt(t)},bon=Ql(2,(e,t)=>ESr(e._keyMap,t)),Eon=e=>LSt(e._keyMap),gJt=e=>hJt(dJt(e._keyMap)),yJt=e=>(e._keyMap._editable=!1,e),ASr=Ql(2,(e,t)=>{let r=gJt(e);return t(r),yJt(r)}),MSt=Ql(2,(e,t)=>e._keyMap._editable?(Oht(t,!0)(e._keyMap),e):hJt(Oht(t,!0)(e._keyMap))),DSr=Ql(2,(e,t)=>e._keyMap._editable?(_Jt(t)(e._keyMap),e):hJt(_Jt(t)(e._keyMap))),Son=Ql(2,(e,t)=>ASr(e,r=>{for(let n of t)DSr(r,n)})),Ton=Ql(2,(e,t)=>ASr(nPt(),r=>{Con(e,n=>MSt(r,n));for(let n of t)MSt(r,n)})),Con=Ql(2,(e,t)=>TSr(e._keyMap,(r,n)=>t(n))),Aon=Ql(3,(e,t,r)=>RSt(e._keyMap,t,(n,s,c)=>r(n,c)))});var HGe,kon,Fht,won,iPt,Lht,kSr,wSr,IQe,Rht,Mht=wi(()=>{Don();HGe=nPt,kon=xon,Fht=von,won=bon,iPt=Eon,Lht=MSt,kSr=DSr,wSr=Son,IQe=Ton,Rht=Aon});var jSt,Bht,jht,USt,Uht,qht,Pon=wi(()=>{jSt="Die",Bht="Empty",jht="Fail",USt="Interrupt",Uht="Parallel",qht="Sequential"});var Ron,Mon,g8i,VSt,qSt,ISr,WGe,NQe,Ght,vAe,y8i,Bon,aPt,jon,Uon,qon,Gon,NSr,OSr,Von,x8i,v8i,b8i,E8i,PSr,S8i,Ion,Non,Hon,GSt,FSr,T8i,sPt,xJt,Oon,Fon,Lon,C8i,vJt=wi(()=>{Yot();zot();_w();Jb();zG();Mht();xoe();EW();Y9();eI();aX();Pon();Ron="effect/Cause",Mon=Symbol.for(Ron),g8i={_E:e=>e},VSt={[Mon]:g8i,[kx](){return rp(h1(Ron),yv(h1(v8i(this))))},[Iy](e){return y8i(e)&&x8i(this,e)},pipe(){return tg(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:xk(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:xk(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:xk(this.left),right:xk(this.right)}}},toString(){return sPt(this)},[bD](){return this.toJSON()}},qSt=(()=>{let e=Object.create(VSt);return e._tag=Bht,e})(),ISr=e=>{let t=Object.create(VSt);return t._tag=jht,t.error=e,t},WGe=e=>{let t=Object.create(VSt);return t._tag=jSt,t.defect=e,t},NQe=e=>{let t=Object.create(VSt);return t._tag=USt,t.fiberId=e,t},Ght=(e,t)=>{let r=Object.create(VSt);return r._tag=Uht,r.left=e,r.right=t,r},vAe=(e,t)=>{let r=Object.create(VSt);return r._tag=qht,r.left=e,r.right=t,r},y8i=e=>Lx(e,Mon),Bon=e=>e._tag===Bht?!0:GSt(e,!0,(t,r)=>{switch(r._tag){case Bht:return _E(t);case jSt:case jht:case USt:return _E(!1);default:return t2()}}),aPt=e=>FSr(void 0,S8i)(e),jon=e=>Xot(GSt(e,wQe(),(t,r)=>r._tag===jht?_E(rp(t,Yde(r.error))):t2())),Uon=e=>Xot(GSt(e,wQe(),(t,r)=>r._tag===jSt?_E(rp(t,Yde(r.defect))):t2())),qon=e=>GSt(e,HGe(),(t,r)=>r._tag===USt?_E(rp(t,Lht(r.fiberId))):t2()),Gon=e=>E8i(e,t=>t._tag===jht?_E(t.error):t2()),NSr=e=>{let t=Gon(e);switch(t._tag){case"None":return fie(e);case"Some":return voe(t.value)}},OSr=e=>Hon(e,{onEmpty:qSt,onFail:()=>qSt,onDie:t=>WGe(t),onInterrupt:t=>NQe(t),onSequential:vAe,onParallel:Ght}),Von=e=>Hon(e,{onEmpty:qSt,onFail:t=>WGe(t),onDie:t=>WGe(t),onInterrupt:t=>NQe(t),onSequential:(t,r)=>vAe(t,r),onParallel:(t,r)=>Ght(t,r)}),x8i=(e,t)=>{let r=Fge(e),n=Fge(t);for(;tFe(r)&&tFe(n);){let[s,c]=rp(rFe(r),GSt([HGe(),wQe()],([b,E],S)=>{let[w,L]=PSr(S);return _E([rp(b,IQe(w)),rp(E,kQe(L))])})),[l,h]=rp(rFe(n),GSt([HGe(),wQe()],([b,E],S)=>{let[w,L]=PSr(S);return _E([rp(b,IQe(w)),rp(E,kQe(L))])}));if(!Zg(s,l))return!1;r=c,n=h}return!0},v8i=e=>b8i(Fge(e),wQe()),b8i=(e,t)=>{for(;;){let[r,n]=rp(e,Pht([HGe(),wQe()],([c,l],h)=>{let[b,E]=PSr(h);return[rp(c,IQe(b)),rp(l,kQe(E))]})),s=iPt(r)>0?rp(t,Yde(r)):t;if(Ysn(n))return Xot(s);e=n,t=s}throw new Error("BUG: Cause.flattenCauseLoop - please report an issue at https://github.com/Effect-TS/effect/issues")},E8i=Ql(2,(e,t)=>{let r=[e];for(;r.length>0;){let n=r.pop(),s=t(n);switch(s._tag){case"None":{switch(n._tag){case qht:case Uht:{r.push(n.right),r.push(n.left);break}}break}case"Some":return s}}return t2()}),PSr=e=>{let t=e,r=[],n=HGe(),s=wQe();for(;t!==void 0;)switch(t._tag){case Bht:{if(r.length===0)return[n,s];t=r.pop();break}case jht:{if(n=Lht(n,t.error),r.length===0)return[n,s];t=r.pop();break}case jSt:{if(n=Lht(n,t.defect),r.length===0)return[n,s];t=r.pop();break}case USt:{if(n=Lht(n,t.fiberId),r.length===0)return[n,s];t=r.pop();break}case qht:{switch(t.left._tag){case Bht:{t=t.right;break}case qht:{t=vAe(t.left.left,vAe(t.left.right,t.right));break}case Uht:{t=Ght(vAe(t.left.left,t.right),vAe(t.left.right,t.right));break}default:{s=Yde(s,t.right),t=t.left;break}}break}case Uht:{r.push(t.right),t=t.left;break}}throw new Error("BUG: Cause.evaluateCauseLoop - please report an issue at https://github.com/Effect-TS/effect/issues")},S8i={emptyCase:GWt,failCase:dSt,dieCase:dSt,interruptCase:GWt,sequentialCase:(e,t,r)=>t&&r,parallelCase:(e,t,r)=>t&&r},Ion="SequentialCase",Non="ParallelCase",Hon=Ql(2,(e,{onDie:t,onEmpty:r,onFail:n,onInterrupt:s,onParallel:c,onSequential:l})=>FSr(e,void 0,{emptyCase:()=>r,failCase:(h,b)=>n(b),dieCase:(h,b)=>t(b),interruptCase:(h,b)=>s(b),sequentialCase:(h,b,E)=>l(b,E),parallelCase:(h,b,E)=>c(b,E)})),GSt=Ql(3,(e,t,r)=>{let n=t,s=e,c=[];for(;s!==void 0;){let l=r(n,s);switch(n=zB(l)?l.value:n,s._tag){case qht:{c.push(s.right),s=s.left;break}case Uht:{c.push(s.right),s=s.left;break}default:{s=void 0;break}}s===void 0&&c.length>0&&(s=c.pop())}return n}),FSr=Ql(3,(e,t,r)=>{let n=[e],s=[];for(;n.length>0;){let l=n.pop();switch(l._tag){case Bht:{s.push(fie(r.emptyCase(t)));break}case jht:{s.push(fie(r.failCase(t,l.error)));break}case jSt:{s.push(fie(r.dieCase(t,l.defect)));break}case USt:{s.push(fie(r.interruptCase(t,l.fiberId)));break}case qht:{n.push(l.right),n.push(l.left),s.push(voe({_tag:Ion}));break}case Uht:{n.push(l.right),n.push(l.left),s.push(voe({_tag:Non}));break}}}let c=[];for(;s.length>0;){let l=s.pop();switch(l._tag){case"Left":{switch(l.left._tag){case Ion:{let h=c.pop(),b=c.pop(),E=r.sequentialCase(t,h,b);c.push(E);break}case Non:{let h=c.pop(),b=c.pop(),E=r.parallelCase(t,h,b);c.push(E);break}}break}case"Right":{c.push(l.right);break}}}if(c.length===0)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return c.pop()}),T8i=e=>{let t=e.split(`
|
|
109
|
+
`,"f"),C2(this,yoe,Mo(this,yoe,"f")+t.join(" "),"f")}}}[gEr](t){sSt(Mo(this,cb,"f")).forEach(r=>{if((s=>s==="configObjects")(r))return;let n=Mo(this,cb,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete Mo(this,sC,"f").getDescriptions()[t]}[kan](t,r,n){Mo(this,wWt,"f")[n]||(Mo(this,GT,"f").process.emitWarning(t,r),Mo(this,wWt,"f")[n]=!0)}[wan](){Mo(this,PWt,"f").push({options:Mo(this,cb,"f"),configObjects:Mo(this,cb,"f").configObjects.slice(0),exitProcess:Mo(this,uwe,"f"),groups:Mo(this,MGe,"f"),strict:Mo(this,ght,"f"),strictCommands:Mo(this,yht,"f"),strictOptions:Mo(this,xht,"f"),completionCommand:Mo(this,mAe,"f"),output:Mo(this,yoe,"f"),exitError:Mo(this,Uot,"f"),hasOutput:Mo(this,hAe,"f"),parsed:this.parsed,parseFn:Mo(this,gAe,"f"),parseContext:Mo(this,mht,"f")}),Mo(this,sC,"f").freeze(),Mo(this,iX,"f").freeze(),Mo(this,RQ,"f").freeze(),Mo(this,lwe,"f").freeze()}[Pan](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(Mo(this,GT,"f").process.argv()[0])?r=Mo(this,GT,"f").process.argv().slice(1,2):r=Mo(this,GT,"f").process.argv().slice(0,1),t=r.map(n=>{let s=this[Van](Mo(this,dht,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&s.length<n.length?s:n}).join(" ").trim(),Mo(this,GT,"f").getEnv("_")&&Mo(this,GT,"f").getProcessArgvBin()===Mo(this,GT,"f").getEnv("_")&&(t=Mo(this,GT,"f").getEnv("_").replace(`${Mo(this,GT,"f").path.dirname(Mo(this,GT,"f").process.execPath())}/`,"")),t}[vht](){return Mo(this,OWt,"f")}[Ian](){return Mo(this,LWt,"f")}[yEr](){if(!Mo(this,_ht,"f"))return;let t=Mo(this,GT,"f").getEnv("LC_ALL")||Mo(this,GT,"f").getEnv("LC_MESSAGES")||Mo(this,GT,"f").getEnv("LANG")||Mo(this,GT,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[Nan](){return this[xEr]().version||"unknown"}[Oan](t){let r=t["--"]?t["--"]:t._;for(let n=0,s;(s=r[n])!==void 0;n++)Mo(this,GT,"f").Parser.looksLikeNumber(s)&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))&&(r[n]=Number(s));return t}[xEr](t){let r=t||"*";if(Mo(this,fSt,"f")[r])return Mo(this,fSt,"f")[r];let n={};try{let s=t||Mo(this,GT,"f").mainFilename;!t&&Mo(this,GT,"f").path.extname(s)&&(s=Mo(this,GT,"f").path.dirname(s));let c=Mo(this,GT,"f").findUp(s,(l,h)=>{if(h.includes("package.json"))return"package.json"});Ige(c,void 0,Mo(this,GT,"f")),n=JSON.parse(Mo(this,GT,"f").readFileSync(c,"utf8"))}catch{}return Mo(this,fSt,"f")[r]=n||{},Mo(this,fSt,"f")[r]}[Got](t,r){r=[].concat(r),r.forEach(n=>{n=this[EEr](n),Mo(this,cb,"f")[t].push(n)})}[pSt](t,r,n,s){this[bEr](t,r,n,s,(c,l,h)=>{Mo(this,cb,"f")[c][l]=h})}[vEr](t,r,n,s){this[bEr](t,r,n,s,(c,l,h)=>{Mo(this,cb,"f")[c][l]=(Mo(this,cb,"f")[c][l]||[]).concat(h)})}[bEr](t,r,n,s,c){if(Array.isArray(n))n.forEach(l=>{t(l,s)});else if((l=>typeof l=="object")(n))for(let l of sSt(n))t(l,n[l]);else c(r,this[EEr](n),s)}[EEr](t){return t==="__proto__"?"___proto___":t}[SEr](t,r){return this[pSt](this[SEr].bind(this),"key",t,r),this}[TEr](){var t,r,n,s,c,l,h,b,E,S,w,L;let R=Mo(this,PWt,"f").pop();Ige(R,void 0,Mo(this,GT,"f"));let q;t=this,r=this,n=this,s=this,c=this,l=this,h=this,b=this,E=this,S=this,w=this,L=this,{options:{set value(K){C2(t,cb,K,"f")}}.value,configObjects:q,exitProcess:{set value(K){C2(r,uwe,K,"f")}}.value,groups:{set value(K){C2(n,MGe,K,"f")}}.value,output:{set value(K){C2(s,yoe,K,"f")}}.value,exitError:{set value(K){C2(c,Uot,K,"f")}}.value,hasOutput:{set value(K){C2(l,hAe,K,"f")}}.value,parsed:this.parsed,strict:{set value(K){C2(h,ght,K,"f")}}.value,strictCommands:{set value(K){C2(b,yht,K,"f")}}.value,strictOptions:{set value(K){C2(E,xht,K,"f")}}.value,completionCommand:{set value(K){C2(S,mAe,K,"f")}}.value,parseFn:{set value(K){C2(w,gAe,K,"f")}}.value,parseContext:{set value(K){C2(L,mht,K,"f")}}.value}=R,Mo(this,cb,"f").configObjects=q,Mo(this,sC,"f").unfreeze(),Mo(this,iX,"f").unfreeze(),Mo(this,RQ,"f").unfreeze(),Mo(this,lwe,"f").unfreeze()}[Fan](t,r){return pht(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[Lan].bind(this),getContext:this[Ran].bind(this),getHasOutput:this[Man].bind(this),getLoggerInstance:this[Ban].bind(this),getParseContext:this[jan].bind(this),getParserConfiguration:this[vht].bind(this),getUsageConfiguration:this[Ian].bind(this),getUsageInstance:this[Uan].bind(this),getValidationInstance:this[qan].bind(this),hasParseCallback:this[RWt].bind(this),isGlobalContext:this[Gan].bind(this),postProcess:this[bht].bind(this),reset:this[CEr].bind(this),runValidation:this[AEr].bind(this),runYargsParserAndExecuteCommands:this[j5t].bind(this),setHasOutput:this[Han].bind(this)}}[Lan](){return Mo(this,RQ,"f")}[Ran](){return Mo(this,B5t,"f")}[Man](){return Mo(this,hAe,"f")}[Ban](){return Mo(this,lSt,"f")}[jan](){return Mo(this,mht,"f")||{}}[Uan](){return Mo(this,sC,"f")}[qan](){return Mo(this,iX,"f")}[RWt](){return!!Mo(this,gAe,"f")}[Gan](){return Mo(this,IWt,"f")}[bht](t,r,n,s){return n||JG(t)||(r||(t=this[Aan](t)),(this[vht]()["parse-positional-numbers"]||this[vht]()["parse-positional-numbers"]===void 0)&&(t=this[Oan](t)),s&&(t=fht(t,this,Mo(this,lwe,"f").getMiddleware(),!1))),t}[CEr](t={}){C2(this,cb,Mo(this,cb,"f")||{},"f");let r={};r.local=Mo(this,cb,"f").local||[],r.configObjects=Mo(this,cb,"f").configObjects||[];let n={};r.local.forEach(l=>{n[l]=!0,(t[l]||[]).forEach(h=>{n[h]=!0})}),Object.assign(Mo(this,hht,"f"),Object.keys(Mo(this,MGe,"f")).reduce((l,h)=>{let b=Mo(this,MGe,"f")[h].filter(E=>!(E in n));return b.length>0&&(l[h]=b),l},{})),C2(this,MGe,{},"f");let s=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],c=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return s.forEach(l=>{r[l]=(Mo(this,cb,"f")[l]||[]).filter(h=>!n[h])}),c.forEach(l=>{r[l]=Bot(Mo(this,cb,"f")[l],h=>!n[h])}),r.envPrefix=Mo(this,cb,"f").envPrefix,C2(this,cb,r,"f"),C2(this,sC,Mo(this,sC,"f")?Mo(this,sC,"f").reset(n):dan(this,Mo(this,GT,"f")),"f"),C2(this,iX,Mo(this,iX,"f")?Mo(this,iX,"f").reset(n):San(this,Mo(this,sC,"f"),Mo(this,GT,"f")),"f"),C2(this,RQ,Mo(this,RQ,"f")?Mo(this,RQ,"f").reset():lan(Mo(this,sC,"f"),Mo(this,iX,"f"),Mo(this,lwe,"f"),Mo(this,GT,"f")),"f"),Mo(this,cwe,"f")||C2(this,cwe,yan(this,Mo(this,sC,"f"),Mo(this,RQ,"f"),Mo(this,GT,"f")),"f"),Mo(this,lwe,"f").reset(),C2(this,mAe,null,"f"),C2(this,yoe,"","f"),C2(this,Uot,null,"f"),C2(this,hAe,!1,"f"),this.parsed=!1,this}[Van](t,r){return Mo(this,GT,"f").path.relative(t,r)}[j5t](t,r,n,s=0,c=!1){let l=!!n||c;t=t||Mo(this,qot,"f"),Mo(this,cb,"f").__=Mo(this,GT,"f").y18n.__,Mo(this,cb,"f").configuration=this[vht]();let h=!!Mo(this,cb,"f").configuration["populate--"],b=Object.assign({},Mo(this,cb,"f").configuration,{"populate--":!0}),E=Mo(this,GT,"f").Parser.detailed(t,Object.assign({},Mo(this,cb,"f"),{configuration:{"parse-positional-numbers":!1,...b}})),S=Object.assign(E.argv,Mo(this,mht,"f")),w,L=E.aliases,R=!1,q=!1;Object.keys(S).forEach(K=>{K===Mo(this,fwe,"f")&&S[K]?R=!0:K===Mo(this,BGe,"f")&&S[K]&&(q=!0)}),S.$0=this.$0,this.parsed=E,s===0&&Mo(this,sC,"f").clearCachedHelpMessage();try{if(this[yEr](),r)return this[bht](S,h,!!n,!1);Mo(this,fwe,"f")&&[Mo(this,fwe,"f")].concat(L[Mo(this,fwe,"f")]||[]).filter(ye=>ye.length>1).includes(""+S._[S._.length-1])&&(S._.pop(),R=!0),C2(this,IWt,!1,"f");let K=Mo(this,RQ,"f").getCommands(),Z=Mo(this,cwe,"f").completionKey in S,ue=R||Z||c;if(S._.length){if(K.length){let V;for(let ye=s||0,pe;S._[ye]!==void 0;ye++)if(pe=String(S._[ye]),K.includes(pe)&&pe!==Mo(this,mAe,"f")){let Te=Mo(this,RQ,"f").runCommand(pe,this,E,ye+1,c,R||q||c);return this[bht](Te,h,!!n,!1)}else if(!V&&pe!==Mo(this,mAe,"f")){V=pe;break}!Mo(this,RQ,"f").hasDefaultCommand()&&Mo(this,FWt,"f")&&V&&!ue&&Mo(this,iX,"f").recommendCommands(V,K)}Mo(this,mAe,"f")&&S._.includes(Mo(this,mAe,"f"))&&!Z&&(Mo(this,uwe,"f")&&jot(!0),this.showCompletionScript(),this.exit(0))}if(Mo(this,RQ,"f").hasDefaultCommand()&&!ue){let V=Mo(this,RQ,"f").runCommand(null,this,E,0,c,R||q||c);return this[bht](V,h,!!n,!1)}if(Z){Mo(this,uwe,"f")&&jot(!0),t=[].concat(t);let V=t.slice(t.indexOf(`--${Mo(this,cwe,"f").completionKey}`)+1);return Mo(this,cwe,"f").getCompletion(V,(ye,pe)=>{if(ye)throw new JB(ye.message);(pe||[]).forEach(Te=>{Mo(this,lSt,"f").log(Te)}),this.exit(0)}),this[bht](S,!h,!!n,!1)}if(Mo(this,hAe,"f")||(R?(Mo(this,uwe,"f")&&jot(!0),l=!0,this.showHelp("log"),this.exit(0)):q&&(Mo(this,uwe,"f")&&jot(!0),l=!0,Mo(this,sC,"f").showVersion("log"),this.exit(0))),!l&&Mo(this,cb,"f").skipValidation.length>0&&(l=Object.keys(S).some(V=>Mo(this,cb,"f").skipValidation.indexOf(V)>=0&&S[V]===!0)),!l){if(E.error)throw new JB(E.error.message);if(!Z){let V=this[AEr](L,{},E.error);n||(w=fht(S,this,Mo(this,lwe,"f").getMiddleware(),!0)),w=this[Fan](V,w??S),JG(w)&&!n&&(w=w.then(()=>fht(S,this,Mo(this,lwe,"f").getMiddleware(),!1)))}}}catch(K){if(K instanceof JB)Mo(this,sC,"f").fail(K.message,K);else throw K}return this[bht](w??S,h,!!n,!0)}[AEr](t,r,n,s){let c={...this.getDemandedOptions()};return l=>{if(n)throw new JB(n.message);Mo(this,iX,"f").nonOptionCount(l),Mo(this,iX,"f").requiredArguments(l,c);let h=!1;Mo(this,yht,"f")&&(h=Mo(this,iX,"f").unknownCommands(l)),Mo(this,ght,"f")&&!h?Mo(this,iX,"f").unknownArguments(l,t,r,!!s):Mo(this,xht,"f")&&Mo(this,iX,"f").unknownArguments(l,t,{},!1,!1),Mo(this,iX,"f").limitedChoices(l),Mo(this,iX,"f").implications(l),Mo(this,iX,"f").conflicting(l)}}[Han](){C2(this,hAe,!0,"f")}[Eht](t){if(typeof t=="string")Mo(this,cb,"f").key[t]=!0;else for(let r of t)Mo(this,cb,"f").key[r]=!0}}});var cwi,Jan,zan=wi(()=>{"use strict";iEr();fEr();cwi=Wan(nEr),Jan=cwi});var Kan=wi(()=>{hEr();tEr();Zbr();iEr()});var Xan,$an=wi(()=>{Xan="0.10.2"});var MWt,Yan,BWt,U5t,q5t,jWt,UWt,Qan,Zan,esn,G5t=wi(()=>{"use strict";MWt=["**/node_modules/**/*.*"],Yan=process.cwd(),BWt=!1,U5t=!1,q5t=!1,jWt=!1,UWt=4,Qan=!1,Zan="InstrumentationKey=d9f8ad27-50df-46e3-8acf-81ea279c8444;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/",esn="CLI"});var Q9e,qWt,tsn,rsn=wi(()=>{"use strict";G5t();Q9e=e=>e.option("json",{alias:"j",type:"boolean",description:"Respond with JSON",default:jWt}),qWt=e=>e.option("no-cache",{type:"boolean",description:"Disable cache for HTTP(S) requests",default:U5t}),tsn=e=>qWt(Q9e(e.option("include",{alias:"i",type:"string",array:!0,description:"Glob pattern(s) for files to include"}).option("exclude",{alias:"e",type:"string",array:!0,description:"Glob pattern(s) for files to exclude",default:MWt}).option("target",{alias:"t",type:"string",description:"Input directory path"}).option("source",{alias:"s",type:"string",description:"Source path of the local codemod to run"}).option("engine",{type:"string",description:'The engine to use with the local codemod: "jscodeshift", "ts-morph", "filemod", "ast-grep"'}).option("raw",{alias:"r",type:"boolean",description:"Disable formatting output with Prettier",default:BWt}).option("threads",{alias:"n",type:"number",description:"Number of worker threads",default:UWt}).option("dry",{alias:"d",type:"boolean",description:"Perform a dry run",default:Qan}).option("telemetryDisable",{type:"boolean",description:"Disable telemetry"}).option("skip-install",{type:"boolean",description:"Disable packages installation for the codemod run if there is `deps` field declared in its configuration.",default:q5t})))});function rp(e,t,r,n,s,c,l,h,b){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return r(t(e));case 4:return n(r(t(e)));case 5:return s(n(r(t(e))));case 6:return c(s(n(r(t(e)))));case 7:return l(c(s(n(r(t(e))))));case 8:return h(l(c(s(n(r(t(e)))))));case 9:return b(h(l(c(s(n(r(t(e))))))));default:{let E=arguments[0];for(let S=1;S<arguments.length;S++)E=arguments[S](E);return E}}}var kEr,Ql,X9,V5t,GWt,dSt,VWt,wEr,Jb=wi(()=>{kEr=e=>typeof e=="function",Ql=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):r=>t(r,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(r,n){return arguments.length>=2?t(r,n):function(s){return t(s,r)}};case 3:return function(r,n,s){return arguments.length>=3?t(r,n,s):function(c){return t(c,r,n)}};case 4:return function(r,n,s,c){return arguments.length>=4?t(r,n,s,c):function(l){return t(l,r,n,s)}};case 5:return function(r,n,s,c,l){return arguments.length>=5?t(r,n,s,c,l):function(h){return t(h,r,n,s,c)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let r=arguments;return function(n){return t(n,...r)}}}},X9=e=>e,V5t=e=>()=>e,GWt=V5t(!0),dSt=V5t(!1),VWt=V5t(void 0),wEr=VWt});var Sht,HWt=wi(()=>{Sht="2.0.0-next.59"});var IEr,PEr,OC,Ube=wi(()=>{HWt();IEr=Symbol.for(`effect/GlobalValue/globalStoreId/${Sht}`);IEr in globalThis||(globalThis[IEr]=new Map);PEr=globalThis[IEr],OC=(e,t)=>(PEr.has(e)||PEr.set(e,t()),PEr.get(e))});var Tht,vW,mSt,Z9e,hSt,TQe,NEr,nsn,isn,gSt,Lx,WWt,Cht,asn,ssn,JWt,osn,OEr,csn,eI=wi(()=>{Jb();Tht=e=>typeof e=="string",vW=e=>typeof e=="number",mSt=e=>typeof e=="boolean",Z9e=e=>typeof e=="bigint",hSt=e=>typeof e=="symbol",TQe=kEr,NEr=e=>e===void 0,nsn=e=>!1,isn=e=>typeof e=="object"&&e!==null,gSt=e=>isn(e)||TQe(e),Lx=Ql(2,(e,t)=>gSt(e)&&t in e),WWt=Ql(2,(e,t)=>Lx(e,"_tag")&&e._tag===t),Cht=e=>e==null,asn=e=>e!=null,ssn=e=>e instanceof Uint8Array,JWt=e=>e instanceof Date,osn=e=>Lx(e,Symbol.iterator),OEr=e=>isn(e)&&!Array.isArray(e),csn=e=>Lx(e,"then")&&"catch"in e&&TQe(e.then)&&TQe(e.catch)});function hwi(e,t,r,n,s){let c=(r>>>16)*(s&65535)>>>0,l=(r&65535)*(s>>>16)>>>0,h=(r&65535)*(s&65535)>>>0,b=(r>>>16)*(s>>>16)+((l>>>16)+(c>>>16))>>>0;l=l<<16>>>0,h=h+l>>>0,h>>>0<l>>>0&&(b=b+1>>>0),c=c<<16>>>0,h=h+c>>>0,h>>>0<c>>>0&&(b=b+1>>>0),b=b+Math.imul(r,n)>>>0,b=b+Math.imul(t,s)>>>0,e[0]=b,e[1]=h}function fsn(e,t,r,n,s){let c=t+n>>>0,l=r+s>>>0;l>>>0<r>>>0&&(c=c+1|0),e[0]=c,e[1]=l}var usn,lsn,W5t,lwi,fwi,pwi,dwi,_wi,mwi,ySt,FEr=wi(()=>{Jb();eI();usn=Symbol.for("effect/Gen/GenKind"),lsn=class{value;constructor(t){this.value=t}get _F(){return X9}get _R(){return t=>t}get _O(){return t=>t}get _E(){return t=>t}[usn]=usn;[Symbol.iterator](){return new W5t(this)}},W5t=class{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new W5t(this.self)}},lwi=335903614,fwi=4150755663,pwi=1481765933,dwi=1284865837,_wi=9007199254740992,mwi=134217728,ySt=class{_state;constructor(t,r,n,s){return Cht(r)&&Cht(t)?(r=Math.random()*4294967295>>>0,t=0):Cht(r)&&(r=t,t=0),Cht(s)&&Cht(n)?(s=this._state?this._state[3]:fwi,n=this._state?this._state[2]:lwi):Cht(s)&&(s=n,n=0),this._state=new Int32Array([0,0,n>>>0,((s||0)|1)>>>0]),this._next(),fsn(this._state,this._state[0],this._state[1],t>>>0,r>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){if(!t)return this._next();if(t=t>>>0,!(t&t-1))return this._next()&t-1;let r=0,n=(-t>>>0)%t>>>0;for(r=this._next();r<n;r=this._next());return r%t}number(){let t=(this._next()&67108863)*1,r=(this._next()&134217727)*1;return(t*mwi+r)/_wi}_next(){let t=this._state[0]>>>0,r=this._state[1]>>>0;hwi(this._state,t,r,pwi,dwi),fsn(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let n=t>>>18,s=(r>>>18|t<<14)>>>0;n=(n^t)>>>0,s=(s^r)>>>0;let c=(s>>>27|n<<5)>>>0,l=t>>>27,h=(-l>>>0&31)>>>0;return(c>>>l|c<<h)>>>0}}});var LEr,ywi,kx,h1,Vot,yv,zWt,xwi,xSt,MQ,vwi,KWt,Nge,zG=wi(()=>{Jb();Ube();eI();FEr();LEr=OC(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),ywi=OC(Symbol.for("effect/Hash/pcgr"),()=>new ySt),kx=Symbol.for("effect/Hash"),h1=e=>{switch(typeof e){case"number":return xSt(e);case"bigint":return MQ(e.toString(10));case"boolean":return MQ(String(e));case"symbol":return MQ(String(e));case"string":return MQ(e);case"undefined":return MQ("undefined");case"function":case"object":return e===null?MQ("null"):xwi(e)?e[kx]():Vot(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Vot=e=>(LEr.has(e)||LEr.set(e,xSt(ywi.integer(Number.MAX_SAFE_INTEGER))),LEr.get(e)),yv=e=>t=>t*53^e,zWt=e=>e&3221225471|e>>>1&1073741824,xwi=e=>Lx(e,kx),xSt=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return zWt(e)},MQ=e=>{let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return zWt(t)},vwi=(e,t)=>{let r=12289;for(let n=0;n<t.length;n++)r^=rp(MQ(t[n]),yv(h1(e[t[n]])));return zWt(r)},KWt=e=>vwi(e,Object.keys(e)),Nge=e=>{let t=6151;for(let r=0;r<e.length;r++)t=rp(t,yv(h1(e[r])));return zWt(t)}});function Zg(){return arguments.length===1?e=>psn(e,arguments[0]):psn(arguments[0],arguments[1])}function psn(e,t){if(e===t)return!0;let r=typeof e;return r!==typeof t?!1:(r==="object"||r==="function")&&e!==null&&t!==null&&vSt(e)&&vSt(t)?h1(e)===h1(t)&&e[Iy](t):!1}var Iy,vSt,J5t,_w=wi(()=>{zG();eI();Iy=Symbol.for("effect/Equal");vSt=e=>Lx(e,Iy),J5t=()=>(e,t)=>Zg(e,t)});var CQe,bwi,REr,Ewi,MEr,dsn,_sn,Aht=wi(()=>{Jb();CQe=e=>(t,r)=>t===r||e(t,r),bwi=(e,t)=>e===t,REr=()=>bwi,Ewi=REr(),MEr=Ql(2,(e,t)=>CQe((r,n)=>e(t(r),t(n)))),dsn=MEr(Ewi,e=>e.getTime()),_sn=e=>CQe((t,r)=>{if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(!e(t[n],r[n]))return!1;return!0})});var bD,xk,rI,xoe=wi(()=>{eI();bD=Symbol.for("nodejs.util.inspect.custom"),xk=e=>Lx(e,"toJSON")&&TQe(e.toJSON)&&e.toJSON.length===0?e.toJSON():Array.isArray(e)?e.map(xk):e,rI=e=>JSON.stringify(e,null,2)});var tg,Y9=wi(()=>{tg=(e,t)=>{switch(t.length){case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let r=e;for(let n=0,s=t.length;n<s;n++)r=t[n](r);return r}}}});var ESt,$Wt,yAe,z5t,SSt,TSt,xAe,XWt,msn,Dht,CSt,YWt,ASt,K5t,QWt=wi(()=>{ESt="Async",$Wt="Commit",yAe="Failure",z5t="OnFailure",SSt="OnSuccess",TSt="OnSuccessAndFailure",xAe="Success",XWt="Sync",msn="Tag",Dht="UpdateRuntimeFlags",CSt="While",YWt="WithRuntime",ASt="Yield",K5t="RevertFlags"});var jEr,hsn,gsn,ysn,Hot,Twi,Cwi,Wot,$5t,xsn,UEr,Jot=wi(()=>{_w();zG();Y9();QWt();HWt();jEr=Symbol.for("effect/Effect"),hsn=Symbol.for("effect/Stream"),gsn=Symbol.for("effect/Sink"),ysn=Symbol.for("effect/Channel"),Hot={_R:e=>e,_E:e=>e,_A:e=>e,_V:Sht},Twi={_R:e=>e,_E:e=>e,_In:e=>e,_L:e=>e,_Z:e=>e},Cwi={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},Wot={[jEr]:Hot,[hsn]:Hot,[gsn]:Twi,[ysn]:Cwi,[Iy](e){return this===e},[kx](){return Vot(this)},pipe(){return tg(this,arguments)}},$5t={[kx](){return KWt(this)},[Iy](e){let t=Object.keys(this),r=Object.keys(e);if(t.length!==r.length)return!1;for(let n of t)if(!(n in e&&Zg(this[n],e[n])))return!1;return!0}},xsn={...Wot,_op:$Wt},UEr={...xsn,...$5t}});var vsn,bsn,Dwi,kwi,ZWt,qEr,GEr,eJt,tJt,VEr=wi(()=>{_w();zG();xoe();eI();Jot();vsn=Symbol.for("effect/Option"),bsn={...Wot,[vsn]:{_A:e=>e},[bD](){return this.toJSON()},toString(){return rI(this.toJSON())}},Dwi=Object.assign(Object.create(bsn),{_tag:"Some",_op:"Some",[Iy](e){return ZWt(e)&&GEr(e)&&Zg(e.value,this.value)},[kx](){return yv(h1(this._tag))(h1(this.value))},toJSON(){return{_id:"Option",_tag:this._tag,value:xk(this.value)}}}),kwi=Object.assign(Object.create(bsn),{_tag:"None",_op:"None",[Iy](e){return ZWt(e)&&qEr(e)},[kx](){return yv(h1(this._tag))},toJSON(){return{_id:"Option",_tag:this._tag}}}),ZWt=e=>Lx(e,vsn),qEr=e=>e._tag==="None",GEr=e=>e._tag==="Some",eJt=Object.create(kwi),tJt=e=>{let t=Object.create(Dwi);return t.value=e,t}});var HEr,Ssn,wwi,Pwi,WEr,JEr,zEr,Tsn,Csn,Asn=wi(()=>{_w();zG();xoe();eI();Jot();HEr=Symbol.for("effect/Either"),Ssn={...Wot,[HEr]:{_A:e=>e},[bD](){return this.toJSON()},toString(){return rI(this.toJSON())}},wwi=Object.assign(Object.create(Ssn),{_tag:"Right",_op:"Right",[Iy](e){return WEr(e)&&zEr(e)&&Zg(e.right,this.right)},[kx](){return yv(h1(this._tag))(h1(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:xk(this.right)}}}),Pwi=Object.assign(Object.create(Ssn),{_tag:"Left",_op:"Left",[Iy](e){return WEr(e)&&JEr(e)&&Zg(e.left,this.left)},[kx](){return yv(h1(this._tag))(h1(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:xk(this.left)}}}),WEr=e=>Lx(e,HEr),JEr=e=>e._tag==="Left",zEr=e=>e._tag==="Right",Tsn=e=>{let t=Object.create(Pwi);return t.left=e,t},Csn=e=>{let t=Object.create(wwi);return t.right=e,t}});var rJt,Dsn,ksn,X5t,Nwi,wsn,KEr,$Er,nJt=wi(()=>{Jb();rJt=e=>(t,r)=>t===r?0:e(t,r),Dsn=rJt((e,t)=>e<t?-1:1),ksn=e=>rJt((t,r)=>e(r,t)),X5t=Ql(2,(e,t)=>rJt((r,n)=>e(t(r),t(n)))),Nwi=e=>rJt((t,r)=>{let n=Math.min(t.length,r.length),s=0;for(let c of e){if(s>=n)break;let l=c(t[s],r[s]);if(l!==0)return l;s++}return 0}),wsn=(...e)=>Nwi(e),KEr=e=>Ql(2,(t,r)=>e(t,r)===1),$Er=e=>Ql(2,(t,r)=>t===r||e(t,r)>-1?t:r)});var t2,_E,Psn,aM,zB,lte,KG,DSt,jGe,AQe,$de,Y5t,Isn,Nsn,Fwi,Lwi,Osn,EW=wi(()=>{_w();Aht();Jb();VEr();t2=()=>eJt,_E=tJt,Psn=ZWt,aM=qEr,zB=GEr,lte=Ql(2,(e,{onNone:t,onSome:r})=>aM(e)?t():r(e.value)),KG=Ql(2,(e,t)=>aM(e)?t():e.value),DSt=Ql(2,(e,t)=>aM(e)?t():e),jGe=e=>e==null?t2():_E(e),AQe=KG(VWt),$de=Ql(2,(e,t)=>aM(e)?t2():_E(t(e.value))),Y5t=Ql(2,(e,t)=>aM(e)?t2():t(e.value)),Isn=Y5t(X9),Nsn=e=>CQe((t,r)=>t===r||(aM(t)?aM(r):aM(r)?!1:e(t.value,r.value))),Fwi=e=>Ql(2,(t,r)=>aM(t)?!1:e(t.value,r)),Lwi=J5t(),Osn=Fwi(Lwi)});var YEr,Rwi,QEr,kSt,ZEr,Fsn,Mwi,eSr,Lsn,tSr,Bwi,rSr,Rsn=wi(()=>{_w();Aht();Jb();zG();xoe();Y9();eI();YEr=Symbol.for("effect/BigDecimal"),Rwi={[YEr]:YEr,[kx](){let e=eSr(this);return rp(h1(e.value),yv(xSt(e.scale)))},[Iy](e){return QEr(e)&&Bwi(this,e)},toString(){return`BigDecimal(${rSr(this)})`},toJSON(){return{_id:"BigDecimal",value:String(this.value),scale:this.scale}},[bD](){return this.toJSON()},pipe(){return tg(this,arguments)}},QEr=e=>Lx(e,YEr),kSt=(e,t)=>{let r=Object.create(Rwi);return r.value=e,r.scale=t,r},ZEr=BigInt(0),Fsn=BigInt(10),Mwi=kSt(ZEr,0),eSr=e=>{if(e.normalized===void 0)if(e.value===ZEr)e.normalized=Mwi;else{let t=`${e.value}`,r=0;for(let c=t.length-1;c>=0&&t[c]==="0";c--)r++;r===0&&(e.normalized=e);let n=BigInt(t.substring(0,t.length-r)),s=e.scale-r;e.normalized=kSt(n,s)}return e.normalized},Lsn=(e,t)=>t>e.scale?kSt(e.value*Fsn**BigInt(t-e.scale),t):t<e.scale?kSt(e.value/Fsn**BigInt(e.scale-t),t):e,tSr=CQe((e,t)=>e.scale>t.scale?Lsn(t,e.scale).value===e.value:e.scale<t.scale?Lsn(e,t.scale).value===t.value:e.value===t.value),Bwi=Ql(2,(e,t)=>tSr(e,t)),rSr=e=>{let t=e.value<ZEr,r=t?`${e.value}`.substring(1):`${e.value}`,n,s;if(e.scale>=r.length)n="0",s="0".repeat(e.scale-r.length)+r;else{let l=r.length-e.scale;if(l>r.length){let h=l-r.length;n=`${r}${"0".repeat(h)}`,s=""}else s=r.slice(l),n=r.slice(0,l)}let c=s===""?n:`${n}.${s}`;return t?`-${c}`:c}});var fie,voe,pie,eFe,Uwi,Msn,zot=wi(()=>{Jb();Asn();fie=Csn,voe=Tsn,pie=JEr,eFe=zEr,Uwi=Ql(2,(e,{onLeft:t,onRight:r})=>pie(e)?t(e.left):r(e.right)),Msn=Uwi({onLeft:X9,onRight:X9})});var nSr,Bsn=wi(()=>{nSr=e=>e.length>0});var jsn,Usn=wi(()=>{jsn=(...e)=>e});var iSr,SW,wSt,qsn,iJt,Vwi,Hwi,PSt,fte,Gsn,Wwi,Jwi,aSr,Kot,Xde,aJt,sSr,UGe,zwi,Vsn,Hsn,oSr,qGe,cSr,Wsn,Kwi,$wi,Xwi,Ywi,Qwi,wht,DQe,Oge,efe,Q5t,uSr,Pht,lSr,$ot,Jsn,fSr,GGe,aX=wi(()=>{_w();Aht();Jb();Bsn();EW();Usn();iSr=(e,t)=>{let r=Math.max(1,Math.floor(e)),n=[t(0)];for(let s=1;s<r;s++)n.push(t(s));return n},SW=e=>Array.isArray(e)?e:Array.from(e),wSt=Ql(2,(e,t)=>[t,...e]),qsn=Ql(2,(e,t)=>[...e,t]),iJt=Ql(2,(e,t)=>SW(e).concat(SW(t))),Vwi=e=>e.length===0,Hwi=Vwi,PSt=nSr,fte=nSr,Gsn=(e,t)=>e<0||e>=t.length,Wwi=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),Jwi=Ql(2,(e,t)=>{let r=Math.floor(t);return Gsn(r,e)?t2():_E(e[r])}),aSr=Ql(2,(e,t)=>{let r=Math.floor(t);if(Gsn(r,e))throw new Error(`Index ${r} out of bounds`);return e[r]}),Kot=Jwi(0),Xde=aSr(0),aJt=e=>fte(e)?_E(sSr(e)):t2(),sSr=e=>e[e.length-1],UGe=e=>e.slice(1),zwi=(e,t)=>{let r=0;for(let n of e){if(!t(n))break;r++}return r},Vsn=Ql(2,(e,t)=>$wi(e,zwi(e,t))),Hsn=Ql(2,(e,t)=>{let r=SW(e);return r.slice(Wwi(t,r),r.length)}),oSr=e=>Array.from(e).reverse(),qGe=Ql(2,(e,t)=>{let r=Array.from(e);return r.sort(t),r}),cSr=Ql(2,(e,t)=>Wsn(e,t,jsn)),Wsn=Ql(3,(e,t,r)=>{let n=SW(e),s=SW(t);if(fte(n)&&fte(s)){let c=[r(Xde(n),Xde(s))],l=Math.min(n.length,s.length);for(let h=1;h<l;h++)c[h]=r(n[h],s[h]);return c}return[]}),Kwi=J5t(),$wi=Ql(2,(e,t)=>{let r=Array.from(e),n=Math.floor(t);return fte(r)?n>=1?Xwi(r,n):[[],r]:[r,[]]}),Xwi=Ql(2,(e,t)=>{let r=Math.max(1,Math.floor(t));return r>=e.length?[Ywi(e),[]]:[wSt(e.slice(1,r),Xde(e)),e.slice(r)]}),Ywi=e=>e.slice(),Qwi=Ql(3,(e,t,r)=>{let n=SW(e),s=SW(t);return fte(n)?fte(s)?Jsn(r)(iJt(n,s)):n:s}),wht=Ql(2,(e,t)=>Qwi(e,t,Kwi)),DQe=()=>[],Oge=e=>[e],efe=Ql(2,(e,t)=>e.map(t)),Q5t=Ql(2,(e,t)=>{if(Hwi(e))return[];let r=[];for(let n=0;n<e.length;n++)r.push(...t(e[n],n));return r}),uSr=Q5t(X9),Pht=Ql(3,(e,t,r)=>SW(e).reduce((n,s,c)=>r(n,s,c),t)),lSr=(e,t)=>{let r=[],n=e,s;for(;zB(s=t(n));){let[c,l]=s.value;r.push(c),n=l}return r},$ot=_sn,Jsn=Ql(2,(e,t)=>{let r=SW(e);if(fte(r)){let n=[Xde(r)],s=UGe(r);for(let c of s)n.every(l=>!t(c,l))&&n.push(c);return n}return[]}),fSr=e=>Jsn(e,J5t()),GGe=Ql(2,(e,t)=>SW(e).join(t))});function e8i(e,t,r,n,s){for(let c=t;c<Math.min(e.length,t+s);c++)r[n+c-t]=e[c];return r}var Ksn,$sn,t8i,r8i,n8i,pte,Xsn,VGe,wQe,Fge,ePt,pSr,Z5t,Xot,_Sr,ISt,Yde,dSr,kQe,Ysn,tFe,mSr,rFe,nFe,Yot=wi(()=>{_w();Aht();Jb();zG();xoe();Y9();eI();aX();Ksn=Symbol.for("effect/Chunk");$sn=[],t8i=e=>CQe((t,r)=>t.length===r.length&&Z5t(t).every((n,s)=>e(n,ISt(r,s)))),r8i=t8i(Zg),n8i={[Ksn]:{_A:e=>e},toString(){return rI(this.toJSON())},toJSON(){return{_id:"Chunk",values:Z5t(this).map(xk)}},[bD](){return this.toJSON()},[Iy](e){return Xsn(e)&&r8i(this,e)},[kx](){return Nge(Z5t(this))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return $sn[Symbol.iterator]();default:return Z5t(this)[Symbol.iterator]()}},pipe(){return tg(this,arguments)}},pte=e=>{let t=Object.create(n8i);switch(t.backing=e,e._tag){case"IEmpty":{t.length=0,t.depth=0,t.left=t,t.right=t;break}case"IConcat":{t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break}case"IArray":{t.length=e.array.length,t.depth=0,t.left=VGe,t.right=VGe;break}case"ISingleton":{t.length=1,t.depth=0,t.left=VGe,t.right=VGe;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=VGe,t.right=VGe;break}}return t},Xsn=e=>Lx(e,Ksn),VGe=pte({_tag:"IEmpty"}),wQe=()=>VGe,Fge=e=>pte({_tag:"ISingleton",a:e}),ePt=e=>Xsn(e)?e:pte({_tag:"IArray",array:SW(e)}),pSr=(e,t,r)=>{switch(e.backing._tag){case"IArray":{e8i(e.backing.array,0,t,r,e.length);break}case"IConcat":{pSr(e.left,t,r),pSr(e.right,t,r+e.left.length);break}case"ISingleton":{t[r]=e.backing.a;break}case"ISlice":{let n=0,s=r;for(;n<e.length;)t[s]=ISt(e,n),n+=1,s+=1;break}}},Z5t=e=>{switch(e.backing._tag){case"IEmpty":return $sn;case"IArray":return e.backing.array;default:{let t=new Array(e.length);return pSr(e,t,0),e.backing={_tag:"IArray",array:t},e.left=VGe,e.right=VGe,e.depth=0,t}}},Xot=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return pte({_tag:"IArray",array:oSr(e.backing.array)});case"IConcat":return pte({_tag:"IConcat",left:Xot(e.backing.right),right:Xot(e.backing.left)});case"ISlice":return _Sr(oSr(Z5t(e)))}},_Sr=e=>pte({_tag:"IArray",array:e}),ISt=Ql(2,(e,t)=>{switch(e.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":{if(t!==0)throw new Error("Index out of bounds");return e.backing.a}case"IArray":{if(t>=e.length||t<0)throw new Error("Index out of bounds");return e.backing.array[t]}case"IConcat":return t<e.left.length?ISt(e.left,t):ISt(e.right,t-e.left.length);case"ISlice":return ISt(e.backing.chunk,t+e.backing.offset)}}),Yde=Ql(2,(e,t)=>kQe(Fge(t),e)),dSr=Ql(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return VGe;switch(e.backing._tag){case"ISlice":return pte({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?dSr(e.right,t-e.left.length):pte({_tag:"IConcat",left:dSr(e.left,t),right:e.right});default:return pte({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),kQe=Ql(2,(e,t)=>{if(e.backing._tag==="IEmpty")return t;if(t.backing._tag==="IEmpty")return e;let r=t.depth-e.depth;if(Math.abs(r)<=1)return pte({_tag:"IConcat",left:e,right:t});if(r<-1)if(e.left.depth>=e.right.depth){let n=kQe(e.right,t);return pte({_tag:"IConcat",left:e.left,right:n})}else{let n=kQe(e.right.right,t);if(n.depth===e.depth-3){let s=pte({_tag:"IConcat",left:e.right.left,right:n});return pte({_tag:"IConcat",left:e.left,right:s})}else{let s=pte({_tag:"IConcat",left:e.left,right:e.right.left});return pte({_tag:"IConcat",left:s,right:n})}}else if(t.right.depth>=t.left.depth){let n=kQe(e,t.left);return pte({_tag:"IConcat",left:n,right:t.right})}else{let n=kQe(e,t.left.left);if(n.depth===t.depth-3){let s=pte({_tag:"IConcat",left:n,right:t.left.right});return pte({_tag:"IConcat",left:s,right:t.right})}else{let s=pte({_tag:"IConcat",left:t.left.right,right:t.right});return pte({_tag:"IConcat",left:n,right:s})}}}),Ysn=e=>e.length===0,tFe=e=>e.length>0,mSr=e=>ISt(e,0),rFe=mSr,nFe=e=>dSr(e,1)});var hSr,Qsn,Zsn,eon,gSr=wi(()=>{hSr=Math.pow(2,5),Qsn=hSr-1,Zsn=hSr/2,eon=hSr/4});function i8i(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function Qot(e,t){return t>>>e&Qsn}function Zot(e){return 1<<e}function sJt(e,t){return i8i(e&t-1)}var ySr=wi(()=>{gSr()});var oJt,ton=wi(()=>{oJt=class{value;previous;constructor(t,r){this.value=t,this.previous=r}}});function Nht(e,t,r,n){let s=n;if(!e){let c=n.length;s=new Array(c);for(let l=0;l<c;++l)s[l]=n[l]}return s[t]=r,s}function xSr(e,t,r){let n=r.length-1,s=0,c=0,l=r;if(e)s=c=t;else for(l=new Array(n);s<t;)l[c++]=r[s++];for(++s;s<=n;)l[c++]=r[s++];return e&&(l.length=n),l}function ron(e,t,r,n){let s=n.length;if(e){let b=s;for(;b>=t;)n[b--]=n[b];return n[t]=r,n}let c=0,l=0,h=new Array(s+1);for(;c<t;)h[l++]=n[c++];for(h[t]=r;c<s;)h[++l]=n[c++];return h}var non=wi(()=>{});function pwe(e){return WWt(e,"EmptyNode")}function a8i(e){return pwe(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function cJt(e,t){return pwe(e)?!1:t===e.edit}function s8i(e,t,r,n){let s=new Array(t-1),c=0,l=0;for(let h=0,b=n.length;h<b;++h)if(h!==r){let E=n[h];E&&!pwe(E)&&(s[c++]=E,l|=1<<h)}return new ect(e,l,s)}function o8i(e,t,r,n,s){let c=[],l=n,h=0;for(let b=0;l;++b)l&1&&(c[b]=s[h++]),l>>>=1;return c[t]=r,new rPt(e,h+1,c)}function c8i(e,t,r,n,s,c){if(r===s)return new tPt(e,r,[c,n]);let l=Qot(t,r),h=Qot(t,s);if(l===h)return b=>new ect(e,Zot(l)|Zot(h),[b]);{let b=l<h?[n,c]:[c,n];return new ect(e,Zot(l)|Zot(h),b)}}function ion(e,t,r,n,s,c){let l,h=t;for(;;){let b=c8i(e,h,r,n,s,c);if(typeof b=="function")l=new oJt(b,l),h=h+5;else{let E=b;for(;l!=null;)E=l.value(E),l=l.previous;return E}}}var iFe,PQe,tPt,ect,rPt,aon=wi(()=>{_w();EW();eI();ton();non();ySr();gSr();iFe=class{_tag="EmptyNode";modify(t,r,n,s,c,l){let h=n(t2());return aM(h)?new iFe:(++l.value,new PQe(t,s,c,h))}};PQe=class{edit;hash;key;value;_tag="LeafNode";constructor(t,r,n,s){this.edit=t,this.hash=r,this.key=n,this.value=s}modify(t,r,n,s,c,l){if(Zg(c,this.key)){let b=n(this.value);return b===this.value?this:aM(b)?(--l.value,new iFe):cJt(this,t)?(this.value=b,this):new PQe(t,s,c,b)}let h=n(t2());return aM(h)?this:(++l.value,ion(t,r,this.hash,this,s,new PQe(t,s,c,h)))}},tPt=class{edit;hash;children;_tag="CollisionNode";constructor(t,r,n){this.edit=t,this.hash=r,this.children=n}modify(t,r,n,s,c,l){if(s===this.hash){let b=cJt(this,t),E=this.updateCollisionList(b,t,this.hash,this.children,n,c,l);return E===this.children?this:E.length>1?new tPt(t,this.hash,E):E[0]}let h=n(t2());return aM(h)?this:(++l.value,ion(t,r,this.hash,this,s,new PQe(t,s,c,h)))}updateCollisionList(t,r,n,s,c,l,h){let b=s.length;for(let S=0;S<b;++S){let w=s[S];if("key"in w&&Zg(l,w.key)){let L=w.value,R=c(L);return R===L?s:aM(R)?(--h.value,xSr(t,S,s)):Nht(t,S,new PQe(r,n,l,R),s)}}let E=c(t2());return aM(E)?s:(++h.value,Nht(t,b,new PQe(r,n,l,E),s))}},ect=class{edit;mask;children;_tag="IndexedNode";constructor(t,r,n){this.edit=t,this.mask=r,this.children=n}modify(t,r,n,s,c,l){let h=this.mask,b=this.children,E=Qot(r,s),S=Zot(E),w=sJt(h,S),L=h&S,R=cJt(this,t);if(!L){let V=new iFe().modify(t,r+5,n,s,c,l);return V?b.length>=Zsn?o8i(t,E,V,h,b):new ect(t,h|S,ron(R,w,V,b)):this}let q=b[w],K=q.modify(t,r+5,n,s,c,l);if(q===K)return this;let Z=h,ue;if(pwe(K)){if(Z&=~S,!Z)return new iFe;if(b.length<=2&&a8i(b[w^1]))return b[w^1];ue=xSr(R,w,b)}else ue=Nht(R,w,K,b);return R?(this.mask=Z,this.children=ue,this):new ect(t,Z,ue)}},rPt=class{edit;size;children;_tag="ArrayNode";constructor(t,r,n){this.edit=t,this.size=r,this.children=n}modify(t,r,n,s,c,l){let h=this.size,b=this.children,E=Qot(r,s),S=b[E],w=(S||new iFe).modify(t,r+5,n,s,c,l);if(S===w)return this;let L=cJt(this,t),R;if(pwe(S)&&!pwe(w))++h,R=Nht(L,E,w,b);else if(!pwe(S)&&pwe(w)){if(--h,h<=eon)return s8i(t,h,E,b);R=Nht(L,E,new iFe,b)}else R=Nht(L,E,w,b);return L?(this.size=h,this.children=R,this):new rPt(t,h,R)}}});var son,uJt,l8i,vSr,OSt,lJt,oon,con,f8i,FSt,uon,bSr,lon,fon,pon,fJt,ESr,Oht,p8i,pJt,LSt,dJt,don,SSr,_on,_Jt,mon,TSr,RSt,CSr=wi(()=>{_w();Jb();Jb();zG();xoe();EW();Y9();eI();ySr();aon();son="effect/HashMap",uJt=Symbol.for(son),l8i={[uJt]:uJt,[Symbol.iterator](){return new OSt(this,(e,t)=>[e,t])},[kx](){let e=h1(son);for(let t of this)e^=rp(h1(t[0]),yv(h1(t[1])));return e},[Iy](e){if(lon(e)){if(e._size!==this._size)return!1;for(let t of this){let r=rp(e,fJt(t[0],h1(t[0])));if(aM(r))return!1;if(!Zg(t[1],r.value))return!1}return!0}return!1},toString(){return rI(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(xk)}},[bD](){return this.toJSON()},pipe(){return tg(this,arguments)}},vSr=(e,t,r,n)=>{let s=Object.create(l8i);return s._editable=e,s._edit=t,s._root=r,s._size=n,s},OSt=class{map;f;v;constructor(t,r){this.map=t,this.f=r,this.v=oon(this.map._root,this.f,void 0)}next(){if(aM(this.v))return{done:!0,value:void 0};let t=this.v.value;return this.v=lJt(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new OSt(this.map,this.f)}},lJt=e=>e?con(e[0],e[1],e[2],e[3],e[4]):t2(),oon=(e,t,r=void 0)=>{switch(e._tag){case"LeafNode":return zB(e.value)?_E({value:t(e.key,e.value.value),cont:r}):lJt(r);case"CollisionNode":case"ArrayNode":case"IndexedNode":{let n=e.children;return con(n.length,n,0,t,r)}default:return lJt(r)}},con=(e,t,r,n,s)=>{for(;r<e;){let c=t[r++];if(c&&!pwe(c))return oon(c,n,[e,t,r,n,s])}return lJt(s)},f8i=vSr(!1,0,new iFe,0),FSt=()=>f8i,uon=(...e)=>bSr(e),bSr=e=>{let t=dJt(FSt());for(let r of e)Oht(t,r[0],r[1]);return don(t)},lon=e=>Lx(e,uJt),fon=e=>e&&pwe(e._root),pon=Ql(2,(e,t)=>fJt(e,t,h1(t))),fJt=Ql(3,(e,t,r)=>{let n=e._root,s=0;for(;;)switch(n._tag){case"LeafNode":return Zg(t,n.key)?n.value:t2();case"CollisionNode":{if(r===n.hash){let c=n.children;for(let l=0,h=c.length;l<h;++l){let b=c[l];if("key"in b&&Zg(t,b.key))return b.value}}return t2()}case"IndexedNode":{let c=Qot(s,r),l=Zot(c);if(n.mask&l){n=n.children[sJt(n.mask,l)],s+=5;break}return t2()}case"ArrayNode":{if(n=n.children[Qot(s,r)],n){s+=5;break}return t2()}default:return t2()}}),ESr=Ql(2,(e,t)=>zB(fJt(e,t,h1(t)))),Oht=Ql(3,(e,t,r)=>SSr(e,t,()=>_E(r))),p8i=Ql(3,(e,t,r)=>e._editable?(e._root=t,e._size=r,e):t===e._root?e:vSr(e._editable,e._edit,t,r)),pJt=e=>new OSt(e,t=>t),LSt=e=>e._size,dJt=e=>vSr(!0,e._edit+1,e._root,e._size),don=e=>(e._editable=!1,e),SSr=Ql(3,(e,t,r)=>_on(e,t,h1(t),r)),_on=Ql(4,(e,t,r,n)=>{let s={value:e._size},c=e._root.modify(e._editable?e._edit:NaN,0,n,r,t,s);return rp(e,p8i(c,s.value))}),_Jt=Ql(2,(e,t)=>SSr(e,t,t2)),mon=Ql(2,(e,t)=>RSt(e,FSt(),(r,n,s)=>Oht(r,s,t(n,s)))),TSr=Ql(2,(e,t)=>RSt(e,void 0,(r,n,s)=>t(n,s))),RSt=Ql(3,(e,t,r)=>{let n=e._root;if(n._tag==="LeafNode")return zB(n.value)?r(t,n.value.value,n.key):t;if(n._tag==="EmptyNode")return t;let s=[n.children],c;for(;c=s.pop();)for(let l=0,h=c.length;l<h;){let b=c[l++];b&&!pwe(b)&&(b._tag==="LeafNode"?zB(b.value)&&(t=r(t,b.value.value,b.key)):s.push(b.children))}return t})});var gon,mJt,d8i,hJt,yon,_8i,nPt,xon,von,bon,Eon,gJt,yJt,ASr,MSt,DSr,Son,Ton,Con,Aon,Don=wi(()=>{_w();Jb();zG();xoe();Y9();eI();CSr();gon="effect/HashSet",mJt=Symbol.for(gon),d8i={[mJt]:mJt,[Symbol.iterator](){return pJt(this._keyMap)},[kx](){return yv(h1(this._keyMap))(h1(gon))},[Iy](e){return yon(e)?LSt(this._keyMap)===LSt(e._keyMap)&&Zg(this._keyMap,e._keyMap):!1},toString(){return rI(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(xk)}},[bD](){return this.toJSON()},pipe(){return tg(this,arguments)}},hJt=e=>{let t=Object.create(d8i);return t._keyMap=e,t},yon=e=>Lx(e,mJt),_8i=hJt(FSt()),nPt=()=>_8i,xon=e=>{let t=gJt(nPt());for(let r of e)MSt(t,r);return yJt(t)},von=(...e)=>{let t=gJt(nPt());for(let r of e)MSt(t,r);return yJt(t)},bon=Ql(2,(e,t)=>ESr(e._keyMap,t)),Eon=e=>LSt(e._keyMap),gJt=e=>hJt(dJt(e._keyMap)),yJt=e=>(e._keyMap._editable=!1,e),ASr=Ql(2,(e,t)=>{let r=gJt(e);return t(r),yJt(r)}),MSt=Ql(2,(e,t)=>e._keyMap._editable?(Oht(t,!0)(e._keyMap),e):hJt(Oht(t,!0)(e._keyMap))),DSr=Ql(2,(e,t)=>e._keyMap._editable?(_Jt(t)(e._keyMap),e):hJt(_Jt(t)(e._keyMap))),Son=Ql(2,(e,t)=>ASr(e,r=>{for(let n of t)DSr(r,n)})),Ton=Ql(2,(e,t)=>ASr(nPt(),r=>{Con(e,n=>MSt(r,n));for(let n of t)MSt(r,n)})),Con=Ql(2,(e,t)=>TSr(e._keyMap,(r,n)=>t(n))),Aon=Ql(3,(e,t,r)=>RSt(e._keyMap,t,(n,s,c)=>r(n,c)))});var HGe,kon,Fht,won,iPt,Lht,kSr,wSr,IQe,Rht,Mht=wi(()=>{Don();HGe=nPt,kon=xon,Fht=von,won=bon,iPt=Eon,Lht=MSt,kSr=DSr,wSr=Son,IQe=Ton,Rht=Aon});var jSt,Bht,jht,USt,Uht,qht,Pon=wi(()=>{jSt="Die",Bht="Empty",jht="Fail",USt="Interrupt",Uht="Parallel",qht="Sequential"});var Ron,Mon,g8i,VSt,qSt,ISr,WGe,NQe,Ght,vAe,y8i,Bon,aPt,jon,Uon,qon,Gon,NSr,OSr,Von,x8i,v8i,b8i,E8i,PSr,S8i,Ion,Non,Hon,GSt,FSr,T8i,sPt,xJt,Oon,Fon,Lon,C8i,vJt=wi(()=>{Yot();zot();_w();Jb();zG();Mht();xoe();EW();Y9();eI();aX();Pon();Ron="effect/Cause",Mon=Symbol.for(Ron),g8i={_E:e=>e},VSt={[Mon]:g8i,[kx](){return rp(h1(Ron),yv(h1(v8i(this))))},[Iy](e){return y8i(e)&&x8i(this,e)},pipe(){return tg(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:xk(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:xk(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:xk(this.left),right:xk(this.right)}}},toString(){return sPt(this)},[bD](){return this.toJSON()}},qSt=(()=>{let e=Object.create(VSt);return e._tag=Bht,e})(),ISr=e=>{let t=Object.create(VSt);return t._tag=jht,t.error=e,t},WGe=e=>{let t=Object.create(VSt);return t._tag=jSt,t.defect=e,t},NQe=e=>{let t=Object.create(VSt);return t._tag=USt,t.fiberId=e,t},Ght=(e,t)=>{let r=Object.create(VSt);return r._tag=Uht,r.left=e,r.right=t,r},vAe=(e,t)=>{let r=Object.create(VSt);return r._tag=qht,r.left=e,r.right=t,r},y8i=e=>Lx(e,Mon),Bon=e=>e._tag===Bht?!0:GSt(e,!0,(t,r)=>{switch(r._tag){case Bht:return _E(t);case jSt:case jht:case USt:return _E(!1);default:return t2()}}),aPt=e=>FSr(void 0,S8i)(e),jon=e=>Xot(GSt(e,wQe(),(t,r)=>r._tag===jht?_E(rp(t,Yde(r.error))):t2())),Uon=e=>Xot(GSt(e,wQe(),(t,r)=>r._tag===jSt?_E(rp(t,Yde(r.defect))):t2())),qon=e=>GSt(e,HGe(),(t,r)=>r._tag===USt?_E(rp(t,Lht(r.fiberId))):t2()),Gon=e=>E8i(e,t=>t._tag===jht?_E(t.error):t2()),NSr=e=>{let t=Gon(e);switch(t._tag){case"None":return fie(e);case"Some":return voe(t.value)}},OSr=e=>Hon(e,{onEmpty:qSt,onFail:()=>qSt,onDie:t=>WGe(t),onInterrupt:t=>NQe(t),onSequential:vAe,onParallel:Ght}),Von=e=>Hon(e,{onEmpty:qSt,onFail:t=>WGe(t),onDie:t=>WGe(t),onInterrupt:t=>NQe(t),onSequential:(t,r)=>vAe(t,r),onParallel:(t,r)=>Ght(t,r)}),x8i=(e,t)=>{let r=Fge(e),n=Fge(t);for(;tFe(r)&&tFe(n);){let[s,c]=rp(rFe(r),GSt([HGe(),wQe()],([b,E],S)=>{let[w,L]=PSr(S);return _E([rp(b,IQe(w)),rp(E,kQe(L))])})),[l,h]=rp(rFe(n),GSt([HGe(),wQe()],([b,E],S)=>{let[w,L]=PSr(S);return _E([rp(b,IQe(w)),rp(E,kQe(L))])}));if(!Zg(s,l))return!1;r=c,n=h}return!0},v8i=e=>b8i(Fge(e),wQe()),b8i=(e,t)=>{for(;;){let[r,n]=rp(e,Pht([HGe(),wQe()],([c,l],h)=>{let[b,E]=PSr(h);return[rp(c,IQe(b)),rp(l,kQe(E))]})),s=iPt(r)>0?rp(t,Yde(r)):t;if(Ysn(n))return Xot(s);e=n,t=s}throw new Error("BUG: Cause.flattenCauseLoop - please report an issue at https://github.com/Effect-TS/effect/issues")},E8i=Ql(2,(e,t)=>{let r=[e];for(;r.length>0;){let n=r.pop(),s=t(n);switch(s._tag){case"None":{switch(n._tag){case qht:case Uht:{r.push(n.right),r.push(n.left);break}}break}case"Some":return s}}return t2()}),PSr=e=>{let t=e,r=[],n=HGe(),s=wQe();for(;t!==void 0;)switch(t._tag){case Bht:{if(r.length===0)return[n,s];t=r.pop();break}case jht:{if(n=Lht(n,t.error),r.length===0)return[n,s];t=r.pop();break}case jSt:{if(n=Lht(n,t.defect),r.length===0)return[n,s];t=r.pop();break}case USt:{if(n=Lht(n,t.fiberId),r.length===0)return[n,s];t=r.pop();break}case qht:{switch(t.left._tag){case Bht:{t=t.right;break}case qht:{t=vAe(t.left.left,vAe(t.left.right,t.right));break}case Uht:{t=Ght(vAe(t.left.left,t.right),vAe(t.left.right,t.right));break}default:{s=Yde(s,t.right),t=t.left;break}}break}case Uht:{r.push(t.right),t=t.left;break}}throw new Error("BUG: Cause.evaluateCauseLoop - please report an issue at https://github.com/Effect-TS/effect/issues")},S8i={emptyCase:GWt,failCase:dSt,dieCase:dSt,interruptCase:GWt,sequentialCase:(e,t,r)=>t&&r,parallelCase:(e,t,r)=>t&&r},Ion="SequentialCase",Non="ParallelCase",Hon=Ql(2,(e,{onDie:t,onEmpty:r,onFail:n,onInterrupt:s,onParallel:c,onSequential:l})=>FSr(e,void 0,{emptyCase:()=>r,failCase:(h,b)=>n(b),dieCase:(h,b)=>t(b),interruptCase:(h,b)=>s(b),sequentialCase:(h,b,E)=>l(b,E),parallelCase:(h,b,E)=>c(b,E)})),GSt=Ql(3,(e,t,r)=>{let n=t,s=e,c=[];for(;s!==void 0;){let l=r(n,s);switch(n=zB(l)?l.value:n,s._tag){case qht:{c.push(s.right),s=s.left;break}case Uht:{c.push(s.right),s=s.left;break}default:{s=void 0;break}}s===void 0&&c.length>0&&(s=c.pop())}return n}),FSr=Ql(3,(e,t,r)=>{let n=[e],s=[];for(;n.length>0;){let l=n.pop();switch(l._tag){case Bht:{s.push(fie(r.emptyCase(t)));break}case jht:{s.push(fie(r.failCase(t,l.error)));break}case jSt:{s.push(fie(r.dieCase(t,l.defect)));break}case USt:{s.push(fie(r.interruptCase(t,l.fiberId)));break}case qht:{n.push(l.right),n.push(l.left),s.push(voe({_tag:Ion}));break}case Uht:{n.push(l.right),n.push(l.left),s.push(voe({_tag:Non}));break}}}let c=[];for(;s.length>0;){let l=s.pop();switch(l._tag){case"Left":{switch(l.left._tag){case Ion:{let h=c.pop(),b=c.pop(),E=r.sequentialCase(t,h,b);c.push(E);break}case Non:{let h=c.pop(),b=c.pop(),E=r.parallelCase(t,h,b);c.push(E);break}}break}case"Right":{c.push(l.right);break}}}if(c.length===0)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return c.pop()}),T8i=e=>{let t=e.split(`
|
|
110
110
|
`),r=[];for(let n=0;n<t.length;n++){if(t[n].includes("EffectPrimitive")||t[n].includes("Generator.next")||t[n].includes("FiberRuntime"))return r.join(`
|
|
111
111
|
`);r.push(t[n])}return r.join(`
|
|
112
112
|
`)},sPt=e=>aPt(e)?"All fibers interrupted without errors.":C8i(e).map(r=>{let n=r.message;if(r.stack&&(n+=`\r
|
|
@@ -653,8 +653,8 @@ export function handleSourceFile(sourceFile: SourceFile): string | undefined {
|
|
|
653
653
|
}
|
|
654
654
|
`)});var hFe=wi(()=>{pdn();Adn();_Ar();EAr();P1n()});var LIt,I1n,N1n,O1n,F1n,L1n,R1n,M1n,h1t=wi(()=>{"use strict";O5t();LIt="X-Codemod-Access-Token".toLocaleLowerCase(),I1n=async e=>(await swe.post("https://backend.codemod.com/validateAccessToken",{},{headers:{[LIt]:e},timeout:5e3})).data,N1n=async(e,t)=>{await swe.post("https://backend.codemod.com/publish",t,{headers:{[LIt]:e,"Content-Type":"multipart/form-data"},timeout:1e4})},O1n=async e=>{await swe.delete("https://backend.codemod.com/revokeToken",{headers:{[LIt]:e},timeout:1e4})},F1n=async(e,t)=>{let r=new URL("https://backend.codemod.com/codemods/downloadLink");e&&r.searchParams.set("name",e);let n={};return t&&(n[LIt]=t),(await swe.get(r.toString(),{timeout:1e4})).data.link},L1n=async e=>{let{accessToken:t,search:r}=e??{},n={};t&&(n[LIt]=t);let s=new URL("https://backend.codemod.com/codemods/list");return r&&s.searchParams.set("search",r),(await swe.get(s.toString(),{headers:n,timeout:1e4})).data},R1n=async()=>(await swe.post("https://backend.codemod.com/intents",{})).data,M1n=async(e,t)=>(await swe.get(`https://backend.codemod.com/intents/${e}?iv=${t}`)).data.token});var j1n=ct((fvo,B1n)=>{"use strict";B1n.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var CTt=ct((pvo,U1n)=>{"use strict";var yji=j1n();U1n.exports=e=>typeof e=="string"?e.replace(yji(),""):e});var q1n=ct((dvo,r$t)=>{var xji=function(){"use strict";function e(l,h,b,E){var S;typeof h=="object"&&(b=h.depth,E=h.prototype,S=h.filter,h=h.circular);var w=[],L=[],R=typeof Buffer<"u";typeof h>"u"&&(h=!0),typeof b>"u"&&(b=1/0);function q(K,Z){if(K===null)return null;if(Z==0)return K;var ue,V;if(typeof K!="object")return K;if(e.__isArray(K))ue=[];else if(e.__isRegExp(K))ue=new RegExp(K.source,c(K)),K.lastIndex&&(ue.lastIndex=K.lastIndex);else if(e.__isDate(K))ue=new Date(K.getTime());else{if(R&&Buffer.isBuffer(K))return Buffer.allocUnsafe?ue=Buffer.allocUnsafe(K.length):ue=new Buffer(K.length),K.copy(ue),ue;typeof E>"u"?(V=Object.getPrototypeOf(K),ue=Object.create(V)):(ue=Object.create(E),V=E)}if(h){var ye=w.indexOf(K);if(ye!=-1)return L[ye];w.push(K),L.push(ue)}for(var pe in K){var Te;V&&(Te=Object.getOwnPropertyDescriptor(V,pe)),!(Te&&Te.set==null)&&(ue[pe]=q(K[pe],Z-1))}return ue}return q(l,b)}e.clonePrototype=function(h){if(h===null)return null;var b=function(){};return b.prototype=h,new b};function t(l){return Object.prototype.toString.call(l)}e.__objToStr=t;function r(l){return typeof l=="object"&&t(l)==="[object Date]"}e.__isDate=r;function n(l){return typeof l=="object"&&t(l)==="[object Array]"}e.__isArray=n;function s(l){return typeof l=="object"&&t(l)==="[object RegExp]"}e.__isRegExp=s;function c(l){var h="";return l.global&&(h+="g"),l.ignoreCase&&(h+="i"),l.multiline&&(h+="m"),h}return e.__getRegExpFlags=c,e}();typeof r$t=="object"&&r$t.exports&&(r$t.exports=xji)});var V1n=ct((_vo,G1n)=>{var vji=q1n();G1n.exports=function(e,t){return e=e||{},Object.keys(t).forEach(function(r){typeof e[r]>"u"&&(e[r]=vji(t[r]))}),e}});var W1n=ct((mvo,H1n)=>{H1n.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]});var L6r=ct((hvo,F6r)=>{"use strict";var bji=V1n(),RIt=W1n(),z1n={nul:0,control:0};F6r.exports=function(t){return K1n(t,z1n)};F6r.exports.config=function(e){return e=bji(e||{},z1n),function(r){return K1n(r,e)}};function K1n(e,t){if(typeof e!="string")return J1n(e,t);for(var r=0,n=0;n<e.length;n++){var s=J1n(e.charCodeAt(n),t);if(s<0)return-1;r+=s}return r}function J1n(e,t){return e===0?t.nul:e<32||e>=127&&e<160?t.control:Eji(e)?0:1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function Eji(e){var t=0,r=RIt.length-1,n;if(e<RIt[0][0]||e>RIt[r][1])return!1;for(;r>=t;)if(n=Math.floor((t+r)/2),e>RIt[n][1])t=n+1;else if(e<RIt[n][0])r=n-1;else return!0;return!1}});var R6r=ct((gvo,$1n)=>{var Sji=CTt(),Tji=L6r();$1n.exports=function(e){return Tji(Sji(e))}});var X1n=ct((yvo,g1t)=>{"use strict";var QQe=R6r();function n$t(e,t){return Array.apply(null,{length:t+1}).join(e).slice(0,t)}function Cji(e,t,r){e=e??"",e=String(e);var n=t-QQe(e);return n<=0?e:e+n$t(r||" ",n)}function Aji(e,t,r){e=e??"",e=String(e);var n=t-QQe(e);if(n<=0)return e;var s=Math.floor(n/2),c=n-s;return n$t(r||" ",s)+e+n$t(r||" ",c)}function Dji(e,t,r){e=e??"",e=String(e);var n=t-QQe(e);return n<=0?e:n$t(r||" ",n)+e}function kji(e,t){function r(n,s){return n.trim().split(" ").reduce(function(c,l){var h=c[c.length-1];return h&&QQe(h.join(" "))+QQe(l)<s?c[c.length-1].push(l):c.push([l]),c},[]).map(function(c){return c.join(" ")})}return e.split(`
|
|
655
655
|
`).map(function(n){return r(n,t)}).reduce(function(n,s){return n.concat(s)},[])}function wji(e,t,r){e=e.trim();for(var n=[],s=e.split(" "),c="",l=QQe(r);c||s.length;){if(c){var h=c;c=""}else var h=s.shift();if(QQe(h)>t){for(var b=0,E=0,S=t-l;b<h.length;){var w=QQe(h.charAt(b));if(w+E>S)break;E+=w,++b}c=h.slice(b),h=h.slice(0,b),h+=r}n.push(h)}return n.join(" ")}function Pji(e,t){if(e=e??"",e=String(e),t==1/0)return e;for(var r=0,n=0;r<e.length;){var s=QQe(e.charAt(r));if(s+n>t)break;n+=s,++r}return e.slice(0,r)}g1t.exports.padRight=Cji;g1t.exports.padCenter=Aji;g1t.exports.padLeft=Dji;g1t.exports.splitIntoLines=kji;g1t.exports.splitLongWords=wji;g1t.exports.truncateString=Pji});var tgn=ct((xvo,egn)=>{"use strict";var M6r=R6r(),ATt=X1n(),Iji=ATt.padRight,Nji=ATt.padCenter,Oji=ATt.padLeft,Y1n=ATt.splitIntoLines,Fji=ATt.splitLongWords,Lji=ATt.truncateString,Z1n=function(t){return t.toUpperCase()},Rji=function(t,r,n){return t},Mji=Object.freeze({maxWidth:1/0,minWidth:0,columnSplitter:" ",truncate:!1,truncateMarker:"\u2026",preserveNewLines:!1,paddingChr:" ",showHeaders:!0,headingTransform:Z1n,dataTransform:Rji});egn.exports=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.config||{};delete t.config;var n=t.maxLineWidth||1/0;n==="auto"&&(n=process.stdout.columns||1/0),delete t.maxLineWidth,t=Q1n({},Mji,t),t.config=t.config||Object.create(null),t.spacing=t.spacing||`
|
|
656
|
-
`,t.preserveNewLines=!!t.preserveNewLines,t.showHeaders=!!t.showHeaders,t.columns=t.columns||t.include;var s=t.columns||[];e=qji(e,s),s.length||e.forEach(function(b){for(var E in b)s.indexOf(E)===-1&&s.push(E)});var c=s.reduce(function(b,E){var S=Object.create(t);return b[E]=Q1n(S,r[E]),b},Object.create(null));s.forEach(function(b){var E=c[b];E.name=b,E.maxWidth=Math.ceil(E.maxWidth),E.minWidth=Math.ceil(E.minWidth),E.truncate=!!E.truncate,E.align=E.align||"left"}),e=e.map(function(b){var E=Object.create(null);return s.forEach(function(S){E[S]=b[S]!=null?b[S]:"",E[S]=""+E[S],c[S].preserveNewLines?E[S]=E[S].replace(/[^\S\n]/gmi," "):E[S]=E[S].replace(/\s/gmi," ")}),E}),s.forEach(function(b){var E=c[b];e=e.map(function(S,w){var L=Object.create(E);S[b]=E.dataTransform(S[b],L,w);var R=Object.keys(L);if(R.indexOf("name")!==-1){if(E.headingTransform!==Z1n)return;E.headingTransform=function(q){return q}}return R.forEach(function(q){return E[q]=L[q]}),S})});var l={};t.showHeaders&&(s.forEach(function(b){var E=c[b];if(!E.showHeaders){l[b]="";return}l[b]=E.headingTransform(E.name)}),e.unshift(l)),s.forEach(function(b){var E=c[b];E.width=e.map(function(S){return S[b]}).reduce(function(S,w){return S>=E.maxWidth?S:Math.max(S,Math.min(E.maxWidth,Math.max(E.minWidth,M6r(w))))},0)}),s.forEach(function(b){var E=c[b];e=e.map(function(S){return S[b]=Fji(S[b],E.width,E.truncateMarker),S})}),s.forEach(function(b){var E=c[b];e=e.map(function(S,w){var L=S[b];if(S[b]=Y1n(L,E.width),E.truncate&&S[b].length>1){S[b]=Y1n(L,E.width-M6r(E.truncateMarker));var R=S[b][0];Uji(R,E.truncateMarker)||(S[b][0]+=E.truncateMarker),S[b]=S[b].slice(0,1)}return S})}),s.forEach(function(b){var E=c[b];E.width=e.map(function(S){return S[b].reduce(function(w,L){return w>=E.maxWidth?w:Math.max(w,Math.min(E.maxWidth,Math.max(E.minWidth,M6r(L))))},0)}).reduce(function(S,w){return S>=E.maxWidth?S:Math.max(S,Math.min(E.maxWidth,Math.max(E.minWidth,w)))},0)});var h=Bji(e,c,s,t.paddingChr);return h.reduce(function(b,E){return b.concat(E.reduce(function(S,w){return S.concat(w.join(t.columnSplitter))},[]))},[]).map(function(b){return Lji(b,n)}).join(t.spacing)};function Bji(e,t,r,n){return e.map(function(s){var c=[],l=0;r.forEach(function(E){l=Math.max(l,s[E].length)});for(var h=function(S){c[S]=c[S]||[],r.forEach(function(w){var L=t[w],R=s[w][S]||"";L.align==="right"?c[S].push(Oji(R,L.width,n)):L.align==="center"||L.align==="centre"?c[S].push(Nji(R,L.width,n)):c[S].push(Iji(R,L.width,n))})},b=0;b<l;b++)h(b);return c})}function Q1n(){return Object.assign?Object.assign.apply(Object,arguments):jji.apply(void 0,arguments)}function jji(e,t){"use strict";if(e==null)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=!1,s,c=1;c<arguments.length;c++){var l=arguments[c];if(l!=null){for(var h=Object.keys(Object(l)),b=0,E=h.length;b<E;b++){var S=h[b];try{var w=Object.getOwnPropertyDescriptor(l,S);w!==void 0&&w.enumerable&&(r[S]=l[S])}catch(L){n||(n=!0,s=L)}}if(n)throw s}}return r}function Uji(e,t,r){r=r||e.length,r=r-t.length;var n=e.lastIndexOf(t);return n!==-1&&n===r}function qji(e,t){if(Array.isArray(e))return e;var r=[];for(var n in e){var s={};s[t[0]||"key"]=n,s[t[1]||"value"]=e[n],r.push(s)}return r}});var i$t,rgn,a$t,ngn,ign,agn,DTt,s$t,TT,zb,Gji,B6r,Lct,_te,sgn,Jbe=wi(()=>{"use strict";i$t=require("node:child_process"),rgn=require("node:fs"),a$t=require("node:fs/promises"),ngn=require("node:os"),ign=require("node:path"),agn=require("node:util");hFe();h1t();DTt=e=>e.startsWith('"')&&e.endsWith('"')?e:`"${e}"`,s$t=e=>{let t=process.platform==="win32"?"start":"open",r=[e];try{return(0,i$t.spawnSync)(t,r,{stdio:"ignore",shell:!1}),!0}catch(n){return console.error("Error while opening URL:",n),!1}},TT=e=>`\x1B[1m${e}\x1B[22m`,zb=(e,t)=>`${Gji[t]}${e}\x1B[39m`,Gji={cyan:"\x1B[36m",red:"\x1B[31m",green:"\x1B[32m",orange:"\x1B[33m"},B6r=async()=>{let e=(0,ign.join)((0,ngn.homedir)(),".codemod","token.txt");if(!(0,rgn.existsSync)(e))return null;try{return{value:await(0,a$t.readFile)(e,"utf-8"),path:e}}catch{return null}},Lct=async()=>{let e=await B6r();if(e===null)return null;let{value:t,path:r}=e,n;try{n=await I1n(t)}catch{try{await(0,a$t.unlink)(r)}catch{}return null}return{user:n,token:e}},_te=(0,agn.promisify)(i$t.exec),sgn=(e,t="slug")=>{let r;switch(t){case"slug":r=n=>n.slug;break;case"name":r=n=>n.name;break;case"slug-and-name":r=n=>n.name===n.slug?n.name:`${n.name} (${n.slug})`;break;default:throw new Error("Invalid type")}return e.user.organizations.map(r).filter(Tct)}});var ogn,o$t,j6r=wi(()=>{"use strict";ogn=Fd(tgn(),1);h1t();Jbe();o$t=async e=>{let{printer:t,search:r}=e;r
|
|
657
|
-
`,"cyan")))}t.printConsoleMessage("info",(0,ogn.default)(
|
|
656
|
+
`,t.preserveNewLines=!!t.preserveNewLines,t.showHeaders=!!t.showHeaders,t.columns=t.columns||t.include;var s=t.columns||[];e=qji(e,s),s.length||e.forEach(function(b){for(var E in b)s.indexOf(E)===-1&&s.push(E)});var c=s.reduce(function(b,E){var S=Object.create(t);return b[E]=Q1n(S,r[E]),b},Object.create(null));s.forEach(function(b){var E=c[b];E.name=b,E.maxWidth=Math.ceil(E.maxWidth),E.minWidth=Math.ceil(E.minWidth),E.truncate=!!E.truncate,E.align=E.align||"left"}),e=e.map(function(b){var E=Object.create(null);return s.forEach(function(S){E[S]=b[S]!=null?b[S]:"",E[S]=""+E[S],c[S].preserveNewLines?E[S]=E[S].replace(/[^\S\n]/gmi," "):E[S]=E[S].replace(/\s/gmi," ")}),E}),s.forEach(function(b){var E=c[b];e=e.map(function(S,w){var L=Object.create(E);S[b]=E.dataTransform(S[b],L,w);var R=Object.keys(L);if(R.indexOf("name")!==-1){if(E.headingTransform!==Z1n)return;E.headingTransform=function(q){return q}}return R.forEach(function(q){return E[q]=L[q]}),S})});var l={};t.showHeaders&&(s.forEach(function(b){var E=c[b];if(!E.showHeaders){l[b]="";return}l[b]=E.headingTransform(E.name)}),e.unshift(l)),s.forEach(function(b){var E=c[b];E.width=e.map(function(S){return S[b]}).reduce(function(S,w){return S>=E.maxWidth?S:Math.max(S,Math.min(E.maxWidth,Math.max(E.minWidth,M6r(w))))},0)}),s.forEach(function(b){var E=c[b];e=e.map(function(S){return S[b]=Fji(S[b],E.width,E.truncateMarker),S})}),s.forEach(function(b){var E=c[b];e=e.map(function(S,w){var L=S[b];if(S[b]=Y1n(L,E.width),E.truncate&&S[b].length>1){S[b]=Y1n(L,E.width-M6r(E.truncateMarker));var R=S[b][0];Uji(R,E.truncateMarker)||(S[b][0]+=E.truncateMarker),S[b]=S[b].slice(0,1)}return S})}),s.forEach(function(b){var E=c[b];E.width=e.map(function(S){return S[b].reduce(function(w,L){return w>=E.maxWidth?w:Math.max(w,Math.min(E.maxWidth,Math.max(E.minWidth,M6r(L))))},0)}).reduce(function(S,w){return S>=E.maxWidth?S:Math.max(S,Math.min(E.maxWidth,Math.max(E.minWidth,w)))},0)});var h=Bji(e,c,s,t.paddingChr);return h.reduce(function(b,E){return b.concat(E.reduce(function(S,w){return S.concat(w.join(t.columnSplitter))},[]))},[]).map(function(b){return Lji(b,n)}).join(t.spacing)};function Bji(e,t,r,n){return e.map(function(s){var c=[],l=0;r.forEach(function(E){l=Math.max(l,s[E].length)});for(var h=function(S){c[S]=c[S]||[],r.forEach(function(w){var L=t[w],R=s[w][S]||"";L.align==="right"?c[S].push(Oji(R,L.width,n)):L.align==="center"||L.align==="centre"?c[S].push(Nji(R,L.width,n)):c[S].push(Iji(R,L.width,n))})},b=0;b<l;b++)h(b);return c})}function Q1n(){return Object.assign?Object.assign.apply(Object,arguments):jji.apply(void 0,arguments)}function jji(e,t){"use strict";if(e==null)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=!1,s,c=1;c<arguments.length;c++){var l=arguments[c];if(l!=null){for(var h=Object.keys(Object(l)),b=0,E=h.length;b<E;b++){var S=h[b];try{var w=Object.getOwnPropertyDescriptor(l,S);w!==void 0&&w.enumerable&&(r[S]=l[S])}catch(L){n||(n=!0,s=L)}}if(n)throw s}}return r}function Uji(e,t,r){r=r||e.length,r=r-t.length;var n=e.lastIndexOf(t);return n!==-1&&n===r}function qji(e,t){if(Array.isArray(e))return e;var r=[];for(var n in e){var s={};s[t[0]||"key"]=n,s[t[1]||"value"]=e[n],r.push(s)}return r}});var i$t,rgn,a$t,ngn,ign,agn,DTt,s$t,TT,zb,Gji,B6r,Lct,_te,sgn,Jbe=wi(()=>{"use strict";i$t=require("node:child_process"),rgn=require("node:fs"),a$t=require("node:fs/promises"),ngn=require("node:os"),ign=require("node:path"),agn=require("node:util");hFe();h1t();DTt=e=>e.startsWith('"')&&e.endsWith('"')?e:`"${e}"`,s$t=e=>{let t=process.platform==="win32"?"start":"open",r=[e];try{return(0,i$t.spawnSync)(t,r,{stdio:"ignore",shell:!1}),!0}catch(n){return console.error("Error while opening URL:",n),!1}},TT=e=>`\x1B[1m${e}\x1B[22m`,zb=(e,t)=>`${Gji[t]}${e}\x1B[39m`,Gji={cyan:"\x1B[36m",red:"\x1B[31m",green:"\x1B[32m",orange:"\x1B[33m"},B6r=async()=>{let e=(0,ign.join)((0,ngn.homedir)(),".codemod","token.txt");if(!(0,rgn.existsSync)(e))return null;try{return{value:await(0,a$t.readFile)(e,"utf-8"),path:e}}catch{return null}},Lct=async()=>{let e=await B6r();if(e===null)return null;let{value:t,path:r}=e,n;try{n=await I1n(t)}catch{try{await(0,a$t.unlink)(r)}catch{}return null}return{user:n,token:e}},_te=(0,agn.promisify)(i$t.exec),sgn=(e,t="slug")=>{let r;switch(t){case"slug":r=n=>n.slug;break;case"name":r=n=>n.name;break;case"slug-and-name":r=n=>n.name===n.slug?n.name:`${n.name} (${n.slug})`;break;default:throw new Error("Invalid type")}return e.user.organizations.map(r).filter(Tct)}});var ogn,o$t,j6r=wi(()=>{"use strict";ogn=Fd(tgn(),1);h1t();Jbe();o$t=async e=>{let{printer:t,search:r}=e,n=()=>{};r&&!t.__jsonOutput&&(n=t.withLoaderMessage(l=>zb(`${l.get("vertical-dots")} Searching for ${TT(`"${r}"`)}`,"cyan")));let s=await L1n(e);if(n(),t.__jsonOutput){t.printOperationMessage({kind:"codemodList",codemods:s});return}let c=s.map(({name:l,verified:h,tags:b,engine:E,author:S})=>{let w=b.join(", ");return r&&(l===r||w.includes(r))?{name:TT(zb(l,"cyan")),tags:TT(zb(w,"cyan")),engine:TT(zb(E,"cyan")),author:TT(zb(S,"cyan"))}:{name:l,tags:w,engine:E,author:S}}).sort((l,h)=>l.name.toLowerCase().localeCompare(h.name.toLowerCase()));if(r){if(c=c.slice(0,10),c.length===0){t.printConsoleMessage("info",TT(zb("No results matched your search.","red")));return}t.printConsoleMessage("info",TT(zb(`Here are the top search results:
|
|
657
|
+
`,"cyan")))}t.printConsoleMessage("info",(0,ogn.default)(c,{headingTransform:l=>TT(l.toLocaleUpperCase())}))}});var cgn,MIt,y1t,c$t,ugn=wi(()=>{"use strict";cgn=require("node:crypto"),MIt=require("node:fs/promises"),y1t=require("node:path");hFe();O5t();h1t();j6r();Jbe();c$t=class{constructor(t,r,n,s,c){this.__printer=t;this.__configurationDirectoryPath=r;this._cacheDisabled=n;this._fileDownloadService=s;this._tarService=c}async download(t){await(0,MIt.mkdir)(this.__configurationDirectoryPath,{recursive:!0});let r=(0,cgn.createHash)("ripemd160").update(t).digest("base64url"),n=(0,y1t.join)(this.__configurationDirectoryPath,r);await(0,MIt.mkdir)(n,{recursive:!0});let s=this.__printer.withLoaderMessage(l=>zb(`${l.get("vertical-dots")} Downloading the ${TT(`"${t}"`)} codemod${this._cacheDisabled?", not using cache...":"..."}`,"cyan"));try{let l=await B6r(),h=await F1n(t,l?.value),b=(0,y1t.join)(n,"codemod.tar.gz"),E=await this._fileDownloadService.download(h,b);await this._tarService.extract(n,E),s()}catch(l){throw s(),l instanceof dWt&&l.response?.status===400&&l.response.data.error==="Codemod not found"?(await o$t({printer:this.__printer}),new Error(`Could not find codemod ${TT(t)} in the registry. Verify the name to be in the list above and try again.`)):new Error(`Error while downloading codemod ${t}: ${l}`)}let c;try{let l=await(0,MIt.readFile)((0,y1t.join)(n,".codemodrc.json"));c=xwe(JSON.parse(l.toString("utf8")))}catch(l){throw new Error(`Error parsing config for codemod ${t}: ${l}`)}if(c.engine==="ast-grep")try{let l=(0,y1t.join)(n,"rule.yaml");return{source:"package",name:t,engine:c.engine,include:c.include,indexPath:l,directoryPath:n,arguments:c.arguments}}catch(l){if(!(l instanceof Error))throw new Error("Error while downloading ast-grep codemod");this.__printer.printOperationMessage({kind:"error",message:l.message})}if(c.engine==="piranha"){let l=(0,y1t.join)(n,"rules.toml");return{source:"package",name:t,engine:c.engine,include:c.include,directoryPath:n,arguments:c.arguments}}if(c.engine==="jscodeshift"||c.engine==="filemod"||c.engine==="ts-morph"){let l=(0,y1t.join)(n,"index.cjs");return{source:"package",name:t,engine:c.engine,include:c.include,indexPath:l,directoryPath:n,arguments:c.arguments}}if(c.engine==="recipe"){let l=[];for(let h of c.names){let b=await this.download(h);l.push(b)}return{source:"package",name:t,engine:c.engine,include:c.include,codemods:l,directoryPath:n,arguments:c.arguments}}throw new Error("Unsupported engine")}}});var Vji,u$t,lgn=wi(()=>{"use strict";Vji=24*60*60*1e3,u$t=class{constructor(t,r,n,s,c){this._disableCache=t;this._fetchBuffer=r;this._getNow=n;this._ifs=s;this._printer=c}async download(t,r){if(!this._disableCache)try{let c=(await this._ifs.promises.stat(r)).mtime.getTime();if(this._getNow()-c<Vji){let h=await this._ifs.promises.readFile(r);return Buffer.from(h)}}catch{}let n=await this._fetchBuffer(t);return await this._ifs.promises.writeFile(r,n),n}}});function Jji(){let e=new Map;for(let[t,r]of Object.entries(AW)){for(let[n,s]of Object.entries(r))AW[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=AW[n],e.set(s[0],s[1]);Object.defineProperty(AW,t,{value:r,enumerable:!1})}return Object.defineProperty(AW,"codes",{value:e,enumerable:!1}),AW.color.close="\x1B[39m",AW.bgColor.close="\x1B[49m",AW.color.ansi=fgn(),AW.color.ansi256=pgn(),AW.color.ansi16m=dgn(),AW.bgColor.ansi=fgn(10),AW.bgColor.ansi256=pgn(10),AW.bgColor.ansi16m=dgn(10),Object.defineProperties(AW,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(c=>c+c).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>AW.rgbToAnsi256(...AW.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,s;if(t>=232)r=((t-232)*10+8)/255,n=r,s=r;else{t-=16;let h=t%36;r=Math.floor(t/36)/5,n=Math.floor(h/6)/5,s=h%6/5}let c=Math.max(r,n,s)*2;if(c===0)return 30;let l=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return c===2&&(l+=60),l},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>AW.ansi256ToAnsi(AW.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>AW.ansi256ToAnsi(AW.hexToAnsi256(t)),enumerable:!1}}),AW}var fgn,pgn,dgn,AW,Lvo,Hji,Wji,Rvo,zji,gFe,_gn=wi(()=>{fgn=(e=0)=>t=>`\x1B[${t+e}m`,pgn=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,dgn=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,AW={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Lvo=Object.keys(AW.modifier),Hji=Object.keys(AW.color),Wji=Object.keys(AW.bgColor),Rvo=[...Hji,...Wji];zji=Jji(),gFe=zji});function Dwe(e,t=globalThis.Deno?globalThis.Deno.args:f$t.default.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}function Kji(){if("FORCE_COLOR"in Uz)return Uz.FORCE_COLOR==="true"?1:Uz.FORCE_COLOR==="false"?0:Uz.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Uz.FORCE_COLOR,10),3)}function $ji(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Xji(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=Kji();n!==void 0&&(l$t=n);let s=r?l$t:n;if(s===0)return 0;if(r){if(Dwe("color=16m")||Dwe("color=full")||Dwe("color=truecolor"))return 3;if(Dwe("color=256"))return 2}if("TF_BUILD"in Uz&&"AGENT_NAME"in Uz)return 1;if(e&&!t&&s===void 0)return 0;let c=s||0;if(Uz.TERM==="dumb")return c;if(f$t.default.platform==="win32"){let l=hgn.default.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in Uz)return"GITHUB_ACTIONS"in Uz||"GITEA_ACTIONS"in Uz?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(l=>l in Uz)||Uz.CI_NAME==="codeship"?1:c;if("TEAMCITY_VERSION"in Uz)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Uz.TEAMCITY_VERSION)?1:0;if(Uz.COLORTERM==="truecolor"||Uz.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Uz){let l=Number.parseInt((Uz.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Uz.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Uz.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Uz.TERM)||"COLORTERM"in Uz?1:c}function mgn(e,t={}){let r=Xji(e,{streamIsTTY:e&&e.isTTY,...t});return $ji(r)}var f$t,hgn,U6r,Uz,l$t,Yji,ggn,ygn=wi(()=>{f$t=Fd(require("node:process"),1),hgn=Fd(require("node:os"),1),U6r=Fd(require("node:tty"),1);({env:Uz}=f$t.default);Dwe("no-color")||Dwe("no-colors")||Dwe("color=false")||Dwe("color=never")?l$t=0:(Dwe("color")||Dwe("colors")||Dwe("color=true")||Dwe("color=always"))&&(l$t=1);Yji={stdout:mgn({isTTY:U6r.default.isatty(1)}),stderr:mgn({isTTY:U6r.default.isatty(2)})},ggn=Yji});function xgn(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let s=t.length,c=0,l="";do l+=e.slice(c,n)+t+r,c=n+s,n=e.indexOf(t,c);while(n!==-1);return l+=e.slice(c),l}function vgn(e,t,r,n){let s=0,c="";do{let l=e[n-1]==="\r";c+=e.slice(s,l?n-1:n)+t+(l?`\r
|
|
658
658
|
`:`
|
|
659
659
|
`)+r,s=n+1,n=e.indexOf(`
|
|
660
660
|
`,s)}while(n!==-1);return c+=e.slice(s),c}var bgn=wi(()=>{});function jIt(e){return Zji(e)}var Egn,Sgn,q6r,kTt,BIt,Tgn,wTt,Qji,Zji,G6r,eUi,tUi,V6r,p$t,rUi,nUi,Vvo,o7,kwe=wi(()=>{_gn();ygn();bgn();({stdout:Egn,stderr:Sgn}=ggn),q6r=Symbol("GENERATOR"),kTt=Symbol("STYLER"),BIt=Symbol("IS_EMPTY"),Tgn=["ansi","ansi","ansi256","ansi16m"],wTt=Object.create(null),Qji=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Egn?Egn.level:0;e.level=t.level===void 0?r:t.level},Zji=e=>{let t=(...r)=>r.join(" ");return Qji(t,e),Object.setPrototypeOf(t,jIt.prototype),t};Object.setPrototypeOf(jIt.prototype,Function.prototype);for(let[e,t]of Object.entries(gFe))wTt[e]={get(){let r=p$t(this,V6r(t.open,t.close,this[kTt]),this[BIt]);return Object.defineProperty(this,e,{value:r}),r}};wTt.visible={get(){let e=p$t(this,this[kTt],!0);return Object.defineProperty(this,"visible",{value:e}),e}};G6r=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?gFe[r].ansi16m(...n):t==="ansi256"?gFe[r].ansi256(gFe.rgbToAnsi256(...n)):gFe[r].ansi(gFe.rgbToAnsi(...n)):e==="hex"?G6r("rgb",t,r,...gFe.hexToRgb(...n)):gFe[r][e](...n),eUi=["rgb","hex","ansi256"];for(let e of eUi){wTt[e]={get(){let{level:r}=this;return function(...n){let s=V6r(G6r(e,Tgn[r],"color",...n),gFe.color.close,this[kTt]);return p$t(this,s,this[BIt])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);wTt[t]={get(){let{level:r}=this;return function(...n){let s=V6r(G6r(e,Tgn[r],"bgColor",...n),gFe.bgColor.close,this[kTt]);return p$t(this,s,this[BIt])}}}}tUi=Object.defineProperties(()=>{},{...wTt,level:{enumerable:!0,get(){return this[q6r].level},set(e){this[q6r].level=e}}}),V6r=(e,t,r)=>{let n,s;return r===void 0?(n=e,s=t):(n=r.openAll+e,s=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:s,parent:r}},p$t=(e,t,r)=>{let n=(...s)=>rUi(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,tUi),n[q6r]=e,n[kTt]=t,n[BIt]=r,n},rUi=(e,t)=>{if(e.level<=0||!t)return e[BIt]?"":t;let r=e[kTt];if(r===void 0)return t;let{openAll:n,closeAll:s}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=xgn(t,r.close,r.open),r=r.parent;let c=t.indexOf(`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codemod",
|
|
3
3
|
"author": "Codemod, Inc.",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.2",
|
|
5
5
|
"description": "A codemod engine for Node.js libraries (jscodeshift, ts-morph, etc.)",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": null,
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"valibot": "^0.24.1",
|
|
75
75
|
"vitest": "^1.0.1",
|
|
76
76
|
"yargs": "^17.6.2",
|
|
77
|
-
"@codemod-com/
|
|
78
|
-
"@codemod-com/
|
|
77
|
+
"@codemod-com/filemod": "2.0.2",
|
|
78
|
+
"@codemod-com/utilities": "1.1.0"
|
|
79
79
|
},
|
|
80
80
|
"packageManager": "pnpm@8.6.7",
|
|
81
81
|
"engines": {
|