updates 16.0.1 → 16.1.0

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/README.md CHANGED
@@ -57,10 +57,10 @@ export default {
57
57
 
58
58
  The config file can be placed in these locations, relative to `package.json`:
59
59
 
60
- - `updates.config.js`
61
- - `updates.config.mjs`
62
- - `.config/updates.js`
63
- - `.config/updates.mjs`
60
+ - `updates.config.{js,ts,mjs,mts}`
61
+ - `.config/updates.{js,ts,mjs,mts}`
62
+
63
+ For typescript, your runtime needs to support it either natively or via a node loader.
64
64
 
65
65
  ### Config File Options
66
66
 
package/dist/updates.js CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {createRequire} from 'module';const require = createRequire(import.meta.url);
3
- var Aa=Object.create;var es=Object.defineProperty;var _a=Object.getOwnPropertyDescriptor;var wa=Object.getOwnPropertyNames;var xa=Object.getPrototypeOf,ya=Object.prototype.hasOwnProperty;var Xe=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ta=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wa(e))!ya.call(t,i)&&i!==r&&es(t,i,{get:()=>e[i],enumerable:!(s=_a(e,i))||s.enumerable});return t};var ye=(t,e,r)=>(r=t!=null?Aa(xa(t)):{},Ta(e||!t||!t.__esModule?es(r,"default",{value:t,enumerable:!0}):r,t));var Zt=_((Rf,ss)=>{"use strict";function ba(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var s=e[e.length-1];return s in r}function ts(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function rs(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}ss.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(w){r.bools[w]=!0});var s={};function i(w){return s[w].some(function(S){return r.bools[S]})}Object.keys(e.alias||{}).forEach(function(w){s[w]=[].concat(e.alias[w]),s[w].forEach(function(S){s[S]=[w].concat(s[w].filter(function(H){return S!==H}))})}),[].concat(e.string).filter(Boolean).forEach(function(w){r.strings[w]=!0,s[w]&&[].concat(s[w]).forEach(function(S){r.strings[S]=!0})});var n=e.default||{},o={_:[]};function a(w,S){return r.allBools&&/^--[^=]+$/.test(S)||r.strings[w]||r.bools[w]||s[w]}function l(w,S,H){for(var O=w,$=0;$<S.length-1;$++){var v=S[$];if(rs(O,v))return;O[v]===void 0&&(O[v]={}),(O[v]===Object.prototype||O[v]===Number.prototype||O[v]===String.prototype)&&(O[v]={}),O[v]===Array.prototype&&(O[v]=[]),O=O[v]}var g=S[S.length-1];rs(O,g)||((O===Object.prototype||O===Number.prototype||O===String.prototype)&&(O={}),O===Array.prototype&&(O=[]),O[g]===void 0||r.bools[g]||typeof O[g]=="boolean"?O[g]=H:Array.isArray(O[g])?O[g].push(H):O[g]=[O[g],H])}function h(w,S,H){if(!(H&&r.unknownFn&&!a(w,H)&&r.unknownFn(H)===!1)){var O=!r.strings[w]&&ts(S)?Number(S):S;l(o,w.split("."),O),(s[w]||[]).forEach(function($){l(o,$.split("."),O)})}}Object.keys(r.bools).forEach(function(w){h(w,n[w]===void 0?!1:n[w])});var c=[];t.indexOf("--")!==-1&&(c=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var d=t[u],p,R;if(/^--.+=/.test(d)){var x=d.match(/^--([^=]+)=([\s\S]*)$/);p=x[1];var I=x[2];r.bools[p]&&(I=I!=="false"),h(p,I,d)}else if(/^--no-.+/.test(d))p=d.match(/^--no-(.+)/)[1],h(p,!1,d);else if(/^--.+/.test(d))p=d.match(/^--(.+)/)[1],R=t[u+1],R!==void 0&&!/^(-|--)[^-]/.test(R)&&!r.bools[p]&&!r.allBools&&(!s[p]||!i(p))?(h(p,R,d),u+=1):/^(true|false)$/.test(R)?(h(p,R==="true",d),u+=1):h(p,r.strings[p]?"":!0,d);else if(/^-[^-]+/.test(d)){for(var E=d.slice(1,-1).split(""),C=!1,N=0;N<E.length;N++){if(R=d.slice(N+2),R==="-"){h(E[N],R,d);continue}if(/[A-Za-z]/.test(E[N])&&R[0]==="="){h(E[N],R.slice(1),d),C=!0;break}if(/[A-Za-z]/.test(E[N])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(R)){h(E[N],R,d),C=!0;break}if(E[N+1]&&E[N+1].match(/\W/)){h(E[N],d.slice(N+2),d),C=!0;break}else h(E[N],r.strings[E[N]]?"":!0,d)}p=d.slice(-1)[0],!C&&p!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!r.bools[p]&&(!s[p]||!i(p))?(h(p,t[u+1],d),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(h(p,t[u+1]==="true",d),u+=1):h(p,r.strings[p]?"":!0,d))}else if((!r.unknownFn||r.unknownFn(d)!==!1)&&o._.push(r.strings._||!ts(d)?d:Number(d)),e.stopEarly){o._.push.apply(o._,t.slice(u+1));break}}return Object.keys(n).forEach(function(w){ba(o,w.split("."))||(l(o,w.split("."),n[w]),(s[w]||[]).forEach(function(S){l(o,S.split("."),n[w])}))}),e["--"]?o["--"]=c.slice():c.forEach(function(w){o._.push(w)}),o}});var ns=_((Af,is)=>{function Ca(t){return Buffer.from(t,"base64").toString("utf8")}function Sa(t){return Buffer.from(t,"utf8").toString("base64")}is.exports={decodeBase64:Ca,encodeBase64:Sa}});var hs=_(Se=>{Se.parse=Se.decode=$a;Se.stringify=Se.encode=os;Se.safe=Pe;Se.unsafe=gt;var Jt=typeof process<"u"&&process.platform==="win32"?`\r
3
+ var wa=Object.create;var ts=Object.defineProperty;var ya=Object.getOwnPropertyDescriptor;var Ta=Object.getOwnPropertyNames;var xa=Object.getPrototypeOf,ba=Object.prototype.hasOwnProperty;var Xe=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ca=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ta(e))!ba.call(t,i)&&i!==r&&ts(t,i,{get:()=>e[i],enumerable:!(s=ya(e,i))||s.enumerable});return t};var Te=(t,e,r)=>(r=t!=null?wa(xa(t)):{},Ca(e||!t||!t.__esModule?ts(r,"default",{value:t,enumerable:!0}):r,t));var Jt=_((wf,is)=>{"use strict";function Sa(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var s=e[e.length-1];return s in r}function rs(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function ss(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}is.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(w){r.bools[w]=!0});var s={};function i(w){return s[w].some(function(S){return r.bools[S]})}Object.keys(e.alias||{}).forEach(function(w){s[w]=[].concat(e.alias[w]),s[w].forEach(function(S){s[S]=[w].concat(s[w].filter(function(H){return S!==H}))})}),[].concat(e.string).filter(Boolean).forEach(function(w){r.strings[w]=!0,s[w]&&[].concat(s[w]).forEach(function(S){r.strings[S]=!0})});var n=e.default||{},o={_:[]};function a(w,S){return r.allBools&&/^--[^=]+$/.test(S)||r.strings[w]||r.bools[w]||s[w]}function l(w,S,H){for(var O=w,$=0;$<S.length-1;$++){var v=S[$];if(ss(O,v))return;O[v]===void 0&&(O[v]={}),(O[v]===Object.prototype||O[v]===Number.prototype||O[v]===String.prototype)&&(O[v]={}),O[v]===Array.prototype&&(O[v]=[]),O=O[v]}var g=S[S.length-1];ss(O,g)||((O===Object.prototype||O===Number.prototype||O===String.prototype)&&(O={}),O===Array.prototype&&(O=[]),O[g]===void 0||r.bools[g]||typeof O[g]=="boolean"?O[g]=H:Array.isArray(O[g])?O[g].push(H):O[g]=[O[g],H])}function h(w,S,H){if(!(H&&r.unknownFn&&!a(w,H)&&r.unknownFn(H)===!1)){var O=!r.strings[w]&&rs(S)?Number(S):S;l(o,w.split("."),O),(s[w]||[]).forEach(function($){l(o,$.split("."),O)})}}Object.keys(r.bools).forEach(function(w){h(w,n[w]===void 0?!1:n[w])});var c=[];t.indexOf("--")!==-1&&(c=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var d=t[u],p,A;if(/^--.+=/.test(d)){var y=d.match(/^--([^=]+)=([\s\S]*)$/);p=y[1];var I=y[2];r.bools[p]&&(I=I!=="false"),h(p,I,d)}else if(/^--no-.+/.test(d))p=d.match(/^--no-(.+)/)[1],h(p,!1,d);else if(/^--.+/.test(d))p=d.match(/^--(.+)/)[1],A=t[u+1],A!==void 0&&!/^(-|--)[^-]/.test(A)&&!r.bools[p]&&!r.allBools&&(!s[p]||!i(p))?(h(p,A,d),u+=1):/^(true|false)$/.test(A)?(h(p,A==="true",d),u+=1):h(p,r.strings[p]?"":!0,d);else if(/^-[^-]+/.test(d)){for(var E=d.slice(1,-1).split(""),C=!1,N=0;N<E.length;N++){if(A=d.slice(N+2),A==="-"){h(E[N],A,d);continue}if(/[A-Za-z]/.test(E[N])&&A[0]==="="){h(E[N],A.slice(1),d),C=!0;break}if(/[A-Za-z]/.test(E[N])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(A)){h(E[N],A,d),C=!0;break}if(E[N+1]&&E[N+1].match(/\W/)){h(E[N],d.slice(N+2),d),C=!0;break}else h(E[N],r.strings[E[N]]?"":!0,d)}p=d.slice(-1)[0],!C&&p!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!r.bools[p]&&(!s[p]||!i(p))?(h(p,t[u+1],d),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(h(p,t[u+1]==="true",d),u+=1):h(p,r.strings[p]?"":!0,d))}else if((!r.unknownFn||r.unknownFn(d)!==!1)&&o._.push(r.strings._||!rs(d)?d:Number(d)),e.stopEarly){o._.push.apply(o._,t.slice(u+1));break}}return Object.keys(n).forEach(function(w){Sa(o,w.split("."))||(l(o,w.split("."),n[w]),(s[w]||[]).forEach(function(S){l(o,S.split("."),n[w])}))}),e["--"]?o["--"]=c.slice():c.forEach(function(w){o._.push(w)}),o}});var os=_((yf,ns)=>{function $a(t){return Buffer.from(t,"base64").toString("utf8")}function Oa(t){return Buffer.from(t,"utf8").toString("base64")}ns.exports={decodeBase64:$a,encodeBase64:Oa}});var us=_(Se=>{Se.parse=Se.decode=va;Se.stringify=Se.encode=as;Se.safe=Pe;Se.unsafe=gt;var er=typeof process<"u"&&process.platform==="win32"?`\r
4
4
  `:`
5
- `;function os(t,e){var r=[],s="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(n,o,a){var l=t[n];l&&Array.isArray(l)?l.forEach(function(h){s+=Pe(n+"[]")+i+Pe(h)+`
6
- `}):l&&typeof l=="object"?r.push(n):s+=Pe(n)+i+Pe(l)+Jt}),e.section&&s.length&&(s="["+Pe(e.section)+"]"+Jt+s),r.forEach(function(n,o,a){var l=as(n).join("\\."),h=(e.section?e.section+".":"")+l,c=os(t[n],{section:h,whitespace:e.whitespace});s.length&&c.length&&(s+=Jt),s+=c}),s}function as(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function $a(t){var e={},r=e,s=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,n=t.split(/[\r\n]+/g);return n.forEach(function(o,a,l){if(!(!o||o.match(/^\s*[;#]/))){var h=o.match(i);if(h){if(h[1]!==void 0){if(s=gt(h[1]),s==="__proto__"){r={};return}r=e[s]=e[s]||{};return}var c=gt(h[2]);if(c!=="__proto__"){var u=h[3]?gt(h[4]):!0;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(c.length>2&&c.slice(-2)==="[]"){if(c=c.substring(0,c.length-2),c==="__proto__")return;r[c]?Array.isArray(r[c])||(r[c]=[r[c]]):r[c]=[]}Array.isArray(r[c])?r[c].push(u):r[c]=u}}}}),Object.keys(e).filter(function(o,a,l){if(!e[o]||typeof e[o]!="object"||Array.isArray(e[o]))return!1;var h=as(o),c=e,u=h.pop(),d=u.replace(/\\\./g,".");return h.forEach(function(p,R,x){p!=="__proto__"&&((!c[p]||typeof c[p]!="object")&&(c[p]={}),c=c[p])}),c===e&&d===u?!1:(c[d]=e[o],!0)}).forEach(function(o,a,l){delete e[o]}),e}function ls(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Pe(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&ls(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function gt(t,e){if(t=(t||"").trim(),ls(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,s="",i=0,n=t.length;i<n;i++){var o=t.charAt(i);if(r)"\\;#".indexOf(o)!==-1?s+=o:s+="\\"+o,r=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?r=!0:s+=o}}return r&&(s+="\\"),s.trim()}return t}});var fs=_((wf,cs)=>{"use strict";var er=1,us=2;function Oa(){return""}function va(t,e,r){return t.slice(e,r).replace(/\S/g," ")}cs.exports=function(t,e){e=e||{};for(var r,s,i=!1,n=!1,o=0,a="",l=e.whitespace===!1?Oa:va,h=0;h<t.length;h++){if(r=t[h],s=t[h+1],!n&&r==='"'){var c=t[h-1]==="\\"&&t[h-2]!=="\\";c||(i=!i)}if(!i){if(!n&&r+s==="//")a+=t.slice(o,h),o=h,n=er,h++;else if(n===er&&r+s===`\r
7
- `){h++,n=!1,a+=l(t,o,h),o=h;continue}else if(n===er&&r===`
8
- `)n=!1,a+=l(t,o,h),o=h;else if(!n&&r+s==="/*"){a+=t.slice(o,h),o=h,n=us,h++;continue}else if(n===us&&r+s==="*/"){h++,n=!1,a+=l(t,o,h+1),o=h+1;continue}}}return a+(n?l(t.substr(o)):t.substr(o))}});var ds=_(Ue=>{"use strict";var ps=Xe("fs"),Ia=hs(),Ye=Xe("path"),Na=fs(),La=Ue.parse=function(t){return/^\s*{/.test(t)?JSON.parse(Na(t)):Ia.parse(t)},Ha=Ue.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Ye.join.apply(null,t),s;try{return ps.readFileSync(r,"utf-8")}catch{return}},xf=Ue.json=function(){var t=Ha.apply(null,arguments);return t?La(t):null},yf=Ue.env=function(t,e){e=e||process.env;var r={},s=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var n=i.substring(s).split("__"),o;(o=n.indexOf(""))>-1;)n.splice(o,1);var a=r;n.forEach(function(h,c){!h||typeof a!="object"||(c===n.length-1&&(a[h]=e[i]),a[h]===void 0&&(a[h]={}),a=a[h])})}return r},Tf=Ue.find=function(){var t=Ye.join.apply(null,[].slice.call(arguments));function e(r,s){var i=Ye.join(r,s);try{return ps.statSync(i),i}catch{if(Ye.dirname(r)!==r)return e(Ye.dirname(r),s)}}return e(process.cwd(),t)}});var _s=_((Cf,As)=>{"use strict";function gs(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function Es(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function Rs(t){var e=[];return t.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?e[s]=Rs(r):gs(r)?e[s]=Es(r):e[s]=tr({},r):e[s]=r}),e}function ms(t,e){return e==="__proto__"?void 0:t[e]}var tr=As.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,s,i;return e.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(o){if(s=ms(t,o),r=ms(n,o),r!==t)if(typeof r!="object"||r===null){t[o]=r;return}else if(Array.isArray(r)){t[o]=Rs(r);return}else if(gs(r)){t[o]=Es(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[o]=tr({},r);return}else{t[o]=tr(s,r);return}})}),t}});var rr=_((Sf,ys)=>{var Qe=ds(),Fe=Xe("path").join,Da=_s(),ws="/etc",xs=process.platform==="win32",Ze=xs?process.env.USERPROFILE:process.env.HOME;ys.exports=function(t,e,r,s){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Zt()(process.argv.slice(2))),e=(typeof e=="string"?Qe.json(e):e)||{},s=s||Qe.parse;var i=Qe.env(t+"_"),n=[e],o=[];function a(l){if(!(o.indexOf(l)>=0)){var h=Qe.file(l);h&&(n.push(s(h)),o.push(l))}}return xs||[Fe(ws,t,"config"),Fe(ws,t+"rc")].forEach(a),Ze&&[Fe(Ze,".config",t,"config"),Fe(Ze,".config",t),Fe(Ze,"."+t,"config"),Fe(Ze,"."+t+"rc")].forEach(a),a(Qe.find("."+t+"rc")),i.config&&a(i.config),r.config&&a(r.config),Da.apply(null,n.concat([i,r,o.length?{configs:o,config:o[o.length-1]}:void 0]))}});var Is=_(($f,vs)=>{var sr=Xe("url"),$s=ns(),Pa=$s.decodeBase64,Ua=$s.encodeBase64,Ts=":_authToken",bs=":_auth",Cs=":username",Ss=":_password";vs.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||rr()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,Os(t,e)||Fa(e.npmrc)};function Os(t,e){for(var r=sr.parse(t,!1,!0),s;s!=="/"&&r.pathname!==s;){s=r.pathname||"/";var i="//"+r.host+s.replace(/\/$/,""),n=Ba(i,e.npmrc);if(n)return n;if(!e.recursive)return/\/$/.test(t)?void 0:Os(sr.resolve(t,"."),e);r.pathname=sr.resolve(Ma(s),"..")||"/"}}function Fa(t){if(t._auth){var e=Et(t._auth);return{token:e,type:"Basic"}}}function Ma(t){return t[t.length-1]==="/"?t:t+"/"}function Ba(t,e){var r=qa(e[t+Ts]||e[t+"/"+Ts]);if(r)return r;var s=e[t+Cs]||e[t+"/"+Cs],i=e[t+Ss]||e[t+"/"+Ss],n=Ga(s,i);if(n)return n;var o=ja(e[t+bs]||e[t+"/"+bs]);if(o)return o}function Et(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function qa(t){if(t){var e=Et(t);return{token:e,type:"Bearer"}}}function Ga(t,e){if(!(!t||!e)){var r=Pa(Et(e)),s=Ua(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}}function ja(t){if(t){var e=Et(t);return{token:e,type:"Basic"}}}});var Je=_((Of,Ns)=>{var Wa="2.0.0",za=Number.MAX_SAFE_INTEGER||9007199254740991,ka=16;Ns.exports={SEMVER_SPEC_VERSION:Wa,MAX_LENGTH:256,MAX_SAFE_INTEGER:za,MAX_SAFE_COMPONENT_LENGTH:ka}});var et=_((vf,Ls)=>{var Va=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ls.exports=Va});var $e=_((Te,Hs)=>{var{MAX_SAFE_COMPONENT_LENGTH:ir}=Je(),Ka=et();Te=Hs.exports={};var Xa=Te.re=[],T=Te.src=[],b=Te.t={},Ya=0,L=(t,e,r)=>{let s=Ya++;Ka(t,s,e),b[t]=s,T[s]=e,Xa[s]=new RegExp(e,r?"g":void 0)};L("NUMERICIDENTIFIER","0|[1-9]\\d*");L("NUMERICIDENTIFIERLOOSE","[0-9]+");L("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");L("MAINVERSION",`(${T[b.NUMERICIDENTIFIER]})\\.(${T[b.NUMERICIDENTIFIER]})\\.(${T[b.NUMERICIDENTIFIER]})`);L("MAINVERSIONLOOSE",`(${T[b.NUMERICIDENTIFIERLOOSE]})\\.(${T[b.NUMERICIDENTIFIERLOOSE]})\\.(${T[b.NUMERICIDENTIFIERLOOSE]})`);L("PRERELEASEIDENTIFIER",`(?:${T[b.NUMERICIDENTIFIER]}|${T[b.NONNUMERICIDENTIFIER]})`);L("PRERELEASEIDENTIFIERLOOSE",`(?:${T[b.NUMERICIDENTIFIERLOOSE]}|${T[b.NONNUMERICIDENTIFIER]})`);L("PRERELEASE",`(?:-(${T[b.PRERELEASEIDENTIFIER]}(?:\\.${T[b.PRERELEASEIDENTIFIER]})*))`);L("PRERELEASELOOSE",`(?:-?(${T[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${T[b.PRERELEASEIDENTIFIERLOOSE]})*))`);L("BUILDIDENTIFIER","[0-9A-Za-z-]+");L("BUILD",`(?:\\+(${T[b.BUILDIDENTIFIER]}(?:\\.${T[b.BUILDIDENTIFIER]})*))`);L("FULLPLAIN",`v?${T[b.MAINVERSION]}${T[b.PRERELEASE]}?${T[b.BUILD]}?`);L("FULL",`^${T[b.FULLPLAIN]}$`);L("LOOSEPLAIN",`[v=\\s]*${T[b.MAINVERSIONLOOSE]}${T[b.PRERELEASELOOSE]}?${T[b.BUILD]}?`);L("LOOSE",`^${T[b.LOOSEPLAIN]}$`);L("GTLT","((?:<|>)?=?)");L("XRANGEIDENTIFIERLOOSE",`${T[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);L("XRANGEIDENTIFIER",`${T[b.NUMERICIDENTIFIER]}|x|X|\\*`);L("XRANGEPLAIN",`[v=\\s]*(${T[b.XRANGEIDENTIFIER]})(?:\\.(${T[b.XRANGEIDENTIFIER]})(?:\\.(${T[b.XRANGEIDENTIFIER]})(?:${T[b.PRERELEASE]})?${T[b.BUILD]}?)?)?`);L("XRANGEPLAINLOOSE",`[v=\\s]*(${T[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${T[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${T[b.XRANGEIDENTIFIERLOOSE]})(?:${T[b.PRERELEASELOOSE]})?${T[b.BUILD]}?)?)?`);L("XRANGE",`^${T[b.GTLT]}\\s*${T[b.XRANGEPLAIN]}$`);L("XRANGELOOSE",`^${T[b.GTLT]}\\s*${T[b.XRANGEPLAINLOOSE]}$`);L("COERCE",`(^|[^\\d])(\\d{1,${ir}})(?:\\.(\\d{1,${ir}}))?(?:\\.(\\d{1,${ir}}))?(?:$|[^\\d])`);L("COERCERTL",T[b.COERCE],!0);L("LONETILDE","(?:~>?)");L("TILDETRIM",`(\\s*)${T[b.LONETILDE]}\\s+`,!0);Te.tildeTrimReplace="$1~";L("TILDE",`^${T[b.LONETILDE]}${T[b.XRANGEPLAIN]}$`);L("TILDELOOSE",`^${T[b.LONETILDE]}${T[b.XRANGEPLAINLOOSE]}$`);L("LONECARET","(?:\\^)");L("CARETTRIM",`(\\s*)${T[b.LONECARET]}\\s+`,!0);Te.caretTrimReplace="$1^";L("CARET",`^${T[b.LONECARET]}${T[b.XRANGEPLAIN]}$`);L("CARETLOOSE",`^${T[b.LONECARET]}${T[b.XRANGEPLAINLOOSE]}$`);L("COMPARATORLOOSE",`^${T[b.GTLT]}\\s*(${T[b.LOOSEPLAIN]})$|^$`);L("COMPARATOR",`^${T[b.GTLT]}\\s*(${T[b.FULLPLAIN]})$|^$`);L("COMPARATORTRIM",`(\\s*)${T[b.GTLT]}\\s*(${T[b.LOOSEPLAIN]}|${T[b.XRANGEPLAIN]})`,!0);Te.comparatorTrimReplace="$1$2$3";L("HYPHENRANGE",`^\\s*(${T[b.XRANGEPLAIN]})\\s+-\\s+(${T[b.XRANGEPLAIN]})\\s*$`);L("HYPHENRANGELOOSE",`^\\s*(${T[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${T[b.XRANGEPLAINLOOSE]})\\s*$`);L("STAR","(<|>)?=?\\s*\\*");L("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");L("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var tt=_((If,Ds)=>{var Qa=["includePrerelease","loose","rtl"],Za=t=>t?typeof t!="object"?{loose:!0}:Qa.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};Ds.exports=Za});var nr=_((Nf,Fs)=>{var Ps=/^[0-9]+$/,Us=(t,e)=>{let r=Ps.test(t),s=Ps.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Ja=(t,e)=>Us(e,t);Fs.exports={compareIdentifiers:Us,rcompareIdentifiers:Ja}});var se=_((Lf,Gs)=>{var Rt=et(),{MAX_LENGTH:Ms,MAX_SAFE_INTEGER:At}=Je(),{re:Bs,t:qs}=$e(),el=tt(),{compareIdentifiers:Me}=nr(),or=class t{constructor(e,r){if(r=el(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Ms)throw new TypeError(`version is longer than ${Ms} characters`);Rt("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?Bs[qs.LOOSE]:Bs[qs.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>At||this.major<0)throw new TypeError("Invalid major version");if(this.minor>At||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>At||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<At)return n}return i}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Rt("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Me(this.major,e.major)||Me(this.minor,e.minor)||Me(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(Rt("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Me(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(Rt("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Me(s,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);s===-1&&this.prerelease.push(0)}r&&(Me(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Gs.exports=or});var Oe=_((Hf,ks)=>{var{MAX_LENGTH:tl}=Je(),{re:js,t:Ws}=$e(),zs=se(),rl=tt(),sl=(t,e)=>{if(e=rl(e),t instanceof zs)return t;if(typeof t!="string"||t.length>tl||!(e.loose?js[Ws.LOOSE]:js[Ws.FULL]).test(t))return null;try{return new zs(t,e)}catch{return null}};ks.exports=sl});var Ks=_((Df,Vs)=>{var il=Oe(),nl=(t,e)=>{let r=il(t,e);return r?r.version:null};Vs.exports=nl});var Ys=_((Pf,Xs)=>{var ol=Oe(),al=(t,e)=>{let r=ol(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Xs.exports=al});var Js=_((Uf,Zs)=>{var Qs=se(),ll=(t,e,r,s)=>{typeof r=="string"&&(s=r,r=void 0);try{return new Qs(t instanceof Qs?t.version:t,r).inc(e,s).version}catch{return null}};Zs.exports=ll});var fe=_((Ff,ti)=>{var ei=se(),hl=(t,e,r)=>new ei(t,r).compare(new ei(e,r));ti.exports=hl});var _t=_((Mf,ri)=>{var ul=fe(),cl=(t,e,r)=>ul(t,e,r)===0;ri.exports=cl});var ni=_((Bf,ii)=>{var si=Oe(),fl=_t(),pl=(t,e)=>{if(fl(t,e))return null;{let r=si(t),s=si(e),i=r.prerelease.length||s.prerelease.length,n=i?"pre":"",o=i?"prerelease":"";for(let a in r)if((a==="major"||a==="minor"||a==="patch")&&r[a]!==s[a])return n+a;return o}};ii.exports=pl});var ai=_((qf,oi)=>{var dl=se(),ml=(t,e)=>new dl(t,e).major;oi.exports=ml});var hi=_((Gf,li)=>{var gl=se(),El=(t,e)=>new gl(t,e).minor;li.exports=El});var ci=_((jf,ui)=>{var Rl=se(),Al=(t,e)=>new Rl(t,e).patch;ui.exports=Al});var pi=_((Wf,fi)=>{var _l=Oe(),wl=(t,e)=>{let r=_l(t,e);return r&&r.prerelease.length?r.prerelease:null};fi.exports=wl});var mi=_((zf,di)=>{var xl=fe(),yl=(t,e,r)=>xl(e,t,r);di.exports=yl});var Ei=_((kf,gi)=>{var Tl=fe(),bl=(t,e)=>Tl(t,e,!0);gi.exports=bl});var wt=_((Vf,Ai)=>{var Ri=se(),Cl=(t,e,r)=>{let s=new Ri(t,r),i=new Ri(e,r);return s.compare(i)||s.compareBuild(i)};Ai.exports=Cl});var wi=_((Kf,_i)=>{var Sl=wt(),$l=(t,e)=>t.sort((r,s)=>Sl(r,s,e));_i.exports=$l});var yi=_((Xf,xi)=>{var Ol=wt(),vl=(t,e)=>t.sort((r,s)=>Ol(s,r,e));xi.exports=vl});var rt=_((Yf,Ti)=>{var Il=fe(),Nl=(t,e,r)=>Il(t,e,r)>0;Ti.exports=Nl});var xt=_((Qf,bi)=>{var Ll=fe(),Hl=(t,e,r)=>Ll(t,e,r)<0;bi.exports=Hl});var ar=_((Zf,Ci)=>{var Dl=fe(),Pl=(t,e,r)=>Dl(t,e,r)!==0;Ci.exports=Pl});var yt=_((Jf,Si)=>{var Ul=fe(),Fl=(t,e,r)=>Ul(t,e,r)>=0;Si.exports=Fl});var Tt=_((ep,$i)=>{var Ml=fe(),Bl=(t,e,r)=>Ml(t,e,r)<=0;$i.exports=Bl});var lr=_((tp,Oi)=>{var ql=_t(),Gl=ar(),jl=rt(),Wl=yt(),zl=xt(),kl=Tt(),Vl=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ql(t,r,s);case"!=":return Gl(t,r,s);case">":return jl(t,r,s);case">=":return Wl(t,r,s);case"<":return zl(t,r,s);case"<=":return kl(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};Oi.exports=Vl});var Ii=_((rp,vi)=>{var Kl=se(),Xl=Oe(),{re:bt,t:Ct}=$e(),Yl=(t,e)=>{if(t instanceof Kl)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(bt[Ct.COERCE]);else{let s;for(;(s=bt[Ct.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||s.index+s[0].length!==r.index+r[0].length)&&(r=s),bt[Ct.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;bt[Ct.COERCERTL].lastIndex=-1}return r===null?null:Xl(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};vi.exports=Yl});var Li=_((sp,Ni)=>{"use strict";Ni.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Di=_((ip,Hi)=>{"use strict";Hi.exports=F;F.Node=ve;F.create=F;function F(t){var e=this;if(e instanceof F||(e=new F),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}F.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};F.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};F.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};F.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Zl(this,arguments[t]);return this.length};F.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Jl(this,arguments[t]);return this.length};F.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};F.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};F.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};F.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};F.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};F.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};F.prototype.map=function(t,e){e=e||this;for(var r=new F,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};F.prototype.mapReverse=function(t,e){e=e||this;for(var r=new F,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};F.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;s!==null;i++)r=t(r,s.value,i),s=s.next;return r};F.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;s!==null;i--)r=t(r,s.value,i),s=s.prev;return r};F.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};F.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};F.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new F;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(;i!==null&&s<e;s++,i=i.next)r.push(i.value);return r};F.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new F;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,i=this.tail;i!==null&&s>e;s--)i=i.prev;for(;i!==null&&s>t;s--,i=i.prev)r.push(i.value);return r};F.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(var n=[],s=0;i&&s<e;s++)n.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var s=0;s<r.length;s++)i=Ql(this,i,r[s]);return n};F.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function Ql(t,e,r){var s=e===t.head?new ve(r,null,e,t):new ve(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function Zl(t,e){t.tail=new ve(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Jl(t,e){t.head=new ve(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function ve(t,e,r,s){if(!(this instanceof ve))return new ve(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Li()(F)}catch{}});var Bi=_((np,Mi)=>{"use strict";var eh=Di(),Ie=Symbol("max"),Ae=Symbol("length"),Be=Symbol("lengthCalculator"),it=Symbol("allowStale"),Ne=Symbol("maxAge"),Re=Symbol("dispose"),Pi=Symbol("noDisposeOnSet"),te=Symbol("lruList"),me=Symbol("cache"),Fi=Symbol("updateAgeOnGet"),hr=()=>1,cr=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[Ie]=e.max||1/0,s=e.length||hr;if(this[Be]=typeof s!="function"?hr:s,this[it]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ne]=e.maxAge||0,this[Re]=e.dispose,this[Pi]=e.noDisposeOnSet||!1,this[Fi]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ie]=e||1/0,st(this)}get max(){return this[Ie]}set allowStale(e){this[it]=!!e}get allowStale(){return this[it]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ne]=e,st(this)}get maxAge(){return this[Ne]}set lengthCalculator(e){typeof e!="function"&&(e=hr),e!==this[Be]&&(this[Be]=e,this[Ae]=0,this[te].forEach(r=>{r.length=this[Be](r.value,r.key),this[Ae]+=r.length})),st(this)}get lengthCalculator(){return this[Be]}get length(){return this[Ae]}get itemCount(){return this[te].length}rforEach(e,r){r=r||this;for(let s=this[te].tail;s!==null;){let i=s.prev;Ui(this,e,s,r),s=i}}forEach(e,r){r=r||this;for(let s=this[te].head;s!==null;){let i=s.next;Ui(this,e,s,r),s=i}}keys(){return this[te].toArray().map(e=>e.key)}values(){return this[te].toArray().map(e=>e.value)}reset(){this[Re]&&this[te]&&this[te].length&&this[te].forEach(e=>this[Re](e.key,e.value)),this[me]=new Map,this[te]=new eh,this[Ae]=0}dump(){return this[te].map(e=>St(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[te]}set(e,r,s){if(s=s||this[Ne],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let i=s?Date.now():0,n=this[Be](r,e);if(this[me].has(e)){if(n>this[Ie])return qe(this,this[me].get(e)),!1;let l=this[me].get(e).value;return this[Re]&&(this[Pi]||this[Re](e,l.value)),l.now=i,l.maxAge=s,l.value=r,this[Ae]+=n-l.length,l.length=n,this.get(e),st(this),!0}let o=new fr(e,r,n,i,s);return o.length>this[Ie]?(this[Re]&&this[Re](e,r),!1):(this[Ae]+=o.length,this[te].unshift(o),this[me].set(e,this[te].head),st(this),!0)}has(e){if(!this[me].has(e))return!1;let r=this[me].get(e).value;return!St(this,r)}get(e){return ur(this,e,!0)}peek(e){return ur(this,e,!1)}pop(){let e=this[te].tail;return e?(qe(this,e),e.value):null}del(e){qe(this,this[me].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let i=e[s],n=i.e||0;if(n===0)this.set(i.k,i.v);else{let o=n-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[me].forEach((e,r)=>ur(this,r,!1))}},ur=(t,e,r)=>{let s=t[me].get(e);if(s){let i=s.value;if(St(t,i)){if(qe(t,s),!t[it])return}else r&&(t[Fi]&&(s.value.now=Date.now()),t[te].unshiftNode(s));return i.value}},St=(t,e)=>{if(!e||!e.maxAge&&!t[Ne])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ne]&&r>t[Ne]},st=t=>{if(t[Ae]>t[Ie])for(let e=t[te].tail;t[Ae]>t[Ie]&&e!==null;){let r=e.prev;qe(t,e),e=r}},qe=(t,e)=>{if(e){let r=e.value;t[Re]&&t[Re](r.key,r.value),t[Ae]-=r.length,t[me].delete(r.key),t[te].removeNode(e)}},fr=class{constructor(e,r,s,i,n){this.key=e,this.value=r,this.length=s,this.now=i,this.maxAge=n||0}},Ui=(t,e,r,s)=>{let i=r.value;St(t,i)&&(qe(t,r),t[it]||(i=void 0)),i&&e.call(s,i.value,i.key,t)};Mi.exports=cr});var pe=_((op,Wi)=>{var pr=class t{constructor(e,r){if(r=rh(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof dr)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!Gi(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&ah(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let s=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=qi.get(s);if(i)return i;let n=this.options.loose,o=n?le[oe.HYPHENRANGELOOSE]:le[oe.HYPHENRANGE];e=e.replace(o,Eh(this.options.includePrerelease)),K("hyphen replace",e),e=e.replace(le[oe.COMPARATORTRIM],ih),K("comparator trim",e),e=e.replace(le[oe.TILDETRIM],nh),e=e.replace(le[oe.CARETTRIM],oh),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(u=>lh(u,this.options)).join(" ").split(/\s+/).map(u=>gh(u,this.options));n&&(a=a.filter(u=>(K("loose invalid filter",u,this.options),!!u.match(le[oe.COMPARATORLOOSE])))),K("range list",a);let l=new Map,h=a.map(u=>new dr(u,this.options));for(let u of h){if(Gi(u))return[u];l.set(u.value,u)}l.size>1&&l.has("")&&l.delete("");let c=[...l.values()];return qi.set(s,c),c}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>ji(s,r)&&e.set.some(i=>ji(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new sh(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Rh(this.set[r],e,this.options))return!0;return!1}};Wi.exports=pr;var th=Bi(),qi=new th({max:1e3}),rh=tt(),dr=nt(),K=et(),sh=se(),{re:le,t:oe,comparatorTrimReplace:ih,tildeTrimReplace:nh,caretTrimReplace:oh}=$e(),Gi=t=>t.value==="<0.0.0-0",ah=t=>t.value==="",ji=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},lh=(t,e)=>(K("comp",t,e),t=ch(t,e),K("caret",t),t=hh(t,e),K("tildes",t),t=ph(t,e),K("xrange",t),t=mh(t,e),K("stars",t),t),ae=t=>!t||t.toLowerCase()==="x"||t==="*",hh=(t,e)=>t.trim().split(/\s+/).map(r=>uh(r,e)).join(" "),uh=(t,e)=>{let r=e.loose?le[oe.TILDELOOSE]:le[oe.TILDE];return t.replace(r,(s,i,n,o,a)=>{K("tilde",t,s,i,n,o,a);let l;return ae(i)?l="":ae(n)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:ae(o)?l=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(K("replaceTilde pr",a),l=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):l=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,K("tilde return",l),l})},ch=(t,e)=>t.trim().split(/\s+/).map(r=>fh(r,e)).join(" "),fh=(t,e)=>{K("caret",t,e);let r=e.loose?le[oe.CARETLOOSE]:le[oe.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,l)=>{K("caret",t,i,n,o,a,l);let h;return ae(n)?h="":ae(o)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:ae(a)?n==="0"?h=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:l?(K("replaceCaret pr",l),n==="0"?o==="0"?h=`>=${n}.${o}.${a}-${l} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}-${l} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a}-${l} <${+n+1}.0.0-0`):(K("no pr"),n==="0"?o==="0"?h=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),K("caret return",h),h})},ph=(t,e)=>(K("replaceXRanges",t,e),t.split(/\s+/).map(r=>dh(r,e)).join(" ")),dh=(t,e)=>{t=t.trim();let r=e.loose?le[oe.XRANGELOOSE]:le[oe.XRANGE];return t.replace(r,(s,i,n,o,a,l)=>{K("xRange",t,s,i,n,o,a,l);let h=ae(n),c=h||ae(o),u=c||ae(a),d=u;return i==="="&&d&&(i=""),l=e.includePrerelease?"-0":"",h?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&d?(c&&(o=0),a=0,i===">"?(i=">=",c?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",c?n=+n+1:o=+o+1),i==="<"&&(l="-0"),s=`${i+n}.${o}.${a}${l}`):c?s=`>=${n}.0.0${l} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`),K("xRange return",s),s})},mh=(t,e)=>(K("replaceStars",t,e),t.trim().replace(le[oe.STAR],"")),gh=(t,e)=>(K("replaceGTE0",t,e),t.trim().replace(le[e.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),Eh=t=>(e,r,s,i,n,o,a,l,h,c,u,d,p)=>(ae(s)?r="":ae(i)?r=`>=${s}.0.0${t?"-0":""}`:ae(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ae(h)?l="":ae(c)?l=`<${+h+1}.0.0-0`:ae(u)?l=`<${h}.${+c+1}.0-0`:d?l=`<=${h}.${c}.${u}-${d}`:t?l=`<${h}.${c}.${+u+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),Rh=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(K(t[s].semver),t[s].semver!==dr.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var nt=_((ap,Xi)=>{var ot=Symbol("SemVer ANY"),Er=class t{static get ANY(){return ot}constructor(e,r){if(r=Ah(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}gr("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===ot?this.value="":this.value=this.operator+this.semver.version,gr("comp",this)}parse(e){let r=this.options.loose?zi[ki.COMPARATORLOOSE]:zi[ki.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Vi(s[2],this.options.loose):this.semver=ot}toString(){return this.value}test(e){if(gr("Comparator.test",e,this.options.loose),this.semver===ot||e===ot)return!0;if(typeof e=="string")try{e=new Vi(e,this.options)}catch{return!1}return mr(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Ki(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Ki(this.value,r).test(e.semver);let s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=mr(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=mr(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||i||n&&o||a||l}};Xi.exports=Er;var Ah=tt(),{re:zi,t:ki}=$e(),mr=lr(),gr=et(),Vi=se(),Ki=pe()});var at=_((lp,Yi)=>{var _h=pe(),wh=(t,e,r)=>{try{e=new _h(e,r)}catch{return!1}return e.test(t)};Yi.exports=wh});var Zi=_((hp,Qi)=>{var xh=pe(),yh=(t,e)=>new xh(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Qi.exports=yh});var en=_((up,Ji)=>{var Th=se(),bh=pe(),Ch=(t,e,r)=>{let s=null,i=null,n=null;try{n=new bh(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new Th(s,r))}),s};Ji.exports=Ch});var rn=_((cp,tn)=>{var Sh=se(),$h=pe(),Oh=(t,e,r)=>{let s=null,i=null,n=null;try{n=new $h(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new Sh(s,r))}),s};tn.exports=Oh});var on=_((fp,nn)=>{var Rr=se(),vh=pe(),sn=rt(),Ih=(t,e)=>{t=new vh(t,e);let r=new Rr("0.0.0");if(t.test(r)||(r=new Rr("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new Rr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||sn(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||sn(r,n))&&(r=n)}return r&&t.test(r)?r:null};nn.exports=Ih});var ln=_((pp,an)=>{var Nh=pe(),Lh=(t,e)=>{try{return new Nh(t,e).range||"*"}catch{return null}};an.exports=Lh});var $t=_((dp,fn)=>{var Hh=se(),cn=nt(),{ANY:Dh}=cn,Ph=pe(),Uh=at(),hn=rt(),un=xt(),Fh=Tt(),Mh=yt(),Bh=(t,e,r,s)=>{t=new Hh(t,s),e=new Ph(e,s);let i,n,o,a,l;switch(r){case">":i=hn,n=Fh,o=un,a=">",l=">=";break;case"<":i=un,n=Mh,o=hn,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Uh(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let c=e.set[h],u=null,d=null;if(c.forEach(p=>{p.semver===Dh&&(p=new cn(">=0.0.0")),u=u||p,d=d||p,i(p.semver,u.semver,s)?u=p:o(p.semver,d.semver,s)&&(d=p)}),u.operator===a||u.operator===l||(!d.operator||d.operator===a)&&n(t,d.semver))return!1;if(d.operator===l&&o(t,d.semver))return!1}return!0};fn.exports=Bh});var dn=_((mp,pn)=>{var qh=$t(),Gh=(t,e,r)=>qh(t,e,">",r);pn.exports=Gh});var gn=_((gp,mn)=>{var jh=$t(),Wh=(t,e,r)=>jh(t,e,"<",r);mn.exports=Wh});var An=_((Ep,Rn)=>{var En=pe(),zh=(t,e,r)=>(t=new En(t,r),e=new En(e,r),t.intersects(e));Rn.exports=zh});var wn=_((Rp,_n)=>{var kh=at(),Vh=fe();_n.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((c,u)=>Vh(c,u,r));for(let c of o)kh(c,e,r)?(n=c,i||(i=c)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[c,u]of s)c===u?a.push(c):!u&&c===o[0]?a.push("*"):u?c===o[0]?a.push(`<=${u}`):a.push(`${c} - ${u}`):a.push(`>=${c}`);let l=a.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return l.length<h.length?l:e}});var Cn=_((Ap,bn)=>{var xn=pe(),Ot=nt(),{ANY:Ar}=Ot,lt=at(),_r=fe(),Kh=(t,e,r={})=>{if(t===e)return!0;t=new xn(t,r),e=new xn(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=Xh(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Xh=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Ar){if(e.length===1&&e[0].semver===Ar)return!0;r.includePrerelease?t=[new Ot(">=0.0.0-0")]:t=[new Ot(">=0.0.0")]}if(e.length===1&&e[0].semver===Ar){if(r.includePrerelease)return!0;e=[new Ot(">=0.0.0")]}let s=new Set,i,n;for(let p of t)p.operator===">"||p.operator===">="?i=yn(i,p,r):p.operator==="<"||p.operator==="<="?n=Tn(n,p,r):s.add(p.semver);if(s.size>1)return null;let o;if(i&&n){if(o=_r(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of s){if(i&&!lt(p,String(i),r)||n&&!lt(p,String(n),r))return null;for(let R of e)if(!lt(p,String(R),r))return!1;return!0}let a,l,h,c,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let p of e){if(c=c||p.operator===">"||p.operator===">=",h=h||p.operator==="<"||p.operator==="<=",i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(a=yn(i,p,r),a===p&&a!==i)return!1}else if(i.operator===">="&&!lt(i.semver,String(p),r))return!1}if(n){if(u&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===u.major&&p.semver.minor===u.minor&&p.semver.patch===u.patch&&(u=!1),p.operator==="<"||p.operator==="<="){if(l=Tn(n,p,r),l===p&&l!==n)return!1}else if(n.operator==="<="&&!lt(n.semver,String(p),r))return!1}if(!p.operator&&(n||i)&&o!==0)return!1}return!(i&&h&&!n&&o!==0||n&&c&&!i&&o!==0||d||u)},yn=(t,e,r)=>{if(!t)return e;let s=_r(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Tn=(t,e,r)=>{if(!t)return e;let s=_r(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};bn.exports=Kh});var On=_((_p,$n)=>{var wr=$e(),Yh=Je(),Qh=se(),Sn=nr(),Zh=Oe(),Jh=Ks(),eu=Ys(),tu=Js(),ru=ni(),su=ai(),iu=hi(),nu=ci(),ou=pi(),au=fe(),lu=mi(),hu=Ei(),uu=wt(),cu=wi(),fu=yi(),pu=rt(),du=xt(),mu=_t(),gu=ar(),Eu=yt(),Ru=Tt(),Au=lr(),_u=Ii(),wu=nt(),xu=pe(),yu=at(),Tu=Zi(),bu=en(),Cu=rn(),Su=on(),$u=ln(),Ou=$t(),vu=dn(),Iu=gn(),Nu=An(),Lu=wn(),Hu=Cn();$n.exports={parse:Zh,valid:Jh,clean:eu,inc:tu,diff:ru,major:su,minor:iu,patch:nu,prerelease:ou,compare:au,rcompare:lu,compareLoose:hu,compareBuild:uu,sort:cu,rsort:fu,gt:pu,lt:du,eq:mu,neq:gu,gte:Eu,lte:Ru,cmp:Au,coerce:_u,Comparator:wu,Range:xu,satisfies:yu,toComparators:Tu,maxSatisfying:bu,minSatisfying:Cu,minVersion:Su,validRange:$u,outside:Ou,gtr:vu,ltr:Iu,intersects:Nu,simplifyRange:Lu,subset:Hu,SemVer:Qh,re:wr.re,src:wr.src,tokens:wr.t,SEMVER_SPEC_VERSION:Yh.SEMVER_SPEC_VERSION,compareIdentifiers:Sn.compareIdentifiers,rcompareIdentifiers:Sn.rcompareIdentifiers}});var Hn=_((wp,Ln)=>{Ln.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,s=e.align||[],i=e.stringLength||function(l){return String(l).length},n=In(t,function(l,h){return Nn(h,function(c,u){var d=vn(c);(!l[u]||d>l[u])&&(l[u]=d)}),l},[]),o=vt(t,function(l){return vt(l,function(h,c){var u=String(h);if(s[c]==="."){var d=vn(u),p=n[c]+(/\./.test(u)?1:2)-(i(u)-d);return u+Array(p).join(" ")}else return u})}),a=In(o,function(l,h){return Nn(h,function(c,u){var d=i(c);(!l[u]||d>l[u])&&(l[u]=d)}),l},[]);return vt(o,function(l){return vt(l,function(h,c){var u=a[c]-i(h)||0,d=Array(Math.max(u+1,1)).join(" ");return s[c]==="r"||s[c]==="."?d+h:s[c]==="c"?Array(Math.ceil(u/2+1)).join(" ")+h+Array(Math.floor(u/2+1)).join(" "):h+d}).join(r).replace(/\s+$/,"")}).join(`
9
- `)};function vn(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function In(t,e,r){if(t.reduce)return t.reduce(e,r);for(var s=0,i=arguments.length>=3?r:t[s++];s<t.length;s++)e(i,t[s],s);return i}function Nn(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function vt(t,e){if(t.map)return t.map(e);for(var r=[],s=0;s<t.length;s++)r.push(e.call(t,t[s],s));return r}});var Mn=_(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.LRUCache=void 0;var Ge=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Pn=new Set,xr=typeof process=="object"&&process?process:{},Un=(t,e,r,s)=>{typeof xr.emitWarning=="function"?xr.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},It=globalThis.AbortController,Dn=globalThis.AbortSignal;if(typeof It>"u"){Dn=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},It=class{constructor(){e()}signal=new Dn;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let t=xr.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Un("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var Du=t=>!Pn.has(t),Tp=Symbol("type"),be=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Fn=t=>be(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?je:null:null,je=class extends Array{constructor(e){super(e),this.fill(0)}},yr=class t{heap;length;static#i=!1;static create(e){let r=Fn(e);if(!r)return[];t.#i=!0;let s=new t(e,r);return t.#i=!1,s}constructor(e,r){if(!t.#i)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Tr=class t{#i;#h;#t;#g;#O;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#E;#n;#s;#e;#c;#p;#u;#a;#R;#l;#A;#_;#d;#w;#b;#f;static unsafeExposeInternals(e){return{starts:e.#_,ttls:e.#d,sizes:e.#A,keyMap:e.#n,keyList:e.#s,valList:e.#e,next:e.#c,prev:e.#p,get head(){return e.#u},get tail(){return e.#a},free:e.#R,isBackgroundFetch:r=>e.#r(r),backgroundFetch:(r,s,i,n)=>e.#N(r,s,i,n),moveToTail:r=>e.#$(r),indexes:r=>e.#x(r),rindexes:r=>e.#y(r),isStale:r=>e.#m(r)}}get max(){return this.#i}get maxSize(){return this.#h}get calculatedSize(){return this.#E}get size(){return this.#o}get fetchMethod(){return this.#O}get dispose(){return this.#t}get disposeAfter(){return this.#g}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:h,disposeAfter:c,noDisposeOnSet:u,noUpdateTTL:d,maxSize:p=0,maxEntrySize:R=0,sizeCalculation:x,fetchMethod:I,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:w,ignoreFetchAbort:S}=e;if(r!==0&&!be(r))throw new TypeError("max option must be a nonnegative integer");let H=r?Fn(r):Array;if(!H)throw new Error("invalid max value: "+r);if(this.#i=r,this.#h=p,this.maxEntrySize=R||this.#h,this.sizeCalculation=x,this.sizeCalculation){if(!this.#h&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(I!==void 0&&typeof I!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=I,this.#b=!!I,this.#n=new Map,this.#s=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#c=new H(r),this.#p=new H(r),this.#u=0,this.#a=0,this.#R=yr.create(r),this.#o=0,this.#E=0,typeof h=="function"&&(this.#t=h),typeof c=="function"?(this.#g=c,this.#l=[]):(this.#g=void 0,this.#l=void 0),this.#w=!!this.#t,this.#f=!!this.#g,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!N,this.allowStaleOnFetchAbort=!!w,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(this.#h!==0&&!be(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!be(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#F()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=be(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!be(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#i===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#i&&!this.#h){let O="LRU_CACHE_UNBOUNDED";Du(O)&&(Pn.add(O),Un("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",O,t))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#L(){let e=new je(this.#i),r=new je(this.#i);this.#d=e,this.#_=r,this.#H=(n,o,a=Ge.now())=>{if(r[n]=o!==0?a:0,e[n]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#m(n)&&this.delete(this.#s[n])},o+1);l.unref&&l.unref()}},this.#C=n=>{r[n]=e[n]!==0?Ge.now():0},this.#T=(n,o)=>{if(e[o]){let a=e[o],l=r[o];if(!a||!l)return;n.ttl=a,n.start=l,n.now=s||i();let h=n.now-l;n.remainingTTL=a-h}};let s=0,i=()=>{let n=Ge.now();if(this.ttlResolution>0){s=n;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#n.get(n);if(o===void 0)return 0;let a=e[o],l=r[o];if(!a||!l)return 1/0;let h=(s||i())-l;return a-h},this.#m=n=>{let o=r[n],a=e[n];return!!a&&!!o&&(s||i())-o>a}}#C=()=>{};#T=()=>{};#H=()=>{};#m=()=>!1;#F(){let e=new je(this.#i);this.#E=0,this.#A=e,this.#S=r=>{this.#E-=e[r],e[r]=0},this.#D=(r,s,i,n)=>{if(this.#r(s))return 0;if(!be(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(s,r),!be(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#v=(r,s,i)=>{if(e[r]=s,this.#h){let n=this.#h-e[r];for(;this.#E>n;)this.#I(!0)}this.#E+=e[r],i&&(i.entrySize=s,i.totalCalculatedSize=this.#E)}}#S=e=>{};#v=(e,r,s)=>{};#D=(e,r,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:e=this.allowStale}={}){if(this.#o)for(let r=this.#a;!(!this.#P(r)||((e||!this.#m(r))&&(yield r),r===this.#u));)r=this.#p[r]}*#y({allowStale:e=this.allowStale}={}){if(this.#o)for(let r=this.#u;!(!this.#P(r)||((e||!this.#m(r))&&(yield r),r===this.#a));)r=this.#c[r]}#P(e){return e!==void 0&&this.#n.get(this.#s[e])===e}*entries(){for(let e of this.#x())this.#e[e]!==void 0&&this.#s[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#s[e],this.#e[e]])}*rentries(){for(let e of this.#y())this.#e[e]!==void 0&&this.#s[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#s[e],this.#e[e]])}*keys(){for(let e of this.#x()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*rkeys(){for(let e of this.#y()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*values(){for(let e of this.#x())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#y())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let s of this.#x()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#s[s],this))return this.get(this.#s[s],r)}}forEach(e,r=this){for(let s of this.#x()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#s[s],this)}}rforEach(e,r=this){for(let s of this.#y()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#s[s],this)}}purgeStale(){let e=!1;for(let r of this.#y({allowStale:!0}))this.#m(r)&&(this.delete(this.#s[r]),e=!0);return e}info(e){let r=this.#n.get(e);if(r===void 0)return;let s=this.#e[r],i=this.#r(s)?s.__staleWhileFetching:s;if(i===void 0)return;let n={value:i};if(this.#d&&this.#_){let o=this.#d[r],a=this.#_[r];if(o&&a){let l=o-(Ge.now()-a);n.ttl=l,n.start=Date.now()}}return this.#A&&(n.size=this.#A[r]),n}dump(){let e=[];for(let r of this.#x({allowStale:!0})){let s=this.#s[r],i=this.#e[r],n=this.#r(i)?i.__staleWhileFetching:i;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#d&&this.#_){o.ttl=this.#d[r];let a=Ge.now()-this.#_[r];o.start=Math.floor(Date.now()-a)}this.#A&&(o.size=this.#A[r]),e.unshift([s,o])}return e}load(e){this.clear();for(let[r,s]of e){if(s.start){let i=Date.now()-s.start;s.start=Ge.now()-i}this.set(r,s.value,s)}}set(e,r,s={}){if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,c=this.#D(e,r,s.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let u=this.#o===0?void 0:this.#n.get(e);if(u===void 0)u=this.#o===0?this.#a:this.#R.length!==0?this.#R.pop():this.#o===this.#i?this.#I(!1):this.#o,this.#s[u]=e,this.#e[u]=r,this.#n.set(e,u),this.#c[this.#a]=u,this.#p[u]=this.#a,this.#a=u,this.#o++,this.#v(u,c,l),l&&(l.set="add"),h=!1;else{this.#$(u);let d=this.#e[u];if(r!==d){if(this.#b&&this.#r(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;p!==void 0&&!o&&(this.#w&&this.#t?.(p,e,"set"),this.#f&&this.#l?.push([p,e,"set"]))}else o||(this.#w&&this.#t?.(d,e,"set"),this.#f&&this.#l?.push([d,e,"set"]));if(this.#S(u),this.#v(u,c,l),this.#e[u]=r,l){l.set="replace";let p=d&&this.#r(d)?d.__staleWhileFetching:d;p!==void 0&&(l.oldValue=p)}}else l&&(l.set="update")}if(i!==0&&!this.#d&&this.#L(),this.#d&&(h||this.#H(u,i,n),l&&this.#T(l,u)),!o&&this.#f&&this.#l){let d=this.#l,p;for(;p=d?.shift();)this.#g?.(...p)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#u];if(this.#I(!0),this.#r(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#g?.(...r)}}}#I(e){let r=this.#u,s=this.#s[r],i=this.#e[r];return this.#b&&this.#r(i)?i.__abortController.abort(new Error("evicted")):(this.#w||this.#f)&&(this.#w&&this.#t?.(i,s,"evict"),this.#f&&this.#l?.push([i,s,"evict"])),this.#S(r),e&&(this.#s[r]=void 0,this.#e[r]=void 0,this.#R.push(r)),this.#o===1?(this.#u=this.#a=0,this.#R.length=0):this.#u=this.#c[r],this.#n.delete(s),this.#o--,r}has(e,r={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=r,n=this.#n.get(e);if(n!==void 0){let o=this.#e[n];if(this.#r(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#m(n))i&&(i.has="stale",this.#T(i,n));else return s&&this.#C(n),i&&(i.has="hit",this.#T(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:s=this.allowStale}=r,i=this.#n.get(e);if(i===void 0||!s&&this.#m(i))return;let n=this.#e[i];return this.#r(n)?n.__staleWhileFetching:n}#N(e,r,s,i){let n=r===void 0?void 0:this.#e[r];if(this.#r(n))return n;let o=new It,{signal:a}=s;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:s,context:i},h=(x,I=!1)=>{let{aborted:E}=o.signal,C=s.ignoreFetchAbort&&x!==void 0;if(s.status&&(E&&!I?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,C&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),E&&!C&&!I)return u(o.signal.reason);let N=p;return this.#e[r]===p&&(x===void 0?N.__staleWhileFetching?this.#e[r]=N.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,x,l.options))),x},c=x=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=x),u(x)),u=x=>{let{aborted:I}=o.signal,E=I&&s.allowStaleOnFetchAbort,C=E||s.allowStaleOnFetchRejection,N=C||s.noDeleteOnFetchRejection,w=p;if(this.#e[r]===p&&(!N||w.__staleWhileFetching===void 0?this.delete(e):E||(this.#e[r]=w.__staleWhileFetching)),C)return s.status&&w.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw x},d=(x,I)=>{let E=this.#O?.(e,n,l);E&&E instanceof Promise&&E.then(C=>x(C===void 0?void 0:C),I),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(x(void 0),s.allowStaleOnFetchAbort&&(x=C=>h(C,!0)))})};s.status&&(s.status.fetchDispatched=!0);let p=new Promise(d).then(h,c),R=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,R,{...l.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=R,R}#r(e){if(!this.#b)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof It}async fetch(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:R=this.allowStaleOnFetchAbort,context:x,forceRefresh:I=!1,status:E,signal:C}=r;if(!this.#b)return E&&(E.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:E});let N={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:R,ignoreFetchAbort:p,status:E,signal:C},w=this.#n.get(e);if(w===void 0){E&&(E.fetch="miss");let S=this.#N(e,w,N,x);return S.__returned=S}else{let S=this.#e[w];if(this.#r(S)){let g=s&&S.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",g&&(E.returnedStale=!0)),g?S.__staleWhileFetching:S.__returned=S}let H=this.#m(w);if(!I&&!H)return E&&(E.fetch="hit"),this.#$(w),i&&this.#C(w),E&&this.#T(E,w),S;let O=this.#N(e,w,N,x),v=O.__staleWhileFetching!==void 0&&s;return E&&(E.fetch=H?"stale":"refresh",v&&H&&(E.returnedStale=!0)),v?O.__staleWhileFetching:O.__returned=O}}get(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=r,a=this.#n.get(e);if(a!==void 0){let l=this.#e[a],h=this.#r(l);return o&&this.#T(o,a),this.#m(a)?(o&&(o.get="stale"),h?(o&&s&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?l.__staleWhileFetching:void 0):(n||this.delete(e),o&&s&&(o.returnedStale=!0),s?l:void 0)):(o&&(o.get="hit"),h?l.__staleWhileFetching:(this.#$(a),i&&this.#C(a),l))}else o&&(o.get="miss")}#U(e,r){this.#p[r]=e,this.#c[e]=r}#$(e){e!==this.#a&&(e===this.#u?this.#u=this.#c[e]:this.#U(this.#p[e],this.#c[e]),this.#U(this.#a,e),this.#a=e)}delete(e){let r=!1;if(this.#o!==0){let s=this.#n.get(e);if(s!==void 0)if(r=!0,this.#o===1)this.clear();else{this.#S(s);let i=this.#e[s];if(this.#r(i)?i.__abortController.abort(new Error("deleted")):(this.#w||this.#f)&&(this.#w&&this.#t?.(i,e,"delete"),this.#f&&this.#l?.push([i,e,"delete"])),this.#n.delete(e),this.#s[s]=void 0,this.#e[s]=void 0,s===this.#a)this.#a=this.#p[s];else if(s===this.#u)this.#u=this.#c[s];else{let n=this.#p[s];this.#c[n]=this.#c[s];let o=this.#c[s];this.#p[o]=this.#p[s]}this.#o--,this.#R.push(s)}}if(this.#f&&this.#l?.length){let s=this.#l,i;for(;i=s?.shift();)this.#g?.(...i)}return r}clear(){for(let e of this.#y({allowStale:!0})){let r=this.#e[e];if(this.#r(r))r.__abortController.abort(new Error("deleted"));else{let s=this.#s[e];this.#w&&this.#t?.(r,s,"delete"),this.#f&&this.#l?.push([r,s,"delete"])}}if(this.#n.clear(),this.#e.fill(void 0),this.#s.fill(void 0),this.#d&&this.#_&&(this.#d.fill(0),this.#_.fill(0)),this.#A&&this.#A.fill(0),this.#u=0,this.#a=0,this.#R.length=0,this.#E=0,this.#o=0,this.#f&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#g?.(...r)}}};Nt.LRUCache=Tr});var Gn=_((Cp,qn)=>{"use strict";var M=(...t)=>t.every(e=>e)?t.join(""):"",Q=t=>t?encodeURIComponent(t):"",Bn=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Pu={sshtemplate:({domain:t,user:e,project:r,committish:s})=>`git@${t}:${e}/${r}.git${M("#",s)}`,sshurltemplate:({domain:t,user:e,project:r,committish:s})=>`git+ssh://git@${t}/${e}/${r}.git${M("#",s)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i,path:n})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s||"HEAD"),"/",n)}`,browsetemplate:({domain:t,user:e,project:r,committish:s,treepath:i})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Q(s||"HEAD")}/${n}${M("#",a(o||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:s,blobpath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Q(s||"HEAD")}/${n}${M("#",a(o||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:s,committish:i})=>`https://${t}/${e}/${r}${M("/",s,"/",Q(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/raw/${Q(s||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:s})=>`${t}:${e}/${r}${M("#",s)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${M("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:Bn},Ce={};Ce.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:s,path:i})=>`https://${M(t,"@")}raw.githubusercontent.com/${e}/${r}/${Q(s||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://codeload.${t}/${e}/${r}/tar.gz/${Q(s||"HEAD")}`,extract:t=>{let[,e,r,s,i]=t.pathname.split("/",5);if(!(s&&s!=="tree")&&(s||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};Ce.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,editpath:o})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s||"HEAD"),"/",n,o)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/get/${Q(s||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["get"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};Ce.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${Q(s||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),s=r.pop();s.endsWith(".git")&&(s=s.slice(0,-4));let i=r.join("/");if(!(!i||!s))return{user:i,project:s,committish:t.hash.slice(1)}}};Ce.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${M("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${M("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i})=>`https://${t}/${e}/${r}${M("/",Q(s))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${M("/",Q(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${M("/",Q(r))}${M("#",i(s))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${M("/",Q(r))}${M("#",i(s))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${M("/",Q(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${M("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:s})=>`https://gist.githubusercontent.com/${t}/${e}/raw${M("/",Q(r))}/${s}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${M("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${M("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${M("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${Q(e||"HEAD")}`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(s!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+Bn(t)}};Ce.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/blob/${Q(s)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}.git${M("#",s)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/archive/${Q(s)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>null,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["archive"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(Ce))Ce[t]=Object.assign({},Pu,e);qn.exports=Ce});var Cr=_((Sp,Wn)=>{var Uu=Xe("url"),br=(t,e,r)=>{let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)},jn=t=>{try{return new Uu.URL(t)}catch{}},Fu=(t,e)=>{let r=t.indexOf(":"),s=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,s))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},Mu=t=>{let e=br(t,"@","#"),r=br(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),br(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};Wn.exports=(t,e)=>{let r=e?Fu(t,e):t;return jn(r)||jn(Mu(r))}});var kn=_(($p,zn)=>{"use strict";var Bu=Cr(),qu=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),s=t.indexOf("/",r+1),i=t.indexOf(":"),n=/\s/.exec(t),o=t.indexOf("@"),a=!n||e>-1&&n.index>e,l=o===-1||e>-1&&o>e,h=i===-1||e>-1&&i>e,c=s===-1||e>-1&&s>e,u=r>0,d=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return a&&u&&d&&p&&l&&h&&c};zn.exports=(t,e,{gitHosts:r,protocols:s})=>{if(!t)return;let i=qu(t)?`github:${t}`:t,n=Bu(i,s);if(!n)return;let o=r.byShortcut[n.protocol],a=r.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=o||a;if(!l)return;let h=r[o||a],c=null;s[n.protocol]?.auth&&(n.username||n.password)&&(c=`${n.username}${n.password?":"+n.password:""}`);let u=null,d=null,p=null,R=null;try{if(o){let x=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,I=x.indexOf("@");I>-1&&(x=x.slice(I+1));let E=x.lastIndexOf("/");E>-1?(d=decodeURIComponent(x.slice(0,E)),d||(d=null),p=decodeURIComponent(x.slice(E+1))):p=decodeURIComponent(x),p.endsWith(".git")&&(p=p.slice(0,-4)),n.hash&&(u=decodeURIComponent(n.hash.slice(1))),R="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let x=h.extract(n);if(!x)return;d=x.user&&decodeURIComponent(x.user),p=decodeURIComponent(x.project),u=decodeURIComponent(x.committish),R=s[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(x){if(x instanceof URIError)return;throw x}return[l,d,c,p,u,R,e]}});var Kn=_((Op,Vn)=>{"use strict";var{LRUCache:Gu}=Mn(),ju=Gn(),Wu=kn(),zu=Cr(),Sr=new Gu({max:1e3}),Lt=class t{constructor(e,r,s,i,n,o,a={}){Object.assign(this,t.#i[e],{type:e,user:r,auth:s,project:i,committish:n,default:o,opts:a})}static#i={byShortcut:{},byDomain:{}};static#h={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,r){t.#i[e]=r,t.#i.byDomain[r.domain]=e,t.#i.byShortcut[`${e}:`]=e,t.#h[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let s=e+JSON.stringify(r||{});if(!Sr.has(s)){let i=Wu(e,r,{gitHosts:t.#i,protocols:t.#h});Sr.set(s,i?new t(...i):void 0)}return Sr.get(s)}static parseUrl(e){return zu(e)}#t(e,r){if(typeof e!="function")return null;let s={...this,...this.opts,...r};s.path||(s.path=""),s.path.startsWith("/")&&(s.path=s.path.slice(1)),s.noCommittish&&(s.committish=null);let i=e(s);return s.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:e}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:e}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#t(this.filetemplate,{...r,path:e})}edit(e,r){return this.#t(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(ju))Lt.addHost(t,e);Vn.exports=Lt});var ht=_((qp,ho)=>{"use strict";var ge="\\\\/",no=`[^${ge}]`,_e="\\.",ic="\\+",nc="\\?",Mt="\\/",oc="(?=.)",oo="[^/]",Lr=`(?:${Mt}|$)`,ao=`(?:^|${Mt})`,Hr=`${_e}{1,2}${Lr}`,ac=`(?!${_e})`,lc=`(?!${ao}${Hr})`,hc=`(?!${_e}{0,1}${Lr})`,uc=`(?!${Hr})`,cc=`[^.${Mt}]`,fc=`${oo}*?`,pc="/",lo={DOT_LITERAL:_e,PLUS_LITERAL:ic,QMARK_LITERAL:nc,SLASH_LITERAL:Mt,ONE_CHAR:oc,QMARK:oo,END_ANCHOR:Lr,DOTS_SLASH:Hr,NO_DOT:ac,NO_DOTS:lc,NO_DOT_SLASH:hc,NO_DOTS_SLASH:uc,QMARK_NO_DOT:cc,STAR:fc,START_ANCHOR:ao,SEP:pc},dc={...lo,SLASH_LITERAL:`[${ge}]`,QMARK:no,STAR:`${no}*?`,DOTS_SLASH:`${_e}{1,2}(?:[${ge}]|$)`,NO_DOT:`(?!${_e})`,NO_DOTS:`(?!(?:^|[${ge}])${_e}{1,2}(?:[${ge}]|$))`,NO_DOT_SLASH:`(?!${_e}{0,1}(?:[${ge}]|$))`,NO_DOTS_SLASH:`(?!${_e}{1,2}(?:[${ge}]|$))`,QMARK_NO_DOT:`[^.${ge}]`,START_ANCHOR:`(?:^|[${ge}])`,END_ANCHOR:`(?:[${ge}]|$)`,SEP:"\\"},mc={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};ho.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:mc,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?dc:lo}}});var ut=_(he=>{"use strict";var{REGEX_BACKSLASH:gc,REGEX_REMOVE_BACKSLASH:Ec,REGEX_SPECIAL_CHARS:Rc,REGEX_SPECIAL_CHARS_GLOBAL:Ac}=ht();he.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);he.hasRegexChars=t=>Rc.test(t);he.isRegexChar=t=>t.length===1&&he.hasRegexChars(t);he.escapeRegex=t=>t.replace(Ac,"\\$1");he.toPosixSlashes=t=>t.replace(gc,"/");he.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let t=navigator.platform.toLowerCase();return t==="win32"||t==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};he.removeBackslashes=t=>t.replace(Ec,e=>e==="\\"?"":e);he.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?he.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};he.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};he.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n};he.basename=(t,{windows:e}={})=>{let r=t.split(e?/[\\/]/:"/"),s=r[r.length-1];return s===""?r[r.length-2]:s}});var Ro=_((jp,Eo)=>{"use strict";var uo=ut(),{CHAR_ASTERISK:Dr,CHAR_AT:_c,CHAR_BACKWARD_SLASH:ct,CHAR_COMMA:wc,CHAR_DOT:Pr,CHAR_EXCLAMATION_MARK:Ur,CHAR_FORWARD_SLASH:go,CHAR_LEFT_CURLY_BRACE:Fr,CHAR_LEFT_PARENTHESES:Mr,CHAR_LEFT_SQUARE_BRACKET:xc,CHAR_PLUS:yc,CHAR_QUESTION_MARK:co,CHAR_RIGHT_CURLY_BRACE:Tc,CHAR_RIGHT_PARENTHESES:fo,CHAR_RIGHT_SQUARE_BRACKET:bc}=ht(),po=t=>t===go||t===ct,mo=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Cc=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===!0||r.scanToEnd===!0,n=[],o=[],a=[],l=t,h=-1,c=0,u=0,d=!1,p=!1,R=!1,x=!1,I=!1,E=!1,C=!1,N=!1,w=!1,S=!1,H=0,O,$,v={value:"",depth:0,isGlob:!1},g=()=>h>=s,Z=()=>l.charCodeAt(h+1),z=()=>(O=$,l.charCodeAt(++h));for(;h<s;){$=z();let D;if($===ct){C=v.backslashes=!0,$=z(),$===Fr&&(E=!0);continue}if(E===!0||$===Fr){for(H++;g()!==!0&&($=z());){if($===ct){C=v.backslashes=!0,z();continue}if($===Fr){H++;continue}if(E!==!0&&$===Pr&&($=z())===Pr){if(d=v.isBrace=!0,R=v.isGlob=!0,S=!0,i===!0)continue;break}if(E!==!0&&$===wc){if(d=v.isBrace=!0,R=v.isGlob=!0,S=!0,i===!0)continue;break}if($===Tc&&(H--,H===0)){E=!1,d=v.isBrace=!0,S=!0;break}}if(i===!0)continue;break}if($===go){if(n.push(h),o.push(v),v={value:"",depth:0,isGlob:!1},S===!0)continue;if(O===Pr&&h===c+1){c+=2;continue}u=h+1;continue}if(r.noext!==!0&&($===yc||$===_c||$===Dr||$===co||$===Ur)===!0&&Z()===Mr){if(R=v.isGlob=!0,x=v.isExtglob=!0,S=!0,$===Ur&&h===c&&(w=!0),i===!0){for(;g()!==!0&&($=z());){if($===ct){C=v.backslashes=!0,$=z();continue}if($===fo){R=v.isGlob=!0,S=!0;break}}continue}break}if($===Dr){if(O===Dr&&(I=v.isGlobstar=!0),R=v.isGlob=!0,S=!0,i===!0)continue;break}if($===co){if(R=v.isGlob=!0,S=!0,i===!0)continue;break}if($===xc){for(;g()!==!0&&(D=z());){if(D===ct){C=v.backslashes=!0,z();continue}if(D===bc){p=v.isBracket=!0,R=v.isGlob=!0,S=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&$===Ur&&h===c){N=v.negated=!0,c++;continue}if(r.noparen!==!0&&$===Mr){if(R=v.isGlob=!0,i===!0){for(;g()!==!0&&($=z());){if($===Mr){C=v.backslashes=!0,$=z();continue}if($===fo){S=!0;break}}continue}break}if(R===!0){if(S=!0,i===!0)continue;break}}r.noext===!0&&(x=!1,R=!1);let k=l,f="",m="";c>0&&(f=l.slice(0,c),l=l.slice(c),u-=c),k&&R===!0&&u>0?(k=l.slice(0,u),m=l.slice(u)):R===!0?(k="",m=l):k=l,k&&k!==""&&k!=="/"&&k!==l&&po(k.charCodeAt(k.length-1))&&(k=k.slice(0,-1)),r.unescape===!0&&(m&&(m=uo.removeBackslashes(m)),k&&C===!0&&(k=uo.removeBackslashes(k)));let j={prefix:f,input:t,start:c,base:k,glob:m,isBrace:d,isBracket:p,isGlob:R,isExtglob:x,isGlobstar:I,negated:N,negatedExtglob:w};if(r.tokens===!0&&(j.maxDepth=0,po($)||o.push(v),j.tokens=o),r.parts===!0||r.tokens===!0){let D;for(let q=0;q<n.length;q++){let ue=D?D+1:c,ee=n[q],re=t.slice(ue,ee);r.tokens&&(q===0&&c!==0?(o[q].isPrefix=!0,o[q].value=f):o[q].value=re,mo(o[q]),j.maxDepth+=o[q].depth),(q!==0||re!=="")&&a.push(re),D=ee}if(D&&D+1<t.length){let q=t.slice(D+1);a.push(q),r.tokens&&(o[o.length-1].value=q,mo(o[o.length-1]),j.maxDepth+=o[o.length-1].depth)}j.slashes=n,j.parts=a}return j};Eo.exports=Cc});var wo=_((Wp,_o)=>{"use strict";var Bt=ht(),Ee=ut(),{MAX_LENGTH:qt,POSIX_REGEX_SOURCE:Sc,REGEX_NON_SPECIAL_CHARS:$c,REGEX_SPECIAL_CHARS_BACKREF:Oc,REPLACEMENTS:Ao}=Bt,vc=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>Ee.escapeRegex(i)).join("..")}return r},ze=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Br=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Ao[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(qt,r.maxLength):qt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],a=r.capture?"":"?:",l=Bt.globChars(r.windows),h=Bt.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:R,NO_DOT:x,NO_DOT_SLASH:I,NO_DOTS_SLASH:E,QMARK:C,QMARK_NO_DOT:N,STAR:w,START_ANCHOR:S}=l,H=y=>`(${a}(?:(?!${S}${y.dot?R:c}).)*?)`,O=r.dot?"":x,$=r.dot?C:N,v=r.bash===!0?H(r):w;r.capture&&(v=`(${v})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Ee.removePrefix(t,g),i=t.length;let Z=[],z=[],k=[],f=n,m,j=()=>g.index===i-1,D=g.peek=(y=1)=>t[g.index+y],q=g.advance=()=>t[++g.index]||"",ue=()=>t.slice(g.index+1),ee=(y="",W=0)=>{g.consumed+=y,g.index+=W},re=y=>{g.output+=y.output!=null?y.output:y.value,ee(y.value)},ce=()=>{let y=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)q(),g.start++,y++;return y%2===0?!1:(g.negated=!0,g.start++,!0)},xe=y=>{g[y]++,k.push(y)},ie=y=>{g[y]--,k.pop()},P=y=>{if(f.type==="globstar"){let W=g.braces>0&&(y.type==="comma"||y.type==="brace"),A=y.extglob===!0||Z.length&&(y.type==="pipe"||y.type==="paren");y.type!=="slash"&&y.type!=="paren"&&!W&&!A&&(g.output=g.output.slice(0,-f.output.length),f.type="star",f.value="*",f.output=v,g.output+=f.output)}if(Z.length&&y.type!=="paren"&&(Z[Z.length-1].inner+=y.value),(y.value||y.output)&&re(y),f&&f.type==="text"&&y.type==="text"){f.output=(f.output||f.value)+y.value,f.value+=y.value;return}y.prev=f,o.push(y),f=y},dt=(y,W)=>{let A={...h[W],conditions:1,inner:""};A.prev=f,A.parens=g.parens,A.output=g.output;let U=(r.capture?"(":"")+A.open;xe("parens"),P({type:y,value:W,output:g.output?"":p}),P({type:"paren",extglob:!0,value:q(),output:U}),Z.push(A)},Ra=y=>{let W=y.close+(r.capture?")":""),A;if(y.type==="negate"){let U=v;if(y.inner&&y.inner.length>1&&y.inner.includes("/")&&(U=H(r)),(U!==v||j()||/^\)+$/.test(ue()))&&(W=y.close=`)$))${U}`),y.inner.includes("*")&&(A=ue())&&/^\.[^\\/.]+$/.test(A)){let V=Br(A,{...e,fastpaths:!1}).output;W=y.close=`)${V})${U})`}y.prev.type==="bos"&&(g.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:m,output:W}),ie("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let y=!1,W=t.replace(Oc,(A,U,V,ne,J,Yt)=>ne==="\\"?(y=!0,A):ne==="?"?U?U+ne+(J?C.repeat(J.length):""):Yt===0?$+(J?C.repeat(J.length):""):C.repeat(V.length):ne==="."?c.repeat(V.length):ne==="*"?U?U+ne+(J?v:""):v:U?A:`\\${A}`);return y===!0&&(r.unescape===!0?W=W.replace(/\\/g,""):W=W.replace(/\\+/g,A=>A.length%2===0?"\\\\":A?"\\":"")),W===t&&r.contains===!0?(g.output=t,g):(g.output=Ee.wrapOutput(W,g,e),g)}for(;!j();){if(m=q(),m==="\0")continue;if(m==="\\"){let A=D();if(A==="/"&&r.bash!==!0||A==="."||A===";")continue;if(!A){m+="\\",P({type:"text",value:m});continue}let U=/^\\+/.exec(ue()),V=0;if(U&&U[0].length>2&&(V=U[0].length,g.index+=V,V%2!==0&&(m+="\\")),r.unescape===!0?m=q():m+=q(),g.brackets===0){P({type:"text",value:m});continue}}if(g.brackets>0&&(m!=="]"||f.value==="["||f.value==="[^")){if(r.posix!==!1&&m===":"){let A=f.value.slice(1);if(A.includes("[")&&(f.posix=!0,A.includes(":"))){let U=f.value.lastIndexOf("["),V=f.value.slice(0,U),ne=f.value.slice(U+2),J=Sc[ne];if(J){f.value=V+J,g.backtrack=!0,q(),!n.output&&o.indexOf(f)===1&&(n.output=p);continue}}}(m==="["&&D()!==":"||m==="-"&&D()==="]")&&(m=`\\${m}`),m==="]"&&(f.value==="["||f.value==="[^")&&(m=`\\${m}`),r.posix===!0&&m==="!"&&f.value==="["&&(m="^"),f.value+=m,re({value:m});continue}if(g.quotes===1&&m!=='"'){m=Ee.escapeRegex(m),f.value+=m,re({value:m});continue}if(m==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&P({type:"text",value:m});continue}if(m==="("){xe("parens"),P({type:"paren",value:m});continue}if(m===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ze("opening","("));let A=Z[Z.length-1];if(A&&g.parens===A.parens+1){Ra(Z.pop());continue}P({type:"paren",value:m,output:g.parens?")":"\\)"}),ie("parens");continue}if(m==="["){if(r.nobracket===!0||!ue().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));m=`\\${m}`}else xe("brackets");P({type:"bracket",value:m});continue}if(m==="]"){if(r.nobracket===!0||f&&f.type==="bracket"&&f.value.length===1){P({type:"text",value:m,output:`\\${m}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ze("opening","["));P({type:"text",value:m,output:`\\${m}`});continue}ie("brackets");let A=f.value.slice(1);if(f.posix!==!0&&A[0]==="^"&&!A.includes("/")&&(m=`/${m}`),f.value+=m,re({value:m}),r.literalBrackets===!1||Ee.hasRegexChars(A))continue;let U=Ee.escapeRegex(f.value);if(g.output=g.output.slice(0,-f.value.length),r.literalBrackets===!0){g.output+=U,f.value=U;continue}f.value=`(${a}${U}|${f.value})`,g.output+=f.value;continue}if(m==="{"&&r.nobrace!==!0){xe("braces");let A={type:"brace",value:m,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};z.push(A),P(A);continue}if(m==="}"){let A=z[z.length-1];if(r.nobrace===!0||!A){P({type:"text",value:m,output:m});continue}let U=")";if(A.dots===!0){let V=o.slice(),ne=[];for(let J=V.length-1;J>=0&&(o.pop(),V[J].type!=="brace");J--)V[J].type!=="dots"&&ne.unshift(V[J].value);U=vc(ne,r),g.backtrack=!0}if(A.comma!==!0&&A.dots!==!0){let V=g.output.slice(0,A.outputIndex),ne=g.tokens.slice(A.tokensIndex);A.value=A.output="\\{",m=U="\\}",g.output=V;for(let J of ne)g.output+=J.output||J.value}P({type:"brace",value:m,output:U}),ie("braces"),z.pop();continue}if(m==="|"){Z.length>0&&Z[Z.length-1].conditions++,P({type:"text",value:m});continue}if(m===","){let A=m,U=z[z.length-1];U&&k[k.length-1]==="braces"&&(U.comma=!0,A="|"),P({type:"comma",value:m,output:A});continue}if(m==="/"){if(f.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",o.pop(),f=n;continue}P({type:"slash",value:m,output:d});continue}if(m==="."){if(g.braces>0&&f.type==="dot"){f.value==="."&&(f.output=c);let A=z[z.length-1];f.type="dots",f.output+=m,f.value+=m,A.dots=!0;continue}if(g.braces+g.parens===0&&f.type!=="bos"&&f.type!=="slash"){P({type:"text",value:m,output:c});continue}P({type:"dot",value:m,output:c});continue}if(m==="?"){if(!(f&&f.value==="(")&&r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("qmark",m);continue}if(f&&f.type==="paren"){let U=D(),V=m;(f.value==="("&&!/[!=<:]/.test(U)||U==="<"&&!/<([!=]|\w+>)/.test(ue()))&&(V=`\\${m}`),P({type:"text",value:m,output:V});continue}if(r.dot!==!0&&(f.type==="slash"||f.type==="bos")){P({type:"qmark",value:m,output:N});continue}P({type:"qmark",value:m,output:C});continue}if(m==="!"){if(r.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){dt("negate",m);continue}if(r.nonegate!==!0&&g.index===0){ce();continue}}if(m==="+"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("plus",m);continue}if(f&&f.value==="("||r.regex===!1){P({type:"plus",value:m,output:u});continue}if(f&&(f.type==="bracket"||f.type==="paren"||f.type==="brace")||g.parens>0){P({type:"plus",value:m});continue}P({type:"plus",value:u});continue}if(m==="@"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){P({type:"at",extglob:!0,value:m,output:""});continue}P({type:"text",value:m});continue}if(m!=="*"){(m==="$"||m==="^")&&(m=`\\${m}`);let A=$c.exec(ue());A&&(m+=A[0],g.index+=A[0].length),P({type:"text",value:m});continue}if(f&&(f.type==="globstar"||f.star===!0)){f.type="star",f.star=!0,f.value+=m,f.output=v,g.backtrack=!0,g.globstar=!0,ee(m);continue}let y=ue();if(r.noextglob!==!0&&/^\([^?]/.test(y)){dt("star",m);continue}if(f.type==="star"){if(r.noglobstar===!0){ee(m);continue}let A=f.prev,U=A.prev,V=A.type==="slash"||A.type==="bos",ne=U&&(U.type==="star"||U.type==="globstar");if(r.bash===!0&&(!V||y[0]&&y[0]!=="/")){P({type:"star",value:m,output:""});continue}let J=g.braces>0&&(A.type==="comma"||A.type==="brace"),Yt=Z.length&&(A.type==="pipe"||A.type==="paren");if(!V&&A.type!=="paren"&&!J&&!Yt){P({type:"star",value:m,output:""});continue}for(;y.slice(0,3)==="/**";){let mt=t[g.index+4];if(mt&&mt!=="/")break;y=y.slice(3),ee("/**",3)}if(A.type==="bos"&&j()){f.type="globstar",f.value+=m,f.output=H(r),g.output=f.output,g.globstar=!0,ee(m);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&!ne&&j()){g.output=g.output.slice(0,-(A.output+f.output).length),A.output=`(?:${A.output}`,f.type="globstar",f.output=H(r)+(r.strictSlashes?")":"|$)"),f.value+=m,g.globstar=!0,g.output+=A.output+f.output,ee(m);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&y[0]==="/"){let mt=y[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(A.output+f.output).length),A.output=`(?:${A.output}`,f.type="globstar",f.output=`${H(r)}${d}|${d}${mt})`,f.value+=m,g.output+=A.output+f.output,g.globstar=!0,ee(m+q()),P({type:"slash",value:"/",output:""});continue}if(A.type==="bos"&&y[0]==="/"){f.type="globstar",f.value+=m,f.output=`(?:^|${d}|${H(r)}${d})`,g.output=f.output,g.globstar=!0,ee(m+q()),P({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-f.output.length),f.type="globstar",f.output=H(r),f.value+=m,g.output+=f.output,g.globstar=!0,ee(m);continue}let W={type:"star",value:m,output:v};if(r.bash===!0){W.output=".*?",(f.type==="bos"||f.type==="slash")&&(W.output=O+W.output),P(W);continue}if(f&&(f.type==="bracket"||f.type==="paren")&&r.regex===!0){W.output=m,P(W);continue}(g.index===g.start||f.type==="slash"||f.type==="dot")&&(f.type==="dot"?(g.output+=I,f.output+=I):r.dot===!0?(g.output+=E,f.output+=E):(g.output+=O,f.output+=O),D()!=="*"&&(g.output+=p,f.output+=p)),P(W)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));g.output=Ee.escapeLast(g.output,"["),ie("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing",")"));g.output=Ee.escapeLast(g.output,"("),ie("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","}"));g.output=Ee.escapeLast(g.output,"{"),ie("braces")}if(r.strictSlashes!==!0&&(f.type==="star"||f.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${d}?`}),g.backtrack===!0){g.output="";for(let y of g.tokens)g.output+=y.output!=null?y.output:y.value,y.suffix&&(g.output+=y.suffix)}return g};Br.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(qt,r.maxLength):qt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=Ao[t]||t;let{DOT_LITERAL:n,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:c,NO_DOTS_SLASH:u,STAR:d,START_ANCHOR:p}=Bt.globChars(r.windows),R=r.dot?c:h,x=r.dot?u:h,I=r.capture?"":"?:",E={negated:!1,prefix:""},C=r.bash===!0?".*?":d;r.capture&&(C=`(${C})`);let N=O=>O.noglobstar===!0?C:`(${I}(?:(?!${p}${O.dot?l:n}).)*?)`,w=O=>{switch(O){case"*":return`${R}${a}${C}`;case".*":return`${n}${a}${C}`;case"*.*":return`${R}${C}${n}${a}${C}`;case"*/*":return`${R}${C}${o}${a}${x}${C}`;case"**":return R+N(r);case"**/*":return`(?:${R}${N(r)}${o})?${x}${a}${C}`;case"**/*.*":return`(?:${R}${N(r)}${o})?${x}${C}${n}${a}${C}`;case"**/.*":return`(?:${R}${N(r)}${o})?${n}${a}${C}`;default:{let $=/^(.*?)\.(\w+)$/.exec(O);if(!$)return;let v=w($[1]);return v?v+n+$[2]:void 0}}},S=Ee.removePrefix(t,E),H=w(S);return H&&r.strictSlashes!==!0&&(H+=`${o}?`),H};_o.exports=Br});var To=_((zp,yo)=>{"use strict";var Ic=Ro(),qr=wo(),xo=ut(),Nc=ht(),Lc=t=>t&&typeof t=="object"&&!Array.isArray(t),Y=(t,e,r=!1)=>{if(Array.isArray(t)){let c=t.map(d=>Y(d,e,r));return d=>{for(let p of c){let R=p(d);if(R)return R}return!1}}let s=Lc(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=i.windows,o=s?Y.compileRe(t,e):Y.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let c={...e,ignore:null,onMatch:null,onResult:null};l=Y(i.ignore,c,r)}let h=(c,u=!1)=>{let{isMatch:d,match:p,output:R}=Y.test(c,o,e,{glob:t,posix:n}),x={glob:t,state:a,regex:o,posix:n,input:c,output:R,match:p,isMatch:d};return typeof i.onResult=="function"&&i.onResult(x),d===!1?(x.isMatch=!1,u?x:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(x),x.isMatch=!1,u?x:!1):(typeof i.onMatch=="function"&&i.onMatch(x),u?x:!0)};return r&&(h.state=a),h};Y.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},o=n.format||(i?xo.toPosixSlashes:null),a=t===s,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===s),(a===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?a=Y.matchBase(t,e,r,i):a=e.exec(l)),{isMatch:!!a,match:a,output:l}};Y.matchBase=(t,e,r)=>(e instanceof RegExp?e:Y.makeRe(e,r)).test(xo.basename(t));Y.isMatch=(t,e,r)=>Y(e,r)(t);Y.parse=(t,e)=>Array.isArray(t)?t.map(r=>Y.parse(r,e)):qr(t,{...e,fastpaths:!1});Y.scan=(t,e)=>Ic(t,e);Y.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",a=`${n}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Y.toRegex(a,e);return s===!0&&(l.state=t),l};Y.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=qr.fastpaths(t,e)),i.output||(i=qr(t,e)),Y.compileRe(i,e,r,s)};Y.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Y.constants=Nc;yo.exports=Y});var $o=_((kp,So)=>{"use strict";var bo=To(),Hc=ut();function Co(t,e,r=!1){return e&&(e.windows===null||e.windows===void 0)&&(e={...e,windows:Hc.isWindows()}),bo(t,e,r)}Object.assign(Co,bo);So.exports=Co});var vo=_((Vp,Oo)=>{"use strict";var Le=class t extends Error{constructor(e,r,s){super("[ParserError] "+e,r,s),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},Gt=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},ft=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new Gt(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new Le("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new Gt(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new Le("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Le("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new Le("Must declare a parseStart method")}};ft.END=1114112;ft.Error=Le;Oo.exports=ft});var No=_((Kp,Io)=>{"use strict";Io.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var jt=_((Xp,Lo)=>{"use strict";Lo.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var Do=_((Yp,Ho)=>{"use strict";var ke=jt(),Gr=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${ke(2,this.getUTCMonth()+1)}-${ke(2,this.getUTCDate())}`,r=`${ke(2,this.getUTCHours())}:${ke(2,this.getUTCMinutes())}:${ke(2,this.getUTCSeconds())}.${ke(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};Ho.exports=t=>{let e=new Gr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Fo=_((Qp,Uo)=>{"use strict";var Po=jt(),Dc=global.Date,jr=class extends Dc{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Po(2,this.getUTCMonth()+1)}-${Po(2,this.getUTCDate())}`}};Uo.exports=t=>{let e=new jr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Bo=_((Zp,Mo)=>{"use strict";var Wt=jt(),Wr=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${Wt(2,this.getUTCHours())}:${Wt(2,this.getUTCMinutes())}:${Wt(2,this.getUTCSeconds())}.${Wt(3,this.getUTCMilliseconds())}`}};Mo.exports=t=>{let e=new Wr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var qo=_((exports,module)=>{"use strict";module.exports=makeParserClass(vo());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=No(),createDateTimeFloat=Do(),createDate=Fo(),createTime=Bo(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
10
- `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(s){let i=this.ctx,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(s){return this.state.resultTable?this.state.resultTable.push(s):this.state.resultTable=[s],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(s){return this.returnNow({key:this.state.resultTable,value:s})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)&&(!isTable(this.ctx[s])||this.ctx[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[s]=this.ctx[s]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)||(this.ctx[s]=List()),isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[s])){let i=Table();this.ctx[s].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else{if(isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(s){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(s){return this.returnNow(s)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let s="\\u00";return this.char<16&&(s+="0"),s+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${s} instead`))}recordMultiEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(s){try{let i=parseInt(s,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(s){if(this.state.resultArr){let i=this.state.resultArr[_contentType],n=tomlType(s);if(i!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${n}`))}else this.state.resultArr=InlineList(tomlType(s));return isFloat(s)||isInteger(s)?this.state.resultArr.push(s.valueOf()):this.state.resultArr.push(s),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(s){let i=this.state.resultTable,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var jo=_((Jp,Go)=>{"use strict";Go.exports=Pc;function Pc(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
5
+ `;function as(t,e){var r=[],s="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(n,o,a){var l=t[n];l&&Array.isArray(l)?l.forEach(function(h){s+=Pe(n+"[]")+i+Pe(h)+`
6
+ `}):l&&typeof l=="object"?r.push(n):s+=Pe(n)+i+Pe(l)+er}),e.section&&s.length&&(s="["+Pe(e.section)+"]"+er+s),r.forEach(function(n,o,a){var l=ls(n).join("\\."),h=(e.section?e.section+".":"")+l,c=as(t[n],{section:h,whitespace:e.whitespace});s.length&&c.length&&(s+=er),s+=c}),s}function ls(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function va(t){var e={},r=e,s=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,n=t.split(/[\r\n]+/g);return n.forEach(function(o,a,l){if(!(!o||o.match(/^\s*[;#]/))){var h=o.match(i);if(h){if(h[1]!==void 0){if(s=gt(h[1]),s==="__proto__"){r={};return}r=e[s]=e[s]||{};return}var c=gt(h[2]);if(c!=="__proto__"){var u=h[3]?gt(h[4]):!0;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(c.length>2&&c.slice(-2)==="[]"){if(c=c.substring(0,c.length-2),c==="__proto__")return;r[c]?Array.isArray(r[c])||(r[c]=[r[c]]):r[c]=[]}Array.isArray(r[c])?r[c].push(u):r[c]=u}}}}),Object.keys(e).filter(function(o,a,l){if(!e[o]||typeof e[o]!="object"||Array.isArray(e[o]))return!1;var h=ls(o),c=e,u=h.pop(),d=u.replace(/\\\./g,".");return h.forEach(function(p,A,y){p!=="__proto__"&&((!c[p]||typeof c[p]!="object")&&(c[p]={}),c=c[p])}),c===e&&d===u?!1:(c[d]=e[o],!0)}).forEach(function(o,a,l){delete e[o]}),e}function hs(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Pe(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&hs(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function gt(t,e){if(t=(t||"").trim(),hs(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,s="",i=0,n=t.length;i<n;i++){var o=t.charAt(i);if(r)"\\;#".indexOf(o)!==-1?s+=o:s+="\\"+o,r=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?r=!0:s+=o}}return r&&(s+="\\"),s.trim()}return t}});var ps=_((xf,fs)=>{"use strict";var tr=1,cs=2;function Ia(){return""}function Na(t,e,r){return t.slice(e,r).replace(/\S/g," ")}fs.exports=function(t,e){e=e||{};for(var r,s,i=!1,n=!1,o=0,a="",l=e.whitespace===!1?Ia:Na,h=0;h<t.length;h++){if(r=t[h],s=t[h+1],!n&&r==='"'){var c=t[h-1]==="\\"&&t[h-2]!=="\\";c||(i=!i)}if(!i){if(!n&&r+s==="//")a+=t.slice(o,h),o=h,n=tr,h++;else if(n===tr&&r+s===`\r
7
+ `){h++,n=!1,a+=l(t,o,h),o=h;continue}else if(n===tr&&r===`
8
+ `)n=!1,a+=l(t,o,h),o=h;else if(!n&&r+s==="/*"){a+=t.slice(o,h),o=h,n=cs,h++;continue}else if(n===cs&&r+s==="*/"){h++,n=!1,a+=l(t,o,h+1),o=h+1;continue}}}return a+(n?l(t.substr(o)):t.substr(o))}});var ms=_(Ue=>{"use strict";var ds=Xe("fs"),La=us(),Ye=Xe("path"),Ha=ps(),Da=Ue.parse=function(t){return/^\s*{/.test(t)?JSON.parse(Ha(t)):La.parse(t)},Pa=Ue.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Ye.join.apply(null,t),s;try{return ds.readFileSync(r,"utf-8")}catch{return}},bf=Ue.json=function(){var t=Pa.apply(null,arguments);return t?Da(t):null},Cf=Ue.env=function(t,e){e=e||process.env;var r={},s=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var n=i.substring(s).split("__"),o;(o=n.indexOf(""))>-1;)n.splice(o,1);var a=r;n.forEach(function(h,c){!h||typeof a!="object"||(c===n.length-1&&(a[h]=e[i]),a[h]===void 0&&(a[h]={}),a=a[h])})}return r},Sf=Ue.find=function(){var t=Ye.join.apply(null,[].slice.call(arguments));function e(r,s){var i=Ye.join(r,s);try{return ds.statSync(i),i}catch{if(Ye.dirname(r)!==r)return e(Ye.dirname(r),s)}}return e(process.cwd(),t)}});var ws=_((Of,_s)=>{"use strict";function Es(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function As(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function Rs(t){var e=[];return t.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?e[s]=Rs(r):Es(r)?e[s]=As(r):e[s]=rr({},r):e[s]=r}),e}function gs(t,e){return e==="__proto__"?void 0:t[e]}var rr=_s.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,s,i;return e.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(o){if(s=gs(t,o),r=gs(n,o),r!==t)if(typeof r!="object"||r===null){t[o]=r;return}else if(Array.isArray(r)){t[o]=Rs(r);return}else if(Es(r)){t[o]=As(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[o]=rr({},r);return}else{t[o]=rr(s,r);return}})}),t}});var sr=_((vf,xs)=>{var Qe=ms(),Fe=Xe("path").join,Ua=ws(),ys="/etc",Ts=process.platform==="win32",Ze=Ts?process.env.USERPROFILE:process.env.HOME;xs.exports=function(t,e,r,s){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Jt()(process.argv.slice(2))),e=(typeof e=="string"?Qe.json(e):e)||{},s=s||Qe.parse;var i=Qe.env(t+"_"),n=[e],o=[];function a(l){if(!(o.indexOf(l)>=0)){var h=Qe.file(l);h&&(n.push(s(h)),o.push(l))}}return Ts||[Fe(ys,t,"config"),Fe(ys,t+"rc")].forEach(a),Ze&&[Fe(Ze,".config",t,"config"),Fe(Ze,".config",t),Fe(Ze,"."+t,"config"),Fe(Ze,"."+t+"rc")].forEach(a),a(Qe.find("."+t+"rc")),i.config&&a(i.config),r.config&&a(r.config),Ua.apply(null,n.concat([i,r,o.length?{configs:o,config:o[o.length-1]}:void 0]))}});var Ns=_((If,Is)=>{var ir=Xe("url"),Os=os(),Fa=Os.decodeBase64,Ma=Os.encodeBase64,bs=":_authToken",Cs=":_auth",Ss=":username",$s=":_password";Is.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||sr()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,vs(t,e)||Ba(e.npmrc)};function vs(t,e){for(var r=ir.parse(t,!1,!0),s;s!=="/"&&r.pathname!==s;){s=r.pathname||"/";var i="//"+r.host+s.replace(/\/$/,""),n=Ga(i,e.npmrc);if(n)return n;if(!e.recursive)return/\/$/.test(t)?void 0:vs(ir.resolve(t,"."),e);r.pathname=ir.resolve(qa(s),"..")||"/"}}function Ba(t){if(t._auth){var e=Et(t._auth);return{token:e,type:"Basic"}}}function qa(t){return t[t.length-1]==="/"?t:t+"/"}function Ga(t,e){var r=ja(e[t+bs]||e[t+"/"+bs]);if(r)return r;var s=e[t+Ss]||e[t+"/"+Ss],i=e[t+$s]||e[t+"/"+$s],n=Wa(s,i);if(n)return n;var o=za(e[t+Cs]||e[t+"/"+Cs]);if(o)return o}function Et(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function ja(t){if(t){var e=Et(t);return{token:e,type:"Bearer"}}}function Wa(t,e){if(!(!t||!e)){var r=Fa(Et(e)),s=Ma(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}}function za(t){if(t){var e=Et(t);return{token:e,type:"Basic"}}}});var Je=_((Nf,Ls)=>{var ka="2.0.0",Va=Number.MAX_SAFE_INTEGER||9007199254740991,Ka=16;Ls.exports={SEMVER_SPEC_VERSION:ka,MAX_LENGTH:256,MAX_SAFE_INTEGER:Va,MAX_SAFE_COMPONENT_LENGTH:Ka}});var et=_((Lf,Hs)=>{var Xa=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Hs.exports=Xa});var $e=_((xe,Ds)=>{var{MAX_SAFE_COMPONENT_LENGTH:nr}=Je(),Ya=et();xe=Ds.exports={};var Qa=xe.re=[],x=xe.src=[],b=xe.t={},Za=0,L=(t,e,r)=>{let s=Za++;Ya(t,s,e),b[t]=s,x[s]=e,Qa[s]=new RegExp(e,r?"g":void 0)};L("NUMERICIDENTIFIER","0|[1-9]\\d*");L("NUMERICIDENTIFIERLOOSE","[0-9]+");L("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");L("MAINVERSION",`(${x[b.NUMERICIDENTIFIER]})\\.(${x[b.NUMERICIDENTIFIER]})\\.(${x[b.NUMERICIDENTIFIER]})`);L("MAINVERSIONLOOSE",`(${x[b.NUMERICIDENTIFIERLOOSE]})\\.(${x[b.NUMERICIDENTIFIERLOOSE]})\\.(${x[b.NUMERICIDENTIFIERLOOSE]})`);L("PRERELEASEIDENTIFIER",`(?:${x[b.NUMERICIDENTIFIER]}|${x[b.NONNUMERICIDENTIFIER]})`);L("PRERELEASEIDENTIFIERLOOSE",`(?:${x[b.NUMERICIDENTIFIERLOOSE]}|${x[b.NONNUMERICIDENTIFIER]})`);L("PRERELEASE",`(?:-(${x[b.PRERELEASEIDENTIFIER]}(?:\\.${x[b.PRERELEASEIDENTIFIER]})*))`);L("PRERELEASELOOSE",`(?:-?(${x[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${x[b.PRERELEASEIDENTIFIERLOOSE]})*))`);L("BUILDIDENTIFIER","[0-9A-Za-z-]+");L("BUILD",`(?:\\+(${x[b.BUILDIDENTIFIER]}(?:\\.${x[b.BUILDIDENTIFIER]})*))`);L("FULLPLAIN",`v?${x[b.MAINVERSION]}${x[b.PRERELEASE]}?${x[b.BUILD]}?`);L("FULL",`^${x[b.FULLPLAIN]}$`);L("LOOSEPLAIN",`[v=\\s]*${x[b.MAINVERSIONLOOSE]}${x[b.PRERELEASELOOSE]}?${x[b.BUILD]}?`);L("LOOSE",`^${x[b.LOOSEPLAIN]}$`);L("GTLT","((?:<|>)?=?)");L("XRANGEIDENTIFIERLOOSE",`${x[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);L("XRANGEIDENTIFIER",`${x[b.NUMERICIDENTIFIER]}|x|X|\\*`);L("XRANGEPLAIN",`[v=\\s]*(${x[b.XRANGEIDENTIFIER]})(?:\\.(${x[b.XRANGEIDENTIFIER]})(?:\\.(${x[b.XRANGEIDENTIFIER]})(?:${x[b.PRERELEASE]})?${x[b.BUILD]}?)?)?`);L("XRANGEPLAINLOOSE",`[v=\\s]*(${x[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[b.XRANGEIDENTIFIERLOOSE]})(?:${x[b.PRERELEASELOOSE]})?${x[b.BUILD]}?)?)?`);L("XRANGE",`^${x[b.GTLT]}\\s*${x[b.XRANGEPLAIN]}$`);L("XRANGELOOSE",`^${x[b.GTLT]}\\s*${x[b.XRANGEPLAINLOOSE]}$`);L("COERCE",`(^|[^\\d])(\\d{1,${nr}})(?:\\.(\\d{1,${nr}}))?(?:\\.(\\d{1,${nr}}))?(?:$|[^\\d])`);L("COERCERTL",x[b.COERCE],!0);L("LONETILDE","(?:~>?)");L("TILDETRIM",`(\\s*)${x[b.LONETILDE]}\\s+`,!0);xe.tildeTrimReplace="$1~";L("TILDE",`^${x[b.LONETILDE]}${x[b.XRANGEPLAIN]}$`);L("TILDELOOSE",`^${x[b.LONETILDE]}${x[b.XRANGEPLAINLOOSE]}$`);L("LONECARET","(?:\\^)");L("CARETTRIM",`(\\s*)${x[b.LONECARET]}\\s+`,!0);xe.caretTrimReplace="$1^";L("CARET",`^${x[b.LONECARET]}${x[b.XRANGEPLAIN]}$`);L("CARETLOOSE",`^${x[b.LONECARET]}${x[b.XRANGEPLAINLOOSE]}$`);L("COMPARATORLOOSE",`^${x[b.GTLT]}\\s*(${x[b.LOOSEPLAIN]})$|^$`);L("COMPARATOR",`^${x[b.GTLT]}\\s*(${x[b.FULLPLAIN]})$|^$`);L("COMPARATORTRIM",`(\\s*)${x[b.GTLT]}\\s*(${x[b.LOOSEPLAIN]}|${x[b.XRANGEPLAIN]})`,!0);xe.comparatorTrimReplace="$1$2$3";L("HYPHENRANGE",`^\\s*(${x[b.XRANGEPLAIN]})\\s+-\\s+(${x[b.XRANGEPLAIN]})\\s*$`);L("HYPHENRANGELOOSE",`^\\s*(${x[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${x[b.XRANGEPLAINLOOSE]})\\s*$`);L("STAR","(<|>)?=?\\s*\\*");L("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");L("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var tt=_((Hf,Ps)=>{var Ja=["includePrerelease","loose","rtl"],el=t=>t?typeof t!="object"?{loose:!0}:Ja.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};Ps.exports=el});var or=_((Df,Ms)=>{var Us=/^[0-9]+$/,Fs=(t,e)=>{let r=Us.test(t),s=Us.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},tl=(t,e)=>Fs(e,t);Ms.exports={compareIdentifiers:Fs,rcompareIdentifiers:tl}});var se=_((Pf,js)=>{var At=et(),{MAX_LENGTH:Bs,MAX_SAFE_INTEGER:Rt}=Je(),{re:qs,t:Gs}=$e(),rl=tt(),{compareIdentifiers:Me}=or(),ar=class t{constructor(e,r){if(r=rl(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Bs)throw new TypeError(`version is longer than ${Bs} characters`);At("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?qs[Gs.LOOSE]:qs[Gs.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Rt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Rt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Rt||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<Rt)return n}return i}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(At("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Me(this.major,e.major)||Me(this.minor,e.minor)||Me(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(At("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Me(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(At("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Me(s,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);s===-1&&this.prerelease.push(0)}r&&(Me(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};js.exports=ar});var Oe=_((Uf,Vs)=>{var{MAX_LENGTH:sl}=Je(),{re:Ws,t:zs}=$e(),ks=se(),il=tt(),nl=(t,e)=>{if(e=il(e),t instanceof ks)return t;if(typeof t!="string"||t.length>sl||!(e.loose?Ws[zs.LOOSE]:Ws[zs.FULL]).test(t))return null;try{return new ks(t,e)}catch{return null}};Vs.exports=nl});var Xs=_((Ff,Ks)=>{var ol=Oe(),al=(t,e)=>{let r=ol(t,e);return r?r.version:null};Ks.exports=al});var Qs=_((Mf,Ys)=>{var ll=Oe(),hl=(t,e)=>{let r=ll(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Ys.exports=hl});var ei=_((Bf,Js)=>{var Zs=se(),ul=(t,e,r,s)=>{typeof r=="string"&&(s=r,r=void 0);try{return new Zs(t instanceof Zs?t.version:t,r).inc(e,s).version}catch{return null}};Js.exports=ul});var fe=_((qf,ri)=>{var ti=se(),cl=(t,e,r)=>new ti(t,r).compare(new ti(e,r));ri.exports=cl});var _t=_((Gf,si)=>{var fl=fe(),pl=(t,e,r)=>fl(t,e,r)===0;si.exports=pl});var oi=_((jf,ni)=>{var ii=Oe(),dl=_t(),ml=(t,e)=>{if(dl(t,e))return null;{let r=ii(t),s=ii(e),i=r.prerelease.length||s.prerelease.length,n=i?"pre":"",o=i?"prerelease":"";for(let a in r)if((a==="major"||a==="minor"||a==="patch")&&r[a]!==s[a])return n+a;return o}};ni.exports=ml});var li=_((Wf,ai)=>{var gl=se(),El=(t,e)=>new gl(t,e).major;ai.exports=El});var ui=_((zf,hi)=>{var Al=se(),Rl=(t,e)=>new Al(t,e).minor;hi.exports=Rl});var fi=_((kf,ci)=>{var _l=se(),wl=(t,e)=>new _l(t,e).patch;ci.exports=wl});var di=_((Vf,pi)=>{var yl=Oe(),Tl=(t,e)=>{let r=yl(t,e);return r&&r.prerelease.length?r.prerelease:null};pi.exports=Tl});var gi=_((Kf,mi)=>{var xl=fe(),bl=(t,e,r)=>xl(e,t,r);mi.exports=bl});var Ai=_((Xf,Ei)=>{var Cl=fe(),Sl=(t,e)=>Cl(t,e,!0);Ei.exports=Sl});var wt=_((Yf,_i)=>{var Ri=se(),$l=(t,e,r)=>{let s=new Ri(t,r),i=new Ri(e,r);return s.compare(i)||s.compareBuild(i)};_i.exports=$l});var yi=_((Qf,wi)=>{var Ol=wt(),vl=(t,e)=>t.sort((r,s)=>Ol(r,s,e));wi.exports=vl});var xi=_((Zf,Ti)=>{var Il=wt(),Nl=(t,e)=>t.sort((r,s)=>Il(s,r,e));Ti.exports=Nl});var rt=_((Jf,bi)=>{var Ll=fe(),Hl=(t,e,r)=>Ll(t,e,r)>0;bi.exports=Hl});var yt=_((ep,Ci)=>{var Dl=fe(),Pl=(t,e,r)=>Dl(t,e,r)<0;Ci.exports=Pl});var lr=_((tp,Si)=>{var Ul=fe(),Fl=(t,e,r)=>Ul(t,e,r)!==0;Si.exports=Fl});var Tt=_((rp,$i)=>{var Ml=fe(),Bl=(t,e,r)=>Ml(t,e,r)>=0;$i.exports=Bl});var xt=_((sp,Oi)=>{var ql=fe(),Gl=(t,e,r)=>ql(t,e,r)<=0;Oi.exports=Gl});var hr=_((ip,vi)=>{var jl=_t(),Wl=lr(),zl=rt(),kl=Tt(),Vl=yt(),Kl=xt(),Xl=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return jl(t,r,s);case"!=":return Wl(t,r,s);case">":return zl(t,r,s);case">=":return kl(t,r,s);case"<":return Vl(t,r,s);case"<=":return Kl(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};vi.exports=Xl});var Ni=_((np,Ii)=>{var Yl=se(),Ql=Oe(),{re:bt,t:Ct}=$e(),Zl=(t,e)=>{if(t instanceof Yl)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(bt[Ct.COERCE]);else{let s;for(;(s=bt[Ct.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||s.index+s[0].length!==r.index+r[0].length)&&(r=s),bt[Ct.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;bt[Ct.COERCERTL].lastIndex=-1}return r===null?null:Ql(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};Ii.exports=Zl});var Hi=_((op,Li)=>{"use strict";Li.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Pi=_((ap,Di)=>{"use strict";Di.exports=F;F.Node=ve;F.create=F;function F(t){var e=this;if(e instanceof F||(e=new F),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}F.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};F.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};F.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};F.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)eh(this,arguments[t]);return this.length};F.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)th(this,arguments[t]);return this.length};F.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};F.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};F.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};F.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};F.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};F.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};F.prototype.map=function(t,e){e=e||this;for(var r=new F,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};F.prototype.mapReverse=function(t,e){e=e||this;for(var r=new F,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};F.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;s!==null;i++)r=t(r,s.value,i),s=s.next;return r};F.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;s!==null;i--)r=t(r,s.value,i),s=s.prev;return r};F.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};F.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};F.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new F;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(;i!==null&&s<e;s++,i=i.next)r.push(i.value);return r};F.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new F;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,i=this.tail;i!==null&&s>e;s--)i=i.prev;for(;i!==null&&s>t;s--,i=i.prev)r.push(i.value);return r};F.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(var n=[],s=0;i&&s<e;s++)n.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var s=0;s<r.length;s++)i=Jl(this,i,r[s]);return n};F.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function Jl(t,e,r){var s=e===t.head?new ve(r,null,e,t):new ve(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function eh(t,e){t.tail=new ve(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function th(t,e){t.head=new ve(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function ve(t,e,r,s){if(!(this instanceof ve))return new ve(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Hi()(F)}catch{}});var qi=_((lp,Bi)=>{"use strict";var rh=Pi(),Ie=Symbol("max"),Re=Symbol("length"),Be=Symbol("lengthCalculator"),it=Symbol("allowStale"),Ne=Symbol("maxAge"),Ae=Symbol("dispose"),Ui=Symbol("noDisposeOnSet"),te=Symbol("lruList"),me=Symbol("cache"),Mi=Symbol("updateAgeOnGet"),ur=()=>1,fr=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[Ie]=e.max||1/0,s=e.length||ur;if(this[Be]=typeof s!="function"?ur:s,this[it]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ne]=e.maxAge||0,this[Ae]=e.dispose,this[Ui]=e.noDisposeOnSet||!1,this[Mi]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ie]=e||1/0,st(this)}get max(){return this[Ie]}set allowStale(e){this[it]=!!e}get allowStale(){return this[it]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ne]=e,st(this)}get maxAge(){return this[Ne]}set lengthCalculator(e){typeof e!="function"&&(e=ur),e!==this[Be]&&(this[Be]=e,this[Re]=0,this[te].forEach(r=>{r.length=this[Be](r.value,r.key),this[Re]+=r.length})),st(this)}get lengthCalculator(){return this[Be]}get length(){return this[Re]}get itemCount(){return this[te].length}rforEach(e,r){r=r||this;for(let s=this[te].tail;s!==null;){let i=s.prev;Fi(this,e,s,r),s=i}}forEach(e,r){r=r||this;for(let s=this[te].head;s!==null;){let i=s.next;Fi(this,e,s,r),s=i}}keys(){return this[te].toArray().map(e=>e.key)}values(){return this[te].toArray().map(e=>e.value)}reset(){this[Ae]&&this[te]&&this[te].length&&this[te].forEach(e=>this[Ae](e.key,e.value)),this[me]=new Map,this[te]=new rh,this[Re]=0}dump(){return this[te].map(e=>St(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[te]}set(e,r,s){if(s=s||this[Ne],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let i=s?Date.now():0,n=this[Be](r,e);if(this[me].has(e)){if(n>this[Ie])return qe(this,this[me].get(e)),!1;let l=this[me].get(e).value;return this[Ae]&&(this[Ui]||this[Ae](e,l.value)),l.now=i,l.maxAge=s,l.value=r,this[Re]+=n-l.length,l.length=n,this.get(e),st(this),!0}let o=new pr(e,r,n,i,s);return o.length>this[Ie]?(this[Ae]&&this[Ae](e,r),!1):(this[Re]+=o.length,this[te].unshift(o),this[me].set(e,this[te].head),st(this),!0)}has(e){if(!this[me].has(e))return!1;let r=this[me].get(e).value;return!St(this,r)}get(e){return cr(this,e,!0)}peek(e){return cr(this,e,!1)}pop(){let e=this[te].tail;return e?(qe(this,e),e.value):null}del(e){qe(this,this[me].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let i=e[s],n=i.e||0;if(n===0)this.set(i.k,i.v);else{let o=n-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[me].forEach((e,r)=>cr(this,r,!1))}},cr=(t,e,r)=>{let s=t[me].get(e);if(s){let i=s.value;if(St(t,i)){if(qe(t,s),!t[it])return}else r&&(t[Mi]&&(s.value.now=Date.now()),t[te].unshiftNode(s));return i.value}},St=(t,e)=>{if(!e||!e.maxAge&&!t[Ne])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ne]&&r>t[Ne]},st=t=>{if(t[Re]>t[Ie])for(let e=t[te].tail;t[Re]>t[Ie]&&e!==null;){let r=e.prev;qe(t,e),e=r}},qe=(t,e)=>{if(e){let r=e.value;t[Ae]&&t[Ae](r.key,r.value),t[Re]-=r.length,t[me].delete(r.key),t[te].removeNode(e)}},pr=class{constructor(e,r,s,i,n){this.key=e,this.value=r,this.length=s,this.now=i,this.maxAge=n||0}},Fi=(t,e,r,s)=>{let i=r.value;St(t,i)&&(qe(t,r),t[it]||(i=void 0)),i&&e.call(s,i.value,i.key,t)};Bi.exports=fr});var pe=_((hp,zi)=>{var dr=class t{constructor(e,r){if(r=ih(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof mr)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!ji(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&hh(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let s=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=Gi.get(s);if(i)return i;let n=this.options.loose,o=n?le[oe.HYPHENRANGELOOSE]:le[oe.HYPHENRANGE];e=e.replace(o,Rh(this.options.includePrerelease)),K("hyphen replace",e),e=e.replace(le[oe.COMPARATORTRIM],oh),K("comparator trim",e),e=e.replace(le[oe.TILDETRIM],ah),e=e.replace(le[oe.CARETTRIM],lh),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(u=>uh(u,this.options)).join(" ").split(/\s+/).map(u=>Ah(u,this.options));n&&(a=a.filter(u=>(K("loose invalid filter",u,this.options),!!u.match(le[oe.COMPARATORLOOSE])))),K("range list",a);let l=new Map,h=a.map(u=>new mr(u,this.options));for(let u of h){if(ji(u))return[u];l.set(u.value,u)}l.size>1&&l.has("")&&l.delete("");let c=[...l.values()];return Gi.set(s,c),c}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Wi(s,r)&&e.set.some(i=>Wi(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new nh(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(_h(this.set[r],e,this.options))return!0;return!1}};zi.exports=dr;var sh=qi(),Gi=new sh({max:1e3}),ih=tt(),mr=nt(),K=et(),nh=se(),{re:le,t:oe,comparatorTrimReplace:oh,tildeTrimReplace:ah,caretTrimReplace:lh}=$e(),ji=t=>t.value==="<0.0.0-0",hh=t=>t.value==="",Wi=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},uh=(t,e)=>(K("comp",t,e),t=ph(t,e),K("caret",t),t=ch(t,e),K("tildes",t),t=mh(t,e),K("xrange",t),t=Eh(t,e),K("stars",t),t),ae=t=>!t||t.toLowerCase()==="x"||t==="*",ch=(t,e)=>t.trim().split(/\s+/).map(r=>fh(r,e)).join(" "),fh=(t,e)=>{let r=e.loose?le[oe.TILDELOOSE]:le[oe.TILDE];return t.replace(r,(s,i,n,o,a)=>{K("tilde",t,s,i,n,o,a);let l;return ae(i)?l="":ae(n)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:ae(o)?l=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(K("replaceTilde pr",a),l=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):l=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,K("tilde return",l),l})},ph=(t,e)=>t.trim().split(/\s+/).map(r=>dh(r,e)).join(" "),dh=(t,e)=>{K("caret",t,e);let r=e.loose?le[oe.CARETLOOSE]:le[oe.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,l)=>{K("caret",t,i,n,o,a,l);let h;return ae(n)?h="":ae(o)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:ae(a)?n==="0"?h=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:l?(K("replaceCaret pr",l),n==="0"?o==="0"?h=`>=${n}.${o}.${a}-${l} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}-${l} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a}-${l} <${+n+1}.0.0-0`):(K("no pr"),n==="0"?o==="0"?h=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),K("caret return",h),h})},mh=(t,e)=>(K("replaceXRanges",t,e),t.split(/\s+/).map(r=>gh(r,e)).join(" ")),gh=(t,e)=>{t=t.trim();let r=e.loose?le[oe.XRANGELOOSE]:le[oe.XRANGE];return t.replace(r,(s,i,n,o,a,l)=>{K("xRange",t,s,i,n,o,a,l);let h=ae(n),c=h||ae(o),u=c||ae(a),d=u;return i==="="&&d&&(i=""),l=e.includePrerelease?"-0":"",h?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&d?(c&&(o=0),a=0,i===">"?(i=">=",c?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",c?n=+n+1:o=+o+1),i==="<"&&(l="-0"),s=`${i+n}.${o}.${a}${l}`):c?s=`>=${n}.0.0${l} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`),K("xRange return",s),s})},Eh=(t,e)=>(K("replaceStars",t,e),t.trim().replace(le[oe.STAR],"")),Ah=(t,e)=>(K("replaceGTE0",t,e),t.trim().replace(le[e.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),Rh=t=>(e,r,s,i,n,o,a,l,h,c,u,d,p)=>(ae(s)?r="":ae(i)?r=`>=${s}.0.0${t?"-0":""}`:ae(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ae(h)?l="":ae(c)?l=`<${+h+1}.0.0-0`:ae(u)?l=`<${h}.${+c+1}.0-0`:d?l=`<=${h}.${c}.${u}-${d}`:t?l=`<${h}.${c}.${+u+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),_h=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(K(t[s].semver),t[s].semver!==mr.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var nt=_((up,Yi)=>{var ot=Symbol("SemVer ANY"),Ar=class t{static get ANY(){return ot}constructor(e,r){if(r=wh(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}Er("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===ot?this.value="":this.value=this.operator+this.semver.version,Er("comp",this)}parse(e){let r=this.options.loose?ki[Vi.COMPARATORLOOSE]:ki[Vi.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ki(s[2],this.options.loose):this.semver=ot}toString(){return this.value}test(e){if(Er("Comparator.test",e,this.options.loose),this.semver===ot||e===ot)return!0;if(typeof e=="string")try{e=new Ki(e,this.options)}catch{return!1}return gr(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Xi(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Xi(this.value,r).test(e.semver);let s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=gr(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=gr(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||i||n&&o||a||l}};Yi.exports=Ar;var wh=tt(),{re:ki,t:Vi}=$e(),gr=hr(),Er=et(),Ki=se(),Xi=pe()});var at=_((cp,Qi)=>{var yh=pe(),Th=(t,e,r)=>{try{e=new yh(e,r)}catch{return!1}return e.test(t)};Qi.exports=Th});var Ji=_((fp,Zi)=>{var xh=pe(),bh=(t,e)=>new xh(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Zi.exports=bh});var tn=_((pp,en)=>{var Ch=se(),Sh=pe(),$h=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Sh(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new Ch(s,r))}),s};en.exports=$h});var sn=_((dp,rn)=>{var Oh=se(),vh=pe(),Ih=(t,e,r)=>{let s=null,i=null,n=null;try{n=new vh(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new Oh(s,r))}),s};rn.exports=Ih});var an=_((mp,on)=>{var Rr=se(),Nh=pe(),nn=rt(),Lh=(t,e)=>{t=new Nh(t,e);let r=new Rr("0.0.0");if(t.test(r)||(r=new Rr("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new Rr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||nn(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||nn(r,n))&&(r=n)}return r&&t.test(r)?r:null};on.exports=Lh});var hn=_((gp,ln)=>{var Hh=pe(),Dh=(t,e)=>{try{return new Hh(t,e).range||"*"}catch{return null}};ln.exports=Dh});var $t=_((Ep,pn)=>{var Ph=se(),fn=nt(),{ANY:Uh}=fn,Fh=pe(),Mh=at(),un=rt(),cn=yt(),Bh=xt(),qh=Tt(),Gh=(t,e,r,s)=>{t=new Ph(t,s),e=new Fh(e,s);let i,n,o,a,l;switch(r){case">":i=un,n=Bh,o=cn,a=">",l=">=";break;case"<":i=cn,n=qh,o=un,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Mh(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let c=e.set[h],u=null,d=null;if(c.forEach(p=>{p.semver===Uh&&(p=new fn(">=0.0.0")),u=u||p,d=d||p,i(p.semver,u.semver,s)?u=p:o(p.semver,d.semver,s)&&(d=p)}),u.operator===a||u.operator===l||(!d.operator||d.operator===a)&&n(t,d.semver))return!1;if(d.operator===l&&o(t,d.semver))return!1}return!0};pn.exports=Gh});var mn=_((Ap,dn)=>{var jh=$t(),Wh=(t,e,r)=>jh(t,e,">",r);dn.exports=Wh});var En=_((Rp,gn)=>{var zh=$t(),kh=(t,e,r)=>zh(t,e,"<",r);gn.exports=kh});var _n=_((_p,Rn)=>{var An=pe(),Vh=(t,e,r)=>(t=new An(t,r),e=new An(e,r),t.intersects(e));Rn.exports=Vh});var yn=_((wp,wn)=>{var Kh=at(),Xh=fe();wn.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((c,u)=>Xh(c,u,r));for(let c of o)Kh(c,e,r)?(n=c,i||(i=c)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[c,u]of s)c===u?a.push(c):!u&&c===o[0]?a.push("*"):u?c===o[0]?a.push(`<=${u}`):a.push(`${c} - ${u}`):a.push(`>=${c}`);let l=a.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return l.length<h.length?l:e}});var Sn=_((yp,Cn)=>{var Tn=pe(),Ot=nt(),{ANY:_r}=Ot,lt=at(),wr=fe(),Yh=(t,e,r={})=>{if(t===e)return!0;t=new Tn(t,r),e=new Tn(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=Qh(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Qh=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===_r){if(e.length===1&&e[0].semver===_r)return!0;r.includePrerelease?t=[new Ot(">=0.0.0-0")]:t=[new Ot(">=0.0.0")]}if(e.length===1&&e[0].semver===_r){if(r.includePrerelease)return!0;e=[new Ot(">=0.0.0")]}let s=new Set,i,n;for(let p of t)p.operator===">"||p.operator===">="?i=xn(i,p,r):p.operator==="<"||p.operator==="<="?n=bn(n,p,r):s.add(p.semver);if(s.size>1)return null;let o;if(i&&n){if(o=wr(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of s){if(i&&!lt(p,String(i),r)||n&&!lt(p,String(n),r))return null;for(let A of e)if(!lt(p,String(A),r))return!1;return!0}let a,l,h,c,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let p of e){if(c=c||p.operator===">"||p.operator===">=",h=h||p.operator==="<"||p.operator==="<=",i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(a=xn(i,p,r),a===p&&a!==i)return!1}else if(i.operator===">="&&!lt(i.semver,String(p),r))return!1}if(n){if(u&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===u.major&&p.semver.minor===u.minor&&p.semver.patch===u.patch&&(u=!1),p.operator==="<"||p.operator==="<="){if(l=bn(n,p,r),l===p&&l!==n)return!1}else if(n.operator==="<="&&!lt(n.semver,String(p),r))return!1}if(!p.operator&&(n||i)&&o!==0)return!1}return!(i&&h&&!n&&o!==0||n&&c&&!i&&o!==0||d||u)},xn=(t,e,r)=>{if(!t)return e;let s=wr(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},bn=(t,e,r)=>{if(!t)return e;let s=wr(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Cn.exports=Yh});var vn=_((Tp,On)=>{var yr=$e(),Zh=Je(),Jh=se(),$n=or(),eu=Oe(),tu=Xs(),ru=Qs(),su=ei(),iu=oi(),nu=li(),ou=ui(),au=fi(),lu=di(),hu=fe(),uu=gi(),cu=Ai(),fu=wt(),pu=yi(),du=xi(),mu=rt(),gu=yt(),Eu=_t(),Au=lr(),Ru=Tt(),_u=xt(),wu=hr(),yu=Ni(),Tu=nt(),xu=pe(),bu=at(),Cu=Ji(),Su=tn(),$u=sn(),Ou=an(),vu=hn(),Iu=$t(),Nu=mn(),Lu=En(),Hu=_n(),Du=yn(),Pu=Sn();On.exports={parse:eu,valid:tu,clean:ru,inc:su,diff:iu,major:nu,minor:ou,patch:au,prerelease:lu,compare:hu,rcompare:uu,compareLoose:cu,compareBuild:fu,sort:pu,rsort:du,gt:mu,lt:gu,eq:Eu,neq:Au,gte:Ru,lte:_u,cmp:wu,coerce:yu,Comparator:Tu,Range:xu,satisfies:bu,toComparators:Cu,maxSatisfying:Su,minSatisfying:$u,minVersion:Ou,validRange:vu,outside:Iu,gtr:Nu,ltr:Lu,intersects:Hu,simplifyRange:Du,subset:Pu,SemVer:Jh,re:yr.re,src:yr.src,tokens:yr.t,SEMVER_SPEC_VERSION:Zh.SEMVER_SPEC_VERSION,compareIdentifiers:$n.compareIdentifiers,rcompareIdentifiers:$n.rcompareIdentifiers}});var Dn=_((xp,Hn)=>{Hn.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,s=e.align||[],i=e.stringLength||function(l){return String(l).length},n=Nn(t,function(l,h){return Ln(h,function(c,u){var d=In(c);(!l[u]||d>l[u])&&(l[u]=d)}),l},[]),o=vt(t,function(l){return vt(l,function(h,c){var u=String(h);if(s[c]==="."){var d=In(u),p=n[c]+(/\./.test(u)?1:2)-(i(u)-d);return u+Array(p).join(" ")}else return u})}),a=Nn(o,function(l,h){return Ln(h,function(c,u){var d=i(c);(!l[u]||d>l[u])&&(l[u]=d)}),l},[]);return vt(o,function(l){return vt(l,function(h,c){var u=a[c]-i(h)||0,d=Array(Math.max(u+1,1)).join(" ");return s[c]==="r"||s[c]==="."?d+h:s[c]==="c"?Array(Math.ceil(u/2+1)).join(" ")+h+Array(Math.floor(u/2+1)).join(" "):h+d}).join(r).replace(/\s+$/,"")}).join(`
9
+ `)};function In(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function Nn(t,e,r){if(t.reduce)return t.reduce(e,r);for(var s=0,i=arguments.length>=3?r:t[s++];s<t.length;s++)e(i,t[s],s);return i}function Ln(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function vt(t,e){if(t.map)return t.map(e);for(var r=[],s=0;s<t.length;s++)r.push(e.call(t,t[s],s));return r}});var Bn=_(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.LRUCache=void 0;var Ge=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Un=new Set,Tr=typeof process=="object"&&process?process:{},Fn=(t,e,r,s)=>{typeof Tr.emitWarning=="function"?Tr.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},It=globalThis.AbortController,Pn=globalThis.AbortSignal;if(typeof It>"u"){Pn=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},It=class{constructor(){e()}signal=new Pn;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let t=Tr.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Fn("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var Uu=t=>!Un.has(t),Sp=Symbol("type"),be=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Mn=t=>be(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?je:null:null,je=class extends Array{constructor(e){super(e),this.fill(0)}},xr=class t{heap;length;static#i=!1;static create(e){let r=Mn(e);if(!r)return[];t.#i=!0;let s=new t(e,r);return t.#i=!1,s}constructor(e,r){if(!t.#i)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},br=class t{#i;#h;#t;#g;#O;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#E;#n;#s;#e;#c;#p;#u;#a;#A;#l;#R;#_;#d;#w;#b;#f;static unsafeExposeInternals(e){return{starts:e.#_,ttls:e.#d,sizes:e.#R,keyMap:e.#n,keyList:e.#s,valList:e.#e,next:e.#c,prev:e.#p,get head(){return e.#u},get tail(){return e.#a},free:e.#A,isBackgroundFetch:r=>e.#r(r),backgroundFetch:(r,s,i,n)=>e.#N(r,s,i,n),moveToTail:r=>e.#$(r),indexes:r=>e.#y(r),rindexes:r=>e.#T(r),isStale:r=>e.#m(r)}}get max(){return this.#i}get maxSize(){return this.#h}get calculatedSize(){return this.#E}get size(){return this.#o}get fetchMethod(){return this.#O}get dispose(){return this.#t}get disposeAfter(){return this.#g}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:h,disposeAfter:c,noDisposeOnSet:u,noUpdateTTL:d,maxSize:p=0,maxEntrySize:A=0,sizeCalculation:y,fetchMethod:I,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:w,ignoreFetchAbort:S}=e;if(r!==0&&!be(r))throw new TypeError("max option must be a nonnegative integer");let H=r?Mn(r):Array;if(!H)throw new Error("invalid max value: "+r);if(this.#i=r,this.#h=p,this.maxEntrySize=A||this.#h,this.sizeCalculation=y,this.sizeCalculation){if(!this.#h&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(I!==void 0&&typeof I!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=I,this.#b=!!I,this.#n=new Map,this.#s=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#c=new H(r),this.#p=new H(r),this.#u=0,this.#a=0,this.#A=xr.create(r),this.#o=0,this.#E=0,typeof h=="function"&&(this.#t=h),typeof c=="function"?(this.#g=c,this.#l=[]):(this.#g=void 0,this.#l=void 0),this.#w=!!this.#t,this.#f=!!this.#g,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!N,this.allowStaleOnFetchAbort=!!w,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(this.#h!==0&&!be(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!be(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#F()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=be(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!be(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#i===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#i&&!this.#h){let O="LRU_CACHE_UNBOUNDED";Uu(O)&&(Un.add(O),Fn("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",O,t))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#L(){let e=new je(this.#i),r=new je(this.#i);this.#d=e,this.#_=r,this.#H=(n,o,a=Ge.now())=>{if(r[n]=o!==0?a:0,e[n]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#m(n)&&this.delete(this.#s[n])},o+1);l.unref&&l.unref()}},this.#C=n=>{r[n]=e[n]!==0?Ge.now():0},this.#x=(n,o)=>{if(e[o]){let a=e[o],l=r[o];if(!a||!l)return;n.ttl=a,n.start=l,n.now=s||i();let h=n.now-l;n.remainingTTL=a-h}};let s=0,i=()=>{let n=Ge.now();if(this.ttlResolution>0){s=n;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#n.get(n);if(o===void 0)return 0;let a=e[o],l=r[o];if(!a||!l)return 1/0;let h=(s||i())-l;return a-h},this.#m=n=>{let o=r[n],a=e[n];return!!a&&!!o&&(s||i())-o>a}}#C=()=>{};#x=()=>{};#H=()=>{};#m=()=>!1;#F(){let e=new je(this.#i);this.#E=0,this.#R=e,this.#S=r=>{this.#E-=e[r],e[r]=0},this.#D=(r,s,i,n)=>{if(this.#r(s))return 0;if(!be(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(s,r),!be(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#v=(r,s,i)=>{if(e[r]=s,this.#h){let n=this.#h-e[r];for(;this.#E>n;)this.#I(!0)}this.#E+=e[r],i&&(i.entrySize=s,i.totalCalculatedSize=this.#E)}}#S=e=>{};#v=(e,r,s)=>{};#D=(e,r,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#y({allowStale:e=this.allowStale}={}){if(this.#o)for(let r=this.#a;!(!this.#P(r)||((e||!this.#m(r))&&(yield r),r===this.#u));)r=this.#p[r]}*#T({allowStale:e=this.allowStale}={}){if(this.#o)for(let r=this.#u;!(!this.#P(r)||((e||!this.#m(r))&&(yield r),r===this.#a));)r=this.#c[r]}#P(e){return e!==void 0&&this.#n.get(this.#s[e])===e}*entries(){for(let e of this.#y())this.#e[e]!==void 0&&this.#s[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#s[e],this.#e[e]])}*rentries(){for(let e of this.#T())this.#e[e]!==void 0&&this.#s[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#s[e],this.#e[e]])}*keys(){for(let e of this.#y()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*rkeys(){for(let e of this.#T()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*values(){for(let e of this.#y())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#T())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let s of this.#y()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#s[s],this))return this.get(this.#s[s],r)}}forEach(e,r=this){for(let s of this.#y()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#s[s],this)}}rforEach(e,r=this){for(let s of this.#T()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#s[s],this)}}purgeStale(){let e=!1;for(let r of this.#T({allowStale:!0}))this.#m(r)&&(this.delete(this.#s[r]),e=!0);return e}info(e){let r=this.#n.get(e);if(r===void 0)return;let s=this.#e[r],i=this.#r(s)?s.__staleWhileFetching:s;if(i===void 0)return;let n={value:i};if(this.#d&&this.#_){let o=this.#d[r],a=this.#_[r];if(o&&a){let l=o-(Ge.now()-a);n.ttl=l,n.start=Date.now()}}return this.#R&&(n.size=this.#R[r]),n}dump(){let e=[];for(let r of this.#y({allowStale:!0})){let s=this.#s[r],i=this.#e[r],n=this.#r(i)?i.__staleWhileFetching:i;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#d&&this.#_){o.ttl=this.#d[r];let a=Ge.now()-this.#_[r];o.start=Math.floor(Date.now()-a)}this.#R&&(o.size=this.#R[r]),e.unshift([s,o])}return e}load(e){this.clear();for(let[r,s]of e){if(s.start){let i=Date.now()-s.start;s.start=Ge.now()-i}this.set(r,s.value,s)}}set(e,r,s={}){if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,c=this.#D(e,r,s.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let u=this.#o===0?void 0:this.#n.get(e);if(u===void 0)u=this.#o===0?this.#a:this.#A.length!==0?this.#A.pop():this.#o===this.#i?this.#I(!1):this.#o,this.#s[u]=e,this.#e[u]=r,this.#n.set(e,u),this.#c[this.#a]=u,this.#p[u]=this.#a,this.#a=u,this.#o++,this.#v(u,c,l),l&&(l.set="add"),h=!1;else{this.#$(u);let d=this.#e[u];if(r!==d){if(this.#b&&this.#r(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;p!==void 0&&!o&&(this.#w&&this.#t?.(p,e,"set"),this.#f&&this.#l?.push([p,e,"set"]))}else o||(this.#w&&this.#t?.(d,e,"set"),this.#f&&this.#l?.push([d,e,"set"]));if(this.#S(u),this.#v(u,c,l),this.#e[u]=r,l){l.set="replace";let p=d&&this.#r(d)?d.__staleWhileFetching:d;p!==void 0&&(l.oldValue=p)}}else l&&(l.set="update")}if(i!==0&&!this.#d&&this.#L(),this.#d&&(h||this.#H(u,i,n),l&&this.#x(l,u)),!o&&this.#f&&this.#l){let d=this.#l,p;for(;p=d?.shift();)this.#g?.(...p)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#u];if(this.#I(!0),this.#r(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#g?.(...r)}}}#I(e){let r=this.#u,s=this.#s[r],i=this.#e[r];return this.#b&&this.#r(i)?i.__abortController.abort(new Error("evicted")):(this.#w||this.#f)&&(this.#w&&this.#t?.(i,s,"evict"),this.#f&&this.#l?.push([i,s,"evict"])),this.#S(r),e&&(this.#s[r]=void 0,this.#e[r]=void 0,this.#A.push(r)),this.#o===1?(this.#u=this.#a=0,this.#A.length=0):this.#u=this.#c[r],this.#n.delete(s),this.#o--,r}has(e,r={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=r,n=this.#n.get(e);if(n!==void 0){let o=this.#e[n];if(this.#r(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#m(n))i&&(i.has="stale",this.#x(i,n));else return s&&this.#C(n),i&&(i.has="hit",this.#x(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:s=this.allowStale}=r,i=this.#n.get(e);if(i===void 0||!s&&this.#m(i))return;let n=this.#e[i];return this.#r(n)?n.__staleWhileFetching:n}#N(e,r,s,i){let n=r===void 0?void 0:this.#e[r];if(this.#r(n))return n;let o=new It,{signal:a}=s;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:s,context:i},h=(y,I=!1)=>{let{aborted:E}=o.signal,C=s.ignoreFetchAbort&&y!==void 0;if(s.status&&(E&&!I?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,C&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),E&&!C&&!I)return u(o.signal.reason);let N=p;return this.#e[r]===p&&(y===void 0?N.__staleWhileFetching?this.#e[r]=N.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,y,l.options))),y},c=y=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=y),u(y)),u=y=>{let{aborted:I}=o.signal,E=I&&s.allowStaleOnFetchAbort,C=E||s.allowStaleOnFetchRejection,N=C||s.noDeleteOnFetchRejection,w=p;if(this.#e[r]===p&&(!N||w.__staleWhileFetching===void 0?this.delete(e):E||(this.#e[r]=w.__staleWhileFetching)),C)return s.status&&w.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw y},d=(y,I)=>{let E=this.#O?.(e,n,l);E&&E instanceof Promise&&E.then(C=>y(C===void 0?void 0:C),I),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(y(void 0),s.allowStaleOnFetchAbort&&(y=C=>h(C,!0)))})};s.status&&(s.status.fetchDispatched=!0);let p=new Promise(d).then(h,c),A=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,A,{...l.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=A,A}#r(e){if(!this.#b)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof It}async fetch(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:y,forceRefresh:I=!1,status:E,signal:C}=r;if(!this.#b)return E&&(E.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:E});let N={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:A,ignoreFetchAbort:p,status:E,signal:C},w=this.#n.get(e);if(w===void 0){E&&(E.fetch="miss");let S=this.#N(e,w,N,y);return S.__returned=S}else{let S=this.#e[w];if(this.#r(S)){let g=s&&S.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",g&&(E.returnedStale=!0)),g?S.__staleWhileFetching:S.__returned=S}let H=this.#m(w);if(!I&&!H)return E&&(E.fetch="hit"),this.#$(w),i&&this.#C(w),E&&this.#x(E,w),S;let O=this.#N(e,w,N,y),v=O.__staleWhileFetching!==void 0&&s;return E&&(E.fetch=H?"stale":"refresh",v&&H&&(E.returnedStale=!0)),v?O.__staleWhileFetching:O.__returned=O}}get(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=r,a=this.#n.get(e);if(a!==void 0){let l=this.#e[a],h=this.#r(l);return o&&this.#x(o,a),this.#m(a)?(o&&(o.get="stale"),h?(o&&s&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?l.__staleWhileFetching:void 0):(n||this.delete(e),o&&s&&(o.returnedStale=!0),s?l:void 0)):(o&&(o.get="hit"),h?l.__staleWhileFetching:(this.#$(a),i&&this.#C(a),l))}else o&&(o.get="miss")}#U(e,r){this.#p[r]=e,this.#c[e]=r}#$(e){e!==this.#a&&(e===this.#u?this.#u=this.#c[e]:this.#U(this.#p[e],this.#c[e]),this.#U(this.#a,e),this.#a=e)}delete(e){let r=!1;if(this.#o!==0){let s=this.#n.get(e);if(s!==void 0)if(r=!0,this.#o===1)this.clear();else{this.#S(s);let i=this.#e[s];if(this.#r(i)?i.__abortController.abort(new Error("deleted")):(this.#w||this.#f)&&(this.#w&&this.#t?.(i,e,"delete"),this.#f&&this.#l?.push([i,e,"delete"])),this.#n.delete(e),this.#s[s]=void 0,this.#e[s]=void 0,s===this.#a)this.#a=this.#p[s];else if(s===this.#u)this.#u=this.#c[s];else{let n=this.#p[s];this.#c[n]=this.#c[s];let o=this.#c[s];this.#p[o]=this.#p[s]}this.#o--,this.#A.push(s)}}if(this.#f&&this.#l?.length){let s=this.#l,i;for(;i=s?.shift();)this.#g?.(...i)}return r}clear(){for(let e of this.#T({allowStale:!0})){let r=this.#e[e];if(this.#r(r))r.__abortController.abort(new Error("deleted"));else{let s=this.#s[e];this.#w&&this.#t?.(r,s,"delete"),this.#f&&this.#l?.push([r,s,"delete"])}}if(this.#n.clear(),this.#e.fill(void 0),this.#s.fill(void 0),this.#d&&this.#_&&(this.#d.fill(0),this.#_.fill(0)),this.#R&&this.#R.fill(0),this.#u=0,this.#a=0,this.#A.length=0,this.#E=0,this.#o=0,this.#f&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#g?.(...r)}}};Nt.LRUCache=br});var jn=_((Op,Gn)=>{"use strict";var M=(...t)=>t.every(e=>e)?t.join(""):"",Q=t=>t?encodeURIComponent(t):"",qn=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Fu={sshtemplate:({domain:t,user:e,project:r,committish:s})=>`git@${t}:${e}/${r}.git${M("#",s)}`,sshurltemplate:({domain:t,user:e,project:r,committish:s})=>`git+ssh://git@${t}/${e}/${r}.git${M("#",s)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i,path:n})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s||"HEAD"),"/",n)}`,browsetemplate:({domain:t,user:e,project:r,committish:s,treepath:i})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Q(s||"HEAD")}/${n}${M("#",a(o||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:s,blobpath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Q(s||"HEAD")}/${n}${M("#",a(o||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:s,committish:i})=>`https://${t}/${e}/${r}${M("/",s,"/",Q(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/raw/${Q(s||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:s})=>`${t}:${e}/${r}${M("#",s)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${M("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:qn},Ce={};Ce.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:s,path:i})=>`https://${M(t,"@")}raw.githubusercontent.com/${e}/${r}/${Q(s||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://codeload.${t}/${e}/${r}/tar.gz/${Q(s||"HEAD")}`,extract:t=>{let[,e,r,s,i]=t.pathname.split("/",5);if(!(s&&s!=="tree")&&(s||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};Ce.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,editpath:o})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s||"HEAD"),"/",n,o)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/get/${Q(s||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["get"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};Ce.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${Q(s||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),s=r.pop();s.endsWith(".git")&&(s=s.slice(0,-4));let i=r.join("/");if(!(!i||!s))return{user:i,project:s,committish:t.hash.slice(1)}}};Ce.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${M("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${M("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i})=>`https://${t}/${e}/${r}${M("/",Q(s))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${M("/",Q(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${M("/",Q(r))}${M("#",i(s))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${M("/",Q(r))}${M("#",i(s))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${M("/",Q(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${M("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:s})=>`https://gist.githubusercontent.com/${t}/${e}/raw${M("/",Q(r))}/${s}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${M("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${M("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${M("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${Q(e||"HEAD")}`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(s!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+qn(t)}};Ce.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/blob/${Q(s)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}.git${M("#",s)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/archive/${Q(s)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["archive"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(Ce))Ce[t]=Object.assign({},Fu,e);Gn.exports=Ce});var Sr=_((vp,zn)=>{var Mu=Xe("url"),Cr=(t,e,r)=>{let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)},Wn=t=>{try{return new Mu.URL(t)}catch{}},Bu=(t,e)=>{let r=t.indexOf(":"),s=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,s))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},qu=t=>{let e=Cr(t,"@","#"),r=Cr(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Cr(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};zn.exports=(t,e)=>{let r=e?Bu(t,e):t;return Wn(r)||Wn(qu(r))}});var Vn=_((Ip,kn)=>{"use strict";var Gu=Sr(),ju=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),s=t.indexOf("/",r+1),i=t.indexOf(":"),n=/\s/.exec(t),o=t.indexOf("@"),a=!n||e>-1&&n.index>e,l=o===-1||e>-1&&o>e,h=i===-1||e>-1&&i>e,c=s===-1||e>-1&&s>e,u=r>0,d=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return a&&u&&d&&p&&l&&h&&c};kn.exports=(t,e,{gitHosts:r,protocols:s})=>{if(!t)return;let i=ju(t)?`github:${t}`:t,n=Gu(i,s);if(!n)return;let o=r.byShortcut[n.protocol],a=r.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=o||a;if(!l)return;let h=r[o||a],c=null;s[n.protocol]?.auth&&(n.username||n.password)&&(c=`${n.username}${n.password?":"+n.password:""}`);let u=null,d=null,p=null,A=null;try{if(o){let y=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,I=y.indexOf("@");I>-1&&(y=y.slice(I+1));let E=y.lastIndexOf("/");E>-1?(d=decodeURIComponent(y.slice(0,E)),d||(d=null),p=decodeURIComponent(y.slice(E+1))):p=decodeURIComponent(y),p.endsWith(".git")&&(p=p.slice(0,-4)),n.hash&&(u=decodeURIComponent(n.hash.slice(1))),A="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let y=h.extract(n);if(!y)return;d=y.user&&decodeURIComponent(y.user),p=decodeURIComponent(y.project),u=decodeURIComponent(y.committish),A=s[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(y){if(y instanceof URIError)return;throw y}return[l,d,c,p,u,A,e]}});var Xn=_((Np,Kn)=>{"use strict";var{LRUCache:Wu}=Bn(),zu=jn(),ku=Vn(),Vu=Sr(),$r=new Wu({max:1e3}),Lt=class t{constructor(e,r,s,i,n,o,a={}){Object.assign(this,t.#i[e],{type:e,user:r,auth:s,project:i,committish:n,default:o,opts:a})}static#i={byShortcut:{},byDomain:{}};static#h={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,r){t.#i[e]=r,t.#i.byDomain[r.domain]=e,t.#i.byShortcut[`${e}:`]=e,t.#h[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let s=e+JSON.stringify(r||{});if(!$r.has(s)){let i=ku(e,r,{gitHosts:t.#i,protocols:t.#h});$r.set(s,i?new t(...i):void 0)}return $r.get(s)}static parseUrl(e){return Vu(e)}#t(e,r){if(typeof e!="function")return null;let s={...this,...this.opts,...r};s.path||(s.path=""),s.path.startsWith("/")&&(s.path=s.path.slice(1)),s.noCommittish&&(s.committish=null);let i=e(s);return s.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:e}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:e}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#t(this.filetemplate,{...r,path:e})}edit(e,r){return this.#t(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(zu))Lt.addHost(t,e);Kn.exports=Lt});var ht=_((Wp,co)=>{"use strict";var ge="\\\\/",ao=`[^${ge}]`,_e="\\.",oc="\\+",ac="\\?",Mt="\\/",lc="(?=.)",lo="[^/]",Hr=`(?:${Mt}|$)`,ho=`(?:^|${Mt})`,Dr=`${_e}{1,2}${Hr}`,hc=`(?!${_e})`,uc=`(?!${ho}${Dr})`,cc=`(?!${_e}{0,1}${Hr})`,fc=`(?!${Dr})`,pc=`[^.${Mt}]`,dc=`${lo}*?`,mc="/",uo={DOT_LITERAL:_e,PLUS_LITERAL:oc,QMARK_LITERAL:ac,SLASH_LITERAL:Mt,ONE_CHAR:lc,QMARK:lo,END_ANCHOR:Hr,DOTS_SLASH:Dr,NO_DOT:hc,NO_DOTS:uc,NO_DOT_SLASH:cc,NO_DOTS_SLASH:fc,QMARK_NO_DOT:pc,STAR:dc,START_ANCHOR:ho,SEP:mc},gc={...uo,SLASH_LITERAL:`[${ge}]`,QMARK:ao,STAR:`${ao}*?`,DOTS_SLASH:`${_e}{1,2}(?:[${ge}]|$)`,NO_DOT:`(?!${_e})`,NO_DOTS:`(?!(?:^|[${ge}])${_e}{1,2}(?:[${ge}]|$))`,NO_DOT_SLASH:`(?!${_e}{0,1}(?:[${ge}]|$))`,NO_DOTS_SLASH:`(?!${_e}{1,2}(?:[${ge}]|$))`,QMARK_NO_DOT:`[^.${ge}]`,START_ANCHOR:`(?:^|[${ge}])`,END_ANCHOR:`(?:[${ge}]|$)`,SEP:"\\"},Ec={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};co.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Ec,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?gc:uo}}});var ut=_(he=>{"use strict";var{REGEX_BACKSLASH:Ac,REGEX_REMOVE_BACKSLASH:Rc,REGEX_SPECIAL_CHARS:_c,REGEX_SPECIAL_CHARS_GLOBAL:wc}=ht();he.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);he.hasRegexChars=t=>_c.test(t);he.isRegexChar=t=>t.length===1&&he.hasRegexChars(t);he.escapeRegex=t=>t.replace(wc,"\\$1");he.toPosixSlashes=t=>t.replace(Ac,"/");he.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let t=navigator.platform.toLowerCase();return t==="win32"||t==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};he.removeBackslashes=t=>t.replace(Rc,e=>e==="\\"?"":e);he.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?he.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};he.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};he.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n};he.basename=(t,{windows:e}={})=>{let r=t.split(e?/[\\/]/:"/"),s=r[r.length-1];return s===""?r[r.length-2]:s}});var _o=_((kp,Ro)=>{"use strict";var fo=ut(),{CHAR_ASTERISK:Pr,CHAR_AT:yc,CHAR_BACKWARD_SLASH:ct,CHAR_COMMA:Tc,CHAR_DOT:Ur,CHAR_EXCLAMATION_MARK:Fr,CHAR_FORWARD_SLASH:Ao,CHAR_LEFT_CURLY_BRACE:Mr,CHAR_LEFT_PARENTHESES:Br,CHAR_LEFT_SQUARE_BRACKET:xc,CHAR_PLUS:bc,CHAR_QUESTION_MARK:po,CHAR_RIGHT_CURLY_BRACE:Cc,CHAR_RIGHT_PARENTHESES:mo,CHAR_RIGHT_SQUARE_BRACKET:Sc}=ht(),go=t=>t===Ao||t===ct,Eo=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},$c=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===!0||r.scanToEnd===!0,n=[],o=[],a=[],l=t,h=-1,c=0,u=0,d=!1,p=!1,A=!1,y=!1,I=!1,E=!1,C=!1,N=!1,w=!1,S=!1,H=0,O,$,v={value:"",depth:0,isGlob:!1},g=()=>h>=s,Z=()=>l.charCodeAt(h+1),z=()=>(O=$,l.charCodeAt(++h));for(;h<s;){$=z();let D;if($===ct){C=v.backslashes=!0,$=z(),$===Mr&&(E=!0);continue}if(E===!0||$===Mr){for(H++;g()!==!0&&($=z());){if($===ct){C=v.backslashes=!0,z();continue}if($===Mr){H++;continue}if(E!==!0&&$===Ur&&($=z())===Ur){if(d=v.isBrace=!0,A=v.isGlob=!0,S=!0,i===!0)continue;break}if(E!==!0&&$===Tc){if(d=v.isBrace=!0,A=v.isGlob=!0,S=!0,i===!0)continue;break}if($===Cc&&(H--,H===0)){E=!1,d=v.isBrace=!0,S=!0;break}}if(i===!0)continue;break}if($===Ao){if(n.push(h),o.push(v),v={value:"",depth:0,isGlob:!1},S===!0)continue;if(O===Ur&&h===c+1){c+=2;continue}u=h+1;continue}if(r.noext!==!0&&($===bc||$===yc||$===Pr||$===po||$===Fr)===!0&&Z()===Br){if(A=v.isGlob=!0,y=v.isExtglob=!0,S=!0,$===Fr&&h===c&&(w=!0),i===!0){for(;g()!==!0&&($=z());){if($===ct){C=v.backslashes=!0,$=z();continue}if($===mo){A=v.isGlob=!0,S=!0;break}}continue}break}if($===Pr){if(O===Pr&&(I=v.isGlobstar=!0),A=v.isGlob=!0,S=!0,i===!0)continue;break}if($===po){if(A=v.isGlob=!0,S=!0,i===!0)continue;break}if($===xc){for(;g()!==!0&&(D=z());){if(D===ct){C=v.backslashes=!0,z();continue}if(D===Sc){p=v.isBracket=!0,A=v.isGlob=!0,S=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&$===Fr&&h===c){N=v.negated=!0,c++;continue}if(r.noparen!==!0&&$===Br){if(A=v.isGlob=!0,i===!0){for(;g()!==!0&&($=z());){if($===Br){C=v.backslashes=!0,$=z();continue}if($===mo){S=!0;break}}continue}break}if(A===!0){if(S=!0,i===!0)continue;break}}r.noext===!0&&(y=!1,A=!1);let k=l,f="",m="";c>0&&(f=l.slice(0,c),l=l.slice(c),u-=c),k&&A===!0&&u>0?(k=l.slice(0,u),m=l.slice(u)):A===!0?(k="",m=l):k=l,k&&k!==""&&k!=="/"&&k!==l&&go(k.charCodeAt(k.length-1))&&(k=k.slice(0,-1)),r.unescape===!0&&(m&&(m=fo.removeBackslashes(m)),k&&C===!0&&(k=fo.removeBackslashes(k)));let j={prefix:f,input:t,start:c,base:k,glob:m,isBrace:d,isBracket:p,isGlob:A,isExtglob:y,isGlobstar:I,negated:N,negatedExtglob:w};if(r.tokens===!0&&(j.maxDepth=0,go($)||o.push(v),j.tokens=o),r.parts===!0||r.tokens===!0){let D;for(let q=0;q<n.length;q++){let ue=D?D+1:c,ee=n[q],re=t.slice(ue,ee);r.tokens&&(q===0&&c!==0?(o[q].isPrefix=!0,o[q].value=f):o[q].value=re,Eo(o[q]),j.maxDepth+=o[q].depth),(q!==0||re!=="")&&a.push(re),D=ee}if(D&&D+1<t.length){let q=t.slice(D+1);a.push(q),r.tokens&&(o[o.length-1].value=q,Eo(o[o.length-1]),j.maxDepth+=o[o.length-1].depth)}j.slashes=n,j.parts=a}return j};Ro.exports=$c});var To=_((Vp,yo)=>{"use strict";var Bt=ht(),Ee=ut(),{MAX_LENGTH:qt,POSIX_REGEX_SOURCE:Oc,REGEX_NON_SPECIAL_CHARS:vc,REGEX_SPECIAL_CHARS_BACKREF:Ic,REPLACEMENTS:wo}=Bt,Nc=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>Ee.escapeRegex(i)).join("..")}return r},ze=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,qr=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=wo[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(qt,r.maxLength):qt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],a=r.capture?"":"?:",l=Bt.globChars(r.windows),h=Bt.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:A,NO_DOT:y,NO_DOT_SLASH:I,NO_DOTS_SLASH:E,QMARK:C,QMARK_NO_DOT:N,STAR:w,START_ANCHOR:S}=l,H=T=>`(${a}(?:(?!${S}${T.dot?A:c}).)*?)`,O=r.dot?"":y,$=r.dot?C:N,v=r.bash===!0?H(r):w;r.capture&&(v=`(${v})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Ee.removePrefix(t,g),i=t.length;let Z=[],z=[],k=[],f=n,m,j=()=>g.index===i-1,D=g.peek=(T=1)=>t[g.index+T],q=g.advance=()=>t[++g.index]||"",ue=()=>t.slice(g.index+1),ee=(T="",W=0)=>{g.consumed+=T,g.index+=W},re=T=>{g.output+=T.output!=null?T.output:T.value,ee(T.value)},ce=()=>{let T=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)q(),g.start++,T++;return T%2===0?!1:(g.negated=!0,g.start++,!0)},ye=T=>{g[T]++,k.push(T)},ie=T=>{g[T]--,k.pop()},P=T=>{if(f.type==="globstar"){let W=g.braces>0&&(T.type==="comma"||T.type==="brace"),R=T.extglob===!0||Z.length&&(T.type==="pipe"||T.type==="paren");T.type!=="slash"&&T.type!=="paren"&&!W&&!R&&(g.output=g.output.slice(0,-f.output.length),f.type="star",f.value="*",f.output=v,g.output+=f.output)}if(Z.length&&T.type!=="paren"&&(Z[Z.length-1].inner+=T.value),(T.value||T.output)&&re(T),f&&f.type==="text"&&T.type==="text"){f.output=(f.output||f.value)+T.value,f.value+=T.value;return}T.prev=f,o.push(T),f=T},dt=(T,W)=>{let R={...h[W],conditions:1,inner:""};R.prev=f,R.parens=g.parens,R.output=g.output;let U=(r.capture?"(":"")+R.open;ye("parens"),P({type:T,value:W,output:g.output?"":p}),P({type:"paren",extglob:!0,value:q(),output:U}),Z.push(R)},_a=T=>{let W=T.close+(r.capture?")":""),R;if(T.type==="negate"){let U=v;if(T.inner&&T.inner.length>1&&T.inner.includes("/")&&(U=H(r)),(U!==v||j()||/^\)+$/.test(ue()))&&(W=T.close=`)$))${U}`),T.inner.includes("*")&&(R=ue())&&/^\.[^\\/.]+$/.test(R)){let V=qr(R,{...e,fastpaths:!1}).output;W=T.close=`)${V})${U})`}T.prev.type==="bos"&&(g.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:m,output:W}),ie("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let T=!1,W=t.replace(Ic,(R,U,V,ne,J,Qt)=>ne==="\\"?(T=!0,R):ne==="?"?U?U+ne+(J?C.repeat(J.length):""):Qt===0?$+(J?C.repeat(J.length):""):C.repeat(V.length):ne==="."?c.repeat(V.length):ne==="*"?U?U+ne+(J?v:""):v:U?R:`\\${R}`);return T===!0&&(r.unescape===!0?W=W.replace(/\\/g,""):W=W.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),W===t&&r.contains===!0?(g.output=t,g):(g.output=Ee.wrapOutput(W,g,e),g)}for(;!j();){if(m=q(),m==="\0")continue;if(m==="\\"){let R=D();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){m+="\\",P({type:"text",value:m});continue}let U=/^\\+/.exec(ue()),V=0;if(U&&U[0].length>2&&(V=U[0].length,g.index+=V,V%2!==0&&(m+="\\")),r.unescape===!0?m=q():m+=q(),g.brackets===0){P({type:"text",value:m});continue}}if(g.brackets>0&&(m!=="]"||f.value==="["||f.value==="[^")){if(r.posix!==!1&&m===":"){let R=f.value.slice(1);if(R.includes("[")&&(f.posix=!0,R.includes(":"))){let U=f.value.lastIndexOf("["),V=f.value.slice(0,U),ne=f.value.slice(U+2),J=Oc[ne];if(J){f.value=V+J,g.backtrack=!0,q(),!n.output&&o.indexOf(f)===1&&(n.output=p);continue}}}(m==="["&&D()!==":"||m==="-"&&D()==="]")&&(m=`\\${m}`),m==="]"&&(f.value==="["||f.value==="[^")&&(m=`\\${m}`),r.posix===!0&&m==="!"&&f.value==="["&&(m="^"),f.value+=m,re({value:m});continue}if(g.quotes===1&&m!=='"'){m=Ee.escapeRegex(m),f.value+=m,re({value:m});continue}if(m==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&P({type:"text",value:m});continue}if(m==="("){ye("parens"),P({type:"paren",value:m});continue}if(m===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ze("opening","("));let R=Z[Z.length-1];if(R&&g.parens===R.parens+1){_a(Z.pop());continue}P({type:"paren",value:m,output:g.parens?")":"\\)"}),ie("parens");continue}if(m==="["){if(r.nobracket===!0||!ue().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));m=`\\${m}`}else ye("brackets");P({type:"bracket",value:m});continue}if(m==="]"){if(r.nobracket===!0||f&&f.type==="bracket"&&f.value.length===1){P({type:"text",value:m,output:`\\${m}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ze("opening","["));P({type:"text",value:m,output:`\\${m}`});continue}ie("brackets");let R=f.value.slice(1);if(f.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(m=`/${m}`),f.value+=m,re({value:m}),r.literalBrackets===!1||Ee.hasRegexChars(R))continue;let U=Ee.escapeRegex(f.value);if(g.output=g.output.slice(0,-f.value.length),r.literalBrackets===!0){g.output+=U,f.value=U;continue}f.value=`(${a}${U}|${f.value})`,g.output+=f.value;continue}if(m==="{"&&r.nobrace!==!0){ye("braces");let R={type:"brace",value:m,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};z.push(R),P(R);continue}if(m==="}"){let R=z[z.length-1];if(r.nobrace===!0||!R){P({type:"text",value:m,output:m});continue}let U=")";if(R.dots===!0){let V=o.slice(),ne=[];for(let J=V.length-1;J>=0&&(o.pop(),V[J].type!=="brace");J--)V[J].type!=="dots"&&ne.unshift(V[J].value);U=Nc(ne,r),g.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let V=g.output.slice(0,R.outputIndex),ne=g.tokens.slice(R.tokensIndex);R.value=R.output="\\{",m=U="\\}",g.output=V;for(let J of ne)g.output+=J.output||J.value}P({type:"brace",value:m,output:U}),ie("braces"),z.pop();continue}if(m==="|"){Z.length>0&&Z[Z.length-1].conditions++,P({type:"text",value:m});continue}if(m===","){let R=m,U=z[z.length-1];U&&k[k.length-1]==="braces"&&(U.comma=!0,R="|"),P({type:"comma",value:m,output:R});continue}if(m==="/"){if(f.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",o.pop(),f=n;continue}P({type:"slash",value:m,output:d});continue}if(m==="."){if(g.braces>0&&f.type==="dot"){f.value==="."&&(f.output=c);let R=z[z.length-1];f.type="dots",f.output+=m,f.value+=m,R.dots=!0;continue}if(g.braces+g.parens===0&&f.type!=="bos"&&f.type!=="slash"){P({type:"text",value:m,output:c});continue}P({type:"dot",value:m,output:c});continue}if(m==="?"){if(!(f&&f.value==="(")&&r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("qmark",m);continue}if(f&&f.type==="paren"){let U=D(),V=m;(f.value==="("&&!/[!=<:]/.test(U)||U==="<"&&!/<([!=]|\w+>)/.test(ue()))&&(V=`\\${m}`),P({type:"text",value:m,output:V});continue}if(r.dot!==!0&&(f.type==="slash"||f.type==="bos")){P({type:"qmark",value:m,output:N});continue}P({type:"qmark",value:m,output:C});continue}if(m==="!"){if(r.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){dt("negate",m);continue}if(r.nonegate!==!0&&g.index===0){ce();continue}}if(m==="+"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("plus",m);continue}if(f&&f.value==="("||r.regex===!1){P({type:"plus",value:m,output:u});continue}if(f&&(f.type==="bracket"||f.type==="paren"||f.type==="brace")||g.parens>0){P({type:"plus",value:m});continue}P({type:"plus",value:u});continue}if(m==="@"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){P({type:"at",extglob:!0,value:m,output:""});continue}P({type:"text",value:m});continue}if(m!=="*"){(m==="$"||m==="^")&&(m=`\\${m}`);let R=vc.exec(ue());R&&(m+=R[0],g.index+=R[0].length),P({type:"text",value:m});continue}if(f&&(f.type==="globstar"||f.star===!0)){f.type="star",f.star=!0,f.value+=m,f.output=v,g.backtrack=!0,g.globstar=!0,ee(m);continue}let T=ue();if(r.noextglob!==!0&&/^\([^?]/.test(T)){dt("star",m);continue}if(f.type==="star"){if(r.noglobstar===!0){ee(m);continue}let R=f.prev,U=R.prev,V=R.type==="slash"||R.type==="bos",ne=U&&(U.type==="star"||U.type==="globstar");if(r.bash===!0&&(!V||T[0]&&T[0]!=="/")){P({type:"star",value:m,output:""});continue}let J=g.braces>0&&(R.type==="comma"||R.type==="brace"),Qt=Z.length&&(R.type==="pipe"||R.type==="paren");if(!V&&R.type!=="paren"&&!J&&!Qt){P({type:"star",value:m,output:""});continue}for(;T.slice(0,3)==="/**";){let mt=t[g.index+4];if(mt&&mt!=="/")break;T=T.slice(3),ee("/**",3)}if(R.type==="bos"&&j()){f.type="globstar",f.value+=m,f.output=H(r),g.output=f.output,g.globstar=!0,ee(m);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!ne&&j()){g.output=g.output.slice(0,-(R.output+f.output).length),R.output=`(?:${R.output}`,f.type="globstar",f.output=H(r)+(r.strictSlashes?")":"|$)"),f.value+=m,g.globstar=!0,g.output+=R.output+f.output,ee(m);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&T[0]==="/"){let mt=T[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(R.output+f.output).length),R.output=`(?:${R.output}`,f.type="globstar",f.output=`${H(r)}${d}|${d}${mt})`,f.value+=m,g.output+=R.output+f.output,g.globstar=!0,ee(m+q()),P({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&T[0]==="/"){f.type="globstar",f.value+=m,f.output=`(?:^|${d}|${H(r)}${d})`,g.output=f.output,g.globstar=!0,ee(m+q()),P({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-f.output.length),f.type="globstar",f.output=H(r),f.value+=m,g.output+=f.output,g.globstar=!0,ee(m);continue}let W={type:"star",value:m,output:v};if(r.bash===!0){W.output=".*?",(f.type==="bos"||f.type==="slash")&&(W.output=O+W.output),P(W);continue}if(f&&(f.type==="bracket"||f.type==="paren")&&r.regex===!0){W.output=m,P(W);continue}(g.index===g.start||f.type==="slash"||f.type==="dot")&&(f.type==="dot"?(g.output+=I,f.output+=I):r.dot===!0?(g.output+=E,f.output+=E):(g.output+=O,f.output+=O),D()!=="*"&&(g.output+=p,f.output+=p)),P(W)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));g.output=Ee.escapeLast(g.output,"["),ie("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing",")"));g.output=Ee.escapeLast(g.output,"("),ie("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","}"));g.output=Ee.escapeLast(g.output,"{"),ie("braces")}if(r.strictSlashes!==!0&&(f.type==="star"||f.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${d}?`}),g.backtrack===!0){g.output="";for(let T of g.tokens)g.output+=T.output!=null?T.output:T.value,T.suffix&&(g.output+=T.suffix)}return g};qr.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(qt,r.maxLength):qt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=wo[t]||t;let{DOT_LITERAL:n,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:c,NO_DOTS_SLASH:u,STAR:d,START_ANCHOR:p}=Bt.globChars(r.windows),A=r.dot?c:h,y=r.dot?u:h,I=r.capture?"":"?:",E={negated:!1,prefix:""},C=r.bash===!0?".*?":d;r.capture&&(C=`(${C})`);let N=O=>O.noglobstar===!0?C:`(${I}(?:(?!${p}${O.dot?l:n}).)*?)`,w=O=>{switch(O){case"*":return`${A}${a}${C}`;case".*":return`${n}${a}${C}`;case"*.*":return`${A}${C}${n}${a}${C}`;case"*/*":return`${A}${C}${o}${a}${y}${C}`;case"**":return A+N(r);case"**/*":return`(?:${A}${N(r)}${o})?${y}${a}${C}`;case"**/*.*":return`(?:${A}${N(r)}${o})?${y}${C}${n}${a}${C}`;case"**/.*":return`(?:${A}${N(r)}${o})?${n}${a}${C}`;default:{let $=/^(.*?)\.(\w+)$/.exec(O);if(!$)return;let v=w($[1]);return v?v+n+$[2]:void 0}}},S=Ee.removePrefix(t,E),H=w(S);return H&&r.strictSlashes!==!0&&(H+=`${o}?`),H};yo.exports=qr});var Co=_((Kp,bo)=>{"use strict";var Lc=_o(),Gr=To(),xo=ut(),Hc=ht(),Dc=t=>t&&typeof t=="object"&&!Array.isArray(t),Y=(t,e,r=!1)=>{if(Array.isArray(t)){let c=t.map(d=>Y(d,e,r));return d=>{for(let p of c){let A=p(d);if(A)return A}return!1}}let s=Dc(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=i.windows,o=s?Y.compileRe(t,e):Y.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let c={...e,ignore:null,onMatch:null,onResult:null};l=Y(i.ignore,c,r)}let h=(c,u=!1)=>{let{isMatch:d,match:p,output:A}=Y.test(c,o,e,{glob:t,posix:n}),y={glob:t,state:a,regex:o,posix:n,input:c,output:A,match:p,isMatch:d};return typeof i.onResult=="function"&&i.onResult(y),d===!1?(y.isMatch=!1,u?y:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(y),y.isMatch=!1,u?y:!1):(typeof i.onMatch=="function"&&i.onMatch(y),u?y:!0)};return r&&(h.state=a),h};Y.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},o=n.format||(i?xo.toPosixSlashes:null),a=t===s,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===s),(a===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?a=Y.matchBase(t,e,r,i):a=e.exec(l)),{isMatch:!!a,match:a,output:l}};Y.matchBase=(t,e,r)=>(e instanceof RegExp?e:Y.makeRe(e,r)).test(xo.basename(t));Y.isMatch=(t,e,r)=>Y(e,r)(t);Y.parse=(t,e)=>Array.isArray(t)?t.map(r=>Y.parse(r,e)):Gr(t,{...e,fastpaths:!1});Y.scan=(t,e)=>Lc(t,e);Y.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",a=`${n}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Y.toRegex(a,e);return s===!0&&(l.state=t),l};Y.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=Gr.fastpaths(t,e)),i.output||(i=Gr(t,e)),Y.compileRe(i,e,r,s)};Y.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Y.constants=Hc;bo.exports=Y});var vo=_((Xp,Oo)=>{"use strict";var So=Co(),Pc=ut();function $o(t,e,r=!1){return e&&(e.windows===null||e.windows===void 0)&&(e={...e,windows:Pc.isWindows()}),So(t,e,r)}Object.assign($o,So);Oo.exports=$o});var No=_((Yp,Io)=>{"use strict";var Le=class t extends Error{constructor(e,r,s){super("[ParserError] "+e,r,s),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},Gt=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},ft=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new Gt(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new Le("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new Gt(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new Le("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Le("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new Le("Must declare a parseStart method")}};ft.END=1114112;ft.Error=Le;Io.exports=ft});var Ho=_((Qp,Lo)=>{"use strict";Lo.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var jt=_((Zp,Do)=>{"use strict";Do.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var Uo=_((Jp,Po)=>{"use strict";var ke=jt(),jr=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${ke(2,this.getUTCMonth()+1)}-${ke(2,this.getUTCDate())}`,r=`${ke(2,this.getUTCHours())}:${ke(2,this.getUTCMinutes())}:${ke(2,this.getUTCSeconds())}.${ke(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};Po.exports=t=>{let e=new jr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Bo=_((ed,Mo)=>{"use strict";var Fo=jt(),Uc=global.Date,Wr=class extends Uc{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Fo(2,this.getUTCMonth()+1)}-${Fo(2,this.getUTCDate())}`}};Mo.exports=t=>{let e=new Wr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Go=_((td,qo)=>{"use strict";var Wt=jt(),zr=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${Wt(2,this.getUTCHours())}:${Wt(2,this.getUTCMinutes())}:${Wt(2,this.getUTCSeconds())}.${Wt(3,this.getUTCMilliseconds())}`}};qo.exports=t=>{let e=new zr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var jo=_((exports,module)=>{"use strict";module.exports=makeParserClass(No());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=Ho(),createDateTimeFloat=Uo(),createDate=Bo(),createTime=Go(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
10
+ `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(s){let i=this.ctx,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(s){return this.state.resultTable?this.state.resultTable.push(s):this.state.resultTable=[s],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(s){return this.returnNow({key:this.state.resultTable,value:s})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)&&(!isTable(this.ctx[s])||this.ctx[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[s]=this.ctx[s]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)||(this.ctx[s]=List()),isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[s])){let i=Table();this.ctx[s].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else{if(isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(s){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(s){return this.returnNow(s)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let s="\\u00";return this.char<16&&(s+="0"),s+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${s} instead`))}recordMultiEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(s){try{let i=parseInt(s,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(s){if(this.state.resultArr){let i=this.state.resultArr[_contentType],n=tomlType(s);if(i!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${n}`))}else this.state.resultArr=InlineList(tomlType(s));return isFloat(s)||isInteger(s)?this.state.resultArr.push(s.valueOf()):this.state.resultArr.push(s),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(s){let i=this.state.resultTable,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var zo=_((rd,Wo)=>{"use strict";Wo.exports=Fc;function Fc(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
11
11
  `,e&&e.split){let s=e.split(/\n/),i=String(Math.min(s.length,t.line+3)).length,n=" ";for(;n.length<i;)n+=" ";for(let o=Math.max(0,t.line-1);o<Math.min(s.length,t.line+2);++o){let a=String(o+1);if(a.length<i&&(a=" "+a),t.line===o){r+=a+"> "+s[o]+`
12
12
  `,r+=n+" ";for(let l=0;l<t.col;++l)r+=" ";r+=`^
13
13
  `}else r+=a+": "+s[o]+`
14
14
  `}}return t.message=r+`
15
- `,t}});var zo=_((ed,Wo)=>{"use strict";Wo.exports=Mc;var Uc=qo(),Fc=jo();function Mc(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Uc;try{return e.parse(t),e.finish()}catch(r){throw Fc(r,t)}}});function Qt({onlyFirst:t=!1}={}){let e=["[\\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(e,t?void 0:"g")}var oa=ye(Zt(),1),aa=ye(Is(),1),la=ye(rr(),1),G=ye(On(),1),ha=ye(Hn(),1),ua=ye(Kn(),1);import{cwd as Bc,stdout as qc,argv as Gc,env as zt,exit as ko}from"node:process";import{join as Zr,dirname as ca,basename as kt,resolve as Vt}from"node:path";import{lstatSync as Vo,readFileSync as Ko,truncateSync as jc,writeFileSync as Wc,accessSync as zc}from"node:fs";var ku=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Vu={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"},Ku={sec:"second",min:"minute"};function Ht(t,{now:e,noAffix:r=!1,times:s=ku,nowThreshold:i=2e3,nowString:n="now",aliases:o=!1,aliasesMap:a=Vu,longUnits:l=!1}={}){if(t=typeof t=="number"?t:Date.parse(t),e=e?typeof e=="number"?e:Date.parse(e):new Date,Number.isNaN(t))return"unknown";let h=!1,c=e-t;if(c<0&&(h=!0,c=Math.abs(c)),c<i)return n;let u,d;for(let R=0,x=s.length;R<x;R++){let I=s[R];if(!(c>=I[1])){u=Math.floor(c/I[0]),d=(l&&Ku[I[2]]||I[2])+(u>1?"s":"");break}}let p=`${h&&!r?"in ":""}${u} ${d}${!h&&!r?" ago":""}`;return o?a[p]??p:p}import $r from"node:process";import Xu from"node:os";import Xn from"node:tty";function de(t,e=globalThis.Deno?globalThis.Deno.args:$r.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:X}=$r,Dt;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Dt=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Dt=1);function Yu(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Qu(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Zu(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let s=Yu();s!==void 0&&(Dt=s);let i=r?Dt:s;if(i===0)return 0;if(r){if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(X.TERM==="dumb")return n;if($r.platform==="win32"){let o=Xu.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in X)||X.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let o=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:n}function Yn(t,e={}){let r=Zu(t,{streamIsTTY:t&&t.isTTY,...e});return Qu(r)}var Ju={stdout:Yn({isTTY:Xn.isatty(1)}),stderr:Yn({isTTY:Xn.isatty(2)})},Qn=Ju;var Zn=!0;function Jn(){Zn=!1}function Or(t,e,r){return Zn?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Pt=(...t)=>Or(t,31,39),Ut=(...t)=>Or(t,32,39);var eo=(...t)=>Or(t,35,39);var ec=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var vr=new Set(["__proto__","prototype","constructor"]),tc=new Set("0123456789");function rc(t){let e=[],r="",s="start",i=!1;for(let n of t)switch(n){case"\\":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=n),s="property",i=!i;break}case".":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="property";break}if(i){i=!1,r+=n;break}if(vr.has(r))return[];e.push(r),r="",s="property";break}case"[":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="index";break}if(i){i=!1,r+=n;break}if(s==="property"){if(vr.has(r))return[];e.push(r),r=""}s="index";break}case"]":{if(s==="index"){e.push(Number.parseInt(r,10)),r="",s="indexEnd";break}if(s==="indexEnd")throw new Error("Invalid character after an index")}default:{if(s==="index"&&!tc.has(n))throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");s==="start"&&(s="property"),i&&(i=!1,r+="\\"),r+=n}}switch(i&&(r+="\\"),s){case"property":{if(vr.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function sc(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function to(t,e,r){if(!ec(t)||typeof e!="string")return r===void 0?t:r;let s=rc(e);if(s.length===0)return r;for(let i=0;i<s.length;i++){let n=s[i];if(sc(t,n)?t=i===s.length-1?void 0:null:t=t[n],t==null){if(i!==s.length-1)return r;break}}return t===void 0?r:t}var Ir=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},ro=t=>globalThis.DOMException===void 0?new Ir(t):new DOMException(t),so=t=>{let e=t.reason===void 0?ro("This operation was aborted."):t.reason;return e instanceof Error?e:ro(e)};async function Nr(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:s=!0,signal:i}={}){return new Promise((n,o)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let a=[],l=[],h=new Map,c=!1,u=!1,d=!1,p=0,R=0,x=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),I=C=>{c=!0,u=!0,o(C)};i&&(i.aborted&&I(so(i)),i.addEventListener("abort",()=>{I(so(i))}));let E=async()=>{if(u)return;let C=await x.next(),N=R;if(R++,C.done){if(d=!0,p===0&&!u){if(!s&&l.length>0){I(new AggregateError(l));return}if(u=!0,h.size===0){n(a);return}let w=[];for(let[S,H]of a.entries())h.get(S)!==io&&w.push(H);n(w)}return}p++,(async()=>{try{let w=await C.value;if(u)return;let S=await e(w,N);S===io&&h.set(N,S),a[N]=S,p--,await E()}catch(w){if(s)I(w);else{l.push(w),p--;try{await E()}catch(S){I(S)}}}})()};(async()=>{for(let C=0;C<r;C++){try{await E()}catch(N){I(N);break}if(d||c)break}})()})}var io=Symbol("skip");async function Ft(t,e){return Nr(t,r=>r(),e)}function We(t,e){var r=0,s,i;e=e||{};function n(){var o=s,a=arguments.length,l,h;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(h=0;h<a;h++)if(o.args[h]!==arguments[h]){o=o.next;continue e}return o!==s&&(o===i&&(i=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=s,o.prev=null,s.prev=o,s=o),o.val}for(l=new Array(a),h=0;h<a;h++)l[h]=arguments[h];return o={args:l,val:t.apply(null,l)},s?(s.prev=o,o.next=s):i=o,r===e.maxSize?(i=i.prev,i.next=null):r++,s=o,o.val}return n.clear=function(){s=null,i=null,r=0},n}var Xr=ye($o(),1),kc=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Vc=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Yr=/^[0-9a-f]{7,}$/i,Xo=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Kt=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),Kc=We(ua.default.fromUrl),zr=We(aa.default),Xt=We(t=>t.endsWith("/")?t.substring(0,t.length-1):t),fa="16.0.1",we="\0",B=(0,oa.default)(Gc.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(B["no-color"]||!Qn.stdout)&&Jn();var Ve=pt(De(B.greatest)),kr=pt(De(B.prerelease)),Vr=pt(De(B.release)),Yo=pt(De(B.patch)),Qo=pt(De(B.minor)),Zo=De(B["allow-downgrade"]),pa=B.githubapi?Xt(B.githubapi):"https://api.github.com",Xc=B.pypiapi?Xt(B.pypiapi):"https://pypi.org";function He(t,e){for(let r of e instanceof Set?e:[])if(r.test(t))return!0;return!1}var Yc=We((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function da(t,e){let r=Zr(e,t);try{return zc(r),r}catch{}let s=ca(e);return s===e?null:da(t,s)}function Qc(t,e,r,s){if(t.startsWith("@")){let i=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=Xt(Yc(i,s));if(n!==e)try{let o=zr(n,r);if(o?.token)return[o,n]}catch{}return[zr(e,r),e]}else return[zr(e,r),e]}var ma=We((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${fa}`,...r&&{Authorization:`${e} ${r}`}}}));async function Jr(t,e){B.verbose&&console.error(`${eo("fetch")} ${t}`);let r=await fetch(t,e);return B.verbose&&console.error(`${r.ok?Ut("done"):Pt("error")} ${t}`),r}async function Zc(t,e,r,s,i,n){let[o,a]=Qc(t,r,i,n),h=(e==="resolutions"?kt(t):t).replace(/\//g,"%2f"),c=`${a}/${h}`,u=await Jr(c,ma(s,o?.type,o?.token));if(u?.ok)return[await u.json(),e,a,t];throw u?.status&&u?.statusText?new Error(`Received ${u.status} ${u.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function Jc(t,e,r){let s=`${Xc}/pypi/${t}/json`,i=await Jr(s,ma(r));if(i?.ok)return[await i.json(),e,null,t];throw i?.status&&i?.statusText?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function Jo({repository:t,homepage:e,info:r},s,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let n;if(s==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let o=typeof t=="string"?t:t.url,a=Kc(o),l=a?.browse?.();l&&(n=l),n&&t.directory&&a.treepath&&(n=`${n}/${a.treepath}/HEAD/${t.directory}`),!n&&t?.url&&/^https?:/.test(t.url)&&(n=t.url),!n&&o&&(n=o)}return n||e||""}function ea(t){console.info(B.json?JSON.stringify({message:t}):t),Ke()}function Ke(t){if(t){let e=t.stack??t.message;console.info(B.json?JSON.stringify({error:e}):Pt(e))}process.exit(t?1:0)}function ef(t={}){for(let r of Object.keys(t))for(let s of Object.values(t[r]))"oldPrint"in s&&(s.old=s.oldPrint,delete s.oldPrint),"newPrint"in s&&(s.new=s.newPrint,delete s.newPrint),"oldOriginal"in s&&(s.old=s.oldOriginal,delete s.oldOriginal);let e=0;for(let r of Object.keys(t))e+=Object.keys(t[r]).length;if(B.json){let r={results:{}};for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let[o,a]=i.split(we);r.results[s]||(r.results[s]={}),r.results[s][o]||(r.results[s][o]={}),r.results[s][o][a]=n}console.info(JSON.stringify(r))}else e&&console.info(rf(t));return B["error-on-outdated"]?e?2:0:B["error-on-unchanged"]?e?0:2:0}async function tf(t,e){let{platform:r}=await import("node:os"),s=r()==="win32";s&&jc(t,0),Wc(t,e,s?{flag:"r+"}:void 0)}function ta(t,e,r){if(t===e)return t;let s=t.split(/\./),i=e.split(/\./),n=/^[0-9a-zA-Z-.]+$/,o="";for(let a=0;a<s.length;a++)if(s[a]!==i[a]){n.test(s[a])?o+=r(s.slice(a).join(".")):o+=s[a].split("").map(l=>n.test(l)?r(l):l).join("")+r(`.${s.slice(a+1).join(".")}`);break}else o+=`${s[a]}.`;return o}function rf(t){let e=[["NAME","OLD","NEW","AGE","INFO"]],r=new Set;for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let o=i.split(we)[1],a=`${s}|${o}`;r.has(a)||(r.add(a),e.push([o,ta(n.old,n.new,Pt),ta(n.new,n.old,Ut),n.age||"",n.info]))}return(0,ha.default)(e,{hsep:" ",stringLength:s=>s.replace(Qt(),"").length})}function sf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(we)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`"${Kt(i)}": *"${Kt(n)}"`,"g");r=r.replace(o,`"${i}": "${e[s].new}"`)}return r}function nf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(we)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`${Kt(i)} *= *"${Kt(n)}"`,"g");r=r.replace(o,`${i} = "${e[s].new}"`)}return r}function of(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Kr(t){let e=(0,G.parse)(t);return e?!!e.prerelease.length:!1}function ga(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function af(t){try{return(0,G.coerce)(t).version}catch{return null}}function lf(t,e,{range:r,semvers:s,usePre:i,useRel:n,useGreatest:o}={}){let a=af(r),l=0;s=new Set(s),i=ga(r)||i,i&&(s.add("prerelease"),s.has("patch")&&s.add("prepatch"),s.has("minor")&&s.add("preminor"),s.has("major")&&s.add("premajor"));for(let h of e){let c=(0,G.parse)(h);if(c.prerelease.length&&(!i||n))continue;let u=(0,G.diff)(a,c.version);if(!(!u||!s.has(u)))if(o||!("time"in t))(0,G.gte)((0,G.coerce)(c.version).version,a)&&(a=c.version);else{let d=new Date(t.time[h]).getTime();d>=0&&d>l&&(a=c.version,l=d)}}return a||null}function hf(t,{mode:e,range:r,useGreatest:s,useRel:i,usePre:n,semvers:o}={}){if(r==="*"||r.includes("||"))return null;let a=Object.keys(e==="pypi"?t.releases:t.versions).filter(h=>(0,G.valid)(h)),l=lf(t,a,{range:r,semvers:o,usePre:n,useRel:i,useGreatest:s});if(s)return l;{let h,c;e==="pypi"?(c=t.info.version,h=(0,G.coerce)(t.info.version).version):h=t["dist-tags"].latest;let u=(0,G.coerce)(r).version,d=ga(r),p=Kr(l),R=Kr(h),x=(0,G.gt)(l,u);if(!i&&n||d&&p||i&&!x&&d&&!p||d&&!p&&x)return l;if(d&&!p&&!x)return null;let I=(0,G.diff)(u,h);return I&&I!=="prerelease"&&!o.has(I.replace(/^pre/,""))||i&&Kr(h)?l:(0,G.lt)(h,u)&&!R?Zo===!0||He(t.name,Zo)?h:null:c??h}}function Ea(t){let e={},r=zt.UPDATES_GITHUB_API_TOKEN||zt.GITHUB_API_TOKEN||zt.GH_TOKEN||zt.HOMEBREW_GITHUB_API_TOKEN;return r&&(e.headers={Authorization:`Bearer ${r}`}),Jr(t,e)}async function uf(t,e){let r=`${pa}/repos/${t}/${e}/commits`,s=await Ea(r);if(!s||!s.ok)return;let i=await s.json(),{sha:n,commit:o}=i[0];return{hash:n,commit:o}}async function cf(t,e){let r=await Ea(`${pa}/repos/${t}/${e}/git/refs/tags`);return!r||!r.ok?void 0:(await r.json()).map(n=>n.ref.replace(/^refs\/tags\//,""))}async function ff([t,e],{useGreatest:r}={}){let s=e.old.replace(kc,""),[i,n,o,a]=Vc.exec(s)||[];if(!(!n||!o||!a))if(Yr.test(a)){let{hash:l,commit:h}=await uf(n,o);if(!l?.length)return;let c=h?.committer?.date??h?.author?.date,u=l.substring(0,a.length);if(a!==u){let d=e.old.replace(a,u);return{key:t,newRange:d,user:n,repo:o,oldRef:a,newRef:u,newDate:c}}}else{let l=await cf(n,o),h=a.replace(/^v/,"");if(!(0,G.valid)(h))return;if(r){let c=a,u=a.replace(/^v/,"");for(let d of l){let p=d.replace(/^v/,"");(0,G.valid)(p)&&(!c||(0,G.gt)(p,u))&&(c=d,u=p)}if((0,G.neq)(h,u))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}else{let c=l.at(-1),u=c.replace(/^v/,"");if(!(0,G.valid)(u))return;if((0,G.neq)(h,u))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}}}function pf(t){let e=t.match(Xo);return e?.length!==1?t:t.replace(Xo,(0,G.coerce)(e[0]))}function De(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}function ra(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function sa(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}function Qr(t,e){return e?/\/.+\//.test(t)?new RegExp(t.slice(1,-1)):Xr.default.makeRe(t):t instanceof RegExp?t:Xr.default.makeRe(t)}function pt(t){if(t instanceof Set){let e=new Set;for(let r of t)e.add(Qr(r,!0));return e}return t}function ia(t,e){let r=new Set;for(let s of t||[])r.add(Qr(s,!0));for(let s of e||[])r.add(Qr(s,!1));return r}function na(t,e,{include:r,exclude:s}){if(e==="pypi"&&t==="python")return!1;if(!r.size&&!s.size)return!0;for(let i of s)if(i.test(t))return!1;for(let i of r)if(i.test(t))return!0;return!r.size}function df(t){let e=new Set;if(t)for(let r of t){let s;try{s=Vo(r)}catch(i){throw new Error(`Unable to open ${r}: ${i.message}`)}if(s?.isFile())e.add(Vt(r));else if(s?.isDirectory())for(let i of["package.json","pyproject.toml"]){let n=Zr(r,i),o;try{o=Vo(n)}catch{}o?.isFile()&&e.add(Vt(n))}else throw new Error(`${r} is neither a file nor directory`)}else for(let r of["package.json","pyproject.toml"]){let s=da(r,Bc());s&&e.add(Vt(s))}return e}async function mf(){for(let R of[process.stdout,process.stderr])R?._handle?.setBlocking?.(!0);let t=96,e=typeof B.sockets=="number"?parseInt(B.sockets):t,{help:r,version:s,file:i,types:n,update:o}=B;r&&(qc.write(`usage: updates [options]
15
+ `,t}});var Vo=_((sd,ko)=>{"use strict";ko.exports=qc;var Mc=jo(),Bc=zo();function qc(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Mc;try{return e.parse(t),e.finish()}catch(r){throw Bc(r,t)}}});function Zt({onlyFirst:t=!1}={}){let e=["[\\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(e,t?void 0:"g")}var la=Te(Jt(),1),ha=Te(Ns(),1),ua=Te(sr(),1),G=Te(vn(),1),ca=Te(Dn(),1),fa=Te(Xn(),1);import{cwd as Gc,stdout as jc,argv as Wc,env as zt,exit as Ko}from"node:process";import{join as Jr,dirname as pa,basename as Vt,resolve as Kt}from"node:path";import{lstatSync as Xo,readFileSync as Yo,truncateSync as zc,writeFileSync as kc,accessSync as Vc}from"node:fs";var Ku=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Xu={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"},Yu={sec:"second",min:"minute"};function Yn(t){return t instanceof Date?t.getTime():typeof t=="string"?Date.parse(t):t}function Ht(t,{now:e,noAffix:r=!1,times:s=Ku,nowThreshold:i=2e3,nowString:n="now",aliases:o=!1,aliasesMap:a=Xu,longUnits:l=!1}={}){if(t=Yn(t),e=e!==void 0?Yn(e):Date.now(),Number.isNaN(t))return"unknown";let h=!1,c=e-t;if(c<0&&(h=!0,c=Math.abs(c)),c<i)return n;let u,d;for(let A=0,y=s.length;A<y;A++){let I=s[A];if(!(c>=I[1])){u=Math.floor(c/I[0]),d=(l&&Yu[I[2]]||I[2])+(u>1?"s":"");break}}let p=`${h&&!r?"in ":""}${u} ${d}${!h&&!r?" ago":""}`;return o?a[p]??p:p}import Or from"node:process";import Qu from"node:os";import Qn from"node:tty";function de(t,e=globalThis.Deno?globalThis.Deno.args:Or.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:X}=Or,Dt;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Dt=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Dt=1);function Zu(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Ju(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function ec(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let s=Zu();s!==void 0&&(Dt=s);let i=r?Dt:s;if(i===0)return 0;if(r){if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(X.TERM==="dumb")return n;if(Or.platform==="win32"){let o=Qu.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in X)||X.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let o=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:n}function Zn(t,e={}){let r=ec(t,{streamIsTTY:t&&t.isTTY,...e});return Ju(r)}var tc={stdout:Zn({isTTY:Qn.isatty(1)}),stderr:Zn({isTTY:Qn.isatty(2)})},Jn=tc;var eo=!0;function to(){eo=!1}function vr(t,e,r){let s=t.join(" ");return eo?`\x1B[${e}m${s}\x1B[${r}m`:s}var Pt=(...t)=>vr(t,31,39),Ut=(...t)=>vr(t,32,39);var ro=(...t)=>vr(t,35,39);var rc=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Ir=new Set(["__proto__","prototype","constructor"]),sc=new Set("0123456789");function ic(t){let e=[],r="",s="start",i=!1;for(let n of t)switch(n){case"\\":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=n),s="property",i=!i;break}case".":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="property";break}if(i){i=!1,r+=n;break}if(Ir.has(r))return[];e.push(r),r="",s="property";break}case"[":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="index";break}if(i){i=!1,r+=n;break}if(s==="property"){if(Ir.has(r))return[];e.push(r),r=""}s="index";break}case"]":{if(s==="index"){e.push(Number.parseInt(r,10)),r="",s="indexEnd";break}if(s==="indexEnd")throw new Error("Invalid character after an index")}default:{if(s==="index"&&!sc.has(n))throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");s==="start"&&(s="property"),i&&(i=!1,r+="\\"),r+=n}}switch(i&&(r+="\\"),s){case"property":{if(Ir.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function nc(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function so(t,e,r){if(!rc(t)||typeof e!="string")return r===void 0?t:r;let s=ic(e);if(s.length===0)return r;for(let i=0;i<s.length;i++){let n=s[i];if(nc(t,n)?t=i===s.length-1?void 0:null:t=t[n],t==null){if(i!==s.length-1)return r;break}}return t===void 0?r:t}var Nr=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},io=t=>globalThis.DOMException===void 0?new Nr(t):new DOMException(t),no=t=>{let e=t.reason===void 0?io("This operation was aborted."):t.reason;return e instanceof Error?e:io(e)};async function Lr(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:s=!0,signal:i}={}){return new Promise((n,o)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let a=[],l=[],h=new Map,c=!1,u=!1,d=!1,p=0,A=0,y=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),I=C=>{c=!0,u=!0,o(C)};i&&(i.aborted&&I(no(i)),i.addEventListener("abort",()=>{I(no(i))}));let E=async()=>{if(u)return;let C=await y.next(),N=A;if(A++,C.done){if(d=!0,p===0&&!u){if(!s&&l.length>0){I(new AggregateError(l));return}if(u=!0,h.size===0){n(a);return}let w=[];for(let[S,H]of a.entries())h.get(S)!==oo&&w.push(H);n(w)}return}p++,(async()=>{try{let w=await C.value;if(u)return;let S=await e(w,N);S===oo&&h.set(N,S),a[N]=S,p--,await E()}catch(w){if(s)I(w);else{l.push(w),p--;try{await E()}catch(S){I(S)}}}})()};(async()=>{for(let C=0;C<r;C++){try{await E()}catch(N){I(N);break}if(d||c)break}})()})}var oo=Symbol("skip");async function Ft(t,e){return Lr(t,r=>r(),e)}function We(t,e){var r=0,s,i;e=e||{};function n(){var o=s,a=arguments.length,l,h;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(h=0;h<a;h++)if(o.args[h]!==arguments[h]){o=o.next;continue e}return o!==s&&(o===i&&(i=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=s,o.prev=null,s.prev=o,s=o),o.val}for(l=new Array(a),h=0;h<a;h++)l[h]=arguments[h];return o={args:l,val:t.apply(null,l)},s?(s.prev=o,o.next=s):i=o,r===e.maxSize?(i=i.prev,i.next=null):r++,s=o,o.val}return n.clear=function(){s=null,i=null,r=0},n}var Yr=Te(vo(),1),Kc=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Xc=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Qr=/^[0-9a-f]{7,}$/i,Qo=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Xt=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),Yc=We(fa.default.fromUrl),kr=We(ha.default),Yt=We(t=>t.endsWith("/")?t.substring(0,t.length-1):t),da="16.1.0",we="\0",B=(0,la.default)(Wc.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(B["no-color"]||!Jn.stdout)&&to();var Ve=pt(De(B.greatest)),Vr=pt(De(B.prerelease)),Kr=pt(De(B.release)),Zo=pt(De(B.patch)),Jo=pt(De(B.minor)),ea=De(B["allow-downgrade"]),ma=B.githubapi?Yt(B.githubapi):"https://api.github.com",Qc=B.pypiapi?Yt(B.pypiapi):"https://pypi.org",kt=t=>t.replace(/^v/,"");function He(t,e){for(let r of e instanceof Set?e:[])if(r.test(t))return!0;return!1}var Zc=We((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function ga(t,e){let r=Jr(e,t);try{return Vc(r),r}catch{}let s=pa(e);return s===e?null:ga(t,s)}function Jc(t,e,r,s){if(t.startsWith("@")){let i=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=Yt(Zc(i,s));if(n!==e)try{let o=kr(n,r);if(o?.token)return[o,n]}catch{}return[kr(e,r),e]}else return[kr(e,r),e]}var Ea=We((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${da}`,...r&&{Authorization:`${e} ${r}`}}}));async function es(t,e){B.verbose&&console.error(`${ro("fetch")} ${t}`);let r=await fetch(t,e);return B.verbose&&console.error(`${r.ok?Ut("done"):Pt("error")} ${t}`),r}async function ef(t,e,r,s,i,n){let[o,a]=Jc(t,r,i,n),h=(e==="resolutions"?Vt(t):t).replace(/\//g,"%2f"),c=`${a}/${h}`,u=await es(c,Ea(s,o?.type,o?.token));if(u?.ok)return[await u.json(),e,a,t];throw u?.status&&u?.statusText?new Error(`Received ${u.status} ${u.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function tf(t,e,r){let s=`${Qc}/pypi/${t}/json`,i=await es(s,Ea(r));if(i?.ok)return[await i.json(),e,null,t];throw i?.status&&i?.statusText?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function ta({repository:t,homepage:e,info:r},s,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let n;if(s==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let o=typeof t=="string"?t:t.url,a=Yc(o),l=a?.browse?.();l&&(n=l),n&&t.directory&&a.treepath&&(n=`${n}/${a.treepath}/HEAD/${t.directory}`),!n&&t?.url&&/^https?:/.test(t.url)&&(n=t.url),!n&&o&&(n=o)}return n||e||""}function ra(t){console.info(B.json?JSON.stringify({message:t}):t),Ke()}function Ke(t){if(t){let e=t.stack??t.message;console.info(B.json?JSON.stringify({error:e}):Pt(e))}process.exit(t?1:0)}function rf(t={}){for(let r of Object.keys(t))for(let s of Object.values(t[r]))"oldPrint"in s&&(s.old=s.oldPrint,delete s.oldPrint),"newPrint"in s&&(s.new=s.newPrint,delete s.newPrint),"oldOriginal"in s&&(s.old=s.oldOriginal,delete s.oldOriginal);let e=0;for(let r of Object.keys(t))e+=Object.keys(t[r]).length;if(B.json){let r={results:{}};for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let[o,a]=i.split(we);r.results[s]||(r.results[s]={}),r.results[s][o]||(r.results[s][o]={}),r.results[s][o][a]=n}console.info(JSON.stringify(r))}else e&&console.info(nf(t));return B["error-on-outdated"]?e?2:0:B["error-on-unchanged"]?e?0:2:0}async function sf(t,e){let{platform:r}=await import("node:os"),s=r()==="win32";s&&zc(t,0),kc(t,e,s?{flag:"r+"}:void 0)}function sa(t,e,r){if(t===e)return t;let s=t.split(/\./),i=e.split(/\./),n=/^[0-9a-zA-Z-.]+$/,o="";for(let a=0;a<s.length;a++)if(s[a]!==i[a]){n.test(s[a])?o+=r(s.slice(a).join(".")):o+=s[a].split("").map(l=>n.test(l)?r(l):l).join("")+r(`.${s.slice(a+1).join(".")}`);break}else o+=`${s[a]}.`;return o}function nf(t){let e=[["NAME","OLD","NEW","AGE","INFO"]],r=new Set;for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let o=i.split(we)[1],a=`${s}|${o}`;r.has(a)||(r.add(a),e.push([o,sa(n.old,n.new,Pt),sa(n.new,n.old,Ut),n.age||"",n.info]))}return(0,ca.default)(e,{hsep:" ",stringLength:s=>s.replace(Zt(),"").length})}function of(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(we)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`"${Xt(i)}": *"${Xt(n)}"`,"g");r=r.replace(o,`"${i}": "${e[s].new}"`)}return r}function af(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(we)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`${Xt(i)} *= *"${Xt(n)}"`,"g");r=r.replace(o,`${i} = "${e[s].new}"`)}return r}function lf(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Xr(t){let e=(0,G.parse)(t);return e?!!e.prerelease.length:!1}function Aa(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function hf(t){try{return(0,G.coerce)(t).version}catch{return null}}function uf(t,e,{range:r,semvers:s,usePre:i,useRel:n,useGreatest:o}={}){let a=hf(r),l=0;s=new Set(s),i=Aa(r)||i,i&&(s.add("prerelease"),s.has("patch")&&s.add("prepatch"),s.has("minor")&&s.add("preminor"),s.has("major")&&s.add("premajor"));for(let h of e){let c=(0,G.parse)(h);if(c.prerelease.length&&(!i||n))continue;let u=(0,G.diff)(a,c.version);if(!(!u||!s.has(u)))if(o||!("time"in t))(0,G.gte)((0,G.coerce)(c.version).version,a)&&(a=c.version);else{let d=new Date(t.time[h]).getTime();d>=0&&d>l&&(a=c.version,l=d)}}return a||null}function cf(t,{mode:e,range:r,useGreatest:s,useRel:i,usePre:n,semvers:o}={}){if(r==="*"||r.includes("||"))return null;let a=Object.keys(e==="pypi"?t.releases:t.versions).filter(h=>(0,G.valid)(h)),l=uf(t,a,{range:r,semvers:o,usePre:n,useRel:i,useGreatest:s});if(s)return l;{let h,c;e==="pypi"?(c=t.info.version,h=(0,G.coerce)(t.info.version).version):h=t["dist-tags"].latest;let u=(0,G.coerce)(r).version,d=Aa(r),p=Xr(l),A=Xr(h),y=(0,G.gt)(l,u);if(!i&&n||d&&p||i&&!y&&d&&!p||d&&!p&&y)return l;if(d&&!p&&!y)return null;let I=(0,G.diff)(u,h);return I&&I!=="prerelease"&&!o.has(I.replace(/^pre/,""))||i&&Xr(h)?l:(0,G.lt)(h,u)&&!A?ea===!0||He(t.name,ea)?h:null:c??h}}function Ra(t){let e={},r=zt.UPDATES_GITHUB_API_TOKEN||zt.GITHUB_API_TOKEN||zt.GH_TOKEN||zt.HOMEBREW_GITHUB_API_TOKEN;return r&&(e.headers={Authorization:`Bearer ${r}`}),es(t,e)}async function ff(t,e){let r=`${ma}/repos/${t}/${e}/commits`,s=await Ra(r);if(!s||!s.ok)return;let i=await s.json(),{sha:n,commit:o}=i[0];return{hash:n,commit:o}}async function pf(t,e){let r=await Ra(`${ma}/repos/${t}/${e}/git/refs/tags`);return!r||!r.ok?void 0:(await r.json()).map(n=>n.ref.replace(/^refs\/tags\//,""))}function df(t,e,r){let s=kt(e);if((0,G.valid)(s))if(r){let i=e,n=kt(e);for(let o of t){let a=kt(o);(0,G.valid)(a)&&(!i||(0,G.gt)(a,n))&&(i=o,n=a)}if((0,G.neq)(s,n))return i}else{let i=t.at(-1),n=kt(i);if(!(0,G.valid)(n))return;if((0,G.neq)(s,n))return i}}async function mf([t,e],{useGreatest:r}={}){let s=e.old.replace(Kc,""),[i,n,o,a]=Xc.exec(s)||[];if(!(!n||!o||!a))if(Qr.test(a)){let{hash:l,commit:h}=await ff(n,o);if(!l?.length)return;let c=h?.committer?.date??h?.author?.date,u=l.substring(0,a.length);if(a!==u){let d=e.old.replace(a,u);return{key:t,newRange:d,user:n,repo:o,oldRef:a,newRef:u,newDate:c}}}else{let l=await pf(n,o),h=df(l,a,r);if(h)return{key:t,newRange:h,user:n,repo:o,oldRef:a,newRef:h}}}function gf(t){let e=t.match(Qo);return e?.length!==1?t:t.replace(Qo,(0,G.coerce)(e[0]))}function De(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}function ia(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function na(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}function Zr(t,e){return e?/\/.+\//.test(t)?new RegExp(t.slice(1,-1)):Yr.default.makeRe(t):t instanceof RegExp?t:Yr.default.makeRe(t)}function pt(t){if(t instanceof Set){let e=new Set;for(let r of t)e.add(Zr(r,!0));return e}return t}function oa(t,e){let r=new Set;for(let s of t||[])r.add(Zr(s,!0));for(let s of e||[])r.add(Zr(s,!1));return r}function aa(t,e,{include:r,exclude:s}){if(e==="pypi"&&t==="python")return!1;if(!r.size&&!s.size)return!0;for(let i of s)if(i.test(t))return!1;for(let i of r)if(i.test(t))return!0;return!r.size}function Ef(t){let e=new Set;if(t)for(let r of t){let s;try{s=Xo(r)}catch(i){throw new Error(`Unable to open ${r}: ${i.message}`)}if(s?.isFile())e.add(Kt(r));else if(s?.isDirectory())for(let i of["package.json","pyproject.toml"]){let n=Jr(r,i),o;try{o=Xo(n)}catch{}o?.isFile()&&e.add(Kt(n))}else throw new Error(`${r} is neither a file nor directory`)}else for(let r of["package.json","pyproject.toml"]){let s=ga(r,Gc());s&&e.add(Kt(s))}return e}async function Af(){for(let A of[process.stdout,process.stderr])A?._handle?.setBlocking?.(!0);let t=96,e=typeof B.sockets=="number"?parseInt(B.sockets):t,{help:r,version:s,file:i,types:n,update:o}=B;r&&(jc.write(`usage: updates [options]
16
16
 
17
17
  Options:
18
18
  -u, --update Update versions and write package file
@@ -43,4 +43,4 @@ var Aa=Object.create;var es=Object.defineProperty;var _a=Object.getOwnPropertyDe
43
43
  $ updates -e '/^react-(dom)?/'
44
44
  $ updates -f package.json
45
45
  $ updates -f pyproject.toml
46
- `),ko(0)),s&&(console.info(fa),ko(0));let a={},l={},h={},c={},u=0;for(let R of df(De(i))){let x=ca(Vt(R)),E=kt(R)==="pyproject.toml"?"pypi":"npm";c[E]=R,a[E]||(a[E]={});let C={};try{({default:C}=await Promise.any(["updates.config.js","updates.config.mjs",".config/updates.js",".config/updates.mjs"].map(f=>import(Zr(x,...f.split("/"))))))}catch{}let N,w;B.include&&B.include!==!0&&(N=(Array.isArray(B.include)?B.include:[B.include]).flatMap(f=>f.split(","))),B.exclude&&B.exclude!==!0&&(w=(Array.isArray(B.exclude)?B.exclude:[B.exclude]).flatMap(f=>f.split(",")));let S=ia(N,C?.include),H=ia(w,C?.exclude),O={},$=(0,la.default)("npm",{registry:"https://registry.npmjs.org"}),v={npmrc:$,recursive:!0};E==="npm"&&($["strict-ssl"]===!1&&(O.rejectUnauthorized=!1),$?.cafile&&(O.ca=sa(ra(Ko($.cafile,"utf8")))),$?.ca&&(O.ca=sa(Array.isArray($.ca)?$.ca:[$.ca].map(f=>ra(f)))));let g;n?g=Array.isArray(n)?n:n.split(","):"types"in C&&Array.isArray(C.types)?g=C.types:E==="npm"?g=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:g=["tool.poetry.dependencies","tool.poetry.dev-dependencies","tool.poetry.test-dependencies","tool.poetry.group.dev.dependencies","tool.poetry.group.test.dependencies"];let Z;try{h[E]=Ko(R,"utf8")}catch(f){throw new Error(`Unable to open ${R}: ${f.message}`)}try{E==="npm"?Z=JSON.parse(h[E]):Z=(await Promise.resolve().then(()=>ye(zo(),1))).default(h[E])}catch(f){throw new Error(`Error parsing ${R}: ${f.message}`)}for(let f of g){let m;E==="npm"?m=Z[f]||{}:m=to(Z,f)||{};for(let[j,D]of Object.entries(m))(0,G.validRange)(D)&&na(j,E,{include:S,exclude:H})?a[E][`${f}${we}${j}`]={old:pf(D),oldOriginal:D}:E==="npm"&&na(j,E,{include:S,exclude:H})&&(l[`${f}${we}${j}`]={old:D})}if(u+=Object.keys(a[E]).length+Object.keys(l).length,!u)continue;let z;E==="npm"&&(z=Xt(B.registry||C.registry||$.registry));let k=await Ft(Object.keys(a[E]).map(f=>()=>{let[m,j]=f.split(we);return E==="npm"?Zc(j,m,z,O,v,$):Jc(j,m,O)}),{concurrency:e});for(let[f,m,j,D]of k){if(f?.error)throw new Error(f.error);let q=typeof Ve=="boolean"?Ve:He(f.name,Ve),ue=typeof kr=="boolean"?kr:He(f.name,kr),ee=typeof Vr=="boolean"?Vr:He(f.name,Vr),re;Yo===!0||He(f.name,Yo)?re=new Set(["patch"]):Qo===!0||He(f.name,Qo)?re=new Set(["patch","minor"]):re=new Set(["patch","minor","major"]);let ce=`${m}${we}${D}`,xe=a[E][ce].old,ie=hf(f,{usePre:ue,useRel:ee,useGreatest:q,semvers:re,range:xe,mode:E}),P=of(xe,ie);!ie||xe===P?delete a[E][ce]:(a[E][ce].new=P,E==="npm"?a[E][ce].info=Jo(f?.versions?.[ie],j,f.name):a[E][ce].info=Jo(f,j,f.info.name),f.time?.[ie]?a[E][ce].age=Ht(f.time[ie],{noAffix:!0}):f.releases?.[ie]?.[0]?.upload_time_iso_8601&&(a[E][ce].age=Ht(f.releases[ie][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(l).length){let f=await Ft(Object.entries(l).map(([m,j])=>()=>{let D=m.split(we)[1],q=typeof Ve=="boolean"?Ve:He(D,Ve);return ff([m,j],{useGreatest:q})}),{concurrency:e});for(let m of(f||[]).filter(Boolean)){let{key:j,newRange:D,user:q,repo:ue,oldRef:ee,newRef:re,newDate:ce}=m;a[E][j]={old:l[j].old,new:D,oldPrint:Yr.test(ee)?ee.substring(0,7):ee,newPrint:Yr.test(re)?re.substring(0,7):re,info:`https://github.com/${q}/${ue}`,...ce?{age:Ht(ce,{noAffix:!0})}:{}}}}}u===0&&(ea("No dependencies found, nothing to do."),Ke());let d=0;for(let R of Object.keys(a))d+=Object.keys(a[R]).length;d||(ea("All dependencies are up to date."),Ke());let p=ef(a);if(o){for(let R of Object.keys(a))if(Object.keys(a[R]).length){try{let x=R==="npm"?sf:nf;await tf(c[R],x(h[R],a[R]))}catch(x){throw new Error(`Error writing ${kt(c[R])}: ${x.message}`)}console.info(Ut(`\u2728 ${kt(c[R])} updated`))}}Ke(p)}mf().catch(Ke).then(Ke);
46
+ `),Ko(0)),s&&(console.info(da),Ko(0));let a={},l={},h={},c={},u=0;for(let A of Ef(De(i))){let y=pa(Kt(A)),E=Vt(A)==="pyproject.toml"?"pypi":"npm";c[E]=A,a[E]||(a[E]={});let C={};try{({default:C}=await Promise.any(["updates.config.js","updates.config.ts","updates.config.mjs","updates.config.mts",".config/updates.js",".config/updates.ts",".config/updates.mjs",".config/updates.mts"].map(f=>import(Jr(y,...f.split("/"))))))}catch{}let N,w;B.include&&B.include!==!0&&(N=(Array.isArray(B.include)?B.include:[B.include]).flatMap(f=>f.split(","))),B.exclude&&B.exclude!==!0&&(w=(Array.isArray(B.exclude)?B.exclude:[B.exclude]).flatMap(f=>f.split(",")));let S=oa(N,C?.include),H=oa(w,C?.exclude),O={},$=(0,ua.default)("npm",{registry:"https://registry.npmjs.org"}),v={npmrc:$,recursive:!0};E==="npm"&&($["strict-ssl"]===!1&&(O.rejectUnauthorized=!1),$?.cafile&&(O.ca=na(ia(Yo($.cafile,"utf8")))),$?.ca&&(O.ca=na(Array.isArray($.ca)?$.ca:[$.ca].map(f=>ia(f)))));let g;n?g=Array.isArray(n)?n:n.split(","):"types"in C&&Array.isArray(C.types)?g=C.types:E==="npm"?g=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:g=["tool.poetry.dependencies","tool.poetry.dev-dependencies","tool.poetry.test-dependencies","tool.poetry.group.dev.dependencies","tool.poetry.group.test.dependencies"];let Z;try{h[E]=Yo(A,"utf8")}catch(f){throw new Error(`Unable to open ${A}: ${f.message}`)}try{E==="npm"?Z=JSON.parse(h[E]):Z=(await Promise.resolve().then(()=>Te(Vo(),1))).default(h[E])}catch(f){throw new Error(`Error parsing ${A}: ${f.message}`)}for(let f of g){let m;E==="npm"?m=Z[f]||{}:m=so(Z,f)||{};for(let[j,D]of Object.entries(m))(0,G.validRange)(D)&&aa(j,E,{include:S,exclude:H})?a[E][`${f}${we}${j}`]={old:gf(D),oldOriginal:D}:E==="npm"&&aa(j,E,{include:S,exclude:H})&&(l[`${f}${we}${j}`]={old:D})}if(u+=Object.keys(a[E]).length+Object.keys(l).length,!u)continue;let z;E==="npm"&&(z=Yt(B.registry||C.registry||$.registry));let k=await Ft(Object.keys(a[E]).map(f=>()=>{let[m,j]=f.split(we);return E==="npm"?ef(j,m,z,O,v,$):tf(j,m,O)}),{concurrency:e});for(let[f,m,j,D]of k){if(f?.error)throw new Error(f.error);let q=typeof Ve=="boolean"?Ve:He(f.name,Ve),ue=typeof Vr=="boolean"?Vr:He(f.name,Vr),ee=typeof Kr=="boolean"?Kr:He(f.name,Kr),re;Zo===!0||He(f.name,Zo)?re=new Set(["patch"]):Jo===!0||He(f.name,Jo)?re=new Set(["patch","minor"]):re=new Set(["patch","minor","major"]);let ce=`${m}${we}${D}`,ye=a[E][ce].old,ie=cf(f,{usePre:ue,useRel:ee,useGreatest:q,semvers:re,range:ye,mode:E}),P=lf(ye,ie);!ie||ye===P?delete a[E][ce]:(a[E][ce].new=P,E==="npm"?a[E][ce].info=ta(f?.versions?.[ie],j,f.name):a[E][ce].info=ta(f,j,f.info.name),f.time?.[ie]?a[E][ce].age=Ht(f.time[ie],{noAffix:!0}):f.releases?.[ie]?.[0]?.upload_time_iso_8601&&(a[E][ce].age=Ht(f.releases[ie][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(l).length){let f=await Ft(Object.entries(l).map(([m,j])=>()=>{let D=m.split(we)[1],q=typeof Ve=="boolean"?Ve:He(D,Ve);return mf([m,j],{useGreatest:q})}),{concurrency:e});for(let m of(f||[]).filter(Boolean)){let{key:j,newRange:D,user:q,repo:ue,oldRef:ee,newRef:re,newDate:ce}=m;a[E][j]={old:l[j].old,new:D,oldPrint:Qr.test(ee)?ee.substring(0,7):ee,newPrint:Qr.test(re)?re.substring(0,7):re,info:`https://github.com/${q}/${ue}`,...ce?{age:Ht(ce,{noAffix:!0})}:{}}}}}u===0&&(ra("No dependencies found, nothing to do."),Ke());let d=0;for(let A of Object.keys(a))d+=Object.keys(a[A]).length;d||(ra("All dependencies are up to date."),Ke());let p=rf(a);if(o){for(let A of Object.keys(a))if(Object.keys(a[A]).length){try{let y=A==="npm"?of:af;await sf(c[A],y(h[A],a[A]))}catch(y){throw new Error(`Error writing ${Vt(c[A])}: ${y.message}`)}console.info(Ut(`\u2728 ${Vt(c[A])} updated`))}}Ke(p)}Af().catch(Ke).then(Ke);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "updates",
3
- "version": "16.0.1",
3
+ "version": "16.1.0",
4
4
  "description": "Flexible npm and poetry dependency update tool",
5
5
  "author": "silverwind",
6
6
  "repository": "silverwind/updates",
@@ -16,13 +16,13 @@
16
16
  "devDependencies": {
17
17
  "@iarna/toml": "2.2.5",
18
18
  "ansi-regex": "6.0.1",
19
- "dot-prop": "8.0.2",
20
- "esbuild": "0.20.2",
19
+ "dot-prop": "9.0.0",
20
+ "esbuild": "0.21.3",
21
21
  "eslint": "8.57.0",
22
- "eslint-config-silverwind": "83.0.1",
23
- "execa": "8.0.1",
24
- "glowie": "1.2.0",
25
- "hosted-git-info": "7.0.1",
22
+ "eslint-config-silverwind": "85.1.2",
23
+ "execa": "9.1.0",
24
+ "glowie": "1.3.1",
25
+ "hosted-git-info": "7.0.2",
26
26
  "memize": "2.1.0",
27
27
  "minimist": "1.2.8",
28
28
  "p-all": "5.0.0",
@@ -33,9 +33,9 @@
33
33
  "semver": "7.3.8",
34
34
  "supports-color": "9.4.0",
35
35
  "text-table": "0.2.0",
36
- "timerel": "5.5.0",
36
+ "timerel": "5.6.3",
37
37
  "versions": "12.0.1",
38
- "vitest": "1.4.0",
39
- "vitest-config-silverwind": "7.0.3"
38
+ "vitest": "1.6.0",
39
+ "vitest-config-silverwind": "9.0.6"
40
40
  }
41
41
  }