@capgo/cli 4.14.2 → 4.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -280,7 +280,7 @@ GFS4: `),console.error(e)});At[Ur]||(S1e=global[Ur]||[],A1e(At,S1e),At.close=fun
280
280
  `;function P1e(e,t){var r=[],i="";typeof t=="string"?t={section:t,whitespace:!1}:(t=t||{},t.whitespace=t.whitespace===!0);var n=t.whitespace?" = ":"=";return Object.keys(e).forEach(function(s,a,o){var u=e[s];u&&Array.isArray(u)?u.forEach(function(l){i+=Mf(s+"[]")+n+Mf(l)+`
281
281
  `}):u&&typeof u=="object"?r.push(s):i+=Mf(s)+n+Mf(u)+BO}),t.section&&i.length&&(i="["+Mf(t.section)+"]"+BO+i),r.forEach(function(s,a,o){var u=I1e(s).join("\\."),l=(t.section?t.section+".":"")+u,c=P1e(e[s],{section:l,whitespace:t.whitespace});i.length&&c.length&&(i+=BO),i+=c}),i}function I1e(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function rZe(e){var t={},r=t,i=null,n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,s=e.split(/[\r\n]+/g);return s.forEach(function(a,o,u){if(!(!a||a.match(/^\s*[;#]/))){var l=a.match(n);if(l){if(l[1]!==void 0){if(i=yy(l[1]),i==="__proto__"){r={};return}r=t[i]=t[i]||{};return}var c=yy(l[2]);if(c!=="__proto__"){var d=l[3]?yy(l[4]):!0;switch(d){case"true":case"false":case"null":d=JSON.parse(d)}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(d):r[c]=d}}}}),Object.keys(t).filter(function(a,o,u){if(!t[a]||typeof t[a]!="object"||Array.isArray(t[a]))return!1;var l=I1e(a),c=t,d=l.pop(),p=d.replace(/\\\./g,".");return l.forEach(function(f,h,g){f!=="__proto__"&&((!c[f]||typeof c[f]!="object")&&(c[f]={}),c=c[f])}),c===t&&p===d?!1:(c[p]=t[a],!0)}).forEach(function(a,o,u){delete t[a]}),t}function L1e(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function Mf(e){return typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&L1e(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function yy(e,t){if(e=(e||"").trim(),L1e(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var r=!1,i="",n=0,s=e.length;n<s;n++){var a=e.charAt(n);if(r)"\\;#".indexOf(a)!==-1?i+=a:i+="\\"+a,r=!1;else{if(";#".indexOf(a)!==-1)break;a==="\\"?r=!0:i+=a}}return r&&(i+="\\"),i.trim()}return e}});var M1e=m((Oo,$1e)=>{var q1e=R1e(),h2=require("path"),vy=require("fs"),qO=B1e(),jO=require("events").EventEmitter,iZe=require("url"),nZe=require("http"),Oo=$1e.exports=function(){for(var e=[].slice.call(arguments),t=new ii;e.length;){var r=e.shift();r&&t.push(typeof r=="string"?aZe(r):r)}return t},Z4t=Oo.find=function(){var e=h2.join.apply(null,[].slice.call(arguments));function t(r,i){var n=h2.join(r,i);try{return vy.statSync(n),n}catch{if(h2.dirname(r)!==r)return t(h2.dirname(r),i)}}return t(__dirname,e)},sZe=Oo.parse=function(e,t,r){if(e=""+e,r)if(r==="json")if(this.emit)try{return JSON.parse(e)}catch(i){this.emit("error",i)}else return JSON.parse(e);else return qO.parse(e);else try{return JSON.parse(e)}catch{return qO.parse(e)}},aZe=Oo.json=function(){var e=[].slice.call(arguments).filter(function(i){return i!=null}),t=h2.join.apply(null,e),r;try{r=vy.readFileSync(t,"utf-8")}catch{return}return sZe(r,t,"json")},Q4t=Oo.env=function(e,t){t=t||process.env;var r={},i=e.length;for(var n in t)n.indexOf(e)===0&&(r[n.substring(i)]=t[n]);return r};Oo.ConfigChain=ii;function ii(){jO.apply(this),q1e.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var j1e={constructor:{value:ii}};Object.keys(jO.prototype).forEach(function(e){j1e[e]=Object.getOwnPropertyDescriptor(jO.prototype,e)});ii.prototype=Object.create(q1e.prototype,j1e);ii.prototype.del=function(e,t){if(t){var r=this.sources[t];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+t));delete r[e]}else for(var i=0,n=this.list.length;i<n;i++)delete this.list[i][e];return this};ii.prototype.set=function(e,t,r){var i;if(r){if(i=this.sources[r],i=i&&i.data,!i)return this.emit("error",new Error("not found "+r))}else if(i=this.list[0],!i)return this.emit("error",new Error("cannot set, no confs!"));return i[e]=t,this};ii.prototype.get=function(e,t){return t?(t=this.sources[t],t&&(t=t.data),t&&Object.hasOwnProperty.call(t,e)?t[e]:void 0):this.list[0][e]};ii.prototype.save=function(e,s,r){typeof s=="function"&&(r=s,s=null);var i=this.sources[e];if(!i||!(i.path||i.source)||!i.data)return this.emit("error",new Error("bad save target: "+e));if(i.source){var n=i.prefix||"";return Object.keys(i.data).forEach(function(o){i.source[n+o]=i.data[o]}),this}var s=s||i.type,a=i.data;return i.type==="json"?a=JSON.stringify(a):a=qO.stringify(a),this._saving++,vy.writeFile(i.path,a,"utf8",function(o){if(this._saving--,o)return r?r(o):this.emit("error",o);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};ii.prototype.addFile=function(e,t,r){r=r||e;var i={__source__:r};return this.sources[r]={path:e,type:t},this.push(i),this._await(),vy.readFile(e,"utf8",function(n,s){n&&this.emit("error",n),this.addString(s,e,t,i)}.bind(this)),this};ii.prototype.addEnv=function(e,t,r){r=r||"env";var i=Oo.env(e,t);return this.sources[r]={data:i,source:t,prefix:e},this.add(i,r)};ii.prototype.addUrl=function(e,t,r){this._await();var i=iZe.format(e);r=r||i;var n={__source__:r};return this.sources[r]={href:i,type:t},this.push(n),nZe.request(e,function(s){var a=[],o=s.headers["content-type"];t||(t=o.indexOf("json")!==-1?"json":o.indexOf("ini")!==-1?"ini":i.match(/\.json$/)?"json":i.match(/\.ini$/)?"ini":null,n.type=t),s.on("data",a.push.bind(a)).on("end",function(){this.addString(Buffer.concat(a),i,t,n)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};ii.prototype.addString=function(e,t,r,i){return e=this.parse(e,t,r),this.add(e,i),this};ii.prototype.add=function(e,t){if(t&&typeof t=="object"){var r=this.list.indexOf(t);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,e),t=t.__source__,this.sources[t]=this.sources[t]||{},this.sources[t].data=e,this._resolve()}else typeof t=="string"&&(this.sources[t]=this.sources[t]||{},this.sources[t].data=e),this._await(),this.push(e),process.nextTick(this._resolve.bind(this));return this};ii.prototype.parse=Oo.parse;ii.prototype._await=function(){this._awaiting++};ii.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var V1e=m((egt,U1e)=>{U1e.exports=function(e){let t=e.indexOf(":");if(t===-1)return $O(e);let r=e.substr(0,t),i=e.substr(t+1);return`${$O(r)}:${$O(i)}`};function $O(e){if(e=e.toLowerCase(),e==="_authtoken")return"_authToken";let t=e[0];for(let r=1;r<e.length;r++)t+=e[r]==="_"?"-":e[r];return t}});var H1e=m(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0});wy.envReplace=void 0;var oZe=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function uZe(e,t){return e.replace(oZe,lZe.bind(null,t))}wy.envReplace=uZe;function lZe(e,t,r,i){if(r.length%2)return t.slice((r.length+1)/2);let n=dZe(e,i);if(n===void 0)throw new Error(`Failed to replace env in config: ${t}`);return`${r.slice(r.length/2)}${n}`}var cZe=/([^:-]+)(:?)-(.+)/;function dZe(e,t){let r=t.match(cZe);if(!r)return e[t];let[,i,n,s]=r;return Object.prototype.hasOwnProperty.call(e,i)?!e[i]&&n?s:e[i]:s}});var z1e=m(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.envReplace=void 0;var pZe=H1e();Object.defineProperty(_y,"envReplace",{enumerable:!0,get:function(){return pZe.envReplace}})});var W1e=m(Dy=>{"use strict";var fZe=require("fs"),qc=require("path"),{envReplace:G1e}=z1e(),hZe=(e,t,r)=>{if(typeof t!="string")return t;let i=[].concat(e[r]),n=i.indexOf(qc)!==-1,s=i.indexOf(Boolean)!==-1,a=i.indexOf(String)!==-1,o=i.indexOf(Number)!==-1;if(t=`${t}`.trim(),/^".*"$/.test(t))try{t=JSON.parse(t)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${t}`)}if(s&&!a&&t==="")return!0;switch(t){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return t=G1e(t,process.env),n&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(t)&&process.env.HOME&&(t=qc.resolve(process.env.HOME,t.substr(2))),t=qc.resolve(t)),o&&!isNaN(t)&&(t=Number(t)),t},mZe=e=>{e=qc.resolve(e);let t=!1;for(;qc.basename(e)==="node_modules";)e=qc.dirname(e),t=!0;if(t)return e;let r=(i,n)=>{let s=/^[a-zA-Z]:(\\|\/)?$/;if(i==="/"||process.platform==="win32"&&s.test(i))return n;try{let a=fZe.readdirSync(i);if(a.includes("node_modules")||a.includes("package.json")||a.includes("package.json5")||a.includes("package.yaml")||a.includes("pnpm-workspace.yaml"))return i;let o=qc.dirname(i);return o===i?n:r(o,n)}catch(a){if(i===n){if(a.code==="ENOENT")return n;throw a}return n}};return r(e,e)};Dy.envReplace=G1e;Dy.findPrefix=mZe;Dy.parseField=hZe});var X1e=m(Y1e=>{"use strict";var jc=require("path"),gZe=require("stream").Stream,by=require("url"),yZe=()=>{},vZe=()=>[],K1e=()=>{};Y1e.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:jc,cache:jc,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:jc,"global-style":Boolean,group:[Number,String],"https-proxy":[null,by],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":jc,"init-author-name":String,"init-author-email":String,"init-author-url":["",by],"init-license":String,"init-version":K1e,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":vZe(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:gZe,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,K1e],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:jc,production:Boolean,progress:Boolean,proxy:[null,!1,by],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,by],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:jc,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:jc,umask:yZe,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var ehe=m((sgt,Q1e)=>{"use strict";var{readCAFileSync:wZe}=F1e(),J1e=require("fs"),MO=require("path"),{ConfigChain:_Ze}=M1e(),DZe=V1e(),Z1e=W1e(),UO=class extends _Ze{constructor(t,r){super(t),this.root=t,this._parseField=Z1e.parseField.bind(null,r||X1e())}add(t,r){try{for(let i of Object.keys(t))t[i]=this._parseField(t[i],i)}catch(i){throw i}return super.add(t,r)}addFile(t,r){r=r||t;let i={__source__:r};this.sources[r]={path:t,type:"ini"},this.push(i),this._await();try{let n=J1e.readFileSync(t,"utf8");this.addString(n,t,"ini",i)}catch(n){if(n.code==="ENOENT")this.add({},i);else return`Issue while reading "${t}". ${n.message}`}}addEnv(t){t=t||process.env;let r={};return Object.keys(t).filter(i=>/^npm_config_/i.test(i)).forEach(i=>{t[i]&&(r[DZe(i.substr(11))]=t[i])}),super.addEnv("",r,"env")}loadPrefix(){let t=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:i=>{let n=this.get("global");this[n?"globalPrefix":"localPrefix"]=i},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:i=>{this.set("prefix",i)},get:()=>MO.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:i=>{r=i},get:()=>r}),Object.prototype.hasOwnProperty.call(t,"prefix"))r=MO.resolve(t.prefix);else try{r=Z1e.findPrefix(process.cwd())}catch(i){throw i}return r}loadCAFile(t){if(!t)return;let r=wZe(t);r&&this.set("ca",r)}loadUser(){let t=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){t.user=Number(process.env.SUDO_UID);return}let r=MO.resolve(this.get("prefix"));try{let i=J1e.statSync(r);t.user=i.uid}catch(i){if(i.code==="ENOENT")return;throw i}}};Q1e.exports=UO});var ahe=m(she=>{"use strict";var ihe=require("os"),Fo=require("path"),nhe=ihe.tmpdir(),bZe=process.getuid?process.getuid():process.pid,EZe=()=>!0,the=process.platform==="win32",rhe={editor:()=>process.env.EDITOR||process.env.VISUAL||(the?"notepad.exe":"vi"),shell:()=>the?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},xZe={fromString:()=>process.umask()},Uf=ihe.homedir();Uf?process.env.HOME=Uf:Uf=Fo.resolve(nhe,"npm-"+bZe);var SZe=process.platform==="win32"?"npm-cache":".npm",CZe=process.platform==="win32"&&process.env.APPDATA||Uf,AZe=Fo.resolve(CZe,SZe),Ey,$c;Object.defineProperty(she,"defaults",{get:function(){return Ey||(process.env.PREFIX?$c=process.env.PREFIX:process.platform==="win32"?$c=Fo.dirname(process.execPath):($c=Fo.dirname(Fo.dirname(process.execPath)),process.env.DESTDIR&&($c=Fo.join(process.env.DESTDIR,$c))),Ey={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:AZe,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:rhe.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Fo.resolve($c,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Fo.resolve(Uf,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:$c,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:15*60,"send-metrics":!1,shell:rhe.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:nhe,unicode:EZe(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:Fo.resolve(Uf,".npmrc"),umask:process.umask?process.umask():xZe.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},Ey)}})});var uhe=m((ogt,VO)=>{"use strict";var Mc=require("path"),TZe=ehe(),ohe=ahe();VO.exports=(e,t,r)=>{let i=new TZe(Object.assign({},ohe.defaults,r),t);i.add(Object.assign({},e),"cli");let n=[],s=!1;if(require.resolve.paths){let l=require.resolve.paths("npm"),c;try{c=require.resolve("npm",{paths:l.slice(-1)})}catch{s=!0}c&&n.push(i.addFile(Mc.resolve(Mc.dirname(c),"..","npmrc"),"builtin"))}i.addEnv(),i.loadPrefix();let a=Mc.resolve(i.localPrefix,".npmrc"),o=i.get("userconfig");if(!i.get("global")&&a!==o?n.push(i.addFile(a,"project")):i.add({},"project"),i.get("workspace-prefix")&&i.get("workspace-prefix")!==a){let l=Mc.resolve(i.get("workspace-prefix"),".npmrc");n.push(i.addFile(l,"workspace"))}if(n.push(i.addFile(i.get("userconfig"),"user")),i.get("prefix")){let l=Mc.resolve(i.get("prefix"),"etc");i.root.globalconfig=Mc.resolve(l,"npmrc"),i.root.globalignorefile=Mc.resolve(l,"npmignore")}n.push(i.addFile(i.get("globalconfig"),"global")),i.loadUser();let u=i.get("cafile");return u&&i.loadCAFile(u),{config:i,warnings:n.filter(Boolean),failedToLoadBuiltInConfig:s}};Object.defineProperty(VO.exports,"defaults",{get(){return ohe.defaults},enumerable:!0})});var ghe=m((ugt,mhe)=>{var HO=require("url"),lhe=uhe(),che=":_authToken",dhe=":_auth",phe=":username",fhe=":_password";mhe.exports=function(){let t,r;arguments.length>=2?(t=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?t=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let i=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:n=>i[n]}}:lhe()).config,t=t||r.npmrc.get("registry")||lhe.defaults.registry,hhe(t,r)||OZe(r.npmrc)};function hhe(e,t){let r=HO.parse(e,!1,!0),i;for(;i!=="/"&&r.pathname!==i;){i=r.pathname||"/";let n="//"+r.host+i.replace(/\/$/,""),s=NZe(n,t.npmrc);if(s)return s;if(!t.recursive)return/\/$/.test(e)?void 0:hhe(HO.resolve(e,"."),t);r.pathname=HO.resolve(FZe(i),"..")||"/"}}function OZe(e){return e.get("_auth")?{token:xy(e.get("_auth")),type:"Basic"}:void 0}function FZe(e){return e[e.length-1]==="/"?e:e+"/"}function NZe(e,t){let r=kZe(t.get(e+che)||t.get(e+"/"+che));if(r)return r;let i=t.get(e+phe)||t.get(e+"/"+phe),n=t.get(e+fhe)||t.get(e+"/"+fhe),s=RZe(i,n);if(s)return s;let a=PZe(t.get(e+dhe)||t.get(e+"/"+dhe));if(a)return a}function xy(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(t,r){return process.env[r]})}function kZe(e){return e?{token:xy(e),type:"Bearer"}:void 0}function RZe(e,t){if(!e||!t)return;let r=Buffer.from(xy(t),"base64").toString("utf8");return{token:Buffer.from(e+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:e}}function PZe(e){return e?{token:xy(e),type:"Basic"}:void 0}});var m2=m((lgt,yhe)=>{var IZe="2.0.0",LZe=Number.MAX_SAFE_INTEGER||9007199254740991,BZe=16,qZe=250,jZe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];yhe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:BZe,MAX_SAFE_BUILD_LENGTH:qZe,MAX_SAFE_INTEGER:LZe,RELEASE_TYPES:jZe,SEMVER_SPEC_VERSION:IZe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var g2=m((cgt,vhe)=>{var $Ze=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};vhe.exports=$Ze});var Vf=m((No,whe)=>{var{MAX_SAFE_COMPONENT_LENGTH:zO,MAX_SAFE_BUILD_LENGTH:MZe,MAX_LENGTH:UZe}=m2(),VZe=g2();No=whe.exports={};var HZe=No.re=[],zZe=No.safeRe=[],K=No.src=[],Y=No.t={},GZe=0,GO="[a-zA-Z0-9-]",WZe=[["\\s",1],["\\d",UZe],[GO,MZe]],KZe=e=>{for(let[t,r]of WZe)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},ye=(e,t,r)=>{let i=KZe(t),n=GZe++;VZe(e,n,t),Y[e]=n,K[n]=t,HZe[n]=new RegExp(t,r?"g":void 0),zZe[n]=new RegExp(i,r?"g":void 0)};ye("NUMERICIDENTIFIER","0|[1-9]\\d*");ye("NUMERICIDENTIFIERLOOSE","\\d+");ye("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${GO}*`);ye("MAINVERSION",`(${K[Y.NUMERICIDENTIFIER]})\\.(${K[Y.NUMERICIDENTIFIER]})\\.(${K[Y.NUMERICIDENTIFIER]})`);ye("MAINVERSIONLOOSE",`(${K[Y.NUMERICIDENTIFIERLOOSE]})\\.(${K[Y.NUMERICIDENTIFIERLOOSE]})\\.(${K[Y.NUMERICIDENTIFIERLOOSE]})`);ye("PRERELEASEIDENTIFIER",`(?:${K[Y.NUMERICIDENTIFIER]}|${K[Y.NONNUMERICIDENTIFIER]})`);ye("PRERELEASEIDENTIFIERLOOSE",`(?:${K[Y.NUMERICIDENTIFIERLOOSE]}|${K[Y.NONNUMERICIDENTIFIER]})`);ye("PRERELEASE",`(?:-(${K[Y.PRERELEASEIDENTIFIER]}(?:\\.${K[Y.PRERELEASEIDENTIFIER]})*))`);ye("PRERELEASELOOSE",`(?:-?(${K[Y.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${K[Y.PRERELEASEIDENTIFIERLOOSE]})*))`);ye("BUILDIDENTIFIER",`${GO}+`);ye("BUILD",`(?:\\+(${K[Y.BUILDIDENTIFIER]}(?:\\.${K[Y.BUILDIDENTIFIER]})*))`);ye("FULLPLAIN",`v?${K[Y.MAINVERSION]}${K[Y.PRERELEASE]}?${K[Y.BUILD]}?`);ye("FULL",`^${K[Y.FULLPLAIN]}$`);ye("LOOSEPLAIN",`[v=\\s]*${K[Y.MAINVERSIONLOOSE]}${K[Y.PRERELEASELOOSE]}?${K[Y.BUILD]}?`);ye("LOOSE",`^${K[Y.LOOSEPLAIN]}$`);ye("GTLT","((?:<|>)?=?)");ye("XRANGEIDENTIFIERLOOSE",`${K[Y.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);ye("XRANGEIDENTIFIER",`${K[Y.NUMERICIDENTIFIER]}|x|X|\\*`);ye("XRANGEPLAIN",`[v=\\s]*(${K[Y.XRANGEIDENTIFIER]})(?:\\.(${K[Y.XRANGEIDENTIFIER]})(?:\\.(${K[Y.XRANGEIDENTIFIER]})(?:${K[Y.PRERELEASE]})?${K[Y.BUILD]}?)?)?`);ye("XRANGEPLAINLOOSE",`[v=\\s]*(${K[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${K[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${K[Y.XRANGEIDENTIFIERLOOSE]})(?:${K[Y.PRERELEASELOOSE]})?${K[Y.BUILD]}?)?)?`);ye("XRANGE",`^${K[Y.GTLT]}\\s*${K[Y.XRANGEPLAIN]}$`);ye("XRANGELOOSE",`^${K[Y.GTLT]}\\s*${K[Y.XRANGEPLAINLOOSE]}$`);ye("COERCE",`(^|[^\\d])(\\d{1,${zO}})(?:\\.(\\d{1,${zO}}))?(?:\\.(\\d{1,${zO}}))?(?:$|[^\\d])`);ye("COERCERTL",K[Y.COERCE],!0);ye("LONETILDE","(?:~>?)");ye("TILDETRIM",`(\\s*)${K[Y.LONETILDE]}\\s+`,!0);No.tildeTrimReplace="$1~";ye("TILDE",`^${K[Y.LONETILDE]}${K[Y.XRANGEPLAIN]}$`);ye("TILDELOOSE",`^${K[Y.LONETILDE]}${K[Y.XRANGEPLAINLOOSE]}$`);ye("LONECARET","(?:\\^)");ye("CARETTRIM",`(\\s*)${K[Y.LONECARET]}\\s+`,!0);No.caretTrimReplace="$1^";ye("CARET",`^${K[Y.LONECARET]}${K[Y.XRANGEPLAIN]}$`);ye("CARETLOOSE",`^${K[Y.LONECARET]}${K[Y.XRANGEPLAINLOOSE]}$`);ye("COMPARATORLOOSE",`^${K[Y.GTLT]}\\s*(${K[Y.LOOSEPLAIN]})$|^$`);ye("COMPARATOR",`^${K[Y.GTLT]}\\s*(${K[Y.FULLPLAIN]})$|^$`);ye("COMPARATORTRIM",`(\\s*)${K[Y.GTLT]}\\s*(${K[Y.LOOSEPLAIN]}|${K[Y.XRANGEPLAIN]})`,!0);No.comparatorTrimReplace="$1$2$3";ye("HYPHENRANGE",`^\\s*(${K[Y.XRANGEPLAIN]})\\s+-\\s+(${K[Y.XRANGEPLAIN]})\\s*$`);ye("HYPHENRANGELOOSE",`^\\s*(${K[Y.XRANGEPLAINLOOSE]})\\s+-\\s+(${K[Y.XRANGEPLAINLOOSE]})\\s*$`);ye("STAR","(<|>)?=?\\s*\\*");ye("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");ye("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Sy=m((dgt,_he)=>{var YZe=Object.freeze({loose:!0}),XZe=Object.freeze({}),JZe=e=>e?typeof e!="object"?YZe:e:XZe;_he.exports=JZe});var WO=m((pgt,Ehe)=>{var Dhe=/^[0-9]+$/,bhe=(e,t)=>{let r=Dhe.test(e),i=Dhe.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},ZZe=(e,t)=>bhe(t,e);Ehe.exports={compareIdentifiers:bhe,rcompareIdentifiers:ZZe}});var ni=m((fgt,Ahe)=>{var Cy=g2(),{MAX_LENGTH:xhe,MAX_SAFE_INTEGER:Ay}=m2(),{safeRe:She,t:Che}=Vf(),QZe=Sy(),{compareIdentifiers:Hf}=WO(),KO=class e{constructor(t,r){if(r=QZe(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>xhe)throw new TypeError(`version is longer than ${xhe} characters`);Cy("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let i=t.trim().match(r.loose?She[Che.LOOSE]:She[Che.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Ay||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ay||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ay||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s<Ay)return s}return n}):this.prerelease=[],this.build=i[5]?i[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(t){if(Cy("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Hf(this.major,t.major)||Hf(this.minor,t.minor)||Hf(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let i=this.prerelease[r],n=t.prerelease[r];if(Cy("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return Hf(i,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let i=this.build[r],n=t.build[r];if(Cy("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return Hf(i,n)}while(++r)}inc(t,r,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,i),this.inc("pre",r,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,i),this.inc("pre",r,i);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":{let n=Number(i)?1:0;if(!r&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[n];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let s=[r,n];i===!1&&(s=[r]),Hf(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ahe.exports=KO});var Uc=m((hgt,Ohe)=>{var The=ni(),eQe=(e,t,r=!1)=>{if(e instanceof The)return e;try{return new The(e,t)}catch(i){if(!r)return null;throw i}};Ohe.exports=eQe});var Nhe=m((mgt,Fhe)=>{var tQe=Uc(),rQe=(e,t)=>{let r=tQe(e,t);return r?r.version:null};Fhe.exports=rQe});var Rhe=m((ggt,khe)=>{var iQe=Uc(),nQe=(e,t)=>{let r=iQe(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};khe.exports=nQe});var Lhe=m((ygt,Ihe)=>{var Phe=ni(),sQe=(e,t,r,i,n)=>{typeof r=="string"&&(n=i,i=r,r=void 0);try{return new Phe(e instanceof Phe?e.version:e,r).inc(t,i,n).version}catch{return null}};Ihe.exports=sQe});var jhe=m((vgt,qhe)=>{var Bhe=Uc(),aQe=(e,t)=>{let r=Bhe(e,null,!0),i=Bhe(t,null,!0),n=r.compare(i);if(n===0)return null;let s=n>0,a=s?r:i,o=s?i:r,u=!!a.prerelease.length;if(!!o.prerelease.length&&!u)return!o.patch&&!o.minor?"major":a.patch?"patch":a.minor?"minor":"major";let c=u?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"};qhe.exports=aQe});var Mhe=m((wgt,$he)=>{var oQe=ni(),uQe=(e,t)=>new oQe(e,t).major;$he.exports=uQe});var Vhe=m((_gt,Uhe)=>{var lQe=ni(),cQe=(e,t)=>new lQe(e,t).minor;Uhe.exports=cQe});var zhe=m((Dgt,Hhe)=>{var dQe=ni(),pQe=(e,t)=>new dQe(e,t).patch;Hhe.exports=pQe});var Whe=m((bgt,Ghe)=>{var fQe=Uc(),hQe=(e,t)=>{let r=fQe(e,t);return r&&r.prerelease.length?r.prerelease:null};Ghe.exports=hQe});var Kn=m((Egt,Yhe)=>{var Khe=ni(),mQe=(e,t,r)=>new Khe(e,r).compare(new Khe(t,r));Yhe.exports=mQe});var Jhe=m((xgt,Xhe)=>{var gQe=Kn(),yQe=(e,t,r)=>gQe(t,e,r);Xhe.exports=yQe});var Qhe=m((Sgt,Zhe)=>{var vQe=Kn(),wQe=(e,t)=>vQe(e,t,!0);Zhe.exports=wQe});var Ty=m((Cgt,t0e)=>{var e0e=ni(),_Qe=(e,t,r)=>{let i=new e0e(e,r),n=new e0e(t,r);return i.compare(n)||i.compareBuild(n)};t0e.exports=_Qe});var i0e=m((Agt,r0e)=>{var DQe=Ty(),bQe=(e,t)=>e.sort((r,i)=>DQe(r,i,t));r0e.exports=bQe});var s0e=m((Tgt,n0e)=>{var EQe=Ty(),xQe=(e,t)=>e.sort((r,i)=>EQe(i,r,t));n0e.exports=xQe});var y2=m((Ogt,a0e)=>{var SQe=Kn(),CQe=(e,t,r)=>SQe(e,t,r)>0;a0e.exports=CQe});var Oy=m((Fgt,o0e)=>{var AQe=Kn(),TQe=(e,t,r)=>AQe(e,t,r)<0;o0e.exports=TQe});var YO=m((Ngt,u0e)=>{var OQe=Kn(),FQe=(e,t,r)=>OQe(e,t,r)===0;u0e.exports=FQe});var XO=m((kgt,l0e)=>{var NQe=Kn(),kQe=(e,t,r)=>NQe(e,t,r)!==0;l0e.exports=kQe});var Fy=m((Rgt,c0e)=>{var RQe=Kn(),PQe=(e,t,r)=>RQe(e,t,r)>=0;c0e.exports=PQe});var Ny=m((Pgt,d0e)=>{var IQe=Kn(),LQe=(e,t,r)=>IQe(e,t,r)<=0;d0e.exports=LQe});var JO=m((Igt,p0e)=>{var BQe=YO(),qQe=XO(),jQe=y2(),$Qe=Fy(),MQe=Oy(),UQe=Ny(),VQe=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return BQe(e,r,i);case"!=":return qQe(e,r,i);case">":return jQe(e,r,i);case">=":return $Qe(e,r,i);case"<":return MQe(e,r,i);case"<=":return UQe(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};p0e.exports=VQe});var h0e=m((Lgt,f0e)=>{var HQe=ni(),zQe=Uc(),{safeRe:ky,t:Ry}=Vf(),GQe=(e,t)=>{if(e instanceof HQe)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(ky[Ry.COERCE]);else{let i;for(;(i=ky[Ry.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||i.index+i[0].length!==r.index+r[0].length)&&(r=i),ky[Ry.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;ky[Ry.COERCERTL].lastIndex=-1}return r===null?null:zQe(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};f0e.exports=GQe});var g0e=m((Bgt,m0e)=>{"use strict";m0e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}});var v0e=m((qgt,y0e)=>{"use strict";y0e.exports=ke;ke.Node=Vc;ke.create=ke;function ke(e){var t=this;if(t instanceof ke||(t=new ke),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(n){t.push(n)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}ke.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t};ke.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};ke.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};ke.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)KQe(this,arguments[e]);return this.length};ke.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)YQe(this,arguments[e]);return this.length};ke.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};ke.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};ke.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,i=0;r!==null;i++)e.call(t,r.value,i,this),r=r.next};ke.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,i=this.length-1;r!==null;i--)e.call(t,r.value,i,this),r=r.prev};ke.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++)r=r.next;if(t===e&&r!==null)return r.value};ke.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++)r=r.prev;if(t===e&&r!==null)return r.value};ke.prototype.map=function(e,t){t=t||this;for(var r=new ke,i=this.head;i!==null;)r.push(e.call(t,i.value,this)),i=i.next;return r};ke.prototype.mapReverse=function(e,t){t=t||this;for(var r=new ke,i=this.tail;i!==null;)r.push(e.call(t,i.value,this)),i=i.prev;return r};ke.prototype.reduce=function(e,t){var r,i=this.head;if(arguments.length>1)r=t;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)r=e(r,i.value,n),i=i.next;return r};ke.prototype.reduceReverse=function(e,t){var r,i=this.tail;if(arguments.length>1)r=t;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)r=e(r,i.value,n),i=i.prev;return r};ke.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};ke.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};ke.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new ke;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,n=this.head;n!==null&&i<e;i++)n=n.next;for(;n!==null&&i<t;i++,n=n.next)r.push(n.value);return r};ke.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new ke;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,n=this.tail;n!==null&&i>t;i--)n=n.prev;for(;n!==null&&i>e;i--,n=n.prev)r.push(n.value);return r};ke.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,n=this.head;n!==null&&i<e;i++)n=n.next;for(var s=[],i=0;n&&i<t;i++)s.push(n.value),n=this.removeNode(n);n===null&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var i=0;i<r.length;i++)n=WQe(this,n,r[i]);return s};ke.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=t,this.tail=e,this};function WQe(e,t,r){var i=t===e.head?new Vc(r,null,t,e):new Vc(r,t,t.next,e);return i.next===null&&(e.tail=i),i.prev===null&&(e.head=i),e.length++,i}function KQe(e,t){e.tail=new Vc(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function YQe(e,t){e.head=new Vc(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Vc(e,t,r,i){if(!(this instanceof Vc))return new Vc(e,t,r,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{g0e()(ke)}catch{}});var E0e=m((jgt,b0e)=>{"use strict";var XQe=v0e(),Hc=Symbol("max"),Ro=Symbol("length"),zf=Symbol("lengthCalculator"),w2=Symbol("allowStale"),zc=Symbol("maxAge"),ko=Symbol("dispose"),w0e=Symbol("noDisposeOnSet"),Cr=Symbol("lruList"),xs=Symbol("cache"),D0e=Symbol("updateAgeOnGet"),ZO=()=>1,eF=class{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");let r=this[Hc]=t.max||1/0,i=t.length||ZO;if(this[zf]=typeof i!="function"?ZO:i,this[w2]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[zc]=t.maxAge||0,this[ko]=t.dispose,this[w0e]=t.noDisposeOnSet||!1,this[D0e]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[Hc]=t||1/0,v2(this)}get max(){return this[Hc]}set allowStale(t){this[w2]=!!t}get allowStale(){return this[w2]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[zc]=t,v2(this)}get maxAge(){return this[zc]}set lengthCalculator(t){typeof t!="function"&&(t=ZO),t!==this[zf]&&(this[zf]=t,this[Ro]=0,this[Cr].forEach(r=>{r.length=this[zf](r.value,r.key),this[Ro]+=r.length})),v2(this)}get lengthCalculator(){return this[zf]}get length(){return this[Ro]}get itemCount(){return this[Cr].length}rforEach(t,r){r=r||this;for(let i=this[Cr].tail;i!==null;){let n=i.prev;_0e(this,t,i,r),i=n}}forEach(t,r){r=r||this;for(let i=this[Cr].head;i!==null;){let n=i.next;_0e(this,t,i,r),i=n}}keys(){return this[Cr].toArray().map(t=>t.key)}values(){return this[Cr].toArray().map(t=>t.value)}reset(){this[ko]&&this[Cr]&&this[Cr].length&&this[Cr].forEach(t=>this[ko](t.key,t.value)),this[xs]=new Map,this[Cr]=new XQe,this[Ro]=0}dump(){return this[Cr].map(t=>Py(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[Cr]}set(t,r,i){if(i=i||this[zc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[zf](r,t);if(this[xs].has(t)){if(s>this[Hc])return Gf(this,this[xs].get(t)),!1;let u=this[xs].get(t).value;return this[ko]&&(this[w0e]||this[ko](t,u.value)),u.now=n,u.maxAge=i,u.value=r,this[Ro]+=s-u.length,u.length=s,this.get(t),v2(this),!0}let a=new tF(t,r,s,n,i);return a.length>this[Hc]?(this[ko]&&this[ko](t,r),!1):(this[Ro]+=a.length,this[Cr].unshift(a),this[xs].set(t,this[Cr].head),v2(this),!0)}has(t){if(!this[xs].has(t))return!1;let r=this[xs].get(t).value;return!Py(this,r)}get(t){return QO(this,t,!0)}peek(t){return QO(this,t,!1)}pop(){let t=this[Cr].tail;return t?(Gf(this,t),t.value):null}del(t){Gf(this,this[xs].get(t))}load(t){this.reset();let r=Date.now();for(let i=t.length-1;i>=0;i--){let n=t[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let a=s-r;a>0&&this.set(n.k,n.v,a)}}}prune(){this[xs].forEach((t,r)=>QO(this,r,!1))}},QO=(e,t,r)=>{let i=e[xs].get(t);if(i){let n=i.value;if(Py(e,n)){if(Gf(e,i),!e[w2])return}else r&&(e[D0e]&&(i.value.now=Date.now()),e[Cr].unshiftNode(i));return n.value}},Py=(e,t)=>{if(!t||!t.maxAge&&!e[zc])return!1;let r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[zc]&&r>e[zc]},v2=e=>{if(e[Ro]>e[Hc])for(let t=e[Cr].tail;e[Ro]>e[Hc]&&t!==null;){let r=t.prev;Gf(e,t),t=r}},Gf=(e,t)=>{if(t){let r=t.value;e[ko]&&e[ko](r.key,r.value),e[Ro]-=r.length,e[xs].delete(r.key),e[Cr].removeNode(t)}},tF=class{constructor(t,r,i,n,s){this.key=t,this.value=r,this.length=i,this.now=n,this.maxAge=s||0}},_0e=(e,t,r,i)=>{let n=r.value;Py(e,n)&&(Gf(e,r),e[w2]||(n=void 0)),n&&t.call(i,n.value,n.key,e)};b0e.exports=eF});var Yn=m(($gt,A0e)=>{var rF=class e{constructor(t,r){if(r=ZQe(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof iF)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!S0e(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&set(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let i=((this.options.includePrerelease&&iet)|(this.options.loose&&net))+":"+t,n=x0e.get(i);if(n)return n;let s=this.options.loose,a=s?Wi[Ei.HYPHENRANGELOOSE]:Wi[Ei.HYPHENRANGE];t=t.replace(a,get(this.options.includePrerelease)),ct("hyphen replace",t),t=t.replace(Wi[Ei.COMPARATORTRIM],eet),ct("comparator trim",t),t=t.replace(Wi[Ei.TILDETRIM],tet),ct("tilde trim",t),t=t.replace(Wi[Ei.CARETTRIM],ret),ct("caret trim",t);let o=t.split(" ").map(d=>aet(d,this.options)).join(" ").split(/\s+/).map(d=>met(d,this.options));s&&(o=o.filter(d=>(ct("loose invalid filter",d,this.options),!!d.match(Wi[Ei.COMPARATORLOOSE])))),ct("range list",o);let u=new Map,l=o.map(d=>new iF(d,this.options));for(let d of l){if(S0e(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return x0e.set(i,c),c}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(i=>C0e(i,r)&&t.set.some(n=>C0e(n,r)&&i.every(s=>n.every(a=>s.intersects(a,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new QQe(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(yet(this.set[r],t,this.options))return!0;return!1}};A0e.exports=rF;var JQe=E0e(),x0e=new JQe({max:1e3}),ZQe=Sy(),iF=_2(),ct=g2(),QQe=ni(),{safeRe:Wi,t:Ei,comparatorTrimReplace:eet,tildeTrimReplace:tet,caretTrimReplace:ret}=Vf(),{FLAG_INCLUDE_PRERELEASE:iet,FLAG_LOOSE:net}=m2(),S0e=e=>e.value==="<0.0.0-0",set=e=>e.value==="",C0e=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every(s=>n.intersects(s,t)),n=i.pop();return r},aet=(e,t)=>(ct("comp",e,t),e=cet(e,t),ct("caret",e),e=oet(e,t),ct("tildes",e),e=pet(e,t),ct("xrange",e),e=het(e,t),ct("stars",e),e),xi=e=>!e||e.toLowerCase()==="x"||e==="*",oet=(e,t)=>e.trim().split(/\s+/).map(r=>uet(r,t)).join(" "),uet=(e,t)=>{let r=t.loose?Wi[Ei.TILDELOOSE]:Wi[Ei.TILDE];return e.replace(r,(i,n,s,a,o)=>{ct("tilde",e,i,n,s,a,o);let u;return xi(n)?u="":xi(s)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:xi(a)?u=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:o?(ct("replaceTilde pr",o),u=`>=${n}.${s}.${a}-${o} <${n}.${+s+1}.0-0`):u=`>=${n}.${s}.${a} <${n}.${+s+1}.0-0`,ct("tilde return",u),u})},cet=(e,t)=>e.trim().split(/\s+/).map(r=>det(r,t)).join(" "),det=(e,t)=>{ct("caret",e,t);let r=t.loose?Wi[Ei.CARETLOOSE]:Wi[Ei.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(n,s,a,o,u)=>{ct("caret",e,n,s,a,o,u);let l;return xi(s)?l="":xi(a)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:xi(o)?s==="0"?l=`>=${s}.${a}.0${i} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.0${i} <${+s+1}.0.0-0`:u?(ct("replaceCaret pr",u),s==="0"?a==="0"?l=`>=${s}.${a}.${o}-${u} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}-${u} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o}-${u} <${+s+1}.0.0-0`):(ct("no pr"),s==="0"?a==="0"?l=`>=${s}.${a}.${o}${i} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}${i} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o} <${+s+1}.0.0-0`),ct("caret return",l),l})},pet=(e,t)=>(ct("replaceXRanges",e,t),e.split(/\s+/).map(r=>fet(r,t)).join(" ")),fet=(e,t)=>{e=e.trim();let r=t.loose?Wi[Ei.XRANGELOOSE]:Wi[Ei.XRANGE];return e.replace(r,(i,n,s,a,o,u)=>{ct("xRange",e,i,n,s,a,o,u);let l=xi(s),c=l||xi(a),d=c||xi(o),p=d;return n==="="&&p&&(n=""),u=t.includePrerelease?"-0":"",l?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&p?(c&&(a=0),o=0,n===">"?(n=">=",c?(s=+s+1,a=0,o=0):(a=+a+1,o=0)):n==="<="&&(n="<",c?s=+s+1:a=+a+1),n==="<"&&(u="-0"),i=`${n+s}.${a}.${o}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:d&&(i=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),ct("xRange return",i),i})},het=(e,t)=>(ct("replaceStars",e,t),e.trim().replace(Wi[Ei.STAR],"")),met=(e,t)=>(ct("replaceGTE0",e,t),e.trim().replace(Wi[t.includePrerelease?Ei.GTE0PRE:Ei.GTE0],"")),get=e=>(t,r,i,n,s,a,o,u,l,c,d,p,f)=>(xi(i)?r="":xi(n)?r=`>=${i}.0.0${e?"-0":""}`:xi(s)?r=`>=${i}.${n}.0${e?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,xi(l)?u="":xi(c)?u=`<${+l+1}.0.0-0`:xi(d)?u=`<${l}.${+c+1}.0-0`:p?u=`<=${l}.${c}.${d}-${p}`:e?u=`<${l}.${c}.${+d+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),yet=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(ct(e[i].semver),e[i].semver!==iF.ANY&&e[i].semver.prerelease.length>0){let n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}});var _2=m((Mgt,R0e)=>{var D2=Symbol("SemVer ANY"),aF=class e{static get ANY(){return D2}constructor(t,r){if(r=T0e(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),sF("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===D2?this.value="":this.value=this.operator+this.semver.version,sF("comp",this)}parse(t){let r=this.options.loose?O0e[F0e.COMPARATORLOOSE]:O0e[F0e.COMPARATOR],i=t.match(r);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new N0e(i[2],this.options.loose):this.semver=D2}toString(){return this.value}test(t){if(sF("Comparator.test",t,this.options.loose),this.semver===D2||t===D2)return!0;if(typeof t=="string")try{t=new N0e(t,this.options)}catch{return!1}return nF(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new k0e(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new k0e(this.value,r).test(t.semver):(r=T0e(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||nF(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||nF(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};R0e.exports=aF;var T0e=Sy(),{safeRe:O0e,t:F0e}=Vf(),nF=JO(),sF=g2(),N0e=ni(),k0e=Yn()});var b2=m((Ugt,P0e)=>{var vet=Yn(),wet=(e,t,r)=>{try{t=new vet(t,r)}catch{return!1}return t.test(e)};P0e.exports=wet});var L0e=m((Vgt,I0e)=>{var _et=Yn(),Det=(e,t)=>new _et(e,t).set.map(r=>r.map(i=>i.value).join(" ").trim().split(" "));I0e.exports=Det});var q0e=m((Hgt,B0e)=>{var bet=ni(),Eet=Yn(),xet=(e,t,r)=>{let i=null,n=null,s=null;try{s=new Eet(t,r)}catch{return null}return e.forEach(a=>{s.test(a)&&(!i||n.compare(a)===-1)&&(i=a,n=new bet(i,r))}),i};B0e.exports=xet});var $0e=m((zgt,j0e)=>{var Cet=ni(),Aet=Yn(),Tet=(e,t,r)=>{let i=null,n=null,s=null;try{s=new Aet(t,r)}catch{return null}return e.forEach(a=>{s.test(a)&&(!i||n.compare(a)===1)&&(i=a,n=new Cet(i,r))}),i};j0e.exports=Tet});var V0e=m((Ggt,U0e)=>{var oF=ni(),Oet=Yn(),M0e=y2(),Fet=(e,t)=>{e=new Oet(e,t);let r=new oF("0.0.0");if(e.test(r)||(r=new oF("0.0.0-0"),e.test(r)))return r;r=null;for(let i=0;i<e.set.length;++i){let n=e.set[i],s=null;n.forEach(a=>{let o=new oF(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!s||M0e(o,s))&&(s=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!r||M0e(r,s))&&(r=s)}return r&&e.test(r)?r:null};U0e.exports=Fet});var z0e=m((Wgt,H0e)=>{var Net=Yn(),ket=(e,t)=>{try{return new Net(e,t).range||"*"}catch{return null}};H0e.exports=ket});var Iy=m((Kgt,Y0e)=>{var Ret=ni(),K0e=_2(),{ANY:Pet}=K0e,Iet=Yn(),Let=b2(),G0e=y2(),W0e=Oy(),Bet=Ny(),qet=Fy(),jet=(e,t,r,i)=>{e=new Ret(e,i),t=new Iet(t,i);let n,s,a,o,u;switch(r){case">":n=G0e,s=Bet,a=W0e,o=">",u=">=";break;case"<":n=W0e,s=qet,a=G0e,o="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Let(e,t,i))return!1;for(let l=0;l<t.set.length;++l){let c=t.set[l],d=null,p=null;if(c.forEach(f=>{f.semver===Pet&&(f=new K0e(">=0.0.0")),d=d||f,p=p||f,n(f.semver,d.semver,i)?d=f:a(f.semver,p.semver,i)&&(p=f)}),d.operator===o||d.operator===u||(!p.operator||p.operator===o)&&s(e,p.semver))return!1;if(p.operator===u&&a(e,p.semver))return!1}return!0};Y0e.exports=jet});var J0e=m((Ygt,X0e)=>{var $et=Iy(),Met=(e,t,r)=>$et(e,t,">",r);X0e.exports=Met});var Q0e=m((Xgt,Z0e)=>{var Uet=Iy(),Vet=(e,t,r)=>Uet(e,t,"<",r);Z0e.exports=Vet});var rme=m((Jgt,tme)=>{var eme=Yn(),Het=(e,t,r)=>(e=new eme(e,r),t=new eme(t,r),e.intersects(t,r));tme.exports=Het});var nme=m((Zgt,ime)=>{var zet=b2(),Get=Kn();ime.exports=(e,t,r)=>{let i=[],n=null,s=null,a=e.sort((c,d)=>Get(c,d,r));for(let c of a)zet(c,t,r)?(s=c,n||(n=c)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let o=[];for(let[c,d]of i)c===d?o.push(c):!d&&c===a[0]?o.push("*"):d?c===a[0]?o.push(`<=${d}`):o.push(`${c} - ${d}`):o.push(`>=${c}`);let u=o.join(" || "),l=typeof t.raw=="string"?t.raw:String(t);return u.length<l.length?u:t}});var cme=m((Qgt,lme)=>{var sme=Yn(),lF=_2(),{ANY:uF}=lF,E2=b2(),cF=Kn(),Wet=(e,t,r={})=>{if(e===t)return!0;e=new sme(e,r),t=new sme(t,r);let i=!1;e:for(let n of e.set){for(let s of t.set){let a=Yet(n,s,r);if(i=i||a!==null,a)continue e}if(i)return!1}return!0},Ket=[new lF(">=0.0.0-0")],ame=[new lF(">=0.0.0")],Yet=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===uF){if(t.length===1&&t[0].semver===uF)return!0;r.includePrerelease?e=Ket:e=ame}if(t.length===1&&t[0].semver===uF){if(r.includePrerelease)return!0;t=ame}let i=new Set,n,s;for(let f of e)f.operator===">"||f.operator===">="?n=ome(n,f,r):f.operator==="<"||f.operator==="<="?s=ume(s,f,r):i.add(f.semver);if(i.size>1)return null;let a;if(n&&s){if(a=cF(n.semver,s.semver,r),a>0)return null;if(a===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let f of i){if(n&&!E2(f,String(n),r)||s&&!E2(f,String(s),r))return null;for(let h of t)if(!E2(f,String(h),r))return!1;return!0}let o,u,l,c,d=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,p=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;d&&d.prerelease.length===1&&s.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let f of t){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",n){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator===">"||f.operator===">="){if(o=ome(n,f,r),o===f&&o!==n)return!1}else if(n.operator===">="&&!E2(n.semver,String(f),r))return!1}if(s){if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),f.operator==="<"||f.operator==="<="){if(u=ume(s,f,r),u===f&&u!==s)return!1}else if(s.operator==="<="&&!E2(s.semver,String(f),r))return!1}if(!f.operator&&(s||n)&&a!==0)return!1}return!(n&&l&&!s&&a!==0||s&&c&&!n&&a!==0||p||d)},ome=(e,t,r)=>{if(!e)return t;let i=cF(e.semver,t.semver,r);return i>0?e:i<0||t.operator===">"&&e.operator===">="?t:e},ume=(e,t,r)=>{if(!e)return t;let i=cF(e.semver,t.semver,r);return i<0?e:i>0||t.operator==="<"&&e.operator==="<="?t:e};lme.exports=Wet});var hme=m((e8t,fme)=>{var dF=Vf(),dme=m2(),Xet=ni(),pme=WO(),Jet=Uc(),Zet=Nhe(),Qet=Rhe(),ett=Lhe(),ttt=jhe(),rtt=Mhe(),itt=Vhe(),ntt=zhe(),stt=Whe(),att=Kn(),ott=Jhe(),utt=Qhe(),ltt=Ty(),ctt=i0e(),dtt=s0e(),ptt=y2(),ftt=Oy(),htt=YO(),mtt=XO(),gtt=Fy(),ytt=Ny(),vtt=JO(),wtt=h0e(),_tt=_2(),Dtt=Yn(),btt=b2(),Ett=L0e(),xtt=q0e(),Stt=$0e(),Ctt=V0e(),Att=z0e(),Ttt=Iy(),Ott=J0e(),Ftt=Q0e(),Ntt=rme(),ktt=nme(),Rtt=cme();fme.exports={parse:Jet,valid:Zet,clean:Qet,inc:ett,diff:ttt,major:rtt,minor:itt,patch:ntt,prerelease:stt,compare:att,rcompare:ott,compareLoose:utt,compareBuild:ltt,sort:ctt,rsort:dtt,gt:ptt,lt:ftt,eq:htt,neq:mtt,gte:gtt,lte:ytt,cmp:vtt,coerce:wtt,Comparator:_tt,Range:Dtt,satisfies:btt,toComparators:Ett,maxSatisfying:xtt,minSatisfying:Stt,minVersion:Ctt,validRange:Att,outside:Ttt,gtr:Ott,ltr:Ftt,intersects:Ntt,simplifyRange:ktt,subset:Rtt,SemVer:Xet,re:dF.re,src:dF.src,tokens:dF.t,SEMVER_SPEC_VERSION:dme.SEMVER_SPEC_VERSION,RELEASE_TYPES:dme.RELEASE_TYPES,compareIdentifiers:pme.compareIdentifiers,rcompareIdentifiers:pme.rcompareIdentifiers}});var pF=m((t8t,vme)=>{var Ptt=require("url"),{getIt:Itt}=Afe(),{debug:Ltt,retry:mme,promise:Btt,httpErrors:qtt,jsonResponse:jtt}=Gfe(),$tt=y1e(),Mtt=ghe(),Utt=hme(),Vtt=e=>/(application\/json|\+json)/.test(e||"");function Htt(e,t,r){let i=e.response||{statusCode:500,headers:{}};return mme.shouldRetry(e,t,r)||i&&i.statusCode>=500||i.statusCode<300&&!Vtt(i.headers["content-type"])}function ztt(e,t){if(t.registryUrl)return t.registryUrl;let r=e.split("/")[0];return $tt(r)}var gme=Itt([jtt({force:!0}),qtt(),Ltt({namespace:"get-latest-version"}),Btt(),mme({shouldRetry:Htt})]);async function yme(e,t){let r=typeof t=="string"?{range:t,auth:!0}:Object.assign({range:"latest",auth:!0},t),i=ztt(e,r),n=Ptt.resolve(i,encodeURIComponent(e).replace(/^%40/,"@")),s=r.auth&&Mtt(i,{recursive:!0}),a=r.request||gme,o={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};s&&(o.authorization=`${s.type} ${s.token}`);let u;try{u=await a({url:n,headers:o})}catch(h){throw h.response&&h.response.statusCode===404?new Error(`Package \`${e}\` doesn't exist`):h}let l=u.body,c=r.range,d=l["dist-tags"].latest;if(l["dist-tags"][c])return r.includeLatest?{latest:d,inRange:l["dist-tags"][c]}:l["dist-tags"][c];if(l.versions[c])return r.includeLatest?{latest:d,inRange:c}:c;let p=Object.keys(l.versions),f=Utt.maxSatisfying(p,c);return f?r.includeLatest?{latest:d,inRange:f}:f:r.includeLatest?{latest:d,inRange:void 0}:void 0}yme.request=gme;vme.exports=yme});var hF=m((w8t,Ame)=>{Ame.exports=require("stream")});var Rme=m((_8t,kme)=>{"use strict";function Tme(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Ome(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tme(Object(r),!0).forEach(function(i){Ktt(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tme(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Ktt(e,t,r){return t=Nme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ytt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fme(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Nme(i.key),i)}}function Xtt(e,t,r){return t&&Fme(e.prototype,t),r&&Fme(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nme(e){var t=Jtt(e,"string");return typeof t=="symbol"?t:String(t)}function Jtt(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ztt=require("buffer"),Ly=Ztt.Buffer,Qtt=require("util"),mF=Qtt.inspect,ert=mF&&mF.custom||"inspect";function trt(e,t,r){Ly.prototype.copy.call(e,t,r)}kme.exports=function(){function e(){Ytt(this,e),this.head=null,this.tail=null,this.length=0}return Xtt(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Ly.alloc(0);for(var i=Ly.allocUnsafe(r>>>0),n=this.head,s=0;n;)trt(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Ly.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:ert,value:function(r,i){return mF(this,Ome(Ome({},i),{},{depth:0,customInspect:!1}))}}]),e}()});var yF=m((D8t,Ime)=>{"use strict";function rrt(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gF,this,e)):process.nextTick(gF,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(By,r):(r._writableState.errorEmitted=!0,process.nextTick(Pme,r,s)):process.nextTick(Pme,r,s):t?(process.nextTick(By,r),t(s)):process.nextTick(By,r)}),this)}function Pme(e,t){gF(e,t),By(e)}function By(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function irt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function gF(e,t){e.emit("error",t)}function nrt(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}Ime.exports={destroy:rrt,undestroy:irt,errorOrDestroy:nrt}});var tl=m((b8t,qme)=>{"use strict";var Bme={};function Xn(e,t,r){r||(r=Error);function i(s,a,o){return typeof t=="string"?t:t(s,a,o)}class n extends r{constructor(a,o,u){super(i(a,o,u))}}n.prototype.name=r.name,n.prototype.code=e,Bme[e]=n}function Lme(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function srt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function art(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function ort(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Xn("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Xn("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&srt(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let n;if(art(e," argument"))n=`The ${e} ${i} ${Lme(t,"type")}`;else{let s=ort(e,".")?"property":"argument";n=`The "${e}" ${s} ${i} ${Lme(t,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Xn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Xn("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Xn("ERR_STREAM_PREMATURE_CLOSE","Premature close");Xn("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Xn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Xn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Xn("ERR_STREAM_WRITE_AFTER_END","write after end");Xn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Xn("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Xn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");qme.exports.codes=Bme});var vF=m((E8t,jme)=>{"use strict";var urt=tl().codes.ERR_INVALID_OPT_VALUE;function lrt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function crt(e,t,r,i){var n=lrt(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new urt(s,n)}return Math.floor(n)}return e.objectMode?16:16*1024}jme.exports={getHighWaterMark:crt}});var DF=m((x8t,zme)=>{"use strict";zme.exports=It;function Mme(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Brt(t,e)}}var Kf;It.WritableState=S2;var drt={deprecate:YC()},Ume=hF(),jy=require("buffer").Buffer,prt=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function frt(e){return jy.from(e)}function hrt(e){return jy.isBuffer(e)||e instanceof prt}var _F=yF(),mrt=vF(),grt=mrt.getHighWaterMark,rl=tl().codes,yrt=rl.ERR_INVALID_ARG_TYPE,vrt=rl.ERR_METHOD_NOT_IMPLEMENTED,wrt=rl.ERR_MULTIPLE_CALLBACK,_rt=rl.ERR_STREAM_CANNOT_PIPE,Drt=rl.ERR_STREAM_DESTROYED,brt=rl.ERR_STREAM_NULL_VALUES,Ert=rl.ERR_STREAM_WRITE_AFTER_END,xrt=rl.ERR_UNKNOWN_ENCODING,Yf=_F.errorOrDestroy;Un()(It,Ume);function Srt(){}function S2(e,t,r){Kf=Kf||Gc(),e=e||{},typeof r!="boolean"&&(r=t instanceof Kf),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=grt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){krt(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Mme(this)}S2.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(S2.prototype,"buffer",{get:drt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var qy;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(qy=Function.prototype[Symbol.hasInstance],Object.defineProperty(It,Symbol.hasInstance,{value:function(t){return qy.call(this,t)?!0:this!==It?!1:t&&t._writableState instanceof S2}})):qy=function(t){return t instanceof this};function It(e){Kf=Kf||Gc();var t=this instanceof Kf;if(!t&&!qy.call(It,this))return new It(e);this._writableState=new S2(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ume.call(this)}It.prototype.pipe=function(){Yf(this,new _rt)};function Crt(e,t){var r=new Ert;Yf(e,r),process.nextTick(t,r)}function Art(e,t,r,i){var n;return r===null?n=new brt:typeof r!="string"&&!t.objectMode&&(n=new yrt("chunk",["string","Buffer"],r)),n?(Yf(e,n),process.nextTick(i,n),!1):!0}It.prototype.write=function(e,t,r){var i=this._writableState,n=!1,s=!i.objectMode&&hrt(e);return s&&!jy.isBuffer(e)&&(e=frt(e)),typeof t=="function"&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Srt),i.ending?Crt(this,r):(s||Art(this,i,e,r))&&(i.pendingcb++,n=Ort(this,i,s,e,t,r)),n};It.prototype.cork=function(){this._writableState.corked++};It.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Vme(this,e))};It.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new xrt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(It.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Trt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=jy.from(t,r)),t}Object.defineProperty(It.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ort(e,t,r,i,n,s){if(!r){var a=Trt(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=t.objectMode?1:i.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else wF(e,t,!1,o,i,n,s);return u}function wF(e,t,r,i,n,s,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Drt("write")):r?e._writev(n,t.onwrite):e._write(n,s,t.onwrite),t.sync=!1}function Frt(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(x2,e,t),e._writableState.errorEmitted=!0,Yf(e,i)):(n(i),e._writableState.errorEmitted=!0,Yf(e,i),x2(e,t))}function Nrt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function krt(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new wrt;if(Nrt(r),t)Frt(e,r,i,t,n);else{var s=Hme(r)||e.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Vme(e,r),i?process.nextTick($me,e,r,s,n):$me(e,r,s,n)}}function $me(e,t,r,i){r||Rrt(e,t),t.pendingcb--,i(),x2(e,t)}function Rrt(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Vme(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,wF(e,t,!0,t.length,n,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new Mme(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,c=r.callback,d=t.objectMode?1:u.length;if(wF(e,t,!1,d,u,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}It.prototype._write=function(e,t,r){r(new vrt("_write()"))};It.prototype._writev=null;It.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||Lrt(this,i,r),this};Object.defineProperty(It.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Hme(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Prt(e,t){e._final(function(r){t.pendingcb--,r&&Yf(e,r),t.prefinished=!0,e.emit("prefinish"),x2(e,t)})}function Irt(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Prt,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function x2(e,t){var r=Hme(t);if(r&&(Irt(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function Lrt(e,t,r){t.ending=!0,x2(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function Brt(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(It.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});It.prototype.destroy=_F.destroy;It.prototype._undestroy=_F.undestroy;It.prototype._destroy=function(e,t){t(e)}});var Gc=m((S8t,Wme)=>{"use strict";var qrt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Wme.exports=wa;var Gme=xF(),EF=DF();Un()(wa,Gme);for(bF=qrt(EF.prototype),$y=0;$y<bF.length;$y++)My=bF[$y],wa.prototype[My]||(wa.prototype[My]=EF.prototype[My]);var bF,My,$y;function wa(e){if(!(this instanceof wa))return new wa(e);Gme.call(this,e),EF.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",jrt)))}Object.defineProperty(wa.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(wa.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(wa.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function jrt(){this._writableState.ended||process.nextTick($rt,this)}function $rt(e){e.end()}Object.defineProperty(wa.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var Xme=m((SF,Yme)=>{var Uy=require("buffer"),_a=Uy.Buffer;function Kme(e,t){for(var r in e)t[r]=e[r]}_a.from&&_a.alloc&&_a.allocUnsafe&&_a.allocUnsafeSlow?Yme.exports=Uy:(Kme(Uy,SF),SF.Buffer=Wc);function Wc(e,t,r){return _a(e,t,r)}Wc.prototype=Object.create(_a.prototype);Kme(_a,Wc);Wc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _a(e,t,r)};Wc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=_a(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Wc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _a(e)};Wc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Uy.SlowBuffer(e)}});var TF=m(Zme=>{"use strict";var AF=Xme().Buffer,Jme=AF.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Mrt(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Urt(e){var t=Mrt(e);if(typeof t!="string"&&(AF.isEncoding===Jme||!Jme(e)))throw new Error("Unknown encoding: "+e);return t||e}Zme.StringDecoder=C2;function C2(e){this.encoding=Urt(e);var t;switch(this.encoding){case"utf16le":this.text=Krt,this.end=Yrt,t=4;break;case"utf8":this.fillLast=zrt,t=4;break;case"base64":this.text=Xrt,this.end=Jrt,t=3;break;default:this.write=Zrt,this.end=Qrt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=AF.allocUnsafe(t)}C2.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};C2.prototype.end=Wrt;C2.prototype.text=Grt;C2.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function CF(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Vrt(e,t,r){var i=t.length-1;if(i<r)return 0;var n=CF(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=CF(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=CF(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function Hrt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function zrt(e){var t=this.lastTotal-this.lastNeed,r=Hrt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Grt(e,t){var r=Vrt(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function Wrt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Krt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Yrt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Xrt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Jrt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Zrt(e){return e.toString(this.encoding)}function Qrt(e){return e&&e.length?this.write(e):""}});var Vy=m((A8t,t2e)=>{"use strict";var Qme=tl().codes.ERR_STREAM_PREMATURE_CLOSE;function eit(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function tit(){}function rit(e){return e.setHeader&&typeof e.abort=="function"}function e2e(e,t,r){if(typeof t=="function")return e2e(e,null,t);t||(t={}),r=eit(r||tit);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,s=function(){e.writable||o()},a=e._writableState&&e._writableState.finished,o=function(){n=!1,a=!0,i||r.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){i=!1,u=!0,n||r.call(e)},c=function(h){r.call(e,h)},d=function(){var h;if(i&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new Qme),r.call(e,h);if(n&&!a)return(!e._writableState||!e._writableState.ended)&&(h=new Qme),r.call(e,h)},p=function(){e.req.on("finish",o)};return rit(e)?(e.on("complete",o),e.on("abort",d),e.req?p():e.on("request",p)):n&&!e._writableState&&(e.on("end",s),e.on("close",s)),e.on("end",l),e.on("finish",o),t.error!==!1&&e.on("error",c),e.on("close",d),function(){e.removeListener("complete",o),e.removeListener("abort",d),e.removeListener("request",p),e.req&&e.req.removeListener("finish",o),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",o),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",d)}}t2e.exports=e2e});var i2e=m((T8t,r2e)=>{"use strict";var Hy;function il(e,t,r){return t=iit(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iit(e){var t=nit(e,"string");return typeof t=="symbol"?t:String(t)}function nit(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sit=Vy(),nl=Symbol("lastResolve"),Kc=Symbol("lastReject"),A2=Symbol("error"),zy=Symbol("ended"),Yc=Symbol("lastPromise"),OF=Symbol("handlePromise"),Xc=Symbol("stream");function sl(e,t){return{value:e,done:t}}function ait(e){var t=e[nl];if(t!==null){var r=e[Xc].read();r!==null&&(e[Yc]=null,e[nl]=null,e[Kc]=null,t(sl(r,!1)))}}function oit(e){process.nextTick(ait,e)}function uit(e,t){return function(r,i){e.then(function(){if(t[zy]){r(sl(void 0,!0));return}t[OF](r,i)},i)}}var lit=Object.getPrototypeOf(function(){}),cit=Object.setPrototypeOf((Hy={get stream(){return this[Xc]},next:function(){var t=this,r=this[A2];if(r!==null)return Promise.reject(r);if(this[zy])return Promise.resolve(sl(void 0,!0));if(this[Xc].destroyed)return new Promise(function(a,o){process.nextTick(function(){t[A2]?o(t[A2]):a(sl(void 0,!0))})});var i=this[Yc],n;if(i)n=new Promise(uit(i,this));else{var s=this[Xc].read();if(s!==null)return Promise.resolve(sl(s,!1));n=new Promise(this[OF])}return this[Yc]=n,n}},il(Hy,Symbol.asyncIterator,function(){return this}),il(Hy,"return",function(){var t=this;return new Promise(function(r,i){t[Xc].destroy(null,function(n){if(n){i(n);return}r(sl(void 0,!0))})})}),Hy),lit),dit=function(t){var r,i=Object.create(cit,(r={},il(r,Xc,{value:t,writable:!0}),il(r,nl,{value:null,writable:!0}),il(r,Kc,{value:null,writable:!0}),il(r,A2,{value:null,writable:!0}),il(r,zy,{value:t._readableState.endEmitted,writable:!0}),il(r,OF,{value:function(s,a){var o=i[Xc].read();o?(i[Yc]=null,i[nl]=null,i[Kc]=null,s(sl(o,!1))):(i[nl]=s,i[Kc]=a)},writable:!0}),r));return i[Yc]=null,sit(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Kc];s!==null&&(i[Yc]=null,i[nl]=null,i[Kc]=null,s(n)),i[A2]=n;return}var a=i[nl];a!==null&&(i[Yc]=null,i[nl]=null,i[Kc]=null,a(sl(void 0,!0))),i[zy]=!0}),t.on("readable",oit.bind(null,i)),i};r2e.exports=dit});var o2e=m((O8t,a2e)=>{"use strict";function n2e(e,t,r,i,n,s,a){try{var o=e[s](a),u=o.value}catch(l){r(l);return}o.done?t(u):Promise.resolve(u).then(i,n)}function pit(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var s=e.apply(t,r);function a(u){n2e(s,i,n,a,o,"next",u)}function o(u){n2e(s,i,n,a,o,"throw",u)}a(void 0)})}}function s2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function fit(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s2e(Object(r),!0).forEach(function(i){hit(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s2e(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function hit(e,t,r){return t=mit(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mit(e){var t=git(e,"string");return typeof t=="symbol"?t:String(t)}function git(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yit=tl().codes.ERR_INVALID_ARG_TYPE;function vit(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new yit("iterable",["Iterable"],t);var n=new e(fit({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=pit(function*(){try{var u=yield i.next(),l=u.value,c=u.done;c?n.push(null):n.push(yield l)?a():s=!1}catch(d){n.destroy(d)}}),o.apply(this,arguments)}return n}a2e.exports=vit});var xF=m((N8t,y2e)=>{"use strict";y2e.exports=Oe;var Xf;Oe.ReadableState=d2e;var F8t=require("events").EventEmitter,c2e=function(t,r){return t.listeners(r).length},O2=hF(),Gy=require("buffer").Buffer,wit=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _it(e){return Gy.from(e)}function Dit(e){return Gy.isBuffer(e)||e instanceof wit}var FF=require("util"),_e;FF&&FF.debuglog?_e=FF.debuglog("stream"):_e=function(){};var bit=Rme(),BF=yF(),Eit=vF(),xit=Eit.getHighWaterMark,Wy=tl().codes,Sit=Wy.ERR_INVALID_ARG_TYPE,Cit=Wy.ERR_STREAM_PUSH_AFTER_EOF,Ait=Wy.ERR_METHOD_NOT_IMPLEMENTED,Tit=Wy.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Jf,NF,kF;Un()(Oe,O2);var T2=BF.errorOrDestroy,RF=["error","close","destroy","pause","resume"];function Oit(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function d2e(e,t,r){Xf=Xf||Gc(),e=e||{},typeof r!="boolean"&&(r=t instanceof Xf),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=xit(this,e,"readableHighWaterMark",r),this.buffer=new bit,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Jf||(Jf=TF().StringDecoder),this.decoder=new Jf(e.encoding),this.encoding=e.encoding)}function Oe(e){if(Xf=Xf||Gc(),!(this instanceof Oe))return new Oe(e);var t=this instanceof Xf;this._readableState=new d2e(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),O2.call(this)}Object.defineProperty(Oe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Oe.prototype.destroy=BF.destroy;Oe.prototype._undestroy=BF.undestroy;Oe.prototype._destroy=function(e,t){t(e)};Oe.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Gy.from(e,t),t=""),i=!0),p2e(this,e,t,!1,i)};Oe.prototype.unshift=function(e){return p2e(this,e,null,!0,!1)};function p2e(e,t,r,i,n){_e("readableAddChunk",t);var s=e._readableState;if(t===null)s.reading=!1,kit(e,s);else{var a;if(n||(a=Fit(s,t)),a)T2(e,a);else if(s.objectMode||t&&t.length>0)if(typeof t!="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==Gy.prototype&&(t=_it(t)),i)s.endEmitted?T2(e,new Tit):PF(e,s,t,!0);else if(s.ended)T2(e,new Cit);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||t.length!==0?PF(e,s,t,!1):LF(e,s)):PF(e,s,t,!1)}else i||(s.reading=!1,LF(e,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function PF(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ky(e)),LF(e,t)}function Fit(e,t){var r;return!Dit(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Sit("chunk",["string","Buffer","Uint8Array"],t)),r}Oe.prototype.isPaused=function(){return this._readableState.flowing===!1};Oe.prototype.setEncoding=function(e){Jf||(Jf=TF().StringDecoder);var t=new Jf(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var u2e=1073741824;function Nit(e){return e>=u2e?e=u2e:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l2e(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Nit(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Oe.prototype.read=function(e){_e("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return _e("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?IF(this):Ky(this),null;if(e=l2e(e,t),e===0&&t.ended)return t.length===0&&IF(this),null;var i=t.needReadable;_e("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,_e("length less than watermark",i)),t.ended||t.reading?(i=!1,_e("reading or ended",i)):i&&(_e("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=l2e(r,t)));var n;return e>0?n=m2e(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&IF(this)),n!==null&&this.emit("data",n),n};function kit(e,t){if(_e("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Ky(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,f2e(e)))}}function Ky(e){var t=e._readableState;_e("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_e("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(f2e,e))}function f2e(e){var t=e._readableState;_e("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,qF(e)}function LF(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Rit,e,t))}function Rit(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(_e("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}Oe.prototype._read=function(e){T2(this,new Ait("_read()"))};Oe.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,_e("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=n?o:g;i.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",a);function a(v,y){_e("onunpipe"),v===r&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function o(){_e("onend"),e.end()}var u=Pit(r);e.on("drain",u);var l=!1;function c(){_e("cleanup"),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",g),r.removeListener("data",d),l=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}r.on("data",d);function d(v){_e("ondata");var y=e.write(v);_e("dest.write",y),y===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&g2e(i.pipes,e)!==-1)&&!l&&(_e("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(v){_e("onerror",v),g(),e.removeListener("error",p),c2e(e,"error")===0&&T2(e,v)}Oit(e,"error",p);function f(){e.removeListener("finish",h),g()}e.once("close",f);function h(){_e("onfinish"),e.removeListener("close",f),g()}e.once("finish",h);function g(){_e("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(_e("pipe resume"),r.resume()),e};function Pit(e){return function(){var r=e._readableState;_e("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&c2e(e,"data")&&(r.flowing=!0,qF(e))}}Oe.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=g2e(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Oe.prototype.on=function(e,t){var r=O2.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,_e("on readable",i.length,i.reading),i.length?Ky(this):i.reading||process.nextTick(Iit,this)),r};Oe.prototype.addListener=Oe.prototype.on;Oe.prototype.removeListener=function(e,t){var r=O2.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(h2e,this),r};Oe.prototype.removeAllListeners=function(e){var t=O2.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(h2e,this),t};function h2e(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Iit(e){_e("readable nexttick read 0"),e.read(0)}Oe.prototype.resume=function(){var e=this._readableState;return e.flowing||(_e("resume"),e.flowing=!e.readableListening,Lit(this,e)),e.paused=!1,this};function Lit(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(Bit,e,t))}function Bit(e,t){_e("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),qF(e),t.flowing&&!t.reading&&e.read(0)}Oe.prototype.pause=function(){return _e("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function qF(e){var t=e._readableState;for(_e("flow",t.flowing);t.flowing&&e.read()!==null;);}Oe.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(_e("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(_e("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=t.push(a);o||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=function(o){return function(){return e[o].apply(e,arguments)}}(n));for(var s=0;s<RF.length;s++)e.on(RF[s],this.emit.bind(this,RF[s]));return this._read=function(a){_e("wrapped _read",a),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(Oe.prototype[Symbol.asyncIterator]=function(){return NF===void 0&&(NF=i2e()),NF(this)});Object.defineProperty(Oe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Oe.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Oe.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});Oe._fromList=m2e;Object.defineProperty(Oe.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function m2e(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function IF(e){var t=e._readableState;_e("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(qit,t,e))}function qit(e,t){if(_e("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Oe.from=function(e,t){return kF===void 0&&(kF=o2e()),kF(Oe,e,t)});function g2e(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var jF=m((k8t,w2e)=>{"use strict";w2e.exports=Po;var Yy=tl().codes,jit=Yy.ERR_METHOD_NOT_IMPLEMENTED,$it=Yy.ERR_MULTIPLE_CALLBACK,Mit=Yy.ERR_TRANSFORM_ALREADY_TRANSFORMING,Uit=Yy.ERR_TRANSFORM_WITH_LENGTH_0,Xy=Gc();Un()(Po,Xy);function Vit(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new $it);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Po(e){if(!(this instanceof Po))return new Po(e);Xy.call(this,e),this._transformState={afterTransform:Vit.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Hit)}function Hit(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){v2e(e,t,r)}):v2e(this,null,null)}Po.prototype.push=function(e,t){return this._transformState.needTransform=!1,Xy.prototype.push.call(this,e,t)};Po.prototype._transform=function(e,t,r){r(new jit("_transform()"))};Po.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Po.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Po.prototype._destroy=function(e,t){Xy.prototype._destroy.call(this,e,function(r){t(r)})};function v2e(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Uit;if(e._transformState.transforming)throw new Mit;return e.push(null)}});var b2e=m((R8t,D2e)=>{"use strict";D2e.exports=F2;var _2e=jF();Un()(F2,_2e);function F2(e){if(!(this instanceof F2))return new F2(e);_2e.call(this,e)}F2.prototype._transform=function(e,t,r){r(null,e)}});var A2e=m((P8t,C2e)=>{"use strict";var $F;function zit(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var S2e=tl().codes,Git=S2e.ERR_MISSING_ARGS,Wit=S2e.ERR_STREAM_DESTROYED;function E2e(e){if(e)throw e}function Kit(e){return e.setHeader&&typeof e.abort=="function"}function Yit(e,t,r,i){i=zit(i);var n=!1;e.on("close",function(){n=!0}),$F===void 0&&($F=Vy()),$F(e,{readable:t,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,Kit(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(a||new Wit("pipe"))}}}function x2e(e){e()}function Xit(e,t){return e.pipe(t)}function Jit(e){return!e.length||typeof e[e.length-1]!="function"?E2e:e.pop()}function Zit(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=Jit(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Git("streams");var n,s=t.map(function(a,o){var u=o<t.length-1,l=o>0;return Yit(a,u,l,function(c){n||(n=c),c&&s.forEach(x2e),!u&&(s.forEach(x2e),i(n))})});return t.reduce(Xit)}C2e.exports=Zit});var T2e=m((Jn,k2)=>{var N2=require("stream");process.env.READABLE_STREAM==="disable"&&N2?(k2.exports=N2.Readable,Object.assign(k2.exports,N2),k2.exports.Stream=N2):(Jn=k2.exports=xF(),Jn.Stream=N2||Jn,Jn.Readable=Jn,Jn.Writable=DF(),Jn.Duplex=Gc(),Jn.Transform=jF(),Jn.PassThrough=b2e(),Jn.finished=Vy(),Jn.pipeline=A2e())});var UF=m(MF=>{var O2e;(function(e){typeof DO_NOT_EXPORT_CRC>"u"?typeof MF=="object"?e(MF):typeof define=="function"&&define.amd?define(function(){var t={};return e(t),t}):e(O2e={}):e(O2e={})})(function(e){e.version="1.2.2";function t(){for(var A=0,C=new Array(256),O=0;O!=256;++O)A=O,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,C[O]=A;return typeof Int32Array<"u"?new Int32Array(C):C}var r=t();function i(A){var C=0,O=0,E=0,b=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(E=0;E!=256;++E)b[E]=A[E];for(E=0;E!=256;++E)for(O=A[E],C=256+E;C<4096;C+=256)O=b[C]=O>>>8^A[O&255];var k=[];for(E=1;E!=16;++E)k[E-1]=typeof Int32Array<"u"?b.subarray(E*256,E*256+256):b.slice(E*256,E*256+256);return k}var n=i(r),s=n[0],a=n[1],o=n[2],u=n[3],l=n[4],c=n[5],d=n[6],p=n[7],f=n[8],h=n[9],g=n[10],v=n[11],y=n[12],x=n[13],D=n[14];function w(A,C){for(var O=C^-1,E=0,b=A.length;E<b;)O=O>>>8^r[(O^A.charCodeAt(E++))&255];return~O}function _(A,C){for(var O=C^-1,E=A.length-15,b=0;b<E;)O=D[A[b++]^O&255]^x[A[b++]^O>>8&255]^y[A[b++]^O>>16&255]^v[A[b++]^O>>>24]^g[A[b++]]^h[A[b++]]^f[A[b++]]^p[A[b++]]^d[A[b++]]^c[A[b++]]^l[A[b++]]^u[A[b++]]^o[A[b++]]^a[A[b++]]^s[A[b++]]^r[A[b++]];for(E+=15;b<E;)O=O>>>8^r[(O^A[b++])&255];return~O}function T(A,C){for(var O=C^-1,E=0,b=A.length,k=0,L=0;E<b;)k=A.charCodeAt(E++),k<128?O=O>>>8^r[(O^k)&255]:k<2048?(O=O>>>8^r[(O^(192|k>>6&31))&255],O=O>>>8^r[(O^(128|k&63))&255]):k>=55296&&k<57344?(k=(k&1023)+64,L=A.charCodeAt(E++)&1023,O=O>>>8^r[(O^(240|k>>8&7))&255],O=O>>>8^r[(O^(128|k>>2&63))&255],O=O>>>8^r[(O^(128|L>>6&15|(k&3)<<4))&255],O=O>>>8^r[(O^(128|L&63))&255]):(O=O>>>8^r[(O^(224|k>>12&15))&255],O=O>>>8^r[(O^(128|k>>6&63))&255],O=O>>>8^r[(O^(128|k&63))&255]);return~O}e.table=r,e.bstr=w,e.buf=_,e.str=T})});var N2e=m((L8t,F2e)=>{"use strict";var{Transform:Qit}=T2e(),ent=UF(),VF=class extends Qit{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,r,i){t&&(this.checksum=ent.buf(t,this.checksum)>>>0,this.rawSize+=t.length),i(null,t)}digest(t){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),t?r.toString(t):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};F2e.exports=VF});var R2e=m((B8t,k2e)=>{"use strict";var{DeflateRaw:tnt}=require("zlib"),rnt=UF(),HF=class extends tnt{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,r){return t&&(this.compressedSize+=t.length),super.push(t,r)}_transform(t,r,i){t&&(this.checksum=rnt.buf(t,this.checksum)>>>0,this.rawSize+=t.length),super._transform(t,r,i)}digest(t){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),t?r.toString(t):r}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}};k2e.exports=HF});var I2e=m((q8t,P2e)=>{"use strict";P2e.exports={CRC32Stream:N2e(),DeflateCRC32Stream:R2e()}});var zF=m(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.checksum=Zf.checksumFile=void 0;var int=require("fs"),nnt=require("crypto"),B2e=require("stream"),snt=require("util"),{CRC32Stream:ant}=I2e(),L2e=(0,snt.promisify)(B2e.pipeline),ont=(e,t,r)=>q2e(int.createReadStream(e),t,r);Zf.checksumFile=ont;async function q2e(e,t,r="hex"){let i=lnt(e);if(t==="crc32"){let s=new ant,a=L2e(i,s);return s.resume(),await a,s.end(),Buffer.from(s.digest()).toString(r)}let n=(0,nnt.createHash)(t);return await L2e(i,n),n.end(),n.digest(r)}Zf.checksum=q2e;function unt(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.pipe=="function"}var lnt=e=>unt(e)?e:new B2e.Readable({read(){this.push(e),this.push(null)}})});var s6e=m((W8t,Io)=>{var tr=require("fs"),XF=require("os"),pn=require("path"),H2e=require("crypto"),Da={fs:tr.constants,os:XF.constants},z2e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",W2e=/XXXXXX/,pnt=3,K2e=(Da.O_CREAT||Da.fs.O_CREAT)|(Da.O_EXCL||Da.fs.O_EXCL)|(Da.O_RDWR||Da.fs.O_RDWR),fnt=XF.platform()==="win32",hnt=Da.EBADF||Da.os.errno.EBADF,mnt=Da.ENOENT||Da.os.errno.ENOENT,Y2e=448,X2e=384,gnt="exit",Qf=[],J2e=tr.rmdirSync.bind(tr),Z2e=!1;function ynt(e,t){return tr.rm(e,{recursive:!0},t)}function Q2e(e){return tr.rmSync(e,{recursive:!0})}function JF(e,t){let r=e1(e,t),i=r[0],n=r[1];try{r6e(i)}catch(a){return n(a)}let s=i.tries;(function a(){try{let o=t6e(i);tr.stat(o,function(u){if(!u)return s-- >0?a():n(new Error("Could not get a unique tmp filename, max tries reached "+o));n(null,o)})}catch(o){n(o)}})()}function ZF(e){let t=e1(e),r=t[0];r6e(r);let i=r.tries;do{let n=t6e(r);try{tr.statSync(n)}catch{return n}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function vnt(e,t){let r=e1(e,t),i=r[0],n=r[1];JF(i,function(a,o){if(a)return n(a);tr.open(o,K2e,i.mode||X2e,function(l,c){if(l)return n(l);if(i.discardDescriptor)return tr.close(c,function(p){return n(p,o,void 0,WF(o,-1,i,!1))});{let d=i.discardDescriptor||i.detachDescriptor;n(null,o,c,WF(o,d?-1:c,i,!1))}})})}function wnt(e){let t=e1(e),r=t[0],i=r.discardDescriptor||r.detachDescriptor,n=ZF(r);var s=tr.openSync(n,K2e,r.mode||X2e);return r.discardDescriptor&&(tr.closeSync(s),s=void 0),{name:n,fd:s,removeCallback:WF(n,i?-1:s,r,!0)}}function _nt(e,t){let r=e1(e,t),i=r[0],n=r[1];JF(i,function(a,o){if(a)return n(a);tr.mkdir(o,i.mode||Y2e,function(l){if(l)return n(l);n(null,o,e6e(o,i,!1))})})}function Dnt(e){let t=e1(e),r=t[0],i=ZF(r);return tr.mkdirSync(i,r.mode||Y2e),{name:i,removeCallback:e6e(i,r,!0)}}function bnt(e,t){let r=function(i){if(i&&!YF(i))return t(i);t()};0<=e[0]?tr.close(e[0],function(){tr.unlink(e[1],r)}):tr.unlink(e[1],r)}function Ent(e){let t=null;try{0<=e[0]&&tr.closeSync(e[0])}catch(r){if(!Cnt(r)&&!YF(r))throw r}finally{try{tr.unlinkSync(e[1])}catch(r){YF(r)||(t=r)}}if(t!==null)throw t}function WF(e,t,r,i){let n=Jy(Ent,[t,e],i),s=Jy(bnt,[t,e],i,n);return r.keep||Qf.unshift(n),i?n:s}function e6e(e,t,r){let i=t.unsafeCleanup?ynt:tr.rmdir.bind(tr),n=t.unsafeCleanup?Q2e:J2e,s=Jy(n,e,r),a=Jy(i,e,r,s);return t.keep||Qf.unshift(s),r?s:a}function Jy(e,t,r,i){let n=!1;return function s(a){if(!n){let o=i||s,u=Qf.indexOf(o);return u>=0&&Qf.splice(u,1),n=!0,r||e===J2e||e===Q2e?e(t):e(t,a||function(){})}}}function xnt(){if(Z2e)for(;Qf.length;)try{Qf[0]()}catch{}}function G2e(e){let t=[],r=null;try{r=H2e.randomBytes(e)}catch{r=H2e.pseudoRandomBytes(e)}for(var i=0;i<e;i++)t.push(z2e[r[i]%z2e.length]);return t.join("")}function Snt(e){return e===null||Ki(e)||!e.trim()}function Ki(e){return typeof e>"u"}function e1(e,t){if(typeof e=="function")return[{},e];if(Ki(e))return[{},t];let r={};for(let i of Object.getOwnPropertyNames(e))r[i]=e[i];return[r,t]}function t6e(e){let t=e.tmpdir;if(!Ki(e.name))return pn.join(t,e.dir,e.name);if(!Ki(e.template))return pn.join(t,e.dir,e.template).replace(W2e,G2e(6));let r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",G2e(12),e.postfix?"-"+e.postfix:""].join("");return pn.join(t,e.dir,r)}function r6e(e){e.tmpdir=n6e(e);let t=e.tmpdir;if(Ki(e.name)||GF(e.name,"name",t),Ki(e.dir)||GF(e.dir,"dir",t),!Ki(e.template)&&(GF(e.template,"template",t),!e.template.match(W2e)))throw new Error(`Invalid template, found "${e.template}".`);if(!Ki(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=Ki(e.name)?e.tries||pnt:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.dir=Ki(e.dir)?"":pn.relative(t,KF(e.dir,t)),e.template=Ki(e.template)?void 0:pn.relative(t,KF(e.template,t)),e.template=Snt(e.template)?void 0:pn.relative(e.dir,e.template),e.name=Ki(e.name)?void 0:e.name,e.prefix=Ki(e.prefix)?"":e.prefix,e.postfix=Ki(e.postfix)?"":e.postfix}function KF(e,t){return e.startsWith(t)?pn.resolve(e):pn.resolve(pn.join(t,e))}function GF(e,t,r){if(t==="name"){if(pn.isAbsolute(e))throw new Error(`${t} option must not contain an absolute path, found "${e}".`);let i=pn.basename(e);if(i===".."||i==="."||i!==e)throw new Error(`${t} option must not contain a path, found "${e}".`)}else{if(pn.isAbsolute(e)&&!e.startsWith(r))throw new Error(`${t} option must be relative to "${r}", found "${e}".`);let i=KF(e,r);if(!i.startsWith(r))throw new Error(`${t} option must be relative to "${r}", found "${i}".`)}}function Cnt(e){return i6e(e,-hnt,"EBADF")}function YF(e){return i6e(e,-mnt,"ENOENT")}function i6e(e,t,r){return fnt?e.code===r:e.code===r&&e.errno===t}function Ant(){Z2e=!0}function n6e(e){return pn.resolve(e&&e.tmpdir||XF.tmpdir())}process.addListener(gnt,xnt);Object.defineProperty(Io.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return n6e()}});Io.exports.dir=_nt;Io.exports.dirSync=Dnt;Io.exports.file=vnt;Io.exports.fileSync=wnt;Io.exports.tmpName=JF;Io.exports.tmpNameSync=ZF;Io.exports.setGracefulCleanup=Ant});var iN=m(t1=>{"use strict";Object.defineProperty(t1,"__esModule",{value:!0});t1.DEFAULT_COLOR_MAP=void 0;t1.DEFAULT_COLOR_MAP={red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",white_bold:"\x1B[01m",reset:"\x1B[0m"};var rN=class{constructor(t=t1.DEFAULT_COLOR_MAP){this.text="",this.colorMap=t}addCharsWithColor(t,r){let i=this.colorMap[t];this.text+=i!==void 0?`${i}${r}${this.colorMap.reset}`:r}renderConsole(){return this.text}};t1.default=rN});var L2=m(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.DEFAULT_HEADER_ALIGNMENT=rr.DEFAULT_ROW_ALIGNMENT=rr.DEFAULT_HEADER_FONT_COLOR=rr.DEFAULT_ROW_FONT_COLOR=rr.COLORS=rr.ALIGNMENTS=rr.DEFAULT_TABLE_STYLE=rr.DEFAULT_ROW_SEPARATOR=rr.DEFAULT_COLUMN_LEN=void 0;rr.DEFAULT_COLUMN_LEN=20;rr.DEFAULT_ROW_SEPARATOR=!1;rr.DEFAULT_TABLE_STYLE={headerTop:{left:"\u250C",mid:"\u252C",right:"\u2510",other:"\u2500"},headerBottom:{left:"\u251C",mid:"\u253C",right:"\u2524",other:"\u2500"},tableBottom:{left:"\u2514",mid:"\u2534",right:"\u2518",other:"\u2500"},vertical:"\u2502",rowSeparator:{left:"\u251C",mid:"\u253C",right:"\u2524",other:"\u2500"}};rr.ALIGNMENTS=["right","left","center"];rr.COLORS=["red","green","yellow","white","blue","magenta","cyan","white_bold","reset"];rr.DEFAULT_ROW_FONT_COLOR="white";rr.DEFAULT_HEADER_FONT_COLOR="white_bold";rr.DEFAULT_ROW_ALIGNMENT="right";rr.DEFAULT_HEADER_ALIGNMENT="center"});var nN=m(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.rawColumnToInternalColumn=Bo.objIfExists=void 0;var Rnt=L2(),Pnt=(e,t)=>t?{[e]:t}:{};Bo.objIfExists=Pnt;var Int=e=>{var t;return Object.assign(Object.assign(Object.assign(Object.assign({name:e.name,title:(t=e.title)!==null&&t!==void 0?t:e.name},(0,Bo.objIfExists)("color",e.color)),(0,Bo.objIfExists)("maxLen",e.maxLen)),(0,Bo.objIfExists)("minLen",e.minLen)),{alignment:e.alignment||Rnt.DEFAULT_ROW_ALIGNMENT})};Bo.rawColumnToInternalColumn=Int});var c6e=m(sN=>{"use strict";Object.defineProperty(sN,"__esModule",{value:!0});var Lnt=[{first:768,last:879},{first:1155,last:1158},{first:1160,last:1161},{first:1425,last:1469},{first:1471,last:1471},{first:1473,last:1474},{first:1476,last:1477},{first:1479,last:1479},{first:1536,last:1539},{first:1552,last:1557},{first:1611,last:1630},{first:1648,last:1648},{first:1750,last:1764},{first:1767,last:1768},{first:1770,last:1773},{first:1807,last:1807},{first:1809,last:1809},{first:1840,last:1866},{first:1958,last:1968},{first:2027,last:2035},{first:2305,last:2306},{first:2364,last:2364},{first:2369,last:2376},{first:2381,last:2381},{first:2385,last:2388},{first:2402,last:2403},{first:2433,last:2433},{first:2492,last:2492},{first:2497,last:2500},{first:2509,last:2509},{first:2530,last:2531},{first:2561,last:2562},{first:2620,last:2620},{first:2625,last:2626},{first:2631,last:2632},{first:2635,last:2637},{first:2672,last:2673},{first:2689,last:2690},{first:2748,last:2748},{first:2753,last:2757},{first:2759,last:2760},{first:2765,last:2765},{first:2786,last:2787},{first:2817,last:2817},{first:2876,last:2876},{first:2879,last:2879},{first:2881,last:2883},{first:2893,last:2893},{first:2902,last:2902},{first:2946,last:2946},{first:3008,last:3008},{first:3021,last:3021},{first:3134,last:3136},{first:3142,last:3144},{first:3146,last:3149},{first:3157,last:3158},{first:3260,last:3260},{first:3263,last:3263},{first:3270,last:3270},{first:3276,last:3277},{first:3298,last:3299},{first:3393,last:3395},{first:3405,last:3405},{first:3530,last:3530},{first:3538,last:3540},{first:3542,last:3542},{first:3633,last:3633},{first:3636,last:3642},{first:3655,last:3662},{first:3761,last:3761},{first:3764,last:3769},{first:3771,last:3772},{first:3784,last:3789},{first:3864,last:3865},{first:3893,last:3893},{first:3895,last:3895},{first:3897,last:3897},{first:3953,last:3966},{first:3968,last:3972},{first:3974,last:3975},{first:3984,last:3991},{first:3993,last:4028},{first:4038,last:4038},{first:4141,last:4144},{first:4146,last:4146},{first:4150,last:4151},{first:4153,last:4153},{first:4184,last:4185},{first:4448,last:4607},{first:4959,last:4959},{first:5906,last:5908},{first:5938,last:5940},{first:5970,last:5971},{first:6002,last:6003},{first:6068,last:6069},{first:6071,last:6077},{first:6086,last:6086},{first:6089,last:6099},{first:6109,last:6109},{first:6155,last:6157},{first:6313,last:6313},{first:6432,last:6434},{first:6439,last:6440},{first:6450,last:6450},{first:6457,last:6459},{first:6679,last:6680},{first:6912,last:6915},{first:6964,last:6964},{first:6966,last:6970},{first:6972,last:6972},{first:6978,last:6978},{first:7019,last:7027},{first:7616,last:7626},{first:7678,last:7679},{first:8203,last:8207},{first:8234,last:8238},{first:8288,last:8291},{first:8298,last:8303},{first:8400,last:8431},{first:12330,last:12335},{first:12441,last:12442},{first:43014,last:43014},{first:43019,last:43019},{first:43045,last:43046},{first:64286,last:64286},{first:65024,last:65039},{first:65056,last:65059},{first:65279,last:65279},{first:65529,last:65531},{first:68097,last:68099},{first:68101,last:68102},{first:68108,last:68111},{first:68152,last:68154},{first:68159,last:68159},{first:119143,last:119145},{first:119155,last:119170},{first:119173,last:119179},{first:119210,last:119213},{first:119362,last:119364},{first:917505,last:917505},{first:917536,last:917631},{first:917760,last:917999}];sN.default=Lnt});var d6e=m(aN=>{"use strict";Object.defineProperty(aN,"__esModule",{value:!0});var Bnt=(e,t,r)=>{let i=0,n,s=r;if(e<t[0].first||e>t[s].last)return 0;for(;s>=i;)if(n=Math.floor((i+s)/2),e>t[n].last)i=n+1;else if(e<t[n].first)s=n-1;else return 1;return 0};aN.default=Bnt});var oN=m(B2=>{"use strict";var f6e=B2&&B2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(B2,"__esModule",{value:!0});var p6e=f6e(c6e()),qnt=f6e(d6e()),jnt=e=>e===0?0:e<32||e>=127&&e<160?-1:qnt.default(e,p6e.default,p6e.default.length-1)?0:1+ +(e>=4352&&(e<=4447||e===9001||e===9002||e>=11904&&e<=42191&&e!==12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141));B2.default=jnt});var h6e=m(q2=>{"use strict";var $nt=q2&&q2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(q2,"__esModule",{value:!0});var Mnt=$nt(oN()),Unt=e=>{let t=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r),n=Mnt.default(i);if(n<0)return-1;t+=n}return t};q2.default=Unt});var g6e=m(ol=>{"use strict";var m6e=ol&&ol.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ol,"__esModule",{value:!0});ol.wcswidth=ol.wcwidth=void 0;var Vnt=m6e(h6e());ol.wcswidth=Vnt.default;var Hnt=m6e(oN());ol.wcwidth=Hnt.default});var uN=m(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.findWidthInConsole=Jc.stripAnsi=void 0;var znt=g6e(),Gnt=/\x1b\[\d{1,3}(;\d{1,3})*m/g,Wnt=e=>e.replace(Gnt,"");Jc.stripAnsi=Wnt;var Knt=(e,t)=>{let r=0;return e=(0,Jc.stripAnsi)(e),t&&Object.entries(t).forEach(([i,n])=>{let s=new RegExp(i,"g");r+=(e.match(s)||[]).length*n,e=e.replace(i,"")}),r+=(0,znt.wcswidth)(e),r};Jc.findWidthInConsole=Knt});var cN=m(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.biggestWordInSentence=Ea.textWithPadding=Ea.splitTextIntoTextsOfMinLen=void 0;var lN=uN(),Ynt=(e,t,r)=>{let i=[];return e.split(/[\n\r]/).forEach(s=>{let a=s.split(" "),o=[],u=0;a.forEach(l=>{let c=(0,lN.findWidthInConsole)(l,r);u+c<=t?(u+=c+1,o.push(l)):(o.length>0&&i.push(o.join(" ")),o=[l],u=c+1)}),i.push(o.join(" "))}),i};Ea.splitTextIntoTextsOfMinLen=Ynt;var Xnt=(e,t,r,i)=>{let n=(0,lN.findWidthInConsole)(e,i),s=Math.floor((r-n)/2),a=r-s-n;if(r<n){let o=(0,Ea.splitTextIntoTextsOfMinLen)(e,r);return o.length===1?e:o.map(u=>(0,Ea.textWithPadding)(u,t,r,i)).join(`
282
282
  `)}switch(t){case"left":return e.concat(" ".repeat(r-n));case"center":return" ".repeat(s).concat(e).concat(" ".repeat(a));case"right":default:return" ".repeat(r-n).concat(e)}};Ea.textWithPadding=Xnt;var Jnt=(e,t)=>e.split(" ").reduce((r,i)=>Math.max(r,(0,lN.findWidthInConsole)(i,t)),0);Ea.biggestWordInSentence=Jnt});var j2=m(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.getWidthLimitedColumnsArray=it.createHeaderAsRow=it.renderTableHorizontalBorders=it.findLenOfColumn=it.createRow=it.createColumFromComputedColumn=it.createColumFromOnlyName=it.createTableHorizontalBorders=it.convertRawRowOptionsToStandard=it.cellText=void 0;var dN=nN(),y6e=uN(),pN=cN(),Zy=L2(),r1=(e,t)=>Math.max(e,t),Znt=e=>e==null?"":`${e}`;it.cellText=Znt;var Qnt=e=>{if(e)return{color:e.color,separator:e.separator||Zy.DEFAULT_ROW_SEPARATOR}};it.convertRawRowOptionsToStandard=Qnt;var est=({left:e,mid:t,right:r,other:i},n)=>{let s=e;return n.forEach(a=>{s+=i.repeat(a+2),s+=t}),s=s.slice(0,-t.length),s+=r,s};it.createTableHorizontalBorders=est;var tst=e=>({name:e,title:e});it.createColumFromOnlyName=tst;var rst=e=>{var t;return Object.assign(Object.assign(Object.assign(Object.assign({name:e.name,title:(t=e.title)!==null&&t!==void 0?t:e.name},(0,dN.objIfExists)("color",e.color)),(0,dN.objIfExists)("maxLen",e.maxLen)),(0,dN.objIfExists)("minLen",e.minLen)),{alignment:e.alignment||Zy.DEFAULT_ROW_ALIGNMENT})};it.createColumFromComputedColumn=rst;var ist=(e,t,r)=>({color:e,separator:r,text:t});it.createRow=ist;var nst=(e,t,r)=>{let i=e.name,n=e.title,s=r1(0,e?.minLen||0);return e.maxLen?(s=r1(s,r1(e.maxLen,(0,pN.biggestWordInSentence)(n,r))),s=t.reduce((a,o)=>r1(a,(0,pN.biggestWordInSentence)((0,it.cellText)(o.text[i]),r)),s),s):(s=r1(s,(0,y6e.findWidthInConsole)(n,r)),t.forEach(a=>{s=r1(s,(0,y6e.findWidthInConsole)((0,it.cellText)(a.text[i]),r))}),s)};it.findLenOfColumn=nst;var sst=(e,t)=>(0,it.createTableHorizontalBorders)(e,t);it.renderTableHorizontalBorders=sst;var ast=(e,t)=>{let r=Zy.DEFAULT_HEADER_FONT_COLOR,i=e(r,{},!1);return t.forEach(n=>{i.text[n.name]=n.title}),i};it.createHeaderAsRow=ast;var ost=(e,t,r)=>{let i={};return e.forEach(n=>{i[n.name]=(0,pN.splitTextIntoTextsOfMinLen)((0,it.cellText)(t.text[n.name]),n.length||Zy.DEFAULT_COLUMN_LEN,r)}),i};it.getWidthLimitedColumnsArray=ost});var v6e=m(i1=>{"use strict";Object.defineProperty(i1,"__esModule",{value:!0});i1.preProcessRows=i1.preProcessColumns=void 0;var ust=j2(),lst=e=>{e.computedColumns.length&&e.computedColumns.forEach(t=>{e.addColumn(t),e.rows.forEach(r=>{r.text[t.name]=t.function(r.text)})})},cst=e=>{e.enabledColumns.length&&(e.columns=e.columns.filter(t=>e.enabledColumns.includes(t.name)))},dst=e=>{e.disabledColumns.length&&(e.columns=e.columns.filter(t=>!e.disabledColumns.includes(t.name)))},pst=e=>{e.columns.forEach(t=>{t.length=(0,ust.findLenOfColumn)(t,e.rows,e.charLength)})},fst=e=>{lst(e),dst(e),cst(e),pst(e)};i1.preProcessColumns=fst;var hst=e=>{let t=e.rows.filter(r=>e.filterFunction(r.text)).sort((r,i)=>e.sortFunction(r.text,i.text));e.rows=t};i1.preProcessRows=hst});var fN=m(Qn=>{"use strict";var _6e=Qn&&Qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.printSimpleTable=Qn.renderSimpleTable=Qn.renderTable=void 0;var D6e=_6e(iN()),b6e=cN(),Ss=L2(),ul=j2(),mst=_6e(hN()),w6e=v6e(),gst=(e,t,r,i,n,s,a,o)=>{let u=new D6e.default(a);return u.addCharsWithColor("",e.vertical),t.forEach(l=>{let d=r<i[l.name].length?(0,ul.cellText)(i[l.name][r]):"";u.addCharsWithColor(Ss.DEFAULT_ROW_FONT_COLOR," "),u.addCharsWithColor(n&&Ss.DEFAULT_HEADER_FONT_COLOR||l.color||s.color,(0,b6e.textWithPadding)(d,l.alignment||Ss.DEFAULT_ROW_ALIGNMENT,l.length||Ss.DEFAULT_COLUMN_LEN,o)),u.addCharsWithColor("",` ${e.vertical}`)}),u.renderConsole()},E6e=(e,t,r,i,n,s)=>{let a=(0,ul.getWidthLimitedColumnsArray)(t,r,s),o=Object.values(a).reduce((l,c)=>Math.max(l,c.length),0),u=[];for(let l=0;l<o;l+=1){let c=gst(e,t,l,a,n,r,i,s);u.push(c)}return u},yst=(e,t)=>{let r=[];return r=r.concat(E6e(e.tableStyle,e.columns,t,e.colorMap,void 0,e.charLength)),r},vst=e=>{let t=[];if(e.title===void 0)return t;let r=()=>{let s=(a,o)=>a+o+2+1;return e.columns.map(a=>a.length||Ss.DEFAULT_COLUMN_LEN).reduce(s,1)},i=(0,b6e.textWithPadding)(e.title,Ss.DEFAULT_HEADER_ALIGNMENT,r()),n=new D6e.default(e.colorMap);return n.addCharsWithColor(Ss.DEFAULT_HEADER_FONT_COLOR,i),t.push(n.renderConsole()),t},wst=e=>{let t=[];t.push((0,ul.renderTableHorizontalBorders)(e.tableStyle.headerTop,e.columns.map(i=>i.length||Ss.DEFAULT_COLUMN_LEN)));let r=(0,ul.createHeaderAsRow)(ul.createRow,e.columns);return t=t.concat(E6e(e.tableStyle,e.columns,r,e.colorMap,!0)),t.push((0,ul.renderTableHorizontalBorders)(e.tableStyle.headerBottom,e.columns.map(i=>i.length||Ss.DEFAULT_COLUMN_LEN))),t},_st=e=>{let t=[];return t.push((0,ul.renderTableHorizontalBorders)(e.tableStyle.tableBottom,e.columns.map(r=>r.length||Ss.DEFAULT_COLUMN_LEN))),t},Dst=(e,t)=>{let r=[],i=e.rows.length-1;return e.rows.indexOf(t)!==i&&t.separator&&r.push((0,ul.renderTableHorizontalBorders)(e.tableStyle.rowSeparator,e.columns.map(s=>s.length||Ss.DEFAULT_COLUMN_LEN))),r},bst=e=>{(0,w6e.preProcessColumns)(e),(0,w6e.preProcessRows)(e);let t=[];return vst(e).forEach(r=>t.push(r)),wst(e).forEach(r=>t.push(r)),e.rows.forEach(r=>{yst(e,r).forEach(i=>t.push(i)),Dst(e,r).forEach(i=>t.push(i))}),_st(e).forEach(r=>t.push(r)),t.join(`
283
- `)};Qn.renderTable=bst;var Est=e=>{let t=new mst.default;return t.addRows(e),(0,Qn.renderTable)(t)};Qn.renderSimpleTable=Est;var xst=e=>{console.log((0,Qn.renderSimpleTable)(e))};Qn.printSimpleTable=xst});var hN=m(gN=>{"use strict";Object.defineProperty(gN,"__esModule",{value:!0});var Sst=iN(),Qy=L2(),e5=j2(),Cst=nN(),Ast=fN(),Tst=()=>0,Ost=()=>!0,mN=class{initSimple(t){this.columns=t.map(r=>({name:r,title:r,alignment:Qy.DEFAULT_ROW_ALIGNMENT}))}initDetailed(t){var r;this.title=t?.title||this.title,this.tableStyle=t?.style||this.tableStyle,this.sortFunction=t?.sort||this.sortFunction,this.filterFunction=t?.filter||this.filterFunction,this.enabledColumns=t?.enabledColumns||this.enabledColumns,this.disabledColumns=t?.disabledColumns||this.disabledColumns,this.computedColumns=t?.computedColumns||this.computedColumns,this.columns=((r=t?.columns)===null||r===void 0?void 0:r.map(Cst.rawColumnToInternalColumn))||this.columns,this.rowSeparator=t?.rowSeparator||this.rowSeparator,this.charLength=t?.charLength||this.charLength,t?.shouldDisableColors?this.colorMap={}:t?.colorMap&&(this.colorMap=Object.assign(Object.assign({},this.colorMap),t.colorMap)),t.rows!==void 0&&this.addRows(t.rows)}constructor(t){this.rows=[],this.columns=[],this.title=void 0,this.tableStyle=Qy.DEFAULT_TABLE_STYLE,this.filterFunction=Ost,this.sortFunction=Tst,this.enabledColumns=[],this.disabledColumns=[],this.computedColumns=[],this.rowSeparator=Qy.DEFAULT_ROW_SEPARATOR,this.colorMap=Sst.DEFAULT_COLOR_MAP,this.charLength={},t instanceof Array?this.initSimple(t):typeof t=="object"&&this.initDetailed(t)}createColumnFromRow(t){let r=this.columns.map(i=>i.name);Object.keys(t).forEach(i=>{r.includes(i)||this.columns.push((0,e5.createColumFromOnlyName)(i))})}addColumn(t){typeof t=="string"?this.columns.push((0,e5.createColumFromOnlyName)(t)):this.columns.push((0,e5.createColumFromComputedColumn)(t))}addColumns(t){t.forEach(r=>{this.addColumn(r)})}addRow(t,r){this.createColumnFromRow(t),this.rows.push((0,e5.createRow)(r?.color||Qy.DEFAULT_ROW_FONT_COLOR,t,r?.separator!==void 0?r?.separator:this.rowSeparator))}addRows(t,r){t.forEach(i=>{this.addRow(i,r)})}renderTable(){return(0,Ast.renderTable)(this)}};gN.default=mN});var S6e=m($2=>{"use strict";var Fst=$2&&$2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($2,"__esModule",{value:!0});var Nst=Fst(hN()),x6e=j2(),yN=class{constructor(t){this.table=new Nst.default(t)}addColumn(t){return this.table.addColumn(t),this}addColumns(t){return this.table.addColumns(t),this}addRow(t,r){return this.table.addRow(t,(0,x6e.convertRawRowOptionsToStandard)(r)),this}addRows(t,r){return this.table.addRows(t,(0,x6e.convertRawRowOptionsToStandard)(r)),this}printTable(){let t=this.table.renderTable();console.log(t)}render(){return this.table.renderTable()}};$2.default=yN});var M2=m(xa=>{"use strict";var kst=xa&&xa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xa,"__esModule",{value:!0});xa.renderTable=xa.printTable=xa.Table=void 0;var Rst=kst(S6e());xa.Table=Rst.default;var C6e=fN();Object.defineProperty(xa,"printTable",{enumerable:!0,get:function(){return C6e.printSimpleTable}});Object.defineProperty(xa,"renderTable",{enumerable:!0,get:function(){return C6e.renderSimpleTable}})});var L6e=m((q3t,Pst)=>{Pst.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var _N=m(fn=>{"use strict";var q6e=L6e(),cr=process.env;Object.defineProperty(fn,"_vendors",{value:q6e.map(function(e){return e.constant})});fn.name=null;fn.isPR=null;q6e.forEach(function(e){let r=(Array.isArray(e.env)?e.env:[e.env]).every(function(i){return B6e(i)});if(fn[e.constant]=r,!!r)switch(fn.name=e.name,typeof e.pr){case"string":fn.isPR=!!cr[e.pr];break;case"object":"env"in e.pr?fn.isPR=e.pr.env in cr&&cr[e.pr.env]!==e.pr.ne:"any"in e.pr?fn.isPR=e.pr.any.some(function(i){return!!cr[i]}):fn.isPR=B6e(e.pr);break;default:fn.isPR=null}});fn.isCI=!!(cr.CI!=="false"&&(cr.BUILD_ID||cr.BUILD_NUMBER||cr.CI||cr.CI_APP_ID||cr.CI_BUILD_ID||cr.CI_BUILD_NUMBER||cr.CI_NAME||cr.CONTINUOUS_INTEGRATION||cr.RUN_ID||fn.name));function B6e(e){return typeof e=="string"?!!cr[e]:"env"in e?cr[e.env]&&cr[e.env].includes(e.includes):"any"in e?e.any.some(function(t){return!!cr[t]}):Object.keys(e).every(function(t){return cr[t]===e[t]})}});var B4e=m((Gyt,L4e)=>{L4e.exports=yg()});var ZN=ge(JN(),1),{program:B,createCommand:Rat,createArgument:Pat,createOption:Iat,CommanderError:Lat,InvalidArgumentError:Bat,InvalidOptionArgumentError:qat,Command:jat,Argument:$at,Option:Mat,Help:Uat}=ZN.default;var Uo={name:"@capgo/cli",version:"4.14.2",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=18.0.0"},scripts:{build:"node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^2.23.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^6.1.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.7.0","@manypkg/find-root":"^2.2.1","@supabase/supabase-js":"^2.44.4","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"0.5.5","@types/mime":"^4.0.0","@types/node":"^20.14.11","@types/npmcli__ci-detect":"^2.0.3","@types/prettyjson":"^0.0.33","@types/prompt-sync":"^4.2.3","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@typescript-eslint/eslint-plugin":"^7.16.1","@typescript-eslint/parser":"^7.16.1","@vercel/ncc":"^0.38.1","adm-zip":"^0.5.14","ci-info":"^4.0.0",commander:"12.1.0","console-table-printer":"^2.12.1",esbuild:"^0.23.0",eslint:"9.9.0","get-latest-version":"^5.1.0","git-format-staged":"3.1.1",husky:"^9.1.1","is-wsl":"^3.1.0",jszip:"^3.10.1",ky:"^1.4.0",logsnag:"1.0.0",mime:"^4.0.4",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.6.2",tmp:"^0.2.3","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"4.2.0",typescript:"5.5.4","node-dir":"^0.1.17"}};var lr=require("node:fs"),fF=ge(require("node:process")),_me=require("node:buffer");var si=ge(nt(),1),id=require("node:process"),Vo=ge(require("node:readline"),1),$5=ge(require("node:readline"),1),ok=require("node:tty");function bge({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function uk(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(bge(),"")}var M5={},Ege={get exports(){return M5},set exports(e){M5=e}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(i){var n=i.charCodeAt(0),s=i.length==2?i.charCodeAt(1):0,a=n;return 55296<=n&&n<=56319&&56320<=s&&s<=57343&&(n&=1023,s&=1023,a=n<<10|s,a+=65536),a==12288||65281<=a&&a<=65376||65504<=a&&a<=65510?"F":a==8361||65377<=a&&a<=65470||65474<=a&&a<=65479||65482<=a&&a<=65487||65490<=a&&a<=65495||65498<=a&&a<=65500||65512<=a&&a<=65518?"H":4352<=a&&a<=4447||4515<=a&&a<=4519||4602<=a&&a<=4607||9001<=a&&a<=9002||11904<=a&&a<=11929||11931<=a&&a<=12019||12032<=a&&a<=12245||12272<=a&&a<=12283||12289<=a&&a<=12350||12353<=a&&a<=12438||12441<=a&&a<=12543||12549<=a&&a<=12589||12593<=a&&a<=12686||12688<=a&&a<=12730||12736<=a&&a<=12771||12784<=a&&a<=12830||12832<=a&&a<=12871||12880<=a&&a<=13054||13056<=a&&a<=19903||19968<=a&&a<=42124||42128<=a&&a<=42182||43360<=a&&a<=43388||44032<=a&&a<=55203||55216<=a&&a<=55238||55243<=a&&a<=55291||63744<=a&&a<=64255||65040<=a&&a<=65049||65072<=a&&a<=65106||65108<=a&&a<=65126||65128<=a&&a<=65131||110592<=a&&a<=110593||127488<=a&&a<=127490||127504<=a&&a<=127546||127552<=a&&a<=127560||127568<=a&&a<=127569||131072<=a&&a<=194367||177984<=a&&a<=196605||196608<=a&&a<=262141?"W":32<=a&&a<=126||162<=a&&a<=163||165<=a&&a<=166||a==172||a==175||10214<=a&&a<=10221||10629<=a&&a<=10630?"Na":a==161||a==164||167<=a&&a<=168||a==170||173<=a&&a<=174||176<=a&&a<=180||182<=a&&a<=186||188<=a&&a<=191||a==198||a==208||215<=a&&a<=216||222<=a&&a<=225||a==230||232<=a&&a<=234||236<=a&&a<=237||a==240||242<=a&&a<=243||247<=a&&a<=250||a==252||a==254||a==257||a==273||a==275||a==283||294<=a&&a<=295||a==299||305<=a&&a<=307||a==312||319<=a&&a<=322||a==324||328<=a&&a<=331||a==333||338<=a&&a<=339||358<=a&&a<=359||a==363||a==462||a==464||a==466||a==468||a==470||a==472||a==474||a==476||a==593||a==609||a==708||a==711||713<=a&&a<=715||a==717||a==720||728<=a&&a<=731||a==733||a==735||768<=a&&a<=879||913<=a&&a<=929||931<=a&&a<=937||945<=a&&a<=961||963<=a&&a<=969||a==1025||1040<=a&&a<=1103||a==1105||a==8208||8211<=a&&a<=8214||8216<=a&&a<=8217||8220<=a&&a<=8221||8224<=a&&a<=8226||8228<=a&&a<=8231||a==8240||8242<=a&&a<=8243||a==8245||a==8251||a==8254||a==8308||a==8319||8321<=a&&a<=8324||a==8364||a==8451||a==8453||a==8457||a==8467||a==8470||8481<=a&&a<=8482||a==8486||a==8491||8531<=a&&a<=8532||8539<=a&&a<=8542||8544<=a&&a<=8555||8560<=a&&a<=8569||a==8585||8592<=a&&a<=8601||8632<=a&&a<=8633||a==8658||a==8660||a==8679||a==8704||8706<=a&&a<=8707||8711<=a&&a<=8712||a==8715||a==8719||a==8721||a==8725||a==8730||8733<=a&&a<=8736||a==8739||a==8741||8743<=a&&a<=8748||a==8750||8756<=a&&a<=8759||8764<=a&&a<=8765||a==8776||a==8780||a==8786||8800<=a&&a<=8801||8804<=a&&a<=8807||8810<=a&&a<=8811||8814<=a&&a<=8815||8834<=a&&a<=8835||8838<=a&&a<=8839||a==8853||a==8857||a==8869||a==8895||a==8978||9312<=a&&a<=9449||9451<=a&&a<=9547||9552<=a&&a<=9587||9600<=a&&a<=9615||9618<=a&&a<=9621||9632<=a&&a<=9633||9635<=a&&a<=9641||9650<=a&&a<=9651||9654<=a&&a<=9655||9660<=a&&a<=9661||9664<=a&&a<=9665||9670<=a&&a<=9672||a==9675||9678<=a&&a<=9681||9698<=a&&a<=9701||a==9711||9733<=a&&a<=9734||a==9737||9742<=a&&a<=9743||9748<=a&&a<=9749||a==9756||a==9758||a==9792||a==9794||9824<=a&&a<=9825||9827<=a&&a<=9829||9831<=a&&a<=9834||9836<=a&&a<=9837||a==9839||9886<=a&&a<=9887||9918<=a&&a<=9919||9924<=a&&a<=9933||9935<=a&&a<=9953||a==9955||9960<=a&&a<=9983||a==10045||a==10071||10102<=a&&a<=10111||11093<=a&&a<=11097||12872<=a&&a<=12879||57344<=a&&a<=63743||65024<=a&&a<=65039||a==65533||127232<=a&&a<=127242||127248<=a&&a<=127277||127280<=a&&a<=127337||127344<=a&&a<=127386||917760<=a&&a<=917999||983040<=a&&a<=1048573||1048576<=a&&a<=1114109?"A":"N"},t.characterLength=function(i){var n=this.eastAsianWidth(i);return n=="F"||n=="W"||n=="A"?2:1};function r(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(i){for(var n=r(i),s=0,a=0;a<n.length;a++)s=s+this.characterLength(n[a]);return s},t.slice=function(i,n,s){textLen=t.length(i),n=n||0,s=s||1,n<0&&(n=textLen+n),s<0&&(s=textLen+s);for(var a="",o=0,u=r(i),l=0;l<u.length;l++){var c=u[l],d=t.length(c);if(o>=n-(d==2?1:0))if(o+d<=s)a+=c;else break;o+=d}return a}})(Ege);var xge=M5,Sge=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function f1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=uk(e),e.length===0))return 0;e=e.replace(Sge()," ");let r=t.ambiguousIsNarrow?1:2,i=0;for(let n of e){let s=n.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(xge.eastAsianWidth(n)){case"F":case"W":i+=2;break;case"A":i+=r;break;default:i+=1}}return i}var q5=10,ek=(e=0)=>t=>`\x1B[${t+e}m`,tk=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,rk=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,dt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(dt.modifier);var Cge=Object.keys(dt.color),Age=Object.keys(dt.bgColor);[...Cge,...Age];function Tge(){let e=new Map;for(let[t,r]of Object.entries(dt)){for(let[i,n]of Object.entries(r))dt[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=dt[i],e.set(n[0],n[1]);Object.defineProperty(dt,t,{value:r,enumerable:!1})}return Object.defineProperty(dt,"codes",{value:e,enumerable:!1}),dt.color.close="\x1B[39m",dt.bgColor.close="\x1B[49m",dt.color.ansi=ek(),dt.color.ansi256=tk(),dt.color.ansi16m=rk(),dt.bgColor.ansi=ek(q5),dt.bgColor.ansi256=tk(q5),dt.bgColor.ansi16m=rk(q5),Object.defineProperties(dt,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(s=>s+s).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>dt.rgbToAnsi256(...dt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,i=Math.floor(o/6)/5,n=o%6/5}let s=Math.max(r,i,n)*2;if(s===0)return 30;let a=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>dt.ansi256ToAnsi(dt.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>dt.ansi256ToAnsi(dt.hexToAnsi256(t)),enumerable:!1}}),dt}var Oge=Tge(),s6=new Set(["\x1B","\x9B"]),Fge=39,U5="\x07",lk="[",Nge="]",ck="m",V5=`${Nge}8;;`,ik=e=>`${s6.values().next().value}${lk}${e}${ck}`,nk=e=>`${s6.values().next().value}${V5}${e}${U5}`,kge=e=>e.split(" ").map(t=>f1(t)),j5=(e,t,r)=>{let i=[...t],n=!1,s=!1,a=f1(uk(e[e.length-1]));for(let[o,u]of i.entries()){let l=f1(u);if(a+l<=r?e[e.length-1]+=u:(e.push(u),a=0),s6.has(u)&&(n=!0,s=i.slice(o+1).join("").startsWith(V5)),n){s?u===U5&&(n=!1,s=!1):u===ck&&(n=!1);continue}a+=l,a===r&&o<i.length-1&&(e.push(""),a=0)}!a&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Rge=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(f1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Pge=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let i="",n,s,a=kge(e),o=[""];for(let[l,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let d=f1(o[o.length-1]);if(l!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),d=0),(d>0||r.trim===!1)&&(o[o.length-1]+=" ",d++)),r.hard&&a[l]>t){let p=t-d,f=1+Math.floor((a[l]-p-1)/t);Math.floor((a[l]-1)/t)<f&&o.push(""),j5(o,c,t);continue}if(d+a[l]>t&&d>0&&a[l]>0){if(r.wordWrap===!1&&d<t){j5(o,c,t);continue}o.push("")}if(d+a[l]>t&&r.wordWrap===!1){j5(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(l=>Rge(l)));let u=[...o.join(`
283
+ `)};Qn.renderTable=bst;var Est=e=>{let t=new mst.default;return t.addRows(e),(0,Qn.renderTable)(t)};Qn.renderSimpleTable=Est;var xst=e=>{console.log((0,Qn.renderSimpleTable)(e))};Qn.printSimpleTable=xst});var hN=m(gN=>{"use strict";Object.defineProperty(gN,"__esModule",{value:!0});var Sst=iN(),Qy=L2(),e5=j2(),Cst=nN(),Ast=fN(),Tst=()=>0,Ost=()=>!0,mN=class{initSimple(t){this.columns=t.map(r=>({name:r,title:r,alignment:Qy.DEFAULT_ROW_ALIGNMENT}))}initDetailed(t){var r;this.title=t?.title||this.title,this.tableStyle=t?.style||this.tableStyle,this.sortFunction=t?.sort||this.sortFunction,this.filterFunction=t?.filter||this.filterFunction,this.enabledColumns=t?.enabledColumns||this.enabledColumns,this.disabledColumns=t?.disabledColumns||this.disabledColumns,this.computedColumns=t?.computedColumns||this.computedColumns,this.columns=((r=t?.columns)===null||r===void 0?void 0:r.map(Cst.rawColumnToInternalColumn))||this.columns,this.rowSeparator=t?.rowSeparator||this.rowSeparator,this.charLength=t?.charLength||this.charLength,t?.shouldDisableColors?this.colorMap={}:t?.colorMap&&(this.colorMap=Object.assign(Object.assign({},this.colorMap),t.colorMap)),t.rows!==void 0&&this.addRows(t.rows)}constructor(t){this.rows=[],this.columns=[],this.title=void 0,this.tableStyle=Qy.DEFAULT_TABLE_STYLE,this.filterFunction=Ost,this.sortFunction=Tst,this.enabledColumns=[],this.disabledColumns=[],this.computedColumns=[],this.rowSeparator=Qy.DEFAULT_ROW_SEPARATOR,this.colorMap=Sst.DEFAULT_COLOR_MAP,this.charLength={},t instanceof Array?this.initSimple(t):typeof t=="object"&&this.initDetailed(t)}createColumnFromRow(t){let r=this.columns.map(i=>i.name);Object.keys(t).forEach(i=>{r.includes(i)||this.columns.push((0,e5.createColumFromOnlyName)(i))})}addColumn(t){typeof t=="string"?this.columns.push((0,e5.createColumFromOnlyName)(t)):this.columns.push((0,e5.createColumFromComputedColumn)(t))}addColumns(t){t.forEach(r=>{this.addColumn(r)})}addRow(t,r){this.createColumnFromRow(t),this.rows.push((0,e5.createRow)(r?.color||Qy.DEFAULT_ROW_FONT_COLOR,t,r?.separator!==void 0?r?.separator:this.rowSeparator))}addRows(t,r){t.forEach(i=>{this.addRow(i,r)})}renderTable(){return(0,Ast.renderTable)(this)}};gN.default=mN});var S6e=m($2=>{"use strict";var Fst=$2&&$2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($2,"__esModule",{value:!0});var Nst=Fst(hN()),x6e=j2(),yN=class{constructor(t){this.table=new Nst.default(t)}addColumn(t){return this.table.addColumn(t),this}addColumns(t){return this.table.addColumns(t),this}addRow(t,r){return this.table.addRow(t,(0,x6e.convertRawRowOptionsToStandard)(r)),this}addRows(t,r){return this.table.addRows(t,(0,x6e.convertRawRowOptionsToStandard)(r)),this}printTable(){let t=this.table.renderTable();console.log(t)}render(){return this.table.renderTable()}};$2.default=yN});var M2=m(xa=>{"use strict";var kst=xa&&xa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xa,"__esModule",{value:!0});xa.renderTable=xa.printTable=xa.Table=void 0;var Rst=kst(S6e());xa.Table=Rst.default;var C6e=fN();Object.defineProperty(xa,"printTable",{enumerable:!0,get:function(){return C6e.printSimpleTable}});Object.defineProperty(xa,"renderTable",{enumerable:!0,get:function(){return C6e.renderSimpleTable}})});var L6e=m((q3t,Pst)=>{Pst.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var _N=m(fn=>{"use strict";var q6e=L6e(),cr=process.env;Object.defineProperty(fn,"_vendors",{value:q6e.map(function(e){return e.constant})});fn.name=null;fn.isPR=null;q6e.forEach(function(e){let r=(Array.isArray(e.env)?e.env:[e.env]).every(function(i){return B6e(i)});if(fn[e.constant]=r,!!r)switch(fn.name=e.name,typeof e.pr){case"string":fn.isPR=!!cr[e.pr];break;case"object":"env"in e.pr?fn.isPR=e.pr.env in cr&&cr[e.pr.env]!==e.pr.ne:"any"in e.pr?fn.isPR=e.pr.any.some(function(i){return!!cr[i]}):fn.isPR=B6e(e.pr);break;default:fn.isPR=null}});fn.isCI=!!(cr.CI!=="false"&&(cr.BUILD_ID||cr.BUILD_NUMBER||cr.CI||cr.CI_APP_ID||cr.CI_BUILD_ID||cr.CI_BUILD_NUMBER||cr.CI_NAME||cr.CONTINUOUS_INTEGRATION||cr.RUN_ID||fn.name));function B6e(e){return typeof e=="string"?!!cr[e]:"env"in e?cr[e.env]&&cr[e.env].includes(e.includes):"any"in e?e.any.some(function(t){return!!cr[t]}):Object.keys(e).every(function(t){return cr[t]===e[t]})}});var B4e=m((Gyt,L4e)=>{L4e.exports=yg()});var ZN=ge(JN(),1),{program:B,createCommand:Rat,createArgument:Pat,createOption:Iat,CommanderError:Lat,InvalidArgumentError:Bat,InvalidOptionArgumentError:qat,Command:jat,Argument:$at,Option:Mat,Help:Uat}=ZN.default;var Uo={name:"@capgo/cli",version:"4.14.4",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=18.0.0"},scripts:{build:"node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^2.23.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^6.1.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.7.0","@manypkg/find-root":"^2.2.1","@supabase/supabase-js":"^2.44.4","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"0.5.5","@types/mime":"^4.0.0","@types/node":"^20.14.11","@types/npmcli__ci-detect":"^2.0.3","@types/prettyjson":"^0.0.33","@types/prompt-sync":"^4.2.3","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@typescript-eslint/eslint-plugin":"^7.16.1","@typescript-eslint/parser":"^7.16.1","@vercel/ncc":"^0.38.1","adm-zip":"^0.5.14","ci-info":"^4.0.0",commander:"12.1.0","console-table-printer":"^2.12.1",esbuild:"^0.23.0",eslint:"9.9.0","get-latest-version":"^5.1.0","git-format-staged":"3.1.1",husky:"^9.1.1","is-wsl":"^3.1.0",jszip:"^3.10.1",ky:"^1.4.0",logsnag:"1.0.0",mime:"^4.0.4",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.6.2",tmp:"^0.2.3","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"4.2.0",typescript:"5.5.4","node-dir":"^0.1.17"}};var lr=require("node:fs"),fF=ge(require("node:process")),_me=require("node:buffer");var si=ge(nt(),1),id=require("node:process"),Vo=ge(require("node:readline"),1),$5=ge(require("node:readline"),1),ok=require("node:tty");function bge({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function uk(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(bge(),"")}var M5={},Ege={get exports(){return M5},set exports(e){M5=e}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(i){var n=i.charCodeAt(0),s=i.length==2?i.charCodeAt(1):0,a=n;return 55296<=n&&n<=56319&&56320<=s&&s<=57343&&(n&=1023,s&=1023,a=n<<10|s,a+=65536),a==12288||65281<=a&&a<=65376||65504<=a&&a<=65510?"F":a==8361||65377<=a&&a<=65470||65474<=a&&a<=65479||65482<=a&&a<=65487||65490<=a&&a<=65495||65498<=a&&a<=65500||65512<=a&&a<=65518?"H":4352<=a&&a<=4447||4515<=a&&a<=4519||4602<=a&&a<=4607||9001<=a&&a<=9002||11904<=a&&a<=11929||11931<=a&&a<=12019||12032<=a&&a<=12245||12272<=a&&a<=12283||12289<=a&&a<=12350||12353<=a&&a<=12438||12441<=a&&a<=12543||12549<=a&&a<=12589||12593<=a&&a<=12686||12688<=a&&a<=12730||12736<=a&&a<=12771||12784<=a&&a<=12830||12832<=a&&a<=12871||12880<=a&&a<=13054||13056<=a&&a<=19903||19968<=a&&a<=42124||42128<=a&&a<=42182||43360<=a&&a<=43388||44032<=a&&a<=55203||55216<=a&&a<=55238||55243<=a&&a<=55291||63744<=a&&a<=64255||65040<=a&&a<=65049||65072<=a&&a<=65106||65108<=a&&a<=65126||65128<=a&&a<=65131||110592<=a&&a<=110593||127488<=a&&a<=127490||127504<=a&&a<=127546||127552<=a&&a<=127560||127568<=a&&a<=127569||131072<=a&&a<=194367||177984<=a&&a<=196605||196608<=a&&a<=262141?"W":32<=a&&a<=126||162<=a&&a<=163||165<=a&&a<=166||a==172||a==175||10214<=a&&a<=10221||10629<=a&&a<=10630?"Na":a==161||a==164||167<=a&&a<=168||a==170||173<=a&&a<=174||176<=a&&a<=180||182<=a&&a<=186||188<=a&&a<=191||a==198||a==208||215<=a&&a<=216||222<=a&&a<=225||a==230||232<=a&&a<=234||236<=a&&a<=237||a==240||242<=a&&a<=243||247<=a&&a<=250||a==252||a==254||a==257||a==273||a==275||a==283||294<=a&&a<=295||a==299||305<=a&&a<=307||a==312||319<=a&&a<=322||a==324||328<=a&&a<=331||a==333||338<=a&&a<=339||358<=a&&a<=359||a==363||a==462||a==464||a==466||a==468||a==470||a==472||a==474||a==476||a==593||a==609||a==708||a==711||713<=a&&a<=715||a==717||a==720||728<=a&&a<=731||a==733||a==735||768<=a&&a<=879||913<=a&&a<=929||931<=a&&a<=937||945<=a&&a<=961||963<=a&&a<=969||a==1025||1040<=a&&a<=1103||a==1105||a==8208||8211<=a&&a<=8214||8216<=a&&a<=8217||8220<=a&&a<=8221||8224<=a&&a<=8226||8228<=a&&a<=8231||a==8240||8242<=a&&a<=8243||a==8245||a==8251||a==8254||a==8308||a==8319||8321<=a&&a<=8324||a==8364||a==8451||a==8453||a==8457||a==8467||a==8470||8481<=a&&a<=8482||a==8486||a==8491||8531<=a&&a<=8532||8539<=a&&a<=8542||8544<=a&&a<=8555||8560<=a&&a<=8569||a==8585||8592<=a&&a<=8601||8632<=a&&a<=8633||a==8658||a==8660||a==8679||a==8704||8706<=a&&a<=8707||8711<=a&&a<=8712||a==8715||a==8719||a==8721||a==8725||a==8730||8733<=a&&a<=8736||a==8739||a==8741||8743<=a&&a<=8748||a==8750||8756<=a&&a<=8759||8764<=a&&a<=8765||a==8776||a==8780||a==8786||8800<=a&&a<=8801||8804<=a&&a<=8807||8810<=a&&a<=8811||8814<=a&&a<=8815||8834<=a&&a<=8835||8838<=a&&a<=8839||a==8853||a==8857||a==8869||a==8895||a==8978||9312<=a&&a<=9449||9451<=a&&a<=9547||9552<=a&&a<=9587||9600<=a&&a<=9615||9618<=a&&a<=9621||9632<=a&&a<=9633||9635<=a&&a<=9641||9650<=a&&a<=9651||9654<=a&&a<=9655||9660<=a&&a<=9661||9664<=a&&a<=9665||9670<=a&&a<=9672||a==9675||9678<=a&&a<=9681||9698<=a&&a<=9701||a==9711||9733<=a&&a<=9734||a==9737||9742<=a&&a<=9743||9748<=a&&a<=9749||a==9756||a==9758||a==9792||a==9794||9824<=a&&a<=9825||9827<=a&&a<=9829||9831<=a&&a<=9834||9836<=a&&a<=9837||a==9839||9886<=a&&a<=9887||9918<=a&&a<=9919||9924<=a&&a<=9933||9935<=a&&a<=9953||a==9955||9960<=a&&a<=9983||a==10045||a==10071||10102<=a&&a<=10111||11093<=a&&a<=11097||12872<=a&&a<=12879||57344<=a&&a<=63743||65024<=a&&a<=65039||a==65533||127232<=a&&a<=127242||127248<=a&&a<=127277||127280<=a&&a<=127337||127344<=a&&a<=127386||917760<=a&&a<=917999||983040<=a&&a<=1048573||1048576<=a&&a<=1114109?"A":"N"},t.characterLength=function(i){var n=this.eastAsianWidth(i);return n=="F"||n=="W"||n=="A"?2:1};function r(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(i){for(var n=r(i),s=0,a=0;a<n.length;a++)s=s+this.characterLength(n[a]);return s},t.slice=function(i,n,s){textLen=t.length(i),n=n||0,s=s||1,n<0&&(n=textLen+n),s<0&&(s=textLen+s);for(var a="",o=0,u=r(i),l=0;l<u.length;l++){var c=u[l],d=t.length(c);if(o>=n-(d==2?1:0))if(o+d<=s)a+=c;else break;o+=d}return a}})(Ege);var xge=M5,Sge=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function f1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=uk(e),e.length===0))return 0;e=e.replace(Sge()," ");let r=t.ambiguousIsNarrow?1:2,i=0;for(let n of e){let s=n.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(xge.eastAsianWidth(n)){case"F":case"W":i+=2;break;case"A":i+=r;break;default:i+=1}}return i}var q5=10,ek=(e=0)=>t=>`\x1B[${t+e}m`,tk=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,rk=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,dt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(dt.modifier);var Cge=Object.keys(dt.color),Age=Object.keys(dt.bgColor);[...Cge,...Age];function Tge(){let e=new Map;for(let[t,r]of Object.entries(dt)){for(let[i,n]of Object.entries(r))dt[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=dt[i],e.set(n[0],n[1]);Object.defineProperty(dt,t,{value:r,enumerable:!1})}return Object.defineProperty(dt,"codes",{value:e,enumerable:!1}),dt.color.close="\x1B[39m",dt.bgColor.close="\x1B[49m",dt.color.ansi=ek(),dt.color.ansi256=tk(),dt.color.ansi16m=rk(),dt.bgColor.ansi=ek(q5),dt.bgColor.ansi256=tk(q5),dt.bgColor.ansi16m=rk(q5),Object.defineProperties(dt,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(s=>s+s).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>dt.rgbToAnsi256(...dt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,i=Math.floor(o/6)/5,n=o%6/5}let s=Math.max(r,i,n)*2;if(s===0)return 30;let a=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>dt.ansi256ToAnsi(dt.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>dt.ansi256ToAnsi(dt.hexToAnsi256(t)),enumerable:!1}}),dt}var Oge=Tge(),s6=new Set(["\x1B","\x9B"]),Fge=39,U5="\x07",lk="[",Nge="]",ck="m",V5=`${Nge}8;;`,ik=e=>`${s6.values().next().value}${lk}${e}${ck}`,nk=e=>`${s6.values().next().value}${V5}${e}${U5}`,kge=e=>e.split(" ").map(t=>f1(t)),j5=(e,t,r)=>{let i=[...t],n=!1,s=!1,a=f1(uk(e[e.length-1]));for(let[o,u]of i.entries()){let l=f1(u);if(a+l<=r?e[e.length-1]+=u:(e.push(u),a=0),s6.has(u)&&(n=!0,s=i.slice(o+1).join("").startsWith(V5)),n){s?u===U5&&(n=!1,s=!1):u===ck&&(n=!1);continue}a+=l,a===r&&o<i.length-1&&(e.push(""),a=0)}!a&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Rge=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(f1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Pge=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let i="",n,s,a=kge(e),o=[""];for(let[l,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let d=f1(o[o.length-1]);if(l!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),d=0),(d>0||r.trim===!1)&&(o[o.length-1]+=" ",d++)),r.hard&&a[l]>t){let p=t-d,f=1+Math.floor((a[l]-p-1)/t);Math.floor((a[l]-1)/t)<f&&o.push(""),j5(o,c,t);continue}if(d+a[l]>t&&d>0&&a[l]>0){if(r.wordWrap===!1&&d<t){j5(o,c,t);continue}o.push("")}if(d+a[l]>t&&r.wordWrap===!1){j5(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(l=>Rge(l)));let u=[...o.join(`
284
284
  `)];for(let[l,c]of u.entries()){if(i+=c,s6.has(c)){let{groups:p}=new RegExp(`(?:\\${lk}(?<code>\\d+)m|\\${V5}(?<uri>.*)${U5})`).exec(u.slice(l).join(""))||{groups:{}};if(p.code!==void 0){let f=Number.parseFloat(p.code);n=f===Fge?void 0:f}else p.uri!==void 0&&(s=p.uri.length===0?void 0:p.uri)}let d=Oge.codes.get(Number(n));u[l+1]===`
285
285
  `?(s&&(i+=nk("")),n&&d&&(i+=ik(d))):c===`
286
286
  `&&(n&&d&&(i+=ik(n)),s&&(i+=nk(s)))}return i};function sk(e,t,r){return String(e).normalize().replace(/\r\n/g,`
@@ -374,7 +374,7 @@ It will be also visible in your dashboard
374
374
  `),u=h.encryptedData}let d=Math.floor((u?.byteLength??0)/1024/1024);return d>vpe&&(S.warn(`WARNING !!
375
375
  The app size is ${d} Mb, this may take a while to download for users
376
376
  `),S.info(`Learn how to optimize your assets https://capgo.app/blog/optimise-your-images-for-updates/
377
- `),await i.track({channel:"app-error",event:"App Too Large",icon:"\u{1F69B}",user_id:n,tags:{"app-id":s},notify:!1}).catch()),{zipped:u,sessionKey:a,checksum:o}}async function Zst(e,t,r,i,n,s){let a=ze();a.start("Uploading Bundle");let o=performance.now();try{if(s.multipart!==void 0&&s.multipart)S.info("Uploading bundle as multipart"),await Cpe(e,t,r,n,i);else{let c=await Spe(e,t,r);c||(S.error("Cannot get upload url"),B.error("")),await Fu.put(c,{timeout:s.timeout||wpe,retry:5,body:n})}}catch(c){let p=((performance.now()-o)/1e3).toFixed(2);if(a.stop(`Failed to upload bundle ( after ${p} seconds)`),S.error(`Cannot upload bundle ( try again with --multipart option) ${ae(c)}`),c instanceof Ou){let f=await c.response.text();S.error(`Response: ${ae(f)}`)}await Ape(e,t,r),B.error("")}let l=((performance.now()-o)/1e3).toFixed(2);a.stop(`Bundle Uploaded \u{1F4AA} (${l} seconds)`)}async function Qst(e,t,r,i,n,s,a,o,u,l){let{data:c}=await e.rpc("get_app_versions",{apikey:t,name_version:i,appid:o}).single();if(c&&eO(l,3)){let{error:d,data:p}=await ry(e,{name:n,app_id:o,created_by:s,version:c,owner_org:a});d&&(S.error(`Cannot set channel, the upload key is not allowed to do that, use the "all" for this. ${ae(d)}`),B.error(""));let f=Nf(o),h=`${u.hostWeb}/app/p/${f}/channel/${p.id}`;p?.public?S.info("Your update is now available in your public channel \u{1F389}"):p?.id&&S.info(`Link device to this bundle to try it: ${h}`),r?S.info(`Bundle url: ${h}`):c?eO(l,3)||S.warn("Cannot set channel as a upload organization member"):(S.warn("Cannot set bundle with upload key, use key with more rights for that"),B.error(""))}}async function eat(e,t,r){try{let i=t?.plugins?.CapacitorUpdater.signKey;if(!(0,cl.existsSync)(zi))return i&&(S.error("Public signature key found in CapacitorUpdater config but private key not found"),S.error("Cannot allow upload as updates will fail without a valid signature"),B.error("")),S.info("Private key not found, skipping signing"),null;i||(S.error("Public key not found in capacitor config"),B.error(""));let n=(0,cl.readFileSync)(zi,"utf-8"),s=xg(r,n);return await iW(s,i,r)||(S.error("The signature is not valid, perhaps you have mismatched key pair (?)"),S.error("Cannot allow upload as updates will fail without a valid signature"),B.error("")),S.info("Bundle signed successfully"),s}catch(i){S.error(`Cannot generate signature ${ae(i)}`),B.error("")}}async function l5(e,t,r=!0){ee("Uploading");let i=bi();await Ve();let{s3Region:n,s3Apikey:s,s3Apisecret:a,s3BucketName:o,s3Endpoint:u,s3Port:l,s3SSL:c}=t,d=zst(t),p=await ce(),{appid:f,path:h}=Gst(e,t,p.config),g=await Hst(p.config,t),v=t.channel||"dev",y=zt();Wst(t,h),S.info(`Upload ${f}@${g} started from path "${h}" to Capgo cloud`);let x=await Tc(),D=await Ee(d),w=await xe(D,d,["write","all","upload"]),_=await rt(D,d,f,2),T=await Wn(D,f);await Of(D,T,d,f,!0),await Yst(D,T,x);let{nativePackages:A,minUpdateVersion:C}=await Kst(D,i,t,v,f,g);await Xst(D,f,g),t.external&&!t.external.startsWith("https://")&&(S.error(`External link should should start with "https://" current is "${external}"`),B.error(""));let O={name:g,app_id:f,session_key:void 0,external_url:t.external,storage_provider:t.external?"external":"r2-direct",min_update_version:C,native_packages:A,owner_org:T,user_id:w,checksum:void 0},E=null;if(t.external)await y.track({channel:"app",event:"App external",icon:"\u{1F4E4}",user_id:T,tags:{"app-id":f},notify:!1}).catch(),O.session_key=t.ivSessionKey;else{let{zipped:k,sessionKey:L,checksum:j}=await Jst(h,t,x,y,T,f);O.session_key=L,O.checksum=j,E=k,t.ignoreChecksumCheck||await Ope(D,f,v,j)}E&&(O.signature=await eat(t,p.config,E));let{error:b}=await iO(D,O);if(b&&(S.error(`Cannot add bundle ${ae(b)}`),B.error("")),E&&(o||u||n||s||a||l||c)){(!o||!u||!n||!s||!a||!l)&&(S.error("Missing argument, for S3 upload you need to provide a bucket name, endpoint, region, port, API key, and API secret"),B.error("")),S.info("Uploading to S3");let k=new G2({endPoint:u,region:n,port:l,useSSL:c,bucket:o,credentials:{accessKeyId:s,secretAccessKey:a}}),L=`${f}-${g}`,j=encodeURIComponent(L);await k.putObject(L,E),O.external_url=`https://${u}/${j}`,O.storage_provider="external"}else if(E){await Zst(D,f,g,T,E,t),O.storage_provider="r2";let{error:k}=await iO(D,O);k&&(S.error(`Cannot update bundle ${ae(k)}`),B.error(""))}return await Qst(D,d,!!t.bundleUrl,g,v,w,T,f,x,_),await y.track({channel:"app",event:"App Uploaded",icon:"\u23EB",user_id:T,tags:{"app-id":f},notify:!1}).catch(),r&&(Z("Time to share your update to the world \u{1F30D}"),(0,X6e.exit)()),!0}async function Q6e(e,t){try{await l5(e,t,!0)}catch(r){S.error(ae(r)),B.error("")}}async function e4e(e,t){let r=bi();S.warn(`\u26A0\uFE0F This command is deprecated, use "${r.runner} @capgo/cli bundle upload" instead \u26A0\uFE0F`);try{await l5(e,t,!0)}catch(i){S.error(ae(i)),B.error("")}}var $o=require("node:fs"),ON=require("node:os"),TN=require("node:process");async function t4e(){let e=(0,ON.homedir)();return(0,$o.existsSync)(`${e}/.capgo`)||(0,$o.existsSync)(".capgo")}async function FN(e,t,r=!0){if(r&&ee("Login to Capgo"),!e)return r&&(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),!1;await Ve();try{let{local:i}=t,n=zt();if(i)(0,$o.existsSync)(".git")||(S.error("To use local you should be in a git repository"),B.error("")),(0,$o.writeFileSync)(".capgo",`${e}
377
+ `),await i.track({channel:"app-error",event:"App Too Large",icon:"\u{1F69B}",user_id:n,tags:{"app-id":s},notify:!1}).catch()),{zipped:u,sessionKey:a,checksum:o}}async function Zst(e,t,r,i,n,s){let a=ze();a.start("Uploading Bundle");let o=performance.now();try{if(s.multipart!==void 0&&s.multipart)S.info("Uploading bundle as multipart"),await Cpe(e,t,r,n,i);else{let c=await Spe(e,t,r);c||(S.error("Cannot get upload url"),B.error("")),await Fu.put(c,{timeout:s.timeout||wpe,retry:5,body:n})}}catch(c){let p=((performance.now()-o)/1e3).toFixed(2);if(a.stop(`Failed to upload bundle ( after ${p} seconds)`),S.error(`Cannot upload bundle ( try again with --multipart option) ${ae(c)}`),c instanceof Ou){let f=await c.response.text();S.error(`Response: ${ae(f)}`)}await Ape(e,t,r),B.error("")}let l=((performance.now()-o)/1e3).toFixed(2);a.stop(`Bundle Uploaded \u{1F4AA} (${l} seconds)`)}async function Qst(e,t,r,i,n,s,a,o,u,l){let{data:c}=await e.rpc("get_app_versions",{apikey:t,name_version:i,appid:o}).single();if(c&&eO(l,3)){let{error:d,data:p}=await ry(e,{name:n,app_id:o,created_by:s,version:c,owner_org:a});d&&(S.error(`Cannot set channel, the upload key is not allowed to do that, use the "all" for this. ${ae(d)}`),B.error(""));let f=Nf(o),h=`${u.hostWeb}/app/p/${f}/channel/${p.id}`;p?.public?S.info("Your update is now available in your public channel \u{1F389}"):p?.id&&S.info(`Link device to this bundle to try it: ${h}`),r?S.info(`Bundle url: ${h}`):c?eO(l,3)||S.warn("Cannot set channel as a upload organization member"):(S.warn("Cannot set bundle with upload key, use key with more rights for that"),B.error(""))}}async function eat(e,t,r){try{let s=((t?.plugins||{}).CapacitorUpdater??{}).signKey;if(!(0,cl.existsSync)(zi))return s&&(S.error("Public signature key found in CapacitorUpdater config but private key not found"),S.error("Cannot allow upload as updates will fail without a valid signature"),B.error("")),S.info("Private key not found, skipping signing"),null;s||(S.error("Public key not found in capacitor config"),B.error(""));let a=(0,cl.readFileSync)(zi,"utf-8"),o=xg(r,a);return await iW(o,s,r)||(S.error("The signature is not valid, perhaps you have mismatched key pair (?)"),S.error("Cannot allow upload as updates will fail without a valid signature"),B.error("")),S.info("Bundle signed successfully"),o}catch(i){S.error(`Cannot generate signature ${ae(i)}`),B.error("")}}async function l5(e,t,r=!0){ee("Uploading");let i=bi();await Ve();let{s3Region:n,s3Apikey:s,s3Apisecret:a,s3BucketName:o,s3Endpoint:u,s3Port:l,s3SSL:c}=t,d=zst(t),p=await ce(),{appid:f,path:h}=Gst(e,t,p.config),g=await Hst(p.config,t),v=t.channel||"dev",y=zt();Wst(t,h),S.info(`Upload ${f}@${g} started from path "${h}" to Capgo cloud`);let x=await Tc(),D=await Ee(d),w=await xe(D,d,["write","all","upload"]),_=await rt(D,d,f,2),T=await Wn(D,f);await Of(D,T,d,f,!0),await Yst(D,T,x);let{nativePackages:A,minUpdateVersion:C}=await Kst(D,i,t,v,f,g);await Xst(D,f,g),t.external&&!t.external.startsWith("https://")&&(S.error(`External link should should start with "https://" current is "${external}"`),B.error(""));let O={name:g,app_id:f,session_key:void 0,external_url:t.external,storage_provider:t.external?"external":"r2-direct",min_update_version:C,native_packages:A,owner_org:T,user_id:w,checksum:void 0},E=null;if(t.external)await y.track({channel:"app",event:"App external",icon:"\u{1F4E4}",user_id:T,tags:{"app-id":f},notify:!1}).catch(),O.session_key=t.ivSessionKey;else{let{zipped:k,sessionKey:L,checksum:j}=await Jst(h,t,x,y,T,f);O.session_key=L,O.checksum=j,E=k,t.ignoreChecksumCheck||await Ope(D,f,v,j)}E&&(O.signature=await eat(t,p.config,E));let{error:b}=await iO(D,O);if(b&&(S.error(`Cannot add bundle ${ae(b)}`),B.error("")),E&&(o||u||n||s||a||l||c)){(!o||!u||!n||!s||!a||!l)&&(S.error("Missing argument, for S3 upload you need to provide a bucket name, endpoint, region, port, API key, and API secret"),B.error("")),S.info("Uploading to S3");let k=new G2({endPoint:u,region:n,port:l,useSSL:c,bucket:o,credentials:{accessKeyId:s,secretAccessKey:a}}),L=`${f}-${g}`,j=encodeURIComponent(L);await k.putObject(L,E),O.external_url=`https://${u}/${j}`,O.storage_provider="external"}else if(E){await Zst(D,f,g,T,E,t),O.storage_provider="r2";let{error:k}=await iO(D,O);k&&(S.error(`Cannot update bundle ${ae(k)}`),B.error(""))}return await Qst(D,d,!!t.bundleUrl,g,v,w,T,f,x,_),await y.track({channel:"app",event:"App Uploaded",icon:"\u23EB",user_id:T,tags:{"app-id":f},notify:!1}).catch(),r&&(Z("Time to share your update to the world \u{1F30D}"),(0,X6e.exit)()),!0}async function Q6e(e,t){try{await l5(e,t,!0)}catch(r){S.error(ae(r)),B.error("")}}async function e4e(e,t){let r=bi();S.warn(`\u26A0\uFE0F This command is deprecated, use "${r.runner} @capgo/cli bundle upload" instead \u26A0\uFE0F`);try{await l5(e,t,!0)}catch(i){S.error(ae(i)),B.error("")}}var $o=require("node:fs"),ON=require("node:os"),TN=require("node:process");async function t4e(){let e=(0,ON.homedir)();return(0,$o.existsSync)(`${e}/.capgo`)||(0,$o.existsSync)(".capgo")}async function FN(e,t,r=!0){if(r&&ee("Login to Capgo"),!e)return r&&(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),!1;await Ve();try{let{local:i}=t,n=zt();if(i)(0,$o.existsSync)(".git")||(S.error("To use local you should be in a git repository"),B.error("")),(0,$o.writeFileSync)(".capgo",`${e}
378
378
  `),(0,$o.appendFileSync)(".gitignore",`.capgo
379
379
  `);else{let o=(0,ON.homedir)();(0,$o.writeFileSync)(`${o}/.capgo`,`${e}
380
380
  `)}let s=await Ee(e),a=await xe(s,e,["write","all","upload"]);await n.track({channel:"user-login",event:"User CLI login",icon:"\u2705",user_id:a,notify:!1}).catch(),S.success(`login saved into .capgo file in ${i?"local":"home"} directory`)}catch{S.error("Error while saving login"),(0,TN.exit)(1)}return r&&(Z("Done \u2705"),(0,TN.exit)()),!0}async function r4e(e,t){FN(e,t,!0)}var o1=require("node:fs"),o4e=require("node:process");var i4e={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(i4e);var n4e=i4e;var s4e={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(s4e);var a4e=s4e;var ts=function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},s1,W2,rd,NN=class{constructor(...t){s1.set(this,new Map),W2.set(this,new Map),rd.set(this,new Map);for(let r of t)this.define(r)}define(t,r=!1){for(let[i,n]of Object.entries(t)){i=i.toLowerCase(),n=n.map(o=>o.toLowerCase()),ts(this,rd,"f").has(i)||ts(this,rd,"f").set(i,new Set);let s=ts(this,rd,"f").get(i),a=!0;for(let o of n){let u=o.startsWith("*");if(o=u?o.slice(1):o,s?.add(o),a&&ts(this,W2,"f").set(i,o),a=!1,u)continue;let l=ts(this,s1,"f").get(o);if(l&&l!=i&&!r)throw new Error(`"${i} -> ${o}" conflicts with "${l} -> ${o}". Pass \`force=true\` to override this definition.`);ts(this,s1,"f").set(o,i)}}return this}getType(t){if(typeof t!="string")return null;let r=t.replace(/^.*[/\\]/,"").toLowerCase(),i=r.replace(/^.*\./,"").toLowerCase(),n=r.length<t.length;return!(i.length<r.length-1)&&n?null:ts(this,s1,"f").get(i)??null}getExtension(t){return typeof t!="string"?null:(t=t?.split?.(";")[0],(t&&ts(this,W2,"f").get(t.trim().toLowerCase()))??null)}getAllExtensions(t){return typeof t!="string"?null:ts(this,rd,"f").get(t.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(let t of ts(this,rd,"f").values())Object.freeze(t);return this}_getTestState(){return{types:ts(this,s1,"f"),extensions:ts(this,W2,"f")}}};s1=new WeakMap,W2=new WeakMap,rd=new WeakMap;var kN=NN;var a1=new kN(a4e,n4e)._freeze();async function tat(e,t,r=!0){await RN(e,t,void 0,r)}async function RN(e,t,r,i=!0){i&&ee("Adding"),await Ve(),t.apikey=t.apikey||Ae();let n=await ce();e=e||n?.config?.appId,t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error("")),e.includes("--")&&(S.error('The app id includes illegal symbols. You cannot use "--" in the app id'),B.error(""));let s=await Ee(t.apikey);await xe(s,t.apikey,["write","all"]),await a6e(s,e)&&(S.error(`App ${e} already exist`),B.error("")),r||(r=await Ff(s,["admin","super_admin"]));let o=r.gid;await Of(s,o,t.apikey,void 0,!1);let{name:u,icon:l}=t;u=u||n.config?.appName||"Unknown",l=l||"resources/icon.png",(!l||!u)&&(S.error("Missing argument, you need to provide a appId and a name, or be in a capacitor project"),B.error("")),i&&S.info(`Adding ${e} to Capgo`);let c,d;l&&(0,o1.existsSync)(l)?(c=(0,o1.readFileSync)(l),d=a1.getType(l)||"image/png",S.warn(`Found app icon ${l}`)):(0,o1.existsSync)(Zn)?(c=(0,o1.readFileSync)(Zn),d=a1.getType(Zn)||"image/png",S.warn(`Found app icon ${Zn}`)):S.warn(`Cannot find app icon in any of the following locations: ${l}, ${Zn}`);let p="icon",f="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(c&&d){let{error:v}=await s.storage.from(`images/org/${o}/${e}`).upload(p,c,{contentType:d});v&&(console.error(v),S.error(`Could not add app ${ae(v)}`),B.error(""));let{data:y}=await s.storage.from(`images/org/${o}/${e}`).getPublicUrl(p);f=y?.publicUrl||f}let{error:h}=await s.from("apps").insert({icon_url:f,owner_org:o,name:u,app_id:e});h&&(S.error(`Could not add app ${ae(h)}`),B.error(""));let{error:g}=await s.from("app_versions").insert([{owner_org:o,deleted:!0,name:"unknown",app_id:e},{owner_org:o,deleted:!0,name:"builtin",app_id:e}]);return g&&(S.error(`Could not add app ${ae(g)}`),B.error("")),S.success(`App ${e} added to Capgo. ${i?"You can upload a bundle now":""}`),i&&(Z("Done \u2705"),(0,o4e.exit)()),!0}async function u4e(e,t){tat(e,t,!0)}var l4e="import { CapacitorUpdater } from '@capgo/capacitor-updater'",c5="CapacitorUpdater.notifyAppReady()",rat=/import.*from.*/g,K2="production",c4e={stdio:"pipe"},u1;function d4e(){u1||(u1=(0,Ar.readdirSync)(p5.default.tmpdir).map(e=>({name:e,full:`${p5.default.tmpdir}/${e}`})).find(e=>e.name.startsWith("capgocli"))?.full??p5.default.fileSync({prefix:"capgocli"}).name)}function dl(e){try{d4e(),(0,Ar.writeFileSync)(u1,JSON.stringify({step_done:e}))}catch(t){S.error(`Cannot mark step as done in the CLI, error:
@@ -395,7 +395,7 @@ ${c5};
395
395
  ${l4e};
396
396
 
397
397
  ${c5};
398
- `)}async function dat(e,t,r,i){let n=bi(),s=await $e({message:`Automatic configure end-to-end encryption in ${i} updates?`});if(await Ca(s,e,t),s){let a=ze();a.start(`Running: ${n.runner} @capgo/cli@latest key create`),await tN({force:!0},!1)?a.stop("key created \u{1F511}"):(a.stop("Error"),S.warn("Cannot create key \u274C"),Z("Bye \u{1F44B}"),(0,hn.exit)(1)),Lo("onboarding-v2",e,t,"Use encryption")}await Cs(e,t,6)}async function pat(e,t,r,i){let n=bi(),s=await $e({message:`Automatic build ${i} with "${n.pm} run build" ?`});if(await Ca(s,e,t),s){let a=ze(),o=await rO(),u=await Epe(o);a.start(`Running: ${n.pm} run ${u} && ${n.runner} cap sync`),(await Di()).scripts[u]||(a.stop("Error"),S.warn(`Cannot find ${u} script in package.json, please add it and run \`capgo init\` again`),Z("Bye \u{1F44B}"),(0,hn.exit)()),(0,Y2.execSync)(`${n.pm} run ${u} && ${n.runner} cap sync`,c4e),a.stop("Build & Sync Done \u2705")}else S.info(`Build yourself with command: ${n.pm} run build && ${n.runner} cap sync`);await Cs(e,t,7)}async function fat(e,t,r,i){let n=bi(),s=await $e({message:`Automatic upload ${i} bundle to Capgo?`});if(await Ca(s,e,t),s){let a=ze();a.start(`Running: ${n.runner} @capgo/cli@latest bundle upload`),await l5(i,{channel:K2,apikey:r},!1)?a.stop("Upload Done \u2705"):(a.stop("Error"),S.warn("Upload failed \u274C"),Z("Bye \u{1F44B}"),(0,hn.exit)())}else S.info(`Upload yourself with command: ${n.runner} @capgo/cli@latest bundle upload`);await Cs(e,t,8)}async function hat(e,t){let r=bi(),i=await $e({message:"Run in device now ?"});if(await Ca(i,e,t),i){let n=await sd({message:"Pick a platform to run your app",options:[{value:"ios",label:"IOS"},{value:"android",label:"Android"}]});ai(n)&&(Z("Bye \u{1F44B}"),(0,hn.exit)());let s=n,a=ze();a.start(`Running: ${r.runner} cap run ${s}`),await(0,Y2.spawnSync)(r.runner,["cap","run",s],{stdio:"inherit"}),a.stop("Started Done \u2705")}else S.info(`If you change your mind, run it for yourself with: ${r.runner} cap run <ios|android>`);await Cs(e,t,9)}async function mat(e,t,r,i){let n=await $e({message:"Automatic check if update working in device ?"});if(await Ca(n,e,t),n)S.info(`Wait logs sent to Capgo from ${i} device, Please open your app \u{1F4AA}`),await eN("onboarding-v2",r,i,t,e);else{let s=Nf(i);S.info(`Check logs in https://web.capgo.app/app/p/${s}/logs to see if update works.`)}await Cs(e,t,10)}async function p4e(e,t,r){let i=bi();ee("Capgo onboarding \u{1F6EB}"),await Ve();let n=zt(),s=await ce();t=t||s?.config?.appId,r.apikey=e||Ae();let a=ze();(!t4e()||e)&&(a.start(`Running: ${i.runner} @capgo/cli@latest login ***`),await FN(r.apikey,r,!1),a.stop("Login Done \u2705"));let o=await Ee(r.apikey);await xe(o,r.apikey,["upload","all","read","write"]);let u=await Ff(o,["admin","super_admin"]),l=u.gid,c=await iat(l,n)??0;try{c<1&&await Cs(l,n,1),c<2&&(await sat(u,n,t,r),dl(2)),c<3&&(await aat(l,n,r.apikey,t),dl(3)),c<4&&(await lat(l,n,r.apikey,t),dl(4)),c<5&&(await cat(l,n,r.apikey,t),dl(5)),c<6&&(await dat(l,n,r.apikey,t),dl(6)),c<7&&(await pat(l,n,r.apikey,t),dl(7)),c<8&&(await fat(l,n,r.apikey,t),dl(8)),c<9&&(await hat(l,n),dl(9)),await mat(l,n,r.apikey,t),await Cs(l,n,0),nat()}catch(d){console.error(d),S.error("Error during onboarding, please try again later"),(0,hn.exit)(1)}S.info("Welcome onboard \u2708\uFE0F!"),S.info("Your Capgo update system is setup"),S.info(`Next time use \`${i.runner} @capgo/cli@latest bundle upload\` to only upload your bundle`),S.info(`If you have any issue try to use the debug command \`${i.runner} @capgo/cli@latest app debug\``),Z("Bye \u{1F44B}"),(0,hn.exit)()}var v4e=require("node:process");var m4e=require("node:process");var g4e=ge(M2());var f4e=require("node:process");async function h4e(e,t,r){let{data:i,error:n}=await e.from("devices_override").select().eq("app_id",t).eq("version",r.id);if(n&&(S.error(`Cannot check Device override ${t}@${r.name}`),B.error("")),i&&i.length>0)if(ee(`\u274C Version ${t}@${r.name} is used in ${i.length} device override`),await $e({message:"unlink it?"}))for(let s of i){let a=ze();a.start(`Unlinking device ${s.device_id}`);let{error:o}=await e.from("devices_override").delete().eq("device_id",s.device_id);o&&(a.stop(`Cannot unlink device ${s.device_id} ${ae(o)}`),(0,f4e.exit)(1)),a.stop(`\u2705 Device ${s.device_id} unlinked`)}else S.error("Unlink it first"),B.error("")}async function gat(e,t,r){let{error:i}=await e.from("app_versions").update({deleted:!0}).eq("app_id",t).eq("deleted",!1).eq("name",r);i&&(S.error(`App Version ${t}@${r} not found in database`),B.error(""))}async function f5(e,t,r){let i=await yat(e,t,r);await O6e(e,t,i),await h4e(e,t,i),await gat(e,t,r)}function h5(e){e.length||(S.error("No bundle found"),(0,m4e.exit)(1));let t=new g4e.Table({title:"Bundles",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Version:r.name,Created:kf(r.created_at),...r.keep!=null?{Keep:r.keep}:{}})}),S.success(t.render())}async function m5(e,t){let{data:r,error:i}=await e.from("app_versions").select().eq("app_id",t).eq("deleted",!1).order("created_at",{ascending:!1});return i&&(S.error(`App ${t} not found in database`),B.error("")),r}async function y4e(e,t){let{data:r,error:i}=await e.from("channels").select("version").eq("app_id",t);return i&&(S.error(`App ${t} not found in database`),B.error("")),r.map(n=>n.version)}async function yat(e,t,r){let{data:i,error:n}=await e.from("app_versions").select().eq("app_id",t).eq("name",r).eq("deleted",!1).single();return(!i||n)&&(S.error(`App Version ${t}@${r} doesn't exist`),B.error("")),i}async function w4e(e,t){ee("List bundles"),await Ve(),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId,t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey);await xe(i,t.apikey,["write","all","read","upload"]),S.info(`Querying available versions of: ${e} in Capgo`),await rt(i,t.apikey,e,1);let n=await m5(i,e);S.info(`Active versions in Capgo: ${n?.length}`),h5(n),Z("Done \u2705"),(0,v4e.exit)()}var Aa=require("node:fs"),_4e=require("node:process");async function D4e(e,t,r){ee("Decrypt zip file"),await Ve(),(0,Aa.existsSync)(e)||(S.error(`Zip not found at the path ${e}`),B.error(""));let i=await ce();!r.key&&!(0,Aa.existsSync)(Co)&&!i.config.plugins?.CapacitorUpdater?.privateKey&&(S.error(`Private Key not found at the path ${Co} or in ${i.path}`),B.error(""));let n=r.key||Co,s=i.config.plugins?.CapacitorUpdater?.privateKey;!(0,Aa.existsSync)(n)&&!s?(S.error(`Cannot find public key ${n} or as keyData option or in ${i.path}`),B.error("")):(0,Aa.existsSync)(n)&&(s=(0,Aa.readFileSync)(n).toString());let a=(0,Aa.readFileSync)(e),o=nW(a,t,r.keyData??s??"");(0,Aa.writeFileSync)(`${e}_decrypted.zip`,o),Z(`Decrypted zip file at ${e}_decrypted.zip`),(0,_4e.exit)()}var Mo=require("node:fs"),b4e=require("node:process");var E4e=ge(_N());async function x4e(e,t){ee("Encryption"),await Ve();let r=await Tc();(0,Mo.existsSync)(e)||(S.error(`Error: Zip not found at the path ${e}`),B.error(""));let i=t.key||Ao,n=t.keyData||"";!(0,Mo.existsSync)(i)&&!n?(S.warning(`Cannot find public key ${i} or as keyData option`),E4e.default.isCI&&(S.error("Error: Missing public key"),B.error("")),await $e({message:"Do you want to use our public key ?"})||(S.error("Error: Missing public key"),B.error("")),n=r.signKey||""):(0,Mo.existsSync)(i)&&(n=(0,Mo.readFileSync)(i).toString());let s=(0,Mo.readFileSync)(e),a=Sg(s,n);S.success(`ivSessionKey: ${a.ivSessionKey}`),(0,Mo.writeFileSync)(`${e}_encrypted.zip`,a.encryptedData),S.success(`Encrypted zip saved at ${e}_encrypted.zip`),Z("Done \u2705"),(0,b4e.exit)()}var l1=require("node:process"),g5=require("node:os"),S4e=ge(pF());async function vat(e){let t={},r=[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.push((0,S4e.default)(i));return await Promise.all(r).then(i=>{let n=Object.keys(e);for(let s=0;s<i.length;s+=1){let a=i[s];a&&(t[n[s]]=a)}}),t}async function wat(){let{dependencies:e}=await Di(),t={"@capgo/cli":Uo.version};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith("@capgo/")&&r.startsWith("@capawesome/")&&r.startsWith("capacitor")){let i=e[r].replace("^","").replace("~","");t[r]=i}return t}async function C4e(){S.warn(" \u{1F48A} Capgo Doctor \u{1F48A}");let e=await ce(),t=await Di(),r=e?.config?.plugins?.CapacitorUpdater?.version||t?.version,i=e?.config?.appName||"";S.info(` App Name: ${i}`);let n=e?.config?.appId||"";S.info(` App ID: ${n}`),S.info(` App Version: ${r}`);let s=e?.config?.webDir||"";S.info(` Web Dir: ${s}`),S.info(` OS: ${(0,g5.platform)()} ${(0,g5.version)()}`),S.info(` Node: ${l1.version}`),S.info(" Installed Dependencies:");let a=await wat();Object.keys(a).length===0&&(S.warning("\x1B[31m%s\x1B[0m \u{1F6A8} No dependencies found"),(0,l1.exit)(1));for(let l in a)if(Object.prototype.hasOwnProperty.call(a,l)){let c=a[l];S.info(` ${l}: ${c}`)}let o=ze();o.start("Running: Loading latest dependencies");let u=await vat(a);o.stop("Latest Dependencies:");for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let c=u[l];S.info(` ${l}: ${c}`)}JSON.stringify(a)!==JSON.stringify(u)&&(S.warn("\x1B[31m\u{1F6A8} Some dependencies are not up to date\x1B[0m"),(0,l1.exit)(1)),S.success("\x1B[32m\u2705 All dependencies are up to date\x1B[0m"),(0,l1.exit)()}var A4e=require("node:process");async function T4e(e,t,r){ee("Delete bundle"),r.apikey=r.apikey||Ae();let i=await ce();t=t||i?.config?.appId,r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(r.apikey);await xe(n,r.apikey,["write","all"]),await rt(n,r.apikey,t,3),r.apikey||(S.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(S.error("Missing argument, you need to provide a bundleId, or be in a capacitor project"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error("")),S.info(`Deleting bundle ${t}@${e} from Capgo`),S.info("Keep in mind that you will not be able to reuse this bundle version, it's gone forever"),await f5(n,t,e),S.success(`Bundle ${t}@${e} deleted in Capgo`),Z("Done"),(0,A4e.exit)()}var F4e=require("node:process");var O4e=["major","minor","metadata","patch","none"];async function N4e(e,t,r){ee("Set channel"),r.apikey=r.apikey||Ae();let i=await ce();t=t||i?.config?.appId;let n=zt();r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await rt(s,r.apikey,t,4);let o=await Wn(s,t),{bundle:u,state:l,downgrade:c,latest:d,upgrade:p,ios:f,android:h,selfAssign:g,disableAutoUpdate:v,dev:y,emulator:x}=r;e||(S.error("Missing argument, you need to provide a channel"),B.error("")),d&&u&&(S.error("Cannot set latest and bundle at the same time"),B.error("")),u==null&&l==null&&d==null&&c==null&&p==null&&f==null&&h==null&&g==null&&y==null&&x==null&&v==null&&(S.error("Missing argument, you need to provide a option to set"),B.error(""));try{await Of(s,o,r.apikey,t);let D={created_by:a,app_id:t,name:e,owner_org:o,version:void 0},w=await Di(),_=d?w?.version:u;if(_!=null){let{data:T,error:A}=await s.from("app_versions").select().eq("app_id",t).eq("name",_).eq("user_id",a).eq("deleted",!1).single();(A||!T)&&(S.error(`Cannot find version ${_}`),B.error("")),S.info(`Set ${t} channel: ${e} to @${_}`),D.version=T.id}if(l!=null&&((l==="public"||l==="private")&&S.info(`Set ${t} channel: ${e} to public or private is deprecated, use default or normal instead`),S.info(`Set ${t} channel: ${e} to ${l==="public"||l==="default"?"default":"normal"}`),D.public=l==="public"||l==="default"),c!=null&&(S.info(`Set ${t} channel: ${e} to ${c?"allow":"disallow"} downgrade`),D.disable_auto_update_under_native=!c),f!=null&&(S.info(`Set ${t} channel: ${e} to ${f?"allow":"disallow"} ios update`),D.ios=!!f),h!=null&&(S.info(`Set ${t} channel: ${e} to ${h?"allow":"disallow"} android update`),D.android=!!h),g!=null&&(S.info(`Set ${t} channel: ${e} to ${g?"allow":"disallow"} self assign to this channel`),D.allow_device_self_set=!!g),v!=null){let T=v.toLocaleLowerCase();O4e.includes(T)||(S.error(`Channel strategy ${T} is not known. The possible values are: ${O4e.join(", ")}.`),B.error("")),T==="metadata"&&(T="version_number"),D.disable_auto_update=T,S.info(`Set ${t} channel: ${e} to ${T} disable update strategy to this channel`)}try{let{error:T}=await ry(s,D);T&&(S.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error(""))}catch{S.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error("")}await n.track({channel:"channel",event:"Set channel",icon:"\u2705",user_id:o,tags:{"app-id":t},notify:!1}).catch()}catch(D){S.error(`Unknow error ${ae(D)}`),B.error("")}Z("Done \u2705"),(0,F4e.exit)()}var k4e=require("node:process");async function R4e(e,t,r){let{quiet:i}=r;i||ee("List current bundle"),r.apikey=r.apikey||Ae(i);let n=await ce();t=t||n?.config?.appId,r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all","read"]);await rt(s,r.apikey,t,1),e||(S.error("Please provide a channel to get the bundle from."),B.error(""));let{data:o,error:u}=await s.from("channels").select("version ( name )").eq("name",e).eq("app_id",t).limit(1);(u||o.length===0)&&(S.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error(""));let{version:l}=o[0];l||(S.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error("")),i?S.info(l.name):S.info(`Current bundle for channel ${e} is ${l.name}`),(0,k4e.exit)()}var IN=require("node:process");var P4e=ge(M2());function _at(e){e.length||(S.error("No apps found"),(0,IN.exit)(1));let t=new P4e.Table({title:"Apps",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Name:r.name,id:r.app_id,Created:kf(r.created_at)})}),S.success(t.render())}async function Dat(e){let{data:t,error:r}=await e.from("apps").select().order("created_at",{ascending:!1});return r&&(S.error("Apps not found"),B.error("")),t}async function I4e(e){ee("List apps in Capgo"),await Ve(),e.apikey=e.apikey||Ae();let t=await Ee(e.apikey);await xe(t,e.apikey,["write","all","read","upload"]),S.info("Getting active bundle in Capgo");let r=await Dat(t);S.info(`Active app in Capgo: ${r?.length}`),_at(r),Z("Done \u2705"),(0,IN.exit)()}var LN=require("node:process");var y5=ge(B4e());async function bat(e,t,r){for await(let i of e)S.warn(`Removing ${i.name} created on ${kf(i.created_at)}`),await f5(t,r,i.name)}function Eat(e,t,r){let i=[];return e?.forEach(n=>{y5.default.gte(n.name,t)&&y5.default.lt(n.name,`${r}`)&&i.push(n)}),i}async function q4e(e,t){ee("Cleanup versions in Capgo"),await Ve(),t.apikey=t.apikey||Ae();let{bundle:r,keep:i=4}=t,n=t.force||!1,s=await ce();e=e||s?.config?.appId,t.apikey||(S.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(S.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let a=await Ee(t.apikey);await xe(a,t.apikey,["write","all"]),await rt(a,t.apikey,e,3),S.info("Querying all available versions in Capgo");let o=await m5(a,e),u=await y4e(a,e);if(S.info(`Total active versions in Capgo: ${o?.length}`),o?.length===0){S.error("No versions found, aborting cleanup");return}if(r){let d=`${y5.default.inc(r,"major")}`;S.info(`Querying available versions in Capgo between ${r} and ${d}`),o=Eat(o,r,d),S.info(`Active versions in Capgo between ${r} and ${d}: ${o?.length}`)}let l=[],c=0;if(o.forEach(d=>{let p=u.find(f=>f===d.id);c<i||p?(p?d.keep="\u2705 (Linked to channel)":d.keep="\u2705",c+=1):(d.keep="\u274C",l.push(d))}),l.length===0){S.warn("Nothing to be removed, aborting removal...");return}if(h5(o),!n){let d=await $e({message:"Do you want to continue removing the versions specified?"});(ai(d)||!d)&&(S.warn("Not confirmed, aborting removal..."),(0,LN.exit)())}S.success("You have confirmed removal, removing versions now"),await bat(l,a,e),Z("Done \u2705"),(0,LN.exit)()}var j4e=require("node:process");async function $4e(e,t,r){ee("Delete channel"),r.apikey=r.apikey||Ae();let i=await ce();t=t||i?.config?.appId;let n=zt();r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await rt(s,r.apikey,t,4),S.info(`Deleting channel ${t}#${e} from Capgo`);try{let o=await N6e(s,e,t,a);o.error&&(S.error(`Cannot delete Channel \u{1F640} ${ae(o.error)}`),B.error(""));let u=await Wn(s,t);S.success("Channel deleted"),await n.track({channel:"channel",event:"Delete channel",icon:"\u2705",user_id:u,tags:{"user-id":a,"app-id":t,channel:e},notify:!1}).catch()}catch{S.error("Cannot delete Channel \u{1F640}")}Z("Done \u2705"),(0,j4e.exit)()}var M4e=require("node:process");async function U4e(e,t){ee("List channels"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId;let i=zt();t.apikey||S.error("Missing API key, you need to provide a API key to upload your bundle"),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all","read","upload"]);await rt(n,t.apikey,e,1),S.info("Querying available channels in Capgo");let a=await R6e(n,e);S.info(`Active channels in Capgo: ${a?.length}`),k6e(a),await i.track({channel:"channel",event:"List channel",icon:"\u2705",user_id:s,tags:{"app-id":e},notify:!1}).catch(),Z("Done \u2705"),(0,M4e.exit)()}var V4e=require("node:crypto"),c1=require("node:fs"),H4e=require("node:process");async function z4e(e,t){ee("Set app"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId,t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey),s=(await Ff(i,["admin","super_admin"])).gid,a=await xe(i,t.apikey,["write","all"]);await rt(i,t.apikey,e,4);let{name:o,icon:u,retention:l}=t;l&&Number.isNaN(Number(l))?(S.error("retention value must be a number"),B.error("")):l&&l<0&&(S.error("retention value cannot be less than 0"),B.error(""));let c,d,p=`icon_${(0,V4e.randomUUID)()}`,f="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(u&&(0,c1.existsSync)(u)?(c=(0,c1.readFileSync)(u),d=a1.getType(u)||"image/png",S.warn(`Found app icon ${u}`)):(0,c1.existsSync)(Zn)?(c=(0,c1.readFileSync)(Zn),d=a1.getType(Zn)||"image/png",S.warn(`Found app icon ${Zn}`)):S.warn(`Cannot find app icon in any of the following locations: ${u}, ${Zn}`),c&&d){let{error:g}=await i.storage.from(`images/org/${s}/${e}`).upload(p,c,{contentType:d});g&&(S.error(`Could not set app ${ae(g)}`),B.error(""));let{data:v}=await i.storage.from(`images/org/${s}/${e}`).getPublicUrl(p);f=v?.publicUrl||f}let{error:h}=await i.from("apps").update({icon_url:f,name:o,retention:l?l*24*60*60:void 0}).eq("app_id",e).eq("user_id",a);h&&(S.error(`Could not set app ${ae(h)}`),B.error("")),Z("Done \u2705"),(0,H4e.exit)()}var G4e=require("node:process");async function W4e(e,t){ee("Deleting"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId;let i=zt();t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all"]);await rt(n,t.apikey,e,5);let{data:a,error:o}=await n.from("apps").select("owner_org ( created_by, id )").eq("app_id",e).single(),u=a;if(!o&&(u?.owner_org.created_by??"")!==s){S.warn("Deleting the app is not recomended for users that are not the organization owner"),S.warn("You are invited as a super_admin but your are not the owner"),S.warn("It's strongly recomended that you do not continue!");let f=await sd({message:"Do you want to continue?",options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}]});(ai(f)||f==="no")&&(S.error("Canceled deleting the app, exiting"),B.error(""))}else o&&S.warn(`Cannot get the app owner ${ae(o)}`);let{error:l}=await n.storage.from("images").remove([`org/${u?.owner_org.id}/${e}/icon`]);l&&(console.error(l,`images/org/${u?.owner_org.id}/${e}`),S.error("Could not delete app logo"));let{error:c}=await n.storage.from(`apps/${e}/${s}`).remove(["versions"]);c&&S.error("Could not delete app version");let{error:d}=await n.from("apps").delete().eq("app_id",e);d&&(S.error("Could not delete app"),B.error(""));let p=await Wn(n,e);await i.track({channel:"app",event:"App Deleted",icon:"\u{1F5D1}\uFE0F",user_id:p,tags:{"app-id":e},notify:!1}).catch(),S.success("App deleted in Capgo"),Z("Done \u2705"),(0,G4e.exit)()}var K4e=ge(M2());async function Y4e(e,t){ee("Check compatibility"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId;let{channel:i}=t;i||(S.error("Missing argument, you need to provide a channel"),B.error("")),t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey);await xe(n,t.apikey,["write","all","read","upload"]),await rt(n,t.apikey,e,1);let{finalCompatibility:s}=await iy(n,e,i),a=new K4e.Table({title:"Compatibility",charLength:{"\u274C":2,"\u2705":2}}),o=t.text?"Yes":"\u2705",u=t.text?"No":"\u274C";s.forEach(l=>{let{name:c,localVersion:d,remoteVersion:p}=l;a.addRow({Package:c,"Local version":d??"None","Remote version":p??"None",Compatible:p===d?o:u})}),S.success(a.render())}B.name(Uo.name).description("Manage packages and bundle versions in Capgo Cloud").version(Uo.version);B.command("login [apikey]").alias("l").description("Save apikey to your machine or folder").action(r4e).option("--local","Only save in local folder");B.command("doctor").description("Get info about your Capgo app install").action(C4e);B.command("init [apikey] [appId]").description("Init a new app").action(p4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path");var d1=B.command("app").description("Manage app");d1.command("add [appId]").alias("a").description("Add a new app in Capgo Cloud").action(u4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");d1.command("delete [appId]").description("Delete an app in Capgo Cloud").action(W4e).option("-a, --apikey <apikey>","apikey to link to your account");d1.command("list").alias("l").description("list apps in Capgo Cloud").action(I4e).option("-a, --apikey <apikey>","apikey to link to your account");d1.command("debug [appId]").description("Listen for live updates event in Capgo Cloud to debug your app").option("-a, --apikey <apikey>","apikey to link to your account").option("-d, --device <device>","the specific device to debug").action(o6e);d1.command("setting [path]").description("Modifies capacitor config programmatically").option("--bool <bool>","A value for the setting to modify as a boolean").option("--string <string>","A value for the setting to modify as a string").action(Sme);d1.command("set [appId]").alias("s").description("Set an app in Capgo Cloud").action(z4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account").option("-r, --retention <retention>","retention period of app bundle in days");var pl=B.command("bundle").description("Manage bundle");pl.command("upload [appId]").alias("u").description("Upload a new bundle in Capgo Cloud").action(Q6e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--iv-session-key <key>","Set the iv and session key for bundle url external").option("--s3-region <region>","Region for your S3 bucket").option("--s3-apikey <apikey>","Apikey for your S3 endpoint").option("--s3-apisecret <apisecret>","Api secret for your S3 endpoint").option("--s3-endoint <s3Endpoint>","Url of S3 endpoint").option("--s3-bucket-name <bucketName>","Name for your AWS S3 bucket").option("--s3-port <port>","Port for your S3 endpoint").option("--no-s3-ssl","Disable SSL for S3 upload").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the bundle to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel").option("--auto-min-update-version","Set the min update version based on native packages").option("--ignore-metadata-check","Ignores the metadata (node_modules) check when uploading").option("--ignore-checksum-check","Ignores the checksum check when uploading").option("--timeout <timeout>","Timeout for the upload process in seconds").option("--multipart","Uses multipart protocol to upload data to S3").option("--ignore-partial","Does not upload partial files to S3");pl.command("compatibility [appId]").action(Y4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-c, --channel <channel>","channel to check the compatibility with").option("--text","output text instead of emojis");pl.command("delete [bundleId] [appId]").alias("d").description("Delete a bundle in Capgo Cloud").action(T4e).option("-a, --apikey <apikey>","apikey to link to your account");pl.command("list [appId]").alias("l").description("List bundle in Capgo Cloud").action(w4e).option("-a, --apikey <apikey>","apikey to link to your account");pl.command("cleanup [appId]").alias("c").action(q4e).description("Cleanup bundle in Capgo Cloud").option("-b, --bundle <bundle>","bundle version number of the app to delete").option("-a, --apikey <apikey>","apikey to link to your account").option("-k, --keep <keep>","number of version to keep").option("-f, --force","force removal");pl.command("decrypt [zipPath] [sessionKey]").description("Decrypt a signed zip bundle").action(D4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");pl.command("encrypt [zipPath]").description("Encrypt a zip bundle").action(x4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");pl.command("zip [appId]").description("Zip a bundle").action(V2e).option("-p, --path <path>","path of the folder to upload").option("-b, --bundle <bundle>","bundle version number to name the zip file").option("-n, --name <name>","name of the zip file").option("-j, --json","output in JSON").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder");var X2=B.command("channel").description("Manage channel");X2.command("add [channelId] [appId]").alias("a").description("Create channel").action(I6e).option("-d, --default","set the channel as default").option("-a, --apikey <apikey>","apikey to link to your account");X2.command("delete [channelId] [appId]").alias("d").description("Delete channel").action($4e).option("-a, --apikey <apikey>","apikey to link to your account");X2.command("list [appId]").alias("l").description("List channel").action(U4e).option("-a, --apikey <apikey>","apikey to link to your account");X2.command("currentBundle [channel] [appId]").description("Get current bundle for specific channel in Capgo Cloud").action(R4e).option("-c, --channel <channel>","channel to get the current bundle from").option("-a, --apikey <apikey>","apikey to link to your account").option("--quiet","only print the bundle version");X2.command("set [channelId] [appId]").alias("s").description("Set channel").action(N4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-b, --bundle <bundle>","bundle version number of the file to set").option("-s, --state <state>","set the state of the channel, default or normal").option("--latest","get the latest version key in the package.json to set it to the channel").option("--downgrade","Allow to downgrade to version under native one").option("--no-downgrade","Disable downgrade to version under native one").option("--upgrade","Allow to upgrade to version above native one").option("--no-upgrade","Disable upgrade to version above native one").option("--ios","Allow sending update to ios devices").option("--no-ios","Disable sending update to ios devices").option("--android","Allow sending update to android devices").option("--no-android","Disable sending update to android devices").option("--self-assign","Allow to device to self assign to this channel").option("--no-self-assign","Disable devices to self assign to this channel").option("--disable-auto-update <disableAutoUpdate>","Disable auto update strategy for this channel.The possible options are: major, minor, metadata, patch, none").option("--dev","Allow sending update to development devices").option("--no-dev","Disable sending update to development devices").option("--emulator","Allow sending update to emulator devices").option("--no-emulator","Disable sending update to emulator devices");var X4e=B.command("key").description("Manage encryption key");X4e.command("save").description("Save base64 encryption key in capacitor config, usefull for CI").action(u6e).option("-f, --force","force generate a new one").option("--key","key path to save in capacitor config").option("--key-data","key data to save in capacitor config");X4e.command("create").description("Create a new encryption key").action(l6e).option("-f, --force","force generate a new one");var v5=B.command("sign").description("Manage encryption key");v5.command("create").description("Create a new signing key").action(xme).option("-f, --force","force generate a new one");v5.command("signFile [file]").description("Signs a file. Useful for uploading signed bundles to a custom backend").action(Eme).option("--json","Returns the output in a JSON format").option("--stdout","Prints the output in a standard output, do not save in a file");v5.command("exportPrivateKey").description("Prints the private key as hex").action(bme);v5.command("importPrivateKey").description("Imports the private key from a hex hex").action(Dme).option("--key <key>",'Private key exported in a HEX format. Can be generated using "sing exportPrivateKey"');B.command("upload [appId]").alias("u").description("(Deprecated) Upload a new bundle to Capgo Cloud").action(e4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the file to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel");var xat=B.command("account").description("Manage account");xat.command("id").description("Get your account ID").action(Cme).option("-a, --apikey <apikey>","apikey to link to your account");B.parseAsync();
398
+ `)}async function dat(e,t,r,i){let n=bi(),s=await $e({message:`Automatic configure end-to-end encryption in ${i} updates?`});if(await Ca(s,e,t),s){let a=ze();a.start(`Running: ${n.runner} @capgo/cli@latest key create`),await tN({force:!0},!1)?a.stop("key created \u{1F511}"):(a.stop("Error"),S.warn("Cannot create key \u274C"),Z("Bye \u{1F44B}"),(0,hn.exit)(1)),Lo("onboarding-v2",e,t,"Use encryption")}await Cs(e,t,6)}async function pat(e,t,r,i){let n=bi(),s=await $e({message:`Automatic build ${i} with "${n.pm} run build" ?`});if(await Ca(s,e,t),s){let a=ze(),o=await rO(),u=await Epe(o);a.start(`Running: ${n.pm} run ${u} && ${n.runner} cap sync`),(await Di()).scripts[u]||(a.stop("Error"),S.warn(`Cannot find ${u} script in package.json, please add it and run \`capgo init\` again`),Z("Bye \u{1F44B}"),(0,hn.exit)()),(0,Y2.execSync)(`${n.pm} run ${u} && ${n.runner} cap sync`,c4e),a.stop("Build & Sync Done \u2705")}else S.info(`Build yourself with command: ${n.pm} run build && ${n.runner} cap sync`);await Cs(e,t,7)}async function fat(e,t,r,i){let n=bi(),s=await $e({message:`Automatic upload ${i} bundle to Capgo?`});if(await Ca(s,e,t),s){let a=ze();a.start(`Running: ${n.runner} @capgo/cli@latest bundle upload`),await l5(i,{channel:K2,apikey:r},!1)?a.stop("Upload Done \u2705"):(a.stop("Error"),S.warn("Upload failed \u274C"),Z("Bye \u{1F44B}"),(0,hn.exit)())}else S.info(`Upload yourself with command: ${n.runner} @capgo/cli@latest bundle upload`);await Cs(e,t,8)}async function hat(e,t){let r=bi(),i=await $e({message:"Run in device now ?"});if(await Ca(i,e,t),i){let n=await sd({message:"Pick a platform to run your app",options:[{value:"ios",label:"IOS"},{value:"android",label:"Android"}]});ai(n)&&(Z("Bye \u{1F44B}"),(0,hn.exit)());let s=n,a=ze();a.start(`Running: ${r.runner} cap run ${s}`),await(0,Y2.spawnSync)(r.runner,["cap","run",s],{stdio:"inherit"}),a.stop("Started Done \u2705")}else S.info(`If you change your mind, run it for yourself with: ${r.runner} cap run <ios|android>`);await Cs(e,t,9)}async function mat(e,t,r,i){let n=await $e({message:"Automatic check if update working in device ?"});if(await Ca(n,e,t),n)S.info(`Wait logs sent to Capgo from ${i} device, Please open your app \u{1F4AA}`),await eN("onboarding-v2",r,i,t,e);else{let s=Nf(i);S.info(`Check logs in https://web.capgo.app/app/p/${s}/logs to see if update works.`)}await Cs(e,t,10)}async function p4e(e,t,r){let i=bi();ee("Capgo onboarding \u{1F6EB}"),await Ve();let n=zt(),s=await ce();t=t||s?.config?.appId,r.apikey=e||Ae();let a=ze();(!t4e()||e)&&(a.start(`Running: ${i.runner} @capgo/cli@latest login ***`),await FN(r.apikey,r,!1),a.stop("Login Done \u2705"));let o=await Ee(r.apikey);await xe(o,r.apikey,["upload","all","read","write"]);let u=await Ff(o,["admin","super_admin"]),l=u.gid,c=await iat(l,n)??0;try{c<1&&await Cs(l,n,1),c<2&&(await sat(u,n,t,r),dl(2)),c<3&&(await aat(l,n,r.apikey,t),dl(3)),c<4&&(await lat(l,n,r.apikey,t),dl(4)),c<5&&(await cat(l,n,r.apikey,t),dl(5)),c<6&&(await dat(l,n,r.apikey,t),dl(6)),c<7&&(await pat(l,n,r.apikey,t),dl(7)),c<8&&(await fat(l,n,r.apikey,t),dl(8)),c<9&&(await hat(l,n),dl(9)),await mat(l,n,r.apikey,t),await Cs(l,n,0),nat()}catch(d){console.error(d),S.error("Error during onboarding, please try again later"),(0,hn.exit)(1)}S.info("Welcome onboard \u2708\uFE0F!"),S.info("Your Capgo update system is setup"),S.info(`Next time use \`${i.runner} @capgo/cli@latest bundle upload\` to only upload your bundle`),S.info(`If you have any issue try to use the debug command \`${i.runner} @capgo/cli@latest app debug\``),Z("Bye \u{1F44B}"),(0,hn.exit)()}var v4e=require("node:process");var m4e=require("node:process");var g4e=ge(M2());var f4e=require("node:process");async function h4e(e,t,r){let{data:i,error:n}=await e.from("devices_override").select().eq("app_id",t).eq("version",r.id);if(n&&(S.error(`Cannot check Device override ${t}@${r.name}`),B.error("")),i&&i.length>0)if(ee(`\u274C Version ${t}@${r.name} is used in ${i.length} device override`),await $e({message:"unlink it?"}))for(let s of i){let a=ze();a.start(`Unlinking device ${s.device_id}`);let{error:o}=await e.from("devices_override").delete().eq("device_id",s.device_id);o&&(a.stop(`Cannot unlink device ${s.device_id} ${ae(o)}`),(0,f4e.exit)(1)),a.stop(`\u2705 Device ${s.device_id} unlinked`)}else S.error("Unlink it first"),B.error("")}async function gat(e,t,r){let{error:i}=await e.from("app_versions").update({deleted:!0}).eq("app_id",t).eq("deleted",!1).eq("name",r);i&&(S.error(`App Version ${t}@${r} not found in database`),B.error(""))}async function f5(e,t,r){let i=await yat(e,t,r);await O6e(e,t,i),await h4e(e,t,i),await gat(e,t,r)}function h5(e){e.length||(S.error("No bundle found"),(0,m4e.exit)(1));let t=new g4e.Table({title:"Bundles",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Version:r.name,Created:kf(r.created_at),...r.keep!=null?{Keep:r.keep}:{}})}),S.success(t.render())}async function m5(e,t){let{data:r,error:i}=await e.from("app_versions").select().eq("app_id",t).eq("deleted",!1).order("created_at",{ascending:!1});return i&&(S.error(`App ${t} not found in database`),B.error("")),r}async function y4e(e,t){let{data:r,error:i}=await e.from("channels").select("version").eq("app_id",t);return i&&(S.error(`App ${t} not found in database`),B.error("")),r.map(n=>n.version)}async function yat(e,t,r){let{data:i,error:n}=await e.from("app_versions").select().eq("app_id",t).eq("name",r).eq("deleted",!1).single();return(!i||n)&&(S.error(`App Version ${t}@${r} doesn't exist`),B.error("")),i}async function w4e(e,t){ee("List bundles"),await Ve(),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId,t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey);await xe(i,t.apikey,["write","all","read","upload"]),S.info(`Querying available versions of: ${e} in Capgo`),await rt(i,t.apikey,e,1);let n=await m5(i,e);S.info(`Active versions in Capgo: ${n?.length}`),h5(n),Z("Done \u2705"),(0,v4e.exit)()}var Aa=require("node:fs"),_4e=require("node:process");async function D4e(e,t,r){ee("Decrypt zip file"),await Ve(),(0,Aa.existsSync)(e)||(S.error(`Zip not found at the path ${e}`),B.error(""));let i=await ce();!r.key&&!(0,Aa.existsSync)(Co)&&!i.config.plugins?.CapacitorUpdater?.privateKey&&(S.error(`Private Key not found at the path ${Co} or in ${i.path}`),B.error(""));let n=r.key||Co,s=i.config.plugins?.CapacitorUpdater?.privateKey;!(0,Aa.existsSync)(n)&&!s?(S.error(`Cannot find public key ${n} or as keyData option or in ${i.path}`),B.error("")):(0,Aa.existsSync)(n)&&(s=(0,Aa.readFileSync)(n).toString());let a=(0,Aa.readFileSync)(e),o=nW(a,t,r.keyData??s??"");(0,Aa.writeFileSync)(`${e}_decrypted.zip`,o),Z(`Decrypted zip file at ${e}_decrypted.zip`),(0,_4e.exit)()}var Mo=require("node:fs"),b4e=require("node:process");var E4e=ge(_N());async function x4e(e,t){ee("Encryption"),await Ve();let r=await Tc();(0,Mo.existsSync)(e)||(S.error(`Error: Zip not found at the path ${e}`),B.error(""));let i=t.key||Ao,n=t.keyData||"";!(0,Mo.existsSync)(i)&&!n?(S.warning(`Cannot find public key ${i} or as keyData option`),E4e.default.isCI&&(S.error("Error: Missing public key"),B.error("")),await $e({message:"Do you want to use our public key ?"})||(S.error("Error: Missing public key"),B.error("")),n=r.encryptionKey||""):(0,Mo.existsSync)(i)&&(n=(0,Mo.readFileSync)(i).toString());let s=(0,Mo.readFileSync)(e),a=Sg(s,n);S.success(`ivSessionKey: ${a.ivSessionKey}`),(0,Mo.writeFileSync)(`${e}_encrypted.zip`,a.encryptedData),S.success(`Encrypted zip saved at ${e}_encrypted.zip`),Z("Done \u2705"),(0,b4e.exit)()}var l1=require("node:process"),g5=require("node:os"),S4e=ge(pF());async function vat(e){let t={},r=[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.push((0,S4e.default)(i));return await Promise.all(r).then(i=>{let n=Object.keys(e);for(let s=0;s<i.length;s+=1){let a=i[s];a&&(t[n[s]]=a)}}),t}async function wat(){let{dependencies:e}=await Di(),t={"@capgo/cli":Uo.version};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith("@capgo/")&&r.startsWith("@capawesome/")&&r.startsWith("capacitor")){let i=e[r].replace("^","").replace("~","");t[r]=i}return t}async function C4e(){S.warn(" \u{1F48A} Capgo Doctor \u{1F48A}");let e=await ce(),t=await Di(),r=e?.config?.plugins?.CapacitorUpdater?.version||t?.version,i=e?.config?.appName||"";S.info(` App Name: ${i}`);let n=e?.config?.appId||"";S.info(` App ID: ${n}`),S.info(` App Version: ${r}`);let s=e?.config?.webDir||"";S.info(` Web Dir: ${s}`),S.info(` OS: ${(0,g5.platform)()} ${(0,g5.version)()}`),S.info(` Node: ${l1.version}`),S.info(" Installed Dependencies:");let a=await wat();Object.keys(a).length===0&&(S.warning("\x1B[31m%s\x1B[0m \u{1F6A8} No dependencies found"),(0,l1.exit)(1));for(let l in a)if(Object.prototype.hasOwnProperty.call(a,l)){let c=a[l];S.info(` ${l}: ${c}`)}let o=ze();o.start("Running: Loading latest dependencies");let u=await vat(a);o.stop("Latest Dependencies:");for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let c=u[l];S.info(` ${l}: ${c}`)}JSON.stringify(a)!==JSON.stringify(u)&&(S.warn("\x1B[31m\u{1F6A8} Some dependencies are not up to date\x1B[0m"),(0,l1.exit)(1)),S.success("\x1B[32m\u2705 All dependencies are up to date\x1B[0m"),(0,l1.exit)()}var A4e=require("node:process");async function T4e(e,t,r){ee("Delete bundle"),r.apikey=r.apikey||Ae();let i=await ce();t=t||i?.config?.appId,r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(r.apikey);await xe(n,r.apikey,["write","all"]),await rt(n,r.apikey,t,3),r.apikey||(S.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(S.error("Missing argument, you need to provide a bundleId, or be in a capacitor project"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error("")),S.info(`Deleting bundle ${t}@${e} from Capgo`),S.info("Keep in mind that you will not be able to reuse this bundle version, it's gone forever"),await f5(n,t,e),S.success(`Bundle ${t}@${e} deleted in Capgo`),Z("Done"),(0,A4e.exit)()}var F4e=require("node:process");var O4e=["major","minor","metadata","patch","none"];async function N4e(e,t,r){ee("Set channel"),r.apikey=r.apikey||Ae();let i=await ce();t=t||i?.config?.appId;let n=zt();r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await rt(s,r.apikey,t,4);let o=await Wn(s,t),{bundle:u,state:l,downgrade:c,latest:d,upgrade:p,ios:f,android:h,selfAssign:g,disableAutoUpdate:v,dev:y,emulator:x}=r;e||(S.error("Missing argument, you need to provide a channel"),B.error("")),d&&u&&(S.error("Cannot set latest and bundle at the same time"),B.error("")),u==null&&l==null&&d==null&&c==null&&p==null&&f==null&&h==null&&g==null&&y==null&&x==null&&v==null&&(S.error("Missing argument, you need to provide a option to set"),B.error(""));try{await Of(s,o,r.apikey,t);let D={created_by:a,app_id:t,name:e,owner_org:o,version:void 0},w=await Di(),_=d?w?.version:u;if(_!=null){let{data:T,error:A}=await s.from("app_versions").select().eq("app_id",t).eq("name",_).eq("user_id",a).eq("deleted",!1).single();(A||!T)&&(S.error(`Cannot find version ${_}`),B.error("")),S.info(`Set ${t} channel: ${e} to @${_}`),D.version=T.id}if(l!=null&&((l==="public"||l==="private")&&S.info(`Set ${t} channel: ${e} to public or private is deprecated, use default or normal instead`),S.info(`Set ${t} channel: ${e} to ${l==="public"||l==="default"?"default":"normal"}`),D.public=l==="public"||l==="default"),c!=null&&(S.info(`Set ${t} channel: ${e} to ${c?"allow":"disallow"} downgrade`),D.disable_auto_update_under_native=!c),f!=null&&(S.info(`Set ${t} channel: ${e} to ${f?"allow":"disallow"} ios update`),D.ios=!!f),h!=null&&(S.info(`Set ${t} channel: ${e} to ${h?"allow":"disallow"} android update`),D.android=!!h),g!=null&&(S.info(`Set ${t} channel: ${e} to ${g?"allow":"disallow"} self assign to this channel`),D.allow_device_self_set=!!g),v!=null){let T=v.toLocaleLowerCase();O4e.includes(T)||(S.error(`Channel strategy ${T} is not known. The possible values are: ${O4e.join(", ")}.`),B.error("")),T==="metadata"&&(T="version_number"),D.disable_auto_update=T,S.info(`Set ${t} channel: ${e} to ${T} disable update strategy to this channel`)}try{let{error:T}=await ry(s,D);T&&(S.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error(""))}catch{S.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error("")}await n.track({channel:"channel",event:"Set channel",icon:"\u2705",user_id:o,tags:{"app-id":t},notify:!1}).catch()}catch(D){S.error(`Unknow error ${ae(D)}`),B.error("")}Z("Done \u2705"),(0,F4e.exit)()}var k4e=require("node:process");async function R4e(e,t,r){let{quiet:i}=r;i||ee("List current bundle"),r.apikey=r.apikey||Ae(i);let n=await ce();t=t||n?.config?.appId,r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all","read"]);await rt(s,r.apikey,t,1),e||(S.error("Please provide a channel to get the bundle from."),B.error(""));let{data:o,error:u}=await s.from("channels").select("version ( name )").eq("name",e).eq("app_id",t).limit(1);(u||o.length===0)&&(S.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error(""));let{version:l}=o[0];l||(S.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error("")),i?S.info(l.name):S.info(`Current bundle for channel ${e} is ${l.name}`),(0,k4e.exit)()}var IN=require("node:process");var P4e=ge(M2());function _at(e){e.length||(S.error("No apps found"),(0,IN.exit)(1));let t=new P4e.Table({title:"Apps",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Name:r.name,id:r.app_id,Created:kf(r.created_at)})}),S.success(t.render())}async function Dat(e){let{data:t,error:r}=await e.from("apps").select().order("created_at",{ascending:!1});return r&&(S.error("Apps not found"),B.error("")),t}async function I4e(e){ee("List apps in Capgo"),await Ve(),e.apikey=e.apikey||Ae();let t=await Ee(e.apikey);await xe(t,e.apikey,["write","all","read","upload"]),S.info("Getting active bundle in Capgo");let r=await Dat(t);S.info(`Active app in Capgo: ${r?.length}`),_at(r),Z("Done \u2705"),(0,IN.exit)()}var LN=require("node:process");var y5=ge(B4e());async function bat(e,t,r){for await(let i of e)S.warn(`Removing ${i.name} created on ${kf(i.created_at)}`),await f5(t,r,i.name)}function Eat(e,t,r){let i=[];return e?.forEach(n=>{y5.default.gte(n.name,t)&&y5.default.lt(n.name,`${r}`)&&i.push(n)}),i}async function q4e(e,t){ee("Cleanup versions in Capgo"),await Ve(),t.apikey=t.apikey||Ae();let{bundle:r,keep:i=4}=t,n=t.force||!1,s=await ce();e=e||s?.config?.appId,t.apikey||(S.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(S.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let a=await Ee(t.apikey);await xe(a,t.apikey,["write","all"]),await rt(a,t.apikey,e,3),S.info("Querying all available versions in Capgo");let o=await m5(a,e),u=await y4e(a,e);if(S.info(`Total active versions in Capgo: ${o?.length}`),o?.length===0){S.error("No versions found, aborting cleanup");return}if(r){let d=`${y5.default.inc(r,"major")}`;S.info(`Querying available versions in Capgo between ${r} and ${d}`),o=Eat(o,r,d),S.info(`Active versions in Capgo between ${r} and ${d}: ${o?.length}`)}let l=[],c=0;if(o.forEach(d=>{let p=u.find(f=>f===d.id);c<i||p?(p?d.keep="\u2705 (Linked to channel)":d.keep="\u2705",c+=1):(d.keep="\u274C",l.push(d))}),l.length===0){S.warn("Nothing to be removed, aborting removal...");return}if(h5(o),!n){let d=await $e({message:"Do you want to continue removing the versions specified?"});(ai(d)||!d)&&(S.warn("Not confirmed, aborting removal..."),(0,LN.exit)())}S.success("You have confirmed removal, removing versions now"),await bat(l,a,e),Z("Done \u2705"),(0,LN.exit)()}var j4e=require("node:process");async function $4e(e,t,r){ee("Delete channel"),r.apikey=r.apikey||Ae();let i=await ce();t=t||i?.config?.appId;let n=zt();r.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await rt(s,r.apikey,t,4),S.info(`Deleting channel ${t}#${e} from Capgo`);try{let o=await N6e(s,e,t,a);o.error&&(S.error(`Cannot delete Channel \u{1F640} ${ae(o.error)}`),B.error(""));let u=await Wn(s,t);S.success("Channel deleted"),await n.track({channel:"channel",event:"Delete channel",icon:"\u2705",user_id:u,tags:{"user-id":a,"app-id":t,channel:e},notify:!1}).catch()}catch{S.error("Cannot delete Channel \u{1F640}")}Z("Done \u2705"),(0,j4e.exit)()}var M4e=require("node:process");async function U4e(e,t){ee("List channels"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId;let i=zt();t.apikey||S.error("Missing API key, you need to provide a API key to upload your bundle"),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all","read","upload"]);await rt(n,t.apikey,e,1),S.info("Querying available channels in Capgo");let a=await R6e(n,e);S.info(`Active channels in Capgo: ${a?.length}`),k6e(a),await i.track({channel:"channel",event:"List channel",icon:"\u2705",user_id:s,tags:{"app-id":e},notify:!1}).catch(),Z("Done \u2705"),(0,M4e.exit)()}var V4e=require("node:crypto"),c1=require("node:fs"),H4e=require("node:process");async function z4e(e,t){ee("Set app"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId,t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey),s=(await Ff(i,["admin","super_admin"])).gid,a=await xe(i,t.apikey,["write","all"]);await rt(i,t.apikey,e,4);let{name:o,icon:u,retention:l}=t;l&&Number.isNaN(Number(l))?(S.error("retention value must be a number"),B.error("")):l&&l<0&&(S.error("retention value cannot be less than 0"),B.error(""));let c,d,p=`icon_${(0,V4e.randomUUID)()}`,f="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(u&&(0,c1.existsSync)(u)?(c=(0,c1.readFileSync)(u),d=a1.getType(u)||"image/png",S.warn(`Found app icon ${u}`)):(0,c1.existsSync)(Zn)?(c=(0,c1.readFileSync)(Zn),d=a1.getType(Zn)||"image/png",S.warn(`Found app icon ${Zn}`)):S.warn(`Cannot find app icon in any of the following locations: ${u}, ${Zn}`),c&&d){let{error:g}=await i.storage.from(`images/org/${s}/${e}`).upload(p,c,{contentType:d});g&&(S.error(`Could not set app ${ae(g)}`),B.error(""));let{data:v}=await i.storage.from(`images/org/${s}/${e}`).getPublicUrl(p);f=v?.publicUrl||f}let{error:h}=await i.from("apps").update({icon_url:f,name:o,retention:l?l*24*60*60:void 0}).eq("app_id",e).eq("user_id",a);h&&(S.error(`Could not set app ${ae(h)}`),B.error("")),Z("Done \u2705"),(0,H4e.exit)()}var G4e=require("node:process");async function W4e(e,t){ee("Deleting"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId;let i=zt();t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all"]);await rt(n,t.apikey,e,5);let{data:a,error:o}=await n.from("apps").select("owner_org ( created_by, id )").eq("app_id",e).single(),u=a;if(!o&&(u?.owner_org.created_by??"")!==s){S.warn("Deleting the app is not recomended for users that are not the organization owner"),S.warn("You are invited as a super_admin but your are not the owner"),S.warn("It's strongly recomended that you do not continue!");let f=await sd({message:"Do you want to continue?",options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}]});(ai(f)||f==="no")&&(S.error("Canceled deleting the app, exiting"),B.error(""))}else o&&S.warn(`Cannot get the app owner ${ae(o)}`);let{error:l}=await n.storage.from("images").remove([`org/${u?.owner_org.id}/${e}/icon`]);l&&(console.error(l,`images/org/${u?.owner_org.id}/${e}`),S.error("Could not delete app logo"));let{error:c}=await n.storage.from(`apps/${e}/${s}`).remove(["versions"]);c&&S.error("Could not delete app version");let{error:d}=await n.from("apps").delete().eq("app_id",e);d&&(S.error("Could not delete app"),B.error(""));let p=await Wn(n,e);await i.track({channel:"app",event:"App Deleted",icon:"\u{1F5D1}\uFE0F",user_id:p,tags:{"app-id":e},notify:!1}).catch(),S.success("App deleted in Capgo"),Z("Done \u2705"),(0,G4e.exit)()}var K4e=ge(M2());async function Y4e(e,t){ee("Check compatibility"),t.apikey=t.apikey||Ae();let r=await ce();e=e||r?.config?.appId;let{channel:i}=t;i||(S.error("Missing argument, you need to provide a channel"),B.error("")),t.apikey||(S.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(S.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey);await xe(n,t.apikey,["write","all","read","upload"]),await rt(n,t.apikey,e,1);let{finalCompatibility:s}=await iy(n,e,i),a=new K4e.Table({title:"Compatibility",charLength:{"\u274C":2,"\u2705":2}}),o=t.text?"Yes":"\u2705",u=t.text?"No":"\u274C";s.forEach(l=>{let{name:c,localVersion:d,remoteVersion:p}=l;a.addRow({Package:c,"Local version":d??"None","Remote version":p??"None",Compatible:p===d?o:u})}),S.success(a.render())}B.name(Uo.name).description("Manage packages and bundle versions in Capgo Cloud").version(Uo.version);B.command("login [apikey]").alias("l").description("Save apikey to your machine or folder").action(r4e).option("--local","Only save in local folder");B.command("doctor").description("Get info about your Capgo app install").action(C4e);B.command("init [apikey] [appId]").description("Init a new app").action(p4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path");var d1=B.command("app").description("Manage app");d1.command("add [appId]").alias("a").description("Add a new app in Capgo Cloud").action(u4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");d1.command("delete [appId]").description("Delete an app in Capgo Cloud").action(W4e).option("-a, --apikey <apikey>","apikey to link to your account");d1.command("list").alias("l").description("list apps in Capgo Cloud").action(I4e).option("-a, --apikey <apikey>","apikey to link to your account");d1.command("debug [appId]").description("Listen for live updates event in Capgo Cloud to debug your app").option("-a, --apikey <apikey>","apikey to link to your account").option("-d, --device <device>","the specific device to debug").action(o6e);d1.command("setting [path]").description("Modifies capacitor config programmatically").option("--bool <bool>","A value for the setting to modify as a boolean").option("--string <string>","A value for the setting to modify as a string").action(Sme);d1.command("set [appId]").alias("s").description("Set an app in Capgo Cloud").action(z4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account").option("-r, --retention <retention>","retention period of app bundle in days");var pl=B.command("bundle").description("Manage bundle");pl.command("upload [appId]").alias("u").description("Upload a new bundle in Capgo Cloud").action(Q6e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--iv-session-key <key>","Set the iv and session key for bundle url external").option("--s3-region <region>","Region for your S3 bucket").option("--s3-apikey <apikey>","Apikey for your S3 endpoint").option("--s3-apisecret <apisecret>","Api secret for your S3 endpoint").option("--s3-endoint <s3Endpoint>","Url of S3 endpoint").option("--s3-bucket-name <bucketName>","Name for your AWS S3 bucket").option("--s3-port <port>","Port for your S3 endpoint").option("--no-s3-ssl","Disable SSL for S3 upload").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the bundle to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel").option("--auto-min-update-version","Set the min update version based on native packages").option("--ignore-metadata-check","Ignores the metadata (node_modules) check when uploading").option("--ignore-checksum-check","Ignores the checksum check when uploading").option("--timeout <timeout>","Timeout for the upload process in seconds").option("--multipart","Uses multipart protocol to upload data to S3").option("--ignore-partial","Does not upload partial files to S3");pl.command("compatibility [appId]").action(Y4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-c, --channel <channel>","channel to check the compatibility with").option("--text","output text instead of emojis");pl.command("delete [bundleId] [appId]").alias("d").description("Delete a bundle in Capgo Cloud").action(T4e).option("-a, --apikey <apikey>","apikey to link to your account");pl.command("list [appId]").alias("l").description("List bundle in Capgo Cloud").action(w4e).option("-a, --apikey <apikey>","apikey to link to your account");pl.command("cleanup [appId]").alias("c").action(q4e).description("Cleanup bundle in Capgo Cloud").option("-b, --bundle <bundle>","bundle version number of the app to delete").option("-a, --apikey <apikey>","apikey to link to your account").option("-k, --keep <keep>","number of version to keep").option("-f, --force","force removal");pl.command("decrypt [zipPath] [sessionKey]").description("Decrypt a signed zip bundle").action(D4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");pl.command("encrypt [zipPath]").description("Encrypt a zip bundle").action(x4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");pl.command("zip [appId]").description("Zip a bundle").action(V2e).option("-p, --path <path>","path of the folder to upload").option("-b, --bundle <bundle>","bundle version number to name the zip file").option("-n, --name <name>","name of the zip file").option("-j, --json","output in JSON").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder");var X2=B.command("channel").description("Manage channel");X2.command("add [channelId] [appId]").alias("a").description("Create channel").action(I6e).option("-d, --default","set the channel as default").option("-a, --apikey <apikey>","apikey to link to your account");X2.command("delete [channelId] [appId]").alias("d").description("Delete channel").action($4e).option("-a, --apikey <apikey>","apikey to link to your account");X2.command("list [appId]").alias("l").description("List channel").action(U4e).option("-a, --apikey <apikey>","apikey to link to your account");X2.command("currentBundle [channel] [appId]").description("Get current bundle for specific channel in Capgo Cloud").action(R4e).option("-c, --channel <channel>","channel to get the current bundle from").option("-a, --apikey <apikey>","apikey to link to your account").option("--quiet","only print the bundle version");X2.command("set [channelId] [appId]").alias("s").description("Set channel").action(N4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-b, --bundle <bundle>","bundle version number of the file to set").option("-s, --state <state>","set the state of the channel, default or normal").option("--latest","get the latest version key in the package.json to set it to the channel").option("--downgrade","Allow to downgrade to version under native one").option("--no-downgrade","Disable downgrade to version under native one").option("--upgrade","Allow to upgrade to version above native one").option("--no-upgrade","Disable upgrade to version above native one").option("--ios","Allow sending update to ios devices").option("--no-ios","Disable sending update to ios devices").option("--android","Allow sending update to android devices").option("--no-android","Disable sending update to android devices").option("--self-assign","Allow to device to self assign to this channel").option("--no-self-assign","Disable devices to self assign to this channel").option("--disable-auto-update <disableAutoUpdate>","Disable auto update strategy for this channel.The possible options are: major, minor, metadata, patch, none").option("--dev","Allow sending update to development devices").option("--no-dev","Disable sending update to development devices").option("--emulator","Allow sending update to emulator devices").option("--no-emulator","Disable sending update to emulator devices");var X4e=B.command("key").description("Manage encryption key");X4e.command("save").description("Save base64 encryption key in capacitor config, usefull for CI").action(u6e).option("-f, --force","force generate a new one").option("--key","key path to save in capacitor config").option("--key-data","key data to save in capacitor config");X4e.command("create").description("Create a new encryption key").action(l6e).option("-f, --force","force generate a new one");var v5=B.command("sign").description("Manage encryption key");v5.command("create").description("Create a new signing key").action(xme).option("-f, --force","force generate a new one");v5.command("signFile [file]").description("Signs a file. Useful for uploading signed bundles to a custom backend").action(Eme).option("--json","Returns the output in a JSON format").option("--stdout","Prints the output in a standard output, do not save in a file");v5.command("exportPrivateKey").description("Prints the private key as hex").action(bme);v5.command("importPrivateKey").description("Imports the private key from a hex hex").action(Dme).option("--key <key>",'Private key exported in a HEX format. Can be generated using "sing exportPrivateKey"');B.command("upload [appId]").alias("u").description("(Deprecated) Upload a new bundle to Capgo Cloud").action(e4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the file to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel");var xat=B.command("account").description("Manage account");xat.command("id").description("Get your account ID").action(Cme).option("-a, --apikey <apikey>","apikey to link to your account");B.parseAsync();
399
399
  /*! Bundled license information:
400
400
 
401
401
  sax/lib/sax.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.14.2",
3
+ "version": "4.14.4",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "github.com/riderx",
6
6
  "license": "Apache 2.0",