@capgo/cli 4.22.4 → 4.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -197,7 +197,7 @@ tell application "System Events" to get value of property list item "CFBundleNam
|
|
|
197
197
|
GFS4: `),console.error(t)});We[_t]||(Vj=global[_t]||[],zj(We,Vj),We.close=function(t){function e(r,n){return t.call(We,r,function(i){i||Hj(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Lh,{value:t}),e}(We.close),We.closeSync=function(t){function e(r){t.apply(We,arguments),Hj()}return Object.defineProperty(e,Lh,{value:t}),e}(We.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Eo(We[_t]),require("assert").equal(We[_t].length,0)}));var Vj;global[_t]||zj(global,We[_t]);fb.exports=cb(Nse(We));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!We.__patched&&(fb.exports=cb(We),We.__patched=!0);function cb(t){Ise(t),t.gracefulify=cb,t.createReadStream=A,t.createWriteStream=$;var e=t.readFile;t.readFile=r;function r(S,I,R){return typeof I=="function"&&(R=I,I=null),B(S,I,R);function B(q,K,M,E){return e(q,K,function(v){v&&(v.code==="EMFILE"||v.code==="ENFILE")?Da([B,[q,K,M],v,E||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(S,I,R,B){return typeof R=="function"&&(B=R,R=null),q(S,I,R,B);function q(K,M,E,v,_){return n(K,M,E,function(O){O&&(O.code==="EMFILE"||O.code==="ENFILE")?Da([q,[K,M,E,v],O,_||Date.now(),Date.now()]):typeof v=="function"&&v.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(S,I,R,B){return typeof R=="function"&&(B=R,R=null),q(S,I,R,B);function q(K,M,E,v,_){return o(K,M,E,function(O){O&&(O.code==="EMFILE"||O.code==="ENFILE")?Da([q,[K,M,E,v],O,_||Date.now(),Date.now()]):typeof v=="function"&&v.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=u);function u(S,I,R,B){return typeof R=="function"&&(B=R,R=0),q(S,I,R,B);function q(K,M,E,v,_){return a(K,M,E,function(O){O&&(O.code==="EMFILE"||O.code==="ENFILE")?Da([q,[K,M,E,v],O,_||Date.now(),Date.now()]):typeof v=="function"&&v.apply(this,arguments)})}}var c=t.readdir;t.readdir=f;var l=/^v[0-5]\./;function f(S,I,R){typeof I=="function"&&(R=I,I=null);var B=l.test(process.version)?function(M,E,v,_){return c(M,q(M,E,v,_))}:function(M,E,v,_){return c(M,E,q(M,E,v,_))};return B(S,I,R);function q(K,M,E,v){return function(_,O){_&&(_.code==="EMFILE"||_.code==="ENFILE")?Da([B,[K,M,E],_,v||Date.now(),Date.now()]):(O&&O.sort&&O.sort(),typeof E=="function"&&E.call(this,_,O))}}}if(process.version.substr(0,4)==="v0.8"){var h=jse(t);w=h.ReadStream,D=h.WriteStream}var d=t.ReadStream;d&&(w.prototype=Object.create(d.prototype),w.prototype.open=x);var p=t.WriteStream;p&&(D.prototype=Object.create(p.prototype),D.prototype.open=C),Object.defineProperty(t,"ReadStream",{get:function(){return w},set:function(S){w=S},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return D},set:function(S){D=S},enumerable:!0,configurable:!0});var b=w;Object.defineProperty(t,"FileReadStream",{get:function(){return b},set:function(S){b=S},enumerable:!0,configurable:!0});var g=D;Object.defineProperty(t,"FileWriteStream",{get:function(){return g},set:function(S){g=S},enumerable:!0,configurable:!0});function w(S,I){return this instanceof w?(d.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function x(){var S=this;L(S.path,S.flags,S.mode,function(I,R){I?(S.autoClose&&S.destroy(),S.emit("error",I)):(S.fd=R,S.emit("open",R),S.read())})}function D(S,I){return this instanceof D?(p.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}function C(){var S=this;L(S.path,S.flags,S.mode,function(I,R){I?(S.destroy(),S.emit("error",I)):(S.fd=R,S.emit("open",R))})}function A(S,I){return new t.ReadStream(S,I)}function $(S,I){return new t.WriteStream(S,I)}var F=t.open;t.open=L;function L(S,I,R,B){return typeof R=="function"&&(B=R,R=null),q(S,I,R,B);function q(K,M,E,v,_){return F(K,M,E,function(O,j){O&&(O.code==="EMFILE"||O.code==="ENFILE")?Da([q,[K,M,E,v],O,_||Date.now(),Date.now()]):typeof v=="function"&&v.apply(this,arguments)})}}return t}function Da(t){Eo("ENQUEUE",t[0].name,t[1]),We[_t].push(t),lb()}var Nh;function Hj(){for(var t=Date.now(),e=0;e<We[_t].length;++e)We[_t][e].length>2&&(We[_t][e][3]=t,We[_t][e][4]=t);lb()}function lb(){if(clearTimeout(Nh),Nh=void 0,We[_t].length!==0){var t=We[_t].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)Eo("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){Eo("TIMEOUT",e.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-o,u=Math.max(o-i,1),c=Math.min(u*1.2,100);a>=c?(Eo("RETRY",e.name,r),e.apply(null,r.concat([i]))):We[_t].push(t)}Nh===void 0&&(Nh=setTimeout(lb,0))}}});var Wj=y(va=>{"use strict";var Bse=va&&va.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(va,"__esModule",{value:!0});va.readCAFileSync=void 0;var qse=Bse(Gj());function Mse(t){try{let e=qse.default.readFileSync(t,"utf8"),r="-----END CERTIFICATE-----";return e.split(r).filter(i=>!!i.trim()).map(i=>`${i.trimLeft()}${r}`)}catch(e){if(e.code==="ENOENT")return;throw e}}va.readCAFileSync=Mse});var Kj=y(Co=>{"use strict";var Use=Co&&Co.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Vse=Co&&Co.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Use(e,t,r)};Object.defineProperty(Co,"__esModule",{value:!0});Vse(Wj(),Co)});var Xj=y((oye,Jj)=>{Jj.exports=Yj;function So(t,e){if(typeof Object.setPrototypeOf=="function")return Object.setPrototypeOf(t,e);t.__proto__=e}function Yj(){this.list=[];var t=null;Object.defineProperty(this,"root",{get:function(){return t},set:function(e){t=e,this.list.length&&So(this.list[this.list.length-1],e)},enumerable:!0,configurable:!0})}Yj.prototype={get length(){return this.list.length},get keys(){var t=[];for(var e in this.list[0])t.push(e);return t},get snapshot(){var t={};return this.keys.forEach(function(e){t[e]=this.get(e)},this),t},get store(){return this.list[0]},push:function(t){return typeof t!="object"&&(t={valueOf:t}),this.list.length>=1&&So(this.list[this.list.length-1],t),So(t,this.root),this.list.push(t)},pop:function(){return this.list.length>=2&&So(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(t){return So(t,this.list[0]||this.root),this.list.unshift(t)},shift:function(){return this.list.length===1&&So(this.list[0],this.root),this.list.shift()},get:function(t){return this.list[0][t]},set:function(t,e,r){return this.length||this.push({}),r&&this.list[0].hasOwnProperty(t)&&this.push({}),this.list[0][t]=e},forEach:function(t,e){for(var r in this.list[0])t.call(e,r,this.list[0][r])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var t=this.list.splice.apply(this.list,arguments),e=0,r=this.list.length;e<r;e++)So(this.list[e],this.list[e+1]||this.root);return t}}});var t8=y(xo=>{xo.parse=xo.decode=Hse;xo.stringify=xo.encode=Zj;xo.safe=ba;xo.unsafe=Bh;var db=typeof process<"u"&&process.platform==="win32"?`\r
|
|
198
198
|
`:`
|
|
199
199
|
`;function Zj(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(o,s,a){var u=t[o];u&&Array.isArray(u)?u.forEach(function(c){n+=ba(o+"[]")+i+ba(c)+`
|
|
200
|
-
`}):u&&typeof u=="object"?r.push(o):n+=ba(o)+i+ba(u)+db}),e.section&&n.length&&(n="["+ba(e.section)+"]"+db+n),r.forEach(function(o,s,a){var u=Qj(o).join("\\."),c=(e.section?e.section+".":"")+u,l=Zj(t[o],{section:c,whitespace:e.whitespace});n.length&&l.length&&(n+=db),n+=l}),n}function Qj(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Hse(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=t.split(/[\r\n]+/g);return o.forEach(function(s,a,u){if(!(!s||s.match(/^\s*[;#]/))){var c=s.match(i);if(c){if(c[1]!==void 0){if(n=Bh(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var l=Bh(c[2]);if(l!=="__proto__"){var f=c[3]?Bh(c[4]):!0;switch(f){case"true":case"false":case"null":f=JSON.parse(f)}if(l.length>2&&l.slice(-2)==="[]"){if(l=l.substring(0,l.length-2),l==="__proto__")return;r[l]?Array.isArray(r[l])||(r[l]=[r[l]]):r[l]=[]}Array.isArray(r[l])?r[l].push(f):r[l]=f}}}}),Object.keys(e).filter(function(s,a,u){if(!e[s]||typeof e[s]!="object"||Array.isArray(e[s]))return!1;var c=Qj(s),l=e,f=c.pop(),h=f.replace(/\\\./g,".");return c.forEach(function(d,p,b){d!=="__proto__"&&((!l[d]||typeof l[d]!="object")&&(l[d]={}),l=l[d])}),l===e&&h===f?!1:(l[h]=e[s],!0)}).forEach(function(s,a,u){delete e[s]}),e}function e8(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function ba(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&e8(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Bh(t,e){if(t=(t||"").trim(),e8(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,o=t.length;i<o;i++){var s=t.charAt(i);if(r)"\\;#".indexOf(s)!==-1?n+=s:n+="\\"+s,r=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?r=!0:n+=s}}return r&&(n+="\\"),n.trim()}return t}});var o8=y((Nn,i8)=>{var r8=Xj(),jc=require("path"),qh=require("fs"),hb=t8(),pb=require("events").EventEmitter,zse=require("url"),Gse=require("http"),Nn=i8.exports=function(){for(var t=[].slice.call(arguments),e=new Ft;t.length;){var r=t.shift();r&&e.push(typeof r=="string"?Kse(r):r)}return e},aye=Nn.find=function(){var t=jc.join.apply(null,[].slice.call(arguments));function e(r,n){var i=jc.join(r,n);try{return qh.statSync(i),i}catch{if(jc.dirname(r)!==r)return e(jc.dirname(r),n)}}return e(__dirname,t)},Wse=Nn.parse=function(t,e,r){if(t=""+t,r)if(r==="json")if(this.emit)try{return JSON.parse(t)}catch(n){this.emit("error",n)}else return JSON.parse(t);else return hb.parse(t);else try{return JSON.parse(t)}catch{return hb.parse(t)}},Kse=Nn.json=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null}),e=jc.join.apply(null,t),r;try{r=qh.readFileSync(e,"utf-8")}catch{return}return Wse(r,e,"json")},uye=Nn.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)i.indexOf(t)===0&&(r[i.substring(n)]=e[i]);return r};Nn.ConfigChain=Ft;function Ft(){pb.apply(this),r8.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var n8={constructor:{value:Ft}};Object.keys(pb.prototype).forEach(function(t){n8[t]=Object.getOwnPropertyDescriptor(pb.prototype,t)});Ft.prototype=Object.create(r8.prototype,n8);Ft.prototype.del=function(t,e){if(e){var r=this.sources[e];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+e));delete r[t]}else for(var n=0,i=this.list.length;n<i;n++)delete this.list[n][t];return this};Ft.prototype.set=function(t,e,r){var n;if(r){if(n=this.sources[r],n=n&&n.data,!n)return this.emit("error",new Error("not found "+r))}else if(n=this.list[0],!n)return this.emit("error",new Error("cannot set, no confs!"));return n[t]=e,this};Ft.prototype.get=function(t,e){return e?(e=this.sources[e],e&&(e=e.data),e&&Object.hasOwnProperty.call(e,t)?e[t]:void 0):this.list[0][t]};Ft.prototype.save=function(t,o,r){typeof o=="function"&&(r=o,o=null);var n=this.sources[t];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+t));if(n.source){var i=n.prefix||"";return Object.keys(n.data).forEach(function(a){n.source[i+a]=n.data[a]}),this}var o=o||n.type,s=n.data;return n.type==="json"?s=JSON.stringify(s):s=hb.stringify(s),this._saving++,qh.writeFile(n.path,s,"utf8",function(a){if(this._saving--,a)return r?r(a):this.emit("error",a);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};Ft.prototype.addFile=function(t,e,r){r=r||t;var n={__source__:r};return this.sources[r]={path:t,type:e},this.push(n),this._await(),qh.readFile(t,"utf8",function(i,o){i&&this.emit("error",i),this.addString(o,t,e,n)}.bind(this)),this};Ft.prototype.addEnv=function(t,e,r){r=r||"env";var n=Nn.env(t,e);return this.sources[r]={data:n,source:e,prefix:t},this.add(n,r)};Ft.prototype.addUrl=function(t,e,r){this._await();var n=zse.format(t);r=r||n;var i={__source__:r};return this.sources[r]={href:n,type:e},this.push(i),Gse.request(t,function(o){var s=[],a=o.headers["content-type"];e||(e=a.indexOf("json")!==-1?"json":a.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,i.type=e),o.on("data",s.push.bind(s)).on("end",function(){this.addString(Buffer.concat(s),n,e,i)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};Ft.prototype.addString=function(t,e,r,n){return t=this.parse(t,e,r),this.add(t,n),this};Ft.prototype.add=function(t,e){if(e&&typeof e=="object"){var r=this.list.indexOf(e);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,t),e=e.__source__,this.sources[e]=this.sources[e]||{},this.sources[e].data=t,this._resolve()}else typeof e=="string"&&(this.sources[e]=this.sources[e]||{},this.sources[e].data=t),this._await(),this.push(t),process.nextTick(this._resolve.bind(this));return this};Ft.prototype.parse=Nn.parse;Ft.prototype._await=function(){this._awaiting++};Ft.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var a8=y((cye,s8)=>{s8.exports=function(t){let e=t.indexOf(":");if(e===-1)return mb(t);let r=t.substr(0,e),n=t.substr(e+1);return`${mb(r)}:${mb(n)}`};function mb(t){if(t=t.toLowerCase(),t==="_authtoken")return"_authToken";let e=t[0];for(let r=1;r<t.length;r++)e+=t[r]==="_"?"-":t[r];return e}});var u8=y(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});Mh.envReplace=void 0;var Yse=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function Jse(t,e){return t.replace(Yse,Xse.bind(null,e))}Mh.envReplace=Jse;function Xse(t,e,r,n){if(r.length%2)return e.slice((r.length+1)/2);let i=Qse(t,n);if(i===void 0)throw new Error(`Failed to replace env in config: ${e}`);return`${r.slice(r.length/2)}${i}`}var Zse=/([^:-]+)(:?)-(.+)/;function Qse(t,e){let r=e.match(Zse);if(!r)return t[e];let[,n,i,o]=r;return Object.prototype.hasOwnProperty.call(t,n)?!t[n]&&i?o:t[n]:o}});var c8=y(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.envReplace=void 0;var eae=u8();Object.defineProperty(Uh,"envReplace",{enumerable:!0,get:function(){return eae.envReplace}})});var f8=y(Vh=>{"use strict";var tae=require("fs"),Fo=require("path"),{envReplace:l8}=c8(),rae=(t,e,r)=>{if(typeof e!="string")return e;let n=[].concat(t[r]),i=n.indexOf(Fo)!==-1,o=n.indexOf(Boolean)!==-1,s=n.indexOf(String)!==-1,a=n.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${e}`)}if(o&&!s&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return e=l8(e,process.env),i&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=Fo.resolve(process.env.HOME,e.substr(2))),e=Fo.resolve(e)),a&&!isNaN(e)&&(e=Number(e)),e},nae=t=>{t=Fo.resolve(t);let e=!1;for(;Fo.basename(t)==="node_modules";)t=Fo.dirname(t),e=!0;if(e)return t;let r=(n,i)=>{let o=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&o.test(n))return i;try{let s=tae.readdirSync(n);if(s.includes("node_modules")||s.includes("package.json")||s.includes("package.json5")||s.includes("package.yaml")||s.includes("pnpm-workspace.yaml"))return n;let a=Fo.dirname(n);return a===n?i:r(a,i)}catch(s){if(n===i){if(s.code==="ENOENT")return i;throw s}return i}};return r(t,t)};Vh.envReplace=l8;Vh.findPrefix=nae;Vh.parseField=rae});var p8=y(h8=>{"use strict";var Oo=require("path"),iae=require("stream").Stream,Hh=require("url"),oae=()=>{},sae=()=>[],d8=()=>{};h8.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:Oo,cache:Oo,"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:Oo,"global-style":Boolean,group:[Number,String],"https-proxy":[null,Hh],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":Oo,"init-author-name":String,"init-author-email":String,"init-author-url":["",Hh],"init-license":String,"init-version":d8,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":sae(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:iae,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,d8],"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:Oo,production:Boolean,progress:Boolean,proxy:[null,!1,Hh],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,Hh],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:Oo,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:Oo,umask:oae,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var D8=y((pye,y8)=>{"use strict";var{readCAFileSync:aae}=Kj(),m8=require("fs"),gb=require("path"),{ConfigChain:uae}=o8(),cae=a8(),g8=f8(),yb=class extends uae{constructor(e,r){super(e),this.root=e,this._parseField=g8.parseField.bind(null,r||p8())}add(e,r){try{for(let n of Object.keys(e))e[n]=this._parseField(e[n],n)}catch(n){throw n}return super.add(e,r)}addFile(e,r){r=r||e;let n={__source__:r};this.sources[r]={path:e,type:"ini"},this.push(n),this._await();try{let i=m8.readFileSync(e,"utf8");this.addString(i,e,"ini",n)}catch(i){if(i.code==="ENOENT")this.add({},n);else return`Issue while reading "${e}". ${i.message}`}}addEnv(e){e=e||process.env;let r={};return Object.keys(e).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{e[n]&&(r[cae(n.substr(11))]=e[n])}),super.addEnv("",r,"env")}loadPrefix(){let e=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:n=>{let i=this.get("global");this[i?"globalPrefix":"localPrefix"]=n},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:n=>{this.set("prefix",n)},get:()=>gb.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(e,"prefix"))r=gb.resolve(e.prefix);else try{r=g8.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(e){if(!e)return;let r=aae(e);r&&this.set("ca",r)}loadUser(){let e=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let r=gb.resolve(this.get("prefix"));try{let n=m8.statSync(r);e.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}};y8.exports=yb});var C8=y(E8=>{"use strict";var w8=require("os"),Ln=require("path"),_8=w8.tmpdir(),lae=process.getuid?process.getuid():process.pid,fae=()=>!0,v8=process.platform==="win32",b8={editor:()=>process.env.EDITOR||process.env.VISUAL||(v8?"notepad.exe":"vi"),shell:()=>v8?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},dae={fromString:()=>process.umask()},wa=w8.homedir();wa?process.env.HOME=wa:wa=Ln.resolve(_8,"npm-"+lae);var hae=process.platform==="win32"?"npm-cache":".npm",pae=process.platform==="win32"&&process.env.APPDATA||wa,mae=Ln.resolve(pae,hae),zh,Ao;Object.defineProperty(E8,"defaults",{get:function(){return zh||(process.env.PREFIX?Ao=process.env.PREFIX:process.platform==="win32"?Ao=Ln.dirname(process.execPath):(Ao=Ln.dirname(Ln.dirname(process.execPath)),process.env.DESTDIR&&(Ao=Ln.join(process.env.DESTDIR,Ao))),zh={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:mae,"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:b8.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:Ln.resolve(Ao,"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":Ln.resolve(wa,".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:Ao,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:b8.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:_8,unicode:fae(),"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:Ln.resolve(wa,".npmrc"),umask:process.umask?process.umask():dae.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},zh)}})});var x8=y((gye,Db)=>{"use strict";var ko=require("path"),gae=D8(),S8=C8();Db.exports=(t,e,r)=>{let n=new gae(Object.assign({},S8.defaults,r),e);n.add(Object.assign({},t),"cli");let i=[],o=!1;if(require.resolve.paths){let c=require.resolve.paths("npm"),l;try{l=require.resolve("npm",{paths:c.slice(-1)})}catch{o=!0}l&&i.push(n.addFile(ko.resolve(ko.dirname(l),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=ko.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let c=ko.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(c,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let c=ko.resolve(n.get("prefix"),"etc");n.root.globalconfig=ko.resolve(c,"npmrc"),n.root.globalignorefile=ko.resolve(c,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let u=n.get("cafile");return u&&n.loadCAFile(u),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(Db.exports,"defaults",{get(){return S8.defaults},enumerable:!0})});var $8=y((yye,R8)=>{var vb=require("url"),F8=x8(),O8=":_authToken",A8=":_auth",k8=":username",T8=":_password";R8.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:F8()).config,e=e||r.npmrc.get("registry")||F8.defaults.registry,P8(e,r)||yae(r.npmrc)};function P8(t,e){let r=vb.parse(t,!1,!0),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=vae(i,e.npmrc);if(o)return o;if(!e.recursive)return/\/$/.test(t)?void 0:P8(vb.resolve(t,"."),e);r.pathname=vb.resolve(Dae(n),"..")||"/"}}function yae(t){return t.get("_auth")?{token:Gh(t.get("_auth")),type:"Basic"}:void 0}function Dae(t){return t[t.length-1]==="/"?t:t+"/"}function vae(t,e){let r=bae(e.get(t+O8)||e.get(t+"/"+O8));if(r)return r;let n=e.get(t+k8)||e.get(t+"/"+k8),i=e.get(t+T8)||e.get(t+"/"+T8),o=wae(n,i);if(o)return o;let s=_ae(e.get(t+A8)||e.get(t+"/"+A8));if(s)return s}function Gh(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function bae(t){return t?{token:Gh(t),type:"Bearer"}:void 0}function wae(t,e){if(!t||!e)return;let r=Buffer.from(Gh(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function _ae(t){return t?{token:Gh(t),type:"Basic"}:void 0}});var $L=y((_we,Vn)=>{var st=require("fs"),Yb=require("os"),fr=require("path"),vL=require("crypto"),ln={fs:st.constants,os:Yb.constants},bL="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",_L=/XXXXXX/,aue=3,EL=(ln.O_CREAT||ln.fs.O_CREAT)|(ln.O_EXCL||ln.fs.O_EXCL)|(ln.O_RDWR||ln.fs.O_RDWR),uue=Yb.platform()==="win32",cue=ln.EBADF||ln.os.errno.EBADF,lue=ln.ENOENT||ln.os.errno.ENOENT,CL=448,SL=384,fue="exit",ka=[],xL=st.rmdirSync.bind(st),FL=!1;function due(t,e){return st.rm(t,{recursive:!0},e)}function OL(t){return st.rmSync(t,{recursive:!0})}function Jb(t,e){let r=Ta(t,e),n=r[0],i=r[1];try{TL(n)}catch(s){return i(s)}let o=n.tries;(function s(){try{let a=kL(n);st.stat(a,function(u){if(!u)return o-- >0?s():i(new Error("Could not get a unique tmp filename, max tries reached "+a));i(null,a)})}catch(a){i(a)}})()}function Xb(t){let e=Ta(t),r=e[0];TL(r);let n=r.tries;do{let i=kL(r);try{st.statSync(i)}catch{return i}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function hue(t,e){let r=Ta(t,e),n=r[0],i=r[1];Jb(n,function(s,a){if(s)return i(s);st.open(a,EL,n.mode||SL,function(c,l){if(c)return i(c);if(n.discardDescriptor)return st.close(l,function(h){return i(h,a,void 0,Gb(a,-1,n,!1))});{let f=n.discardDescriptor||n.detachDescriptor;i(null,a,l,Gb(a,f?-1:l,n,!1))}})})}function pue(t){let e=Ta(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,i=Xb(r);var o=st.openSync(i,EL,r.mode||SL);return r.discardDescriptor&&(st.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:Gb(i,n?-1:o,r,!0)}}function mue(t,e){let r=Ta(t,e),n=r[0],i=r[1];Jb(n,function(s,a){if(s)return i(s);st.mkdir(a,n.mode||CL,function(c){if(c)return i(c);i(null,a,AL(a,n,!1))})})}function gue(t){let e=Ta(t),r=e[0],n=Xb(r);return st.mkdirSync(n,r.mode||CL),{name:n,removeCallback:AL(n,r,!0)}}function yue(t,e){let r=function(n){if(n&&!Kb(n))return e(n);e()};0<=t[0]?st.close(t[0],function(){st.unlink(t[1],r)}):st.unlink(t[1],r)}function Due(t){let e=null;try{0<=t[0]&&st.closeSync(t[0])}catch(r){if(!wue(r)&&!Kb(r))throw r}finally{try{st.unlinkSync(t[1])}catch(r){Kb(r)||(e=r)}}if(e!==null)throw e}function Gb(t,e,r,n){let i=mp(Due,[e,t],n),o=mp(yue,[e,t],n,i);return r.keep||ka.unshift(i),n?i:o}function AL(t,e,r){let n=e.unsafeCleanup?due:st.rmdir.bind(st),i=e.unsafeCleanup?OL:xL,o=mp(i,t,r),s=mp(n,t,r,o);return e.keep||ka.unshift(o),r?o:s}function mp(t,e,r,n){let i=!1;return function o(s){if(!i){let a=n||o,u=ka.indexOf(a);return u>=0&&ka.splice(u,1),i=!0,r||t===xL||t===OL?t(e):t(e,s||function(){})}}}function vue(){if(FL)for(;ka.length;)try{ka[0]()}catch{}}function wL(t){let e=[],r=null;try{r=vL.randomBytes(t)}catch{r=vL.pseudoRandomBytes(t)}for(var n=0;n<t;n++)e.push(bL[r[n]%bL.length]);return e.join("")}function bue(t){return t===null||rr(t)||!t.trim()}function rr(t){return typeof t>"u"}function Ta(t,e){if(typeof t=="function")return[{},t];if(rr(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}function kL(t){let e=t.tmpdir;if(!rr(t.name))return fr.join(e,t.dir,t.name);if(!rr(t.template))return fr.join(e,t.dir,t.template).replace(_L,wL(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",wL(12),t.postfix?"-"+t.postfix:""].join("");return fr.join(e,t.dir,r)}function TL(t){t.tmpdir=RL(t);let e=t.tmpdir;if(rr(t.name)||zb(t.name,"name",e),rr(t.dir)||zb(t.dir,"dir",e),!rr(t.template)&&(zb(t.template,"template",e),!t.template.match(_L)))throw new Error(`Invalid template, found "${t.template}".`);if(!rr(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=rr(t.name)?t.tries||aue:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.dir=rr(t.dir)?"":fr.relative(e,Wb(t.dir,e)),t.template=rr(t.template)?void 0:fr.relative(e,Wb(t.template,e)),t.template=bue(t.template)?void 0:fr.relative(t.dir,t.template),t.name=rr(t.name)?void 0:t.name,t.prefix=rr(t.prefix)?"":t.prefix,t.postfix=rr(t.postfix)?"":t.postfix}function Wb(t,e){return t.startsWith(e)?fr.resolve(t):fr.resolve(fr.join(e,t))}function zb(t,e,r){if(e==="name"){if(fr.isAbsolute(t))throw new Error(`${e} option must not contain an absolute path, found "${t}".`);let n=fr.basename(t);if(n===".."||n==="."||n!==t)throw new Error(`${e} option must not contain a path, found "${t}".`)}else{if(fr.isAbsolute(t)&&!t.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${t}".`);let n=Wb(t,r);if(!n.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${n}".`)}}function wue(t){return PL(t,-cue,"EBADF")}function Kb(t){return PL(t,-lue,"ENOENT")}function PL(t,e,r){return uue?t.code===r:t.code===r&&t.errno===e}function _ue(){FL=!0}function RL(t){return fr.resolve(t&&t.tmpdir||Yb.tmpdir())}process.addListener(fue,vue);Object.defineProperty(Vn.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return RL()}});Vn.exports.dir=mue;Vn.exports.dirSync=gue;Vn.exports.file=hue;Vn.exports.fileSync=pue;Vn.exports.tmpName=Jb;Vn.exports.tmpNameSync=Xb;Vn.exports.setGracefulCleanup=_ue});var Dw=le(yw(),1),{program:k,createCommand:ece,createArgument:tce,createOption:rce,CommanderError:nce,InvalidArgumentError:ice,InvalidOptionArgumentError:oce,Command:sce,Argument:ace,Option:uce,Help:cce}=Dw.default;var Ir={name:"@capgo/cli",version:"4.22.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:">=20.0.0"},scripts:{build:"tsc && 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":"^3.7.3","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^6.1.2","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.7.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver","@supabase/supabase-js":"^2.45.2","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"^0.5.5","@types/node":"^22.5.0","@types/prettyjson":"^0.0.33","@types/tmp":"^0.2.6","@typescript-eslint/eslint-plugin":"^8.3.0","@typescript-eslint/parser":"^8.3.0","@vercel/ncc":"^0.38.1","adm-zip":"^0.5.16","ci-info":"^4.0.0",commander:"12.1.0",esbuild:"^0.24.0",eslint:"9.13.0","git-format-staged":"3.1.1",husky:"^9.1.5","is-wsl":"^3.1.0",ky:"^1.7.2","latest-version":"^9.0.0",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",tmp:"^0.2.3","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"4.2.0","tus-js-client":"^4.2.3",typescript:"5.6.3"}};var _a=require("node:fs"),N8=require("node:process");var At=le(ke(),1),jo=require("node:process"),Gn=le(require("node:readline"),1),qp=le(require("node:readline"),1),kw=require("node:tty"),il=le(_w(),1);function _B({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Tw(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(_B(),"")}var Mp={},EB={get exports(){return Mp},set exports(t){Mp=t}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=r(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){textLen=e.length(n),i=i||0,o=o||1,i<0&&(i=textLen+i),o<0&&(o=textLen+o);for(var s="",a=0,u=r(n),c=0;c<u.length;c++){var l=u[c],f=e.length(l);if(a>=i-(f==2?1:0))if(a+f<=o)s+=l;else break;a+=f}return s}})(EB);var CB=Mp,SB=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 Ia(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=Tw(t),t.length===0))return 0;t=t.replace(SB()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let o=i.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(CB.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Lp=10,Ew=(t=0)=>e=>`\x1B[${e+t}m`,Cw=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Sw=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Ie={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(Ie.modifier);var xB=Object.keys(Ie.color),FB=Object.keys(Ie.bgColor);[...xB,...FB];function OB(){let t=new Map;for(let[e,r]of Object.entries(Ie)){for(let[n,i]of Object.entries(r))Ie[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Ie[n],t.set(i[0],i[1]);Object.defineProperty(Ie,e,{value:r,enumerable:!1})}return Object.defineProperty(Ie,"codes",{value:t,enumerable:!1}),Ie.color.close="\x1B[39m",Ie.bgColor.close="\x1B[49m",Ie.color.ansi=Ew(),Ie.color.ansi256=Cw(),Ie.color.ansi16m=Sw(),Ie.bgColor.ansi=Ew(Lp),Ie.bgColor.ansi256=Cw(Lp),Ie.bgColor.ansi16m=Sw(Lp),Object.defineProperties(Ie,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Ie.rgbToAnsi256(...Ie.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Ie.ansi256ToAnsi(Ie.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Ie.ansi256ToAnsi(Ie.hexToAnsi256(e)),enumerable:!1}}),Ie}var AB=OB(),ul=new Set(["\x1B","\x9B"]),kB=39,Up="\x07",Pw="[",TB="]",Rw="m",Vp=`${TB}8;;`,xw=t=>`${ul.values().next().value}${Pw}${t}${Rw}`,Fw=t=>`${ul.values().next().value}${Vp}${t}${Up}`,PB=t=>t.split(" ").map(e=>Ia(e)),Bp=(t,e,r)=>{let n=[...e],i=!1,o=!1,s=Ia(Tw(t[t.length-1]));for(let[a,u]of n.entries()){let c=Ia(u);if(s+c<=r?t[t.length-1]+=u:(t.push(u),s=0),ul.has(u)&&(i=!0,o=n.slice(a+1).join("").startsWith(Vp)),i){o?u===Up&&(i=!1,o=!1):u===Rw&&(i=!1);continue}s+=c,s===r&&a<n.length-1&&(t.push(""),s=0)}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},RB=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(Ia(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},$B=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,o,s=PB(t),a=[""];for(let[c,l]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let f=Ia(a[a.length-1]);if(c!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&s[c]>e){let h=e-f,d=1+Math.floor((s[c]-h-1)/e);Math.floor((s[c]-1)/e)<d&&a.push(""),Bp(a,l,e);continue}if(f+s[c]>e&&f>0&&s[c]>0){if(r.wordWrap===!1&&f<e){Bp(a,l,e);continue}a.push("")}if(f+s[c]>e&&r.wordWrap===!1){Bp(a,l,e);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>RB(c)));let u=[...a.join(`
|
|
200
|
+
`}):u&&typeof u=="object"?r.push(o):n+=ba(o)+i+ba(u)+db}),e.section&&n.length&&(n="["+ba(e.section)+"]"+db+n),r.forEach(function(o,s,a){var u=Qj(o).join("\\."),c=(e.section?e.section+".":"")+u,l=Zj(t[o],{section:c,whitespace:e.whitespace});n.length&&l.length&&(n+=db),n+=l}),n}function Qj(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Hse(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=t.split(/[\r\n]+/g);return o.forEach(function(s,a,u){if(!(!s||s.match(/^\s*[;#]/))){var c=s.match(i);if(c){if(c[1]!==void 0){if(n=Bh(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var l=Bh(c[2]);if(l!=="__proto__"){var f=c[3]?Bh(c[4]):!0;switch(f){case"true":case"false":case"null":f=JSON.parse(f)}if(l.length>2&&l.slice(-2)==="[]"){if(l=l.substring(0,l.length-2),l==="__proto__")return;r[l]?Array.isArray(r[l])||(r[l]=[r[l]]):r[l]=[]}Array.isArray(r[l])?r[l].push(f):r[l]=f}}}}),Object.keys(e).filter(function(s,a,u){if(!e[s]||typeof e[s]!="object"||Array.isArray(e[s]))return!1;var c=Qj(s),l=e,f=c.pop(),h=f.replace(/\\\./g,".");return c.forEach(function(d,p,b){d!=="__proto__"&&((!l[d]||typeof l[d]!="object")&&(l[d]={}),l=l[d])}),l===e&&h===f?!1:(l[h]=e[s],!0)}).forEach(function(s,a,u){delete e[s]}),e}function e8(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function ba(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&e8(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Bh(t,e){if(t=(t||"").trim(),e8(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,o=t.length;i<o;i++){var s=t.charAt(i);if(r)"\\;#".indexOf(s)!==-1?n+=s:n+="\\"+s,r=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?r=!0:n+=s}}return r&&(n+="\\"),n.trim()}return t}});var o8=y((Nn,i8)=>{var r8=Xj(),jc=require("path"),qh=require("fs"),hb=t8(),pb=require("events").EventEmitter,zse=require("url"),Gse=require("http"),Nn=i8.exports=function(){for(var t=[].slice.call(arguments),e=new Ft;t.length;){var r=t.shift();r&&e.push(typeof r=="string"?Kse(r):r)}return e},aye=Nn.find=function(){var t=jc.join.apply(null,[].slice.call(arguments));function e(r,n){var i=jc.join(r,n);try{return qh.statSync(i),i}catch{if(jc.dirname(r)!==r)return e(jc.dirname(r),n)}}return e(__dirname,t)},Wse=Nn.parse=function(t,e,r){if(t=""+t,r)if(r==="json")if(this.emit)try{return JSON.parse(t)}catch(n){this.emit("error",n)}else return JSON.parse(t);else return hb.parse(t);else try{return JSON.parse(t)}catch{return hb.parse(t)}},Kse=Nn.json=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null}),e=jc.join.apply(null,t),r;try{r=qh.readFileSync(e,"utf-8")}catch{return}return Wse(r,e,"json")},uye=Nn.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)i.indexOf(t)===0&&(r[i.substring(n)]=e[i]);return r};Nn.ConfigChain=Ft;function Ft(){pb.apply(this),r8.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var n8={constructor:{value:Ft}};Object.keys(pb.prototype).forEach(function(t){n8[t]=Object.getOwnPropertyDescriptor(pb.prototype,t)});Ft.prototype=Object.create(r8.prototype,n8);Ft.prototype.del=function(t,e){if(e){var r=this.sources[e];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+e));delete r[t]}else for(var n=0,i=this.list.length;n<i;n++)delete this.list[n][t];return this};Ft.prototype.set=function(t,e,r){var n;if(r){if(n=this.sources[r],n=n&&n.data,!n)return this.emit("error",new Error("not found "+r))}else if(n=this.list[0],!n)return this.emit("error",new Error("cannot set, no confs!"));return n[t]=e,this};Ft.prototype.get=function(t,e){return e?(e=this.sources[e],e&&(e=e.data),e&&Object.hasOwnProperty.call(e,t)?e[t]:void 0):this.list[0][t]};Ft.prototype.save=function(t,o,r){typeof o=="function"&&(r=o,o=null);var n=this.sources[t];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+t));if(n.source){var i=n.prefix||"";return Object.keys(n.data).forEach(function(a){n.source[i+a]=n.data[a]}),this}var o=o||n.type,s=n.data;return n.type==="json"?s=JSON.stringify(s):s=hb.stringify(s),this._saving++,qh.writeFile(n.path,s,"utf8",function(a){if(this._saving--,a)return r?r(a):this.emit("error",a);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};Ft.prototype.addFile=function(t,e,r){r=r||t;var n={__source__:r};return this.sources[r]={path:t,type:e},this.push(n),this._await(),qh.readFile(t,"utf8",function(i,o){i&&this.emit("error",i),this.addString(o,t,e,n)}.bind(this)),this};Ft.prototype.addEnv=function(t,e,r){r=r||"env";var n=Nn.env(t,e);return this.sources[r]={data:n,source:e,prefix:t},this.add(n,r)};Ft.prototype.addUrl=function(t,e,r){this._await();var n=zse.format(t);r=r||n;var i={__source__:r};return this.sources[r]={href:n,type:e},this.push(i),Gse.request(t,function(o){var s=[],a=o.headers["content-type"];e||(e=a.indexOf("json")!==-1?"json":a.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,i.type=e),o.on("data",s.push.bind(s)).on("end",function(){this.addString(Buffer.concat(s),n,e,i)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};Ft.prototype.addString=function(t,e,r,n){return t=this.parse(t,e,r),this.add(t,n),this};Ft.prototype.add=function(t,e){if(e&&typeof e=="object"){var r=this.list.indexOf(e);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,t),e=e.__source__,this.sources[e]=this.sources[e]||{},this.sources[e].data=t,this._resolve()}else typeof e=="string"&&(this.sources[e]=this.sources[e]||{},this.sources[e].data=t),this._await(),this.push(t),process.nextTick(this._resolve.bind(this));return this};Ft.prototype.parse=Nn.parse;Ft.prototype._await=function(){this._awaiting++};Ft.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var a8=y((cye,s8)=>{s8.exports=function(t){let e=t.indexOf(":");if(e===-1)return mb(t);let r=t.substr(0,e),n=t.substr(e+1);return`${mb(r)}:${mb(n)}`};function mb(t){if(t=t.toLowerCase(),t==="_authtoken")return"_authToken";let e=t[0];for(let r=1;r<t.length;r++)e+=t[r]==="_"?"-":t[r];return e}});var u8=y(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});Mh.envReplace=void 0;var Yse=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function Jse(t,e){return t.replace(Yse,Xse.bind(null,e))}Mh.envReplace=Jse;function Xse(t,e,r,n){if(r.length%2)return e.slice((r.length+1)/2);let i=Qse(t,n);if(i===void 0)throw new Error(`Failed to replace env in config: ${e}`);return`${r.slice(r.length/2)}${i}`}var Zse=/([^:-]+)(:?)-(.+)/;function Qse(t,e){let r=e.match(Zse);if(!r)return t[e];let[,n,i,o]=r;return Object.prototype.hasOwnProperty.call(t,n)?!t[n]&&i?o:t[n]:o}});var c8=y(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.envReplace=void 0;var eae=u8();Object.defineProperty(Uh,"envReplace",{enumerable:!0,get:function(){return eae.envReplace}})});var f8=y(Vh=>{"use strict";var tae=require("fs"),Fo=require("path"),{envReplace:l8}=c8(),rae=(t,e,r)=>{if(typeof e!="string")return e;let n=[].concat(t[r]),i=n.indexOf(Fo)!==-1,o=n.indexOf(Boolean)!==-1,s=n.indexOf(String)!==-1,a=n.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${e}`)}if(o&&!s&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return e=l8(e,process.env),i&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=Fo.resolve(process.env.HOME,e.substr(2))),e=Fo.resolve(e)),a&&!isNaN(e)&&(e=Number(e)),e},nae=t=>{t=Fo.resolve(t);let e=!1;for(;Fo.basename(t)==="node_modules";)t=Fo.dirname(t),e=!0;if(e)return t;let r=(n,i)=>{let o=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&o.test(n))return i;try{let s=tae.readdirSync(n);if(s.includes("node_modules")||s.includes("package.json")||s.includes("package.json5")||s.includes("package.yaml")||s.includes("pnpm-workspace.yaml"))return n;let a=Fo.dirname(n);return a===n?i:r(a,i)}catch(s){if(n===i){if(s.code==="ENOENT")return i;throw s}return i}};return r(t,t)};Vh.envReplace=l8;Vh.findPrefix=nae;Vh.parseField=rae});var p8=y(h8=>{"use strict";var Oo=require("path"),iae=require("stream").Stream,Hh=require("url"),oae=()=>{},sae=()=>[],d8=()=>{};h8.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:Oo,cache:Oo,"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:Oo,"global-style":Boolean,group:[Number,String],"https-proxy":[null,Hh],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":Oo,"init-author-name":String,"init-author-email":String,"init-author-url":["",Hh],"init-license":String,"init-version":d8,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":sae(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:iae,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,d8],"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:Oo,production:Boolean,progress:Boolean,proxy:[null,!1,Hh],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,Hh],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:Oo,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:Oo,umask:oae,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var D8=y((pye,y8)=>{"use strict";var{readCAFileSync:aae}=Kj(),m8=require("fs"),gb=require("path"),{ConfigChain:uae}=o8(),cae=a8(),g8=f8(),yb=class extends uae{constructor(e,r){super(e),this.root=e,this._parseField=g8.parseField.bind(null,r||p8())}add(e,r){try{for(let n of Object.keys(e))e[n]=this._parseField(e[n],n)}catch(n){throw n}return super.add(e,r)}addFile(e,r){r=r||e;let n={__source__:r};this.sources[r]={path:e,type:"ini"},this.push(n),this._await();try{let i=m8.readFileSync(e,"utf8");this.addString(i,e,"ini",n)}catch(i){if(i.code==="ENOENT")this.add({},n);else return`Issue while reading "${e}". ${i.message}`}}addEnv(e){e=e||process.env;let r={};return Object.keys(e).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{e[n]&&(r[cae(n.substr(11))]=e[n])}),super.addEnv("",r,"env")}loadPrefix(){let e=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:n=>{let i=this.get("global");this[i?"globalPrefix":"localPrefix"]=n},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:n=>{this.set("prefix",n)},get:()=>gb.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(e,"prefix"))r=gb.resolve(e.prefix);else try{r=g8.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(e){if(!e)return;let r=aae(e);r&&this.set("ca",r)}loadUser(){let e=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let r=gb.resolve(this.get("prefix"));try{let n=m8.statSync(r);e.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}};y8.exports=yb});var C8=y(E8=>{"use strict";var w8=require("os"),Ln=require("path"),_8=w8.tmpdir(),lae=process.getuid?process.getuid():process.pid,fae=()=>!0,v8=process.platform==="win32",b8={editor:()=>process.env.EDITOR||process.env.VISUAL||(v8?"notepad.exe":"vi"),shell:()=>v8?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},dae={fromString:()=>process.umask()},wa=w8.homedir();wa?process.env.HOME=wa:wa=Ln.resolve(_8,"npm-"+lae);var hae=process.platform==="win32"?"npm-cache":".npm",pae=process.platform==="win32"&&process.env.APPDATA||wa,mae=Ln.resolve(pae,hae),zh,Ao;Object.defineProperty(E8,"defaults",{get:function(){return zh||(process.env.PREFIX?Ao=process.env.PREFIX:process.platform==="win32"?Ao=Ln.dirname(process.execPath):(Ao=Ln.dirname(Ln.dirname(process.execPath)),process.env.DESTDIR&&(Ao=Ln.join(process.env.DESTDIR,Ao))),zh={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:mae,"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:b8.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:Ln.resolve(Ao,"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":Ln.resolve(wa,".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:Ao,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:b8.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:_8,unicode:fae(),"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:Ln.resolve(wa,".npmrc"),umask:process.umask?process.umask():dae.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},zh)}})});var x8=y((gye,Db)=>{"use strict";var ko=require("path"),gae=D8(),S8=C8();Db.exports=(t,e,r)=>{let n=new gae(Object.assign({},S8.defaults,r),e);n.add(Object.assign({},t),"cli");let i=[],o=!1;if(require.resolve.paths){let c=require.resolve.paths("npm"),l;try{l=require.resolve("npm",{paths:c.slice(-1)})}catch{o=!0}l&&i.push(n.addFile(ko.resolve(ko.dirname(l),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=ko.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let c=ko.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(c,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let c=ko.resolve(n.get("prefix"),"etc");n.root.globalconfig=ko.resolve(c,"npmrc"),n.root.globalignorefile=ko.resolve(c,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let u=n.get("cafile");return u&&n.loadCAFile(u),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(Db.exports,"defaults",{get(){return S8.defaults},enumerable:!0})});var $8=y((yye,R8)=>{var vb=require("url"),F8=x8(),O8=":_authToken",A8=":_auth",k8=":username",T8=":_password";R8.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:F8()).config,e=e||r.npmrc.get("registry")||F8.defaults.registry,P8(e,r)||yae(r.npmrc)};function P8(t,e){let r=vb.parse(t,!1,!0),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=vae(i,e.npmrc);if(o)return o;if(!e.recursive)return/\/$/.test(t)?void 0:P8(vb.resolve(t,"."),e);r.pathname=vb.resolve(Dae(n),"..")||"/"}}function yae(t){return t.get("_auth")?{token:Gh(t.get("_auth")),type:"Basic"}:void 0}function Dae(t){return t[t.length-1]==="/"?t:t+"/"}function vae(t,e){let r=bae(e.get(t+O8)||e.get(t+"/"+O8));if(r)return r;let n=e.get(t+k8)||e.get(t+"/"+k8),i=e.get(t+T8)||e.get(t+"/"+T8),o=wae(n,i);if(o)return o;let s=_ae(e.get(t+A8)||e.get(t+"/"+A8));if(s)return s}function Gh(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function bae(t){return t?{token:Gh(t),type:"Bearer"}:void 0}function wae(t,e){if(!t||!e)return;let r=Buffer.from(Gh(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function _ae(t){return t?{token:Gh(t),type:"Basic"}:void 0}});var $L=y((_we,Vn)=>{var st=require("fs"),Yb=require("os"),fr=require("path"),vL=require("crypto"),ln={fs:st.constants,os:Yb.constants},bL="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",_L=/XXXXXX/,aue=3,EL=(ln.O_CREAT||ln.fs.O_CREAT)|(ln.O_EXCL||ln.fs.O_EXCL)|(ln.O_RDWR||ln.fs.O_RDWR),uue=Yb.platform()==="win32",cue=ln.EBADF||ln.os.errno.EBADF,lue=ln.ENOENT||ln.os.errno.ENOENT,CL=448,SL=384,fue="exit",ka=[],xL=st.rmdirSync.bind(st),FL=!1;function due(t,e){return st.rm(t,{recursive:!0},e)}function OL(t){return st.rmSync(t,{recursive:!0})}function Jb(t,e){let r=Ta(t,e),n=r[0],i=r[1];try{TL(n)}catch(s){return i(s)}let o=n.tries;(function s(){try{let a=kL(n);st.stat(a,function(u){if(!u)return o-- >0?s():i(new Error("Could not get a unique tmp filename, max tries reached "+a));i(null,a)})}catch(a){i(a)}})()}function Xb(t){let e=Ta(t),r=e[0];TL(r);let n=r.tries;do{let i=kL(r);try{st.statSync(i)}catch{return i}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function hue(t,e){let r=Ta(t,e),n=r[0],i=r[1];Jb(n,function(s,a){if(s)return i(s);st.open(a,EL,n.mode||SL,function(c,l){if(c)return i(c);if(n.discardDescriptor)return st.close(l,function(h){return i(h,a,void 0,Gb(a,-1,n,!1))});{let f=n.discardDescriptor||n.detachDescriptor;i(null,a,l,Gb(a,f?-1:l,n,!1))}})})}function pue(t){let e=Ta(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,i=Xb(r);var o=st.openSync(i,EL,r.mode||SL);return r.discardDescriptor&&(st.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:Gb(i,n?-1:o,r,!0)}}function mue(t,e){let r=Ta(t,e),n=r[0],i=r[1];Jb(n,function(s,a){if(s)return i(s);st.mkdir(a,n.mode||CL,function(c){if(c)return i(c);i(null,a,AL(a,n,!1))})})}function gue(t){let e=Ta(t),r=e[0],n=Xb(r);return st.mkdirSync(n,r.mode||CL),{name:n,removeCallback:AL(n,r,!0)}}function yue(t,e){let r=function(n){if(n&&!Kb(n))return e(n);e()};0<=t[0]?st.close(t[0],function(){st.unlink(t[1],r)}):st.unlink(t[1],r)}function Due(t){let e=null;try{0<=t[0]&&st.closeSync(t[0])}catch(r){if(!wue(r)&&!Kb(r))throw r}finally{try{st.unlinkSync(t[1])}catch(r){Kb(r)||(e=r)}}if(e!==null)throw e}function Gb(t,e,r,n){let i=mp(Due,[e,t],n),o=mp(yue,[e,t],n,i);return r.keep||ka.unshift(i),n?i:o}function AL(t,e,r){let n=e.unsafeCleanup?due:st.rmdir.bind(st),i=e.unsafeCleanup?OL:xL,o=mp(i,t,r),s=mp(n,t,r,o);return e.keep||ka.unshift(o),r?o:s}function mp(t,e,r,n){let i=!1;return function o(s){if(!i){let a=n||o,u=ka.indexOf(a);return u>=0&&ka.splice(u,1),i=!0,r||t===xL||t===OL?t(e):t(e,s||function(){})}}}function vue(){if(FL)for(;ka.length;)try{ka[0]()}catch{}}function wL(t){let e=[],r=null;try{r=vL.randomBytes(t)}catch{r=vL.pseudoRandomBytes(t)}for(var n=0;n<t;n++)e.push(bL[r[n]%bL.length]);return e.join("")}function bue(t){return t===null||rr(t)||!t.trim()}function rr(t){return typeof t>"u"}function Ta(t,e){if(typeof t=="function")return[{},t];if(rr(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}function kL(t){let e=t.tmpdir;if(!rr(t.name))return fr.join(e,t.dir,t.name);if(!rr(t.template))return fr.join(e,t.dir,t.template).replace(_L,wL(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",wL(12),t.postfix?"-"+t.postfix:""].join("");return fr.join(e,t.dir,r)}function TL(t){t.tmpdir=RL(t);let e=t.tmpdir;if(rr(t.name)||zb(t.name,"name",e),rr(t.dir)||zb(t.dir,"dir",e),!rr(t.template)&&(zb(t.template,"template",e),!t.template.match(_L)))throw new Error(`Invalid template, found "${t.template}".`);if(!rr(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=rr(t.name)?t.tries||aue:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.dir=rr(t.dir)?"":fr.relative(e,Wb(t.dir,e)),t.template=rr(t.template)?void 0:fr.relative(e,Wb(t.template,e)),t.template=bue(t.template)?void 0:fr.relative(t.dir,t.template),t.name=rr(t.name)?void 0:t.name,t.prefix=rr(t.prefix)?"":t.prefix,t.postfix=rr(t.postfix)?"":t.postfix}function Wb(t,e){return t.startsWith(e)?fr.resolve(t):fr.resolve(fr.join(e,t))}function zb(t,e,r){if(e==="name"){if(fr.isAbsolute(t))throw new Error(`${e} option must not contain an absolute path, found "${t}".`);let n=fr.basename(t);if(n===".."||n==="."||n!==t)throw new Error(`${e} option must not contain a path, found "${t}".`)}else{if(fr.isAbsolute(t)&&!t.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${t}".`);let n=Wb(t,r);if(!n.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${n}".`)}}function wue(t){return PL(t,-cue,"EBADF")}function Kb(t){return PL(t,-lue,"ENOENT")}function PL(t,e,r){return uue?t.code===r:t.code===r&&t.errno===e}function _ue(){FL=!0}function RL(t){return fr.resolve(t&&t.tmpdir||Yb.tmpdir())}process.addListener(fue,vue);Object.defineProperty(Vn.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return RL()}});Vn.exports.dir=mue;Vn.exports.dirSync=gue;Vn.exports.file=hue;Vn.exports.fileSync=pue;Vn.exports.tmpName=Jb;Vn.exports.tmpNameSync=Xb;Vn.exports.setGracefulCleanup=_ue});var Dw=le(yw(),1),{program:k,createCommand:ece,createArgument:tce,createOption:rce,CommanderError:nce,InvalidArgumentError:ice,InvalidOptionArgumentError:oce,Command:sce,Argument:ace,Option:uce,Help:cce}=Dw.default;var Ir={name:"@capgo/cli",version:"4.22.6",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:">=20.0.0"},scripts:{build:"tsc && 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":"^3.7.3","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^6.1.2","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.7.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver","@supabase/supabase-js":"^2.45.2","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"^0.5.5","@types/node":"^22.5.0","@types/prettyjson":"^0.0.33","@types/tmp":"^0.2.6","@typescript-eslint/eslint-plugin":"^8.3.0","@typescript-eslint/parser":"^8.3.0","@vercel/ncc":"^0.38.1","adm-zip":"^0.5.16","ci-info":"^4.0.0",commander:"12.1.0",esbuild:"^0.24.0",eslint:"9.13.0","git-format-staged":"3.1.1",husky:"^9.1.5","is-wsl":"^3.1.0",ky:"^1.7.2","latest-version":"^9.0.0",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",tmp:"^0.2.3","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"4.2.0","tus-js-client":"^4.2.3",typescript:"5.6.3"}};var _a=require("node:fs"),N8=require("node:process");var At=le(ke(),1),jo=require("node:process"),Gn=le(require("node:readline"),1),qp=le(require("node:readline"),1),kw=require("node:tty"),il=le(_w(),1);function _B({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Tw(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(_B(),"")}var Mp={},EB={get exports(){return Mp},set exports(t){Mp=t}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=r(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){textLen=e.length(n),i=i||0,o=o||1,i<0&&(i=textLen+i),o<0&&(o=textLen+o);for(var s="",a=0,u=r(n),c=0;c<u.length;c++){var l=u[c],f=e.length(l);if(a>=i-(f==2?1:0))if(a+f<=o)s+=l;else break;a+=f}return s}})(EB);var CB=Mp,SB=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 Ia(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=Tw(t),t.length===0))return 0;t=t.replace(SB()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let o=i.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(CB.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Lp=10,Ew=(t=0)=>e=>`\x1B[${e+t}m`,Cw=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Sw=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Ie={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(Ie.modifier);var xB=Object.keys(Ie.color),FB=Object.keys(Ie.bgColor);[...xB,...FB];function OB(){let t=new Map;for(let[e,r]of Object.entries(Ie)){for(let[n,i]of Object.entries(r))Ie[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Ie[n],t.set(i[0],i[1]);Object.defineProperty(Ie,e,{value:r,enumerable:!1})}return Object.defineProperty(Ie,"codes",{value:t,enumerable:!1}),Ie.color.close="\x1B[39m",Ie.bgColor.close="\x1B[49m",Ie.color.ansi=Ew(),Ie.color.ansi256=Cw(),Ie.color.ansi16m=Sw(),Ie.bgColor.ansi=Ew(Lp),Ie.bgColor.ansi256=Cw(Lp),Ie.bgColor.ansi16m=Sw(Lp),Object.defineProperties(Ie,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Ie.rgbToAnsi256(...Ie.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Ie.ansi256ToAnsi(Ie.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Ie.ansi256ToAnsi(Ie.hexToAnsi256(e)),enumerable:!1}}),Ie}var AB=OB(),ul=new Set(["\x1B","\x9B"]),kB=39,Up="\x07",Pw="[",TB="]",Rw="m",Vp=`${TB}8;;`,xw=t=>`${ul.values().next().value}${Pw}${t}${Rw}`,Fw=t=>`${ul.values().next().value}${Vp}${t}${Up}`,PB=t=>t.split(" ").map(e=>Ia(e)),Bp=(t,e,r)=>{let n=[...e],i=!1,o=!1,s=Ia(Tw(t[t.length-1]));for(let[a,u]of n.entries()){let c=Ia(u);if(s+c<=r?t[t.length-1]+=u:(t.push(u),s=0),ul.has(u)&&(i=!0,o=n.slice(a+1).join("").startsWith(Vp)),i){o?u===Up&&(i=!1,o=!1):u===Rw&&(i=!1);continue}s+=c,s===r&&a<n.length-1&&(t.push(""),s=0)}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},RB=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(Ia(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},$B=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,o,s=PB(t),a=[""];for(let[c,l]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let f=Ia(a[a.length-1]);if(c!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&s[c]>e){let h=e-f,d=1+Math.floor((s[c]-h-1)/e);Math.floor((s[c]-1)/e)<d&&a.push(""),Bp(a,l,e);continue}if(f+s[c]>e&&f>0&&s[c]>0){if(r.wordWrap===!1&&f<e){Bp(a,l,e);continue}a.push("")}if(f+s[c]>e&&r.wordWrap===!1){Bp(a,l,e);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>RB(c)));let u=[...a.join(`
|
|
201
201
|
`)];for(let[c,l]of u.entries()){if(n+=l,ul.has(l)){let{groups:h}=new RegExp(`(?:\\${Pw}(?<code>\\d+)m|\\${Vp}(?<uri>.*)${Up})`).exec(u.slice(c).join(""))||{groups:{}};if(h.code!==void 0){let d=Number.parseFloat(h.code);i=d===kB?void 0:d}else h.uri!==void 0&&(o=h.uri.length===0?void 0:h.uri)}let f=AB.codes.get(Number(i));u[c+1]===`
|
|
202
202
|
`?(o&&(n+=Fw("")),i&&f&&(n+=xw(f))):l===`
|
|
203
203
|
`&&(i&&f&&(n+=xw(i)),o&&(n+=Fw(o)))}return n};function Ow(t,e,r){return String(t).normalize().replace(/\r\n/g,`
|
|
@@ -245,12 +245,12 @@ ${J6.default.render(t)}`:"";function W6(t){return new Promise(e=>{setTimeout(e,t
|
|
|
245
245
|
Upgrade here: ${o.hostWeb}/dashboard/settings/plans
|
|
246
246
|
`),W6(100),Promise.resolve().then(()=>(U6(),M6)).then(c=>{c.default(`${o.hostWeb}/dashboard/settings/plans`)}),W6(500),k.error(""));let[a,u]=await Promise.all([hse(t,e),dse(t,e)]);a>0&&i&&!u&&m.warn(`WARNING !!
|
|
247
247
|
Trial expires in ${a} days, upgrade here: ${o.hostWeb}/dashboard/settings/plans
|
|
248
|
-
`)}function he(t=!1){let e=(0,Oh.homedir)(),r,n=`${e}/.capgo`;return(0,ot.existsSync)(n)&&(t||m.info(`Use global API key ${n}`),r=(0,ot.readFileSync)(n,"utf8").trim()),n=".capgo",!r&&(0,ot.existsSync)(n)&&(t||m.info(`Use local API key ${n}`),r=(0,ot.readFileSync)(n,"utf8").trim()),r||(m.error(`Cannot find API key in local folder or global, please login first with ${Nt().runner} @capacitor/cli login`),k.error("")),r}async function*Qv(t){let e=await(0,ot.readdirSync)(t,{withFileTypes:!0});for(let r of e){let n=(0,rt.resolve)(t,r.name);r.isDirectory()&&!r.name.startsWith(".")&&!r.name.startsWith("node_modules")&&!r.name.startsWith("dist")?yield*Qv(n):yield n}}function da(t){let e=/\.(jpg|jpeg|png|gif|bmp|webp)$/i,r=t.match(e);if(r)switch(r[1].toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"webp":return"image/webp"}return null}async function eb(){let t=(0,ar.cwd)(),e=!1,r=(0,rt.resolve)(t,"tsconfig.json");(0,ot.existsSync)(r)&&(e=!0);for await(let n of Qv(t)){if(n.includes("angular.json"))return m.info("Found angular project"),e?"angular-ts":"angular-js";if(n.includes("nuxt.config.js")||n.includes("nuxt.config.ts"))return m.info("Found nuxtjs project"),e?"nuxtjs-ts":"nuxtjs-js";if(n.includes("next.config.js")||n.includes("next.config.mjs"))return m.info("Found nextjs project"),e?"nextjs-ts":"nextjs-js";if(n.includes("svelte.config.js"))return m.info("Found sveltekit project"),e?"sveltekit-ts":"sveltekit-js";if(n.includes("rolluconfig.js"))return m.info("Found svelte project"),e?"svelte-ts":"svelte-js";if(n.includes("vue.config.js"))return m.info("Found vue project"),e?"vue-ts":"vue-js";if(n.includes("package.json")){let i=(0,rt.dirname)(n),o=await jt(i);if(o.dependencies){if(o.dependencies.react)return m.info("Found react project test"),e?"react-ts":"react-js";if(o.dependencies.vue)return m.info("Found vue project"),e?"vue-ts":"vue-js"}}}return"unknown"}function rj(t,e){return t==="angular-js"||t==="angular-ts"?e?"src/main.ts":"src/main.js":t==="nextjs-js"||t==="nextjs-ts"?e?"src/app/layout.tsx":"src/app/layout.js":t==="svelte-js"||t==="svelte-ts"||t==="vue-js"||t==="vue-ts"?e?"src/main.ts":"src/main.js":t==="react-js"||t==="react-ts"?e?"src/index.tsx":"src/index.js":null}async function nj(t){return t==="angular"?(m.info("Angular project detected"),"build"):t==="nuxtjs"?(m.info("Nuxtjs project detected"),"generate"):t==="nextjs"?(m.info("Nextjs project detected"),m.warn("Please make sure you have configured static export in your next.config.js: https://nextjs.org/docs/pages/building-your-application/deploying/static-exports"),m.warn("Please make sure you have the output: 'export' and distDir: 'dist' in your next.config.js"),await Te({message:"Do you want to continue?"})||(m.error("Aborted"),k.error("")),"build"):(t==="sveltekit"&&(m.info("Sveltekit project detected"),m.warn("Please make sure you have the adapter-static installed: https://kit.svelte.dev/docs/adapter-static"),m.warn("Please make sure you have the pages: 'dist' and assets: 'dest', in your svelte.config.js adaptater"),await Te({message:"Do you want to continue?"})||(m.error("Aborted"),k.error(""))),"build")}async function ij(){let t=/(main|index)\.(ts|tsx|js|jsx)$/,e="",r=(0,ar.cwd)(),n=r.split("/").length;for await(let i of Qv(r))if(i.split("/").length-n<=2&&t.test(i)){e=i,m.info(`Found main file here ${i}`);break}return e}async function tb(t,e){return t.from("app_versions").upsert(e,{onConflict:"name,app_id"}).eq("app_id",e.app_id).eq("name",e.name)}async function oj(t,e,r){let n={app_id:e,name:r,version:0};try{let o=await t.functions.invoke("private/upload_link",{body:JSON.stringify(n)});if(o.error){if(o.error instanceof ca.FunctionsHttpError){let s=await o.error.context.json();m.error(`Upload URL error: ${s.status||JSON.stringify(s)}`)}else m.error(`Cannot get upload url: ${o.error.message}`);return""}return o.data.url}catch(i){m.error(`Cannot get upload url ${Z(i)}`)}return""}async function*sj(t){let e=(0,ot.readdirSync)(t,{withFileTypes:!0});for(let r of e){let n=(0,rt.join)(t,r.name);r.isDirectory()?yield*sj(n):yield n}}async function aj(t){let e=[];for await(let r of sj(t)){let n=(0,ot.readFileSync)(r),i=await(0,Y6.checksum)(n,"sha256"),o=(0,rt.relative)(t,r);o.startsWith("/")&&(o=o.substring(1)),e.push({file:o,hash:i})}return e}async function Th(t){return(0,Oh.platform)()==="win32"?yse(t):gse(t)}function gse(t){let e=new Jv.default;return e.addLocalFolder(t),e.toBuffer()}async function yse(t){m.info("Zipping file windows mode");let e=new Jv.default,r=(n,i)=>{let o=(0,ot.readdirSync)(n);for(let s of o){let a=(0,rt.join)(n,s),u=(0,ot.statSync)(a);if(u.isFile()){let c=(0,ot.readFileSync)(a);e.addFile((0,rt.join)(i,s).split(rt.sep).join("/"),c)}else u.isDirectory()&&r(a,(0,rt.join)(i,s))}};return r(t,""),e.toBuffer()}async function rb(t,e,r,n,i,o,s){return new Promise((a,u)=>{xe(t,{channel:"app",event:"App TUS upload",icon:"\u23EB",user_id:r,tags:{"app-id":n},notify:!1}),new Ah.Upload(e,{endpoint:`${s.hostFilesApi}/files/upload/attachments/`,metadataForPartialUploads:{filename:`orgs/${r}/apps/${n}/${i}.zip`,filetype:"application/gzip"},metadata:{filename:`orgs/${r}/apps/${n}/${i}.zip`,filetype:"application/zip"},headers:{Authorization:t},onError(l){if(l instanceof Ah.DetailedError){let f=l.originalResponse?.getBody(),h=JSON.parse(f||'{"error": "unknown error"}');u(h.status||h.error||h.message||"unknown error")}else u(l.message||l.toString()||"unknown error")},onProgress(l,f){let h=(l/f*100).toFixed(2);o.message(`Uploaded ${h}%`)},async onSuccess(){await xe(t,{channel:"app",event:"App TUS done",icon:"\u23EB",user_id:r,tags:{"app-id":n},notify:!1}).catch(),a(!0)}}).start()})}async function uj(t,e,r){let n={app_id:e,name:r};try{let o=await t.functions.invoke("private/delete_failed_version",{body:JSON.stringify(n),method:"DELETE"});if(o.error){if(o.error instanceof ca.FunctionsHttpError){let s=await o.error.context.json();m.error(`Cannot delete failed version: ${s.status||JSON.stringify(s)}`)}else m.error(`Cannot delete failed version: ${o.error.message}`);return}return o.data?.status}catch(i){if(i instanceof ca.FunctionsHttpError){let o=await i.context.json();m.error(`Cannot delete failed version: ${o.message||JSON.stringify(o)}`)}else m.error(`Cannot delete failed version: ${Z(i)}`)}}async function Ph(t,e){if(!e.app_id||!e.name||!e.created_by)return m.error("missing app_id, name, or created_by"),Promise.reject(new Error("missing app_id, name, or created_by"));let{data:r,error:n}=await t.from("channels").select("enable_progressive_deploy, secondary_version_percentage, second_version").eq("app_id",e.app_id).eq("name",e.name).single();if(r&&!n){if(r.enable_progressive_deploy){if(m.info("Progressive deploy is enabled"),r.secondary_version_percentage!==1&&m.warn("Latest progressive deploy has not finished"),e.second_version=e.version,!r.second_version)return m.error("missing secondVersion"),Promise.reject(new Error("missing secondVersion"));e.version=r.second_version,e.secondary_version_percentage=.1,m.info("Started new progressive upload!")}return t.from("channels").update(e).eq("app_id",e.app_id).eq("name",e.name).select().single()}return t.from("channels").insert(e).select().single()}async function xe(t,e){try{let r=await Zv(),n=await Hr.post(`${r.host}/private/events`,{json:e,headers:{Authorization:`Bearer ${t}`},timeout:1e4,retry:3}).json();n.error&&m.error(`Failed to send LogSnag event: ${n.error}`)}catch{}}async function ha(t,e){let{error:r,data:n}=await t.rpc("get_orgs_v5");r&&(m.error("Cannot get the list of organizations - exiting"),m.error(`Error ${JSON.stringify(r)}`),k.error(""));let i=n.filter(u=>!!e.find(c=>c===u.role));i.length===0&&(m.error(`Could not get organization with roles: ${e.join(" or ")} because the user does not have any org`),k.error(""));let o=i.length>1?await Bo({message:"Please pick the organization that you want to insert to",options:i.map(u=>({value:u.gid,label:u.name}))}):i[0].gid;qt(o)&&(m.error("Canceled organization selection, exiting"),k.error(""));let s=o,a=n.find(u=>u.gid===s);return m.info(`Using the organization "${a.name}" as the app owner`),a}var wo=t=>t.replace(/\./g,"--");async function pe(t,e,r=["all"]){await fse(t,e,r);let{data:n,error:i}=await t.rpc("get_user_id",{apikey:e}).single(),o=(n||"").toString();return(!o||i)&&(m.error("Cannot auth user with apikey"),k.error("")),o}async function Sr(t,e){let{data:r,error:n}=await t.from("apps").select("owner_org").eq("app_id",e).single();return(!r||n)&&(m.error(`Cannot get organization id for app id ${e}`),Z(n),k.error("")),r.owner_org}function pa(t){return new Date(t||"").toLocaleString()}var K6=!1,ua="npm",Pc="install",Yv="npx";function Nt(){if(K6)return{pm:ua,command:Pc,installCommand:`${ua} ${Pc}`,runner:Yv};let t=Xv((0,ar.cwd)());return ua=La(t,"npm"),Pc=fl(ua),K6=!0,Yv=Hw(t),{pm:ua,command:Pc,installCommand:`${ua} ${Pc}`,runner:Yv}}function cj(t){return(0,ot.readdirSync)(t,{withFileTypes:!0}).flatMap(n=>{let i=(0,rt.join)(t,n.name);return n.isDirectory()?cj(i):i.split(`node_modules${rt.sep}`)[1]||i})}async function nb(t){let e;try{e=await jt("",t)}catch(a){m.error("Invalid package.json, JSON parsing failed"),console.error("json parse error: ",a),k.error("")}let r=t?rt.default.resolve(t).replace("package.json",""):Xv((0,ar.cwd)()),{dependencies:n}=e;n||(m.error("Missing dependencies section in package.json"),k.error(""));for(let[a,u]of Object.entries(n))typeof u!="string"&&(m.error(`Invalid dependency ${a}: ${u}, expected string, got ${typeof u}`),k.error(""));let i=(0,rt.join)((0,ar.cwd)(),"node_modules");if(!(0,ot.existsSync)(i)){let a=La(r,"npm"),u=fl(a);m.error(`Missing node_modules folder, please run ${a} ${u}`),k.error("")}let o=!1,s=await Promise.all(Object.entries(n).map(async([a,u])=>{let c=(0,rt.join)(i,a);if(!(0,ot.existsSync)(c)){o=!0;let h=La(r,"npm"),d=fl(h);return m.error(`Missing dependency ${a}, please run ${h} ${d}`),{name:a,version:u}}let f=!1;try{f=cj(c).some(d=>lse.test(d))}catch(h){m.error(`Error reading node_modules files for ${a} package`),console.error(h),k.error("")}return{name:a,version:u,native:f}})).catch(()=>[]);return(o||s.find(a=>a.native===void 0))&&k.error(""),s}async function Dse(t,e,r){let{data:n,error:i}=await t.from("channels").select("version(checksum)").eq("name",r).eq("app_id",e).single(),o=n;return i||o===null||!o.version||!o.version.checksum?null:o.version.checksum}async function vse(t,e,r){let{data:n,error:i}=await t.from("channels").select(`version (
|
|
248
|
+
`)}function he(t=!1){let e=(0,Oh.homedir)(),r,n=`${e}/.capgo`;return(0,ot.existsSync)(n)&&(t||m.info(`Use global API key ${n}`),r=(0,ot.readFileSync)(n,"utf8").trim()),n=".capgo",!r&&(0,ot.existsSync)(n)&&(t||m.info(`Use local API key ${n}`),r=(0,ot.readFileSync)(n,"utf8").trim()),r||(m.error(`Cannot find API key in local folder or global, please login first with ${Nt().runner} @capacitor/cli login`),k.error("")),r}async function*Qv(t){let e=await(0,ot.readdirSync)(t,{withFileTypes:!0});for(let r of e){let n=(0,rt.resolve)(t,r.name);r.isDirectory()&&!r.name.startsWith(".")&&!r.name.startsWith("node_modules")&&!r.name.startsWith("dist")?yield*Qv(n):yield n}}function da(t){let e=/\.(jpg|jpeg|png|gif|bmp|webp)$/i,r=t.match(e);if(r)switch(r[1].toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"webp":return"image/webp"}return null}async function eb(){let t=(0,ar.cwd)(),e=!1,r=(0,rt.resolve)(t,"tsconfig.json");(0,ot.existsSync)(r)&&(e=!0);for await(let n of Qv(t)){if(n.includes("angular.json"))return m.info("Found angular project"),e?"angular-ts":"angular-js";if(n.includes("nuxt.config.js")||n.includes("nuxt.config.ts"))return m.info("Found nuxtjs project"),e?"nuxtjs-ts":"nuxtjs-js";if(n.includes("next.config.js")||n.includes("next.config.mjs"))return m.info("Found nextjs project"),e?"nextjs-ts":"nextjs-js";if(n.includes("svelte.config.js"))return m.info("Found sveltekit project"),e?"sveltekit-ts":"sveltekit-js";if(n.includes("rolluconfig.js"))return m.info("Found svelte project"),e?"svelte-ts":"svelte-js";if(n.includes("vue.config.js"))return m.info("Found vue project"),e?"vue-ts":"vue-js";if(n.includes("package.json")){let i=(0,rt.dirname)(n),o=await jt(i);if(o.dependencies){if(o.dependencies.react)return m.info("Found react project test"),e?"react-ts":"react-js";if(o.dependencies.vue)return m.info("Found vue project"),e?"vue-ts":"vue-js"}}}return"unknown"}function rj(t,e){return t==="angular-js"||t==="angular-ts"?e?"src/main.ts":"src/main.js":t==="nextjs-js"||t==="nextjs-ts"?e?"src/app/layout.tsx":"src/app/layout.js":t==="svelte-js"||t==="svelte-ts"||t==="vue-js"||t==="vue-ts"?e?"src/main.ts":"src/main.js":t==="react-js"||t==="react-ts"?e?"src/index.tsx":"src/index.js":null}async function nj(t){return t==="angular"?(m.info("Angular project detected"),"build"):t==="nuxtjs"?(m.info("Nuxtjs project detected"),"generate"):t==="nextjs"?(m.info("Nextjs project detected"),m.warn("Please make sure you have configured static export in your next.config.js: https://nextjs.org/docs/pages/building-your-application/deploying/static-exports"),m.warn("Please make sure you have the output: 'export' and distDir: 'dist' in your next.config.js"),await Te({message:"Do you want to continue?"})||(m.error("Aborted"),k.error("")),"build"):(t==="sveltekit"&&(m.info("Sveltekit project detected"),m.warn("Please make sure you have the adapter-static installed: https://kit.svelte.dev/docs/adapter-static"),m.warn("Please make sure you have the pages: 'dist' and assets: 'dest', in your svelte.config.js adaptater"),await Te({message:"Do you want to continue?"})||(m.error("Aborted"),k.error(""))),"build")}async function ij(){let t=/(main|index)\.(ts|tsx|js|jsx)$/,e="",r=(0,ar.cwd)(),n=r.split("/").length;for await(let i of Qv(r))if(i.split("/").length-n<=2&&t.test(i)){e=i,m.info(`Found main file here ${i}`);break}return e}async function tb(t,e){return t.from("app_versions").upsert(e,{onConflict:"name,app_id"}).eq("app_id",e.app_id).eq("name",e.name)}async function oj(t,e,r){let n={app_id:e,name:r,version:0};try{let o=await t.functions.invoke("private/upload_link",{body:JSON.stringify(n)});if(o.error){if(o.error instanceof ca.FunctionsHttpError){let s=await o.error.context.json();m.error(`Upload URL error: ${s.status||JSON.stringify(s)}`)}else m.error(`Cannot get upload url: ${o.error.message}`);return""}return o.data.url}catch(i){m.error(`Cannot get upload url ${Z(i)}`)}return""}async function*sj(t){let e=(0,ot.readdirSync)(t,{withFileTypes:!0});for(let r of e){let n=(0,rt.join)(t,r.name);r.isDirectory()?yield*sj(n):yield n}}async function aj(t){let e=[];for await(let r of sj(t)){let n=(0,ot.readFileSync)(r),i=await(0,Y6.checksum)(n,"sha256"),o=(0,rt.relative)(t,r);o.startsWith("/")&&(o=o.substring(1)),e.push({file:o,hash:i})}return e}async function Th(t){return(0,Oh.platform)()==="win32"?yse(t):gse(t)}function gse(t){let e=new Jv.default;return e.addLocalFolder(t),e.toBuffer()}async function yse(t){m.info("Zipping file windows mode");let e=new Jv.default,r=(n,i)=>{let o=(0,ot.readdirSync)(n);for(let s of o){let a=(0,rt.join)(n,s),u=(0,ot.statSync)(a);if(u.isFile()){let c=(0,ot.readFileSync)(a);e.addFile((0,rt.join)(i,s).split(rt.sep).join("/"),c)}else u.isDirectory()&&r(a,(0,rt.join)(i,s))}};return r(t,""),e.toBuffer()}async function rb(t,e,r,n,i,o,s){return new Promise((a,u)=>{xe(t,{channel:"app",event:"App TUS upload",icon:"\u23EB",user_id:r,tags:{"app-id":n},notify:!1}),new Ah.Upload(e,{endpoint:`${s.hostFilesApi}/files/upload/attachments/`,metadataForPartialUploads:{filename:`orgs/${r}/apps/${n}/${i}.zip`,filetype:"application/gzip"},metadata:{filename:`orgs/${r}/apps/${n}/${i}.zip`,filetype:"application/zip"},headers:{Authorization:t},onError(l){if(l instanceof Ah.DetailedError){let f=l.originalResponse?.getBody(),h=JSON.parse(f||'{"error": "unknown error"}');u(h.status||h.error||h.message||"unknown error")}else u(l.message||l.toString()||"unknown error")},onProgress(l,f){let h=(l/f*100).toFixed(2);o.message(`Uploaded ${h}%`)},async onSuccess(){await xe(t,{channel:"app",event:"App TUS done",icon:"\u23EB",user_id:r,tags:{"app-id":n},notify:!1}).catch(),a(!0)}}).start()})}async function uj(t,e,r){let n={app_id:e,name:r};try{let o=await t.functions.invoke("private/delete_failed_version",{body:JSON.stringify(n),method:"DELETE"});if(o.error){if(o.error instanceof ca.FunctionsHttpError){let s=await o.error.context.json();m.error(`Cannot delete failed version: ${s.status||JSON.stringify(s)}`)}else m.error(`Cannot delete failed version: ${o.error.message}`);return}return o.data?.status}catch(i){if(i instanceof ca.FunctionsHttpError){let o=await i.context.json();m.error(`Cannot delete failed version: ${o.message||JSON.stringify(o)}`)}else m.error(`Cannot delete failed version: ${Z(i)}`)}}async function Ph(t,e){if(!e.app_id||!e.name||!e.created_by)return m.error("missing app_id, name, or created_by"),Promise.reject(new Error("missing app_id, name, or created_by"));let{data:r,error:n}=await t.from("channels").select("enable_progressive_deploy, secondary_version_percentage, second_version").eq("app_id",e.app_id).eq("name",e.name).single();if(r&&!n){if(r.enable_progressive_deploy){if(m.info("Progressive deploy is enabled"),r.secondary_version_percentage!==1&&m.warn("Latest progressive deploy has not finished"),e.second_version=e.version,!r.second_version)return m.error("missing secondVersion"),Promise.reject(new Error("missing secondVersion"));e.version=r.second_version,e.secondary_version_percentage=.1,m.info("Started new progressive upload!")}return t.from("channels").update(e).eq("app_id",e.app_id).eq("name",e.name).select().single()}return t.from("channels").insert(e).select().single()}async function xe(t,e){try{let r=await Zv(),n=await Hr.post(`${r.host}/private/events`,{json:e,headers:{capgkey:t},timeout:1e4,retry:3}).json();n.error&&m.error(`Failed to send LogSnag event: ${n.error}`)}catch{}}async function ha(t,e){let{error:r,data:n}=await t.rpc("get_orgs_v5");r&&(m.error("Cannot get the list of organizations - exiting"),m.error(`Error ${JSON.stringify(r)}`),k.error(""));let i=n.filter(u=>!!e.find(c=>c===u.role));i.length===0&&(m.error(`Could not get organization with roles: ${e.join(" or ")} because the user does not have any org`),k.error(""));let o=i.length>1?await Bo({message:"Please pick the organization that you want to insert to",options:i.map(u=>({value:u.gid,label:u.name}))}):i[0].gid;qt(o)&&(m.error("Canceled organization selection, exiting"),k.error(""));let s=o,a=n.find(u=>u.gid===s);return m.info(`Using the organization "${a.name}" as the app owner`),a}var wo=t=>t.replace(/\./g,"--");async function pe(t,e,r=["all"]){await fse(t,e,r);let{data:n,error:i}=await t.rpc("get_user_id",{apikey:e}).single(),o=(n||"").toString();return(!o||i)&&(m.error("Cannot auth user with apikey"),k.error("")),o}async function Sr(t,e){let{data:r,error:n}=await t.from("apps").select("owner_org").eq("app_id",e).single();return(!r||n)&&(m.error(`Cannot get organization id for app id ${e}`),Z(n),k.error("")),r.owner_org}function pa(t){return new Date(t||"").toLocaleString()}var K6=!1,ua="npm",Pc="install",Yv="npx";function Nt(){if(K6)return{pm:ua,command:Pc,installCommand:`${ua} ${Pc}`,runner:Yv};let t=Xv((0,ar.cwd)());return ua=La(t,"npm"),Pc=fl(ua),K6=!0,Yv=Hw(t),{pm:ua,command:Pc,installCommand:`${ua} ${Pc}`,runner:Yv}}function cj(t){return(0,ot.readdirSync)(t,{withFileTypes:!0}).flatMap(n=>{let i=(0,rt.join)(t,n.name);return n.isDirectory()?cj(i):i.split(`node_modules${rt.sep}`)[1]||i})}async function nb(t){let e;try{e=await jt("",t)}catch(a){m.error("Invalid package.json, JSON parsing failed"),console.error("json parse error: ",a),k.error("")}let r=t?rt.default.resolve(t).replace("package.json",""):Xv((0,ar.cwd)()),{dependencies:n}=e;n||(m.error("Missing dependencies section in package.json"),k.error(""));for(let[a,u]of Object.entries(n))typeof u!="string"&&(m.error(`Invalid dependency ${a}: ${u}, expected string, got ${typeof u}`),k.error(""));let i=(0,rt.join)((0,ar.cwd)(),"node_modules");if(!(0,ot.existsSync)(i)){let a=La(r,"npm"),u=fl(a);m.error(`Missing node_modules folder, please run ${a} ${u}`),k.error("")}let o=!1,s=await Promise.all(Object.entries(n).map(async([a,u])=>{let c=(0,rt.join)(i,a);if(!(0,ot.existsSync)(c)){o=!0;let h=La(r,"npm"),d=fl(h);return m.error(`Missing dependency ${a}, please run ${h} ${d}`),{name:a,version:u}}let f=!1;try{f=cj(c).some(d=>lse.test(d))}catch(h){m.error(`Error reading node_modules files for ${a} package`),console.error(h),k.error("")}return{name:a,version:u,native:f}})).catch(()=>[]);return(o||s.find(a=>a.native===void 0))&&k.error(""),s}async function Dse(t,e,r){let{data:n,error:i}=await t.from("channels").select("version(checksum)").eq("name",r).eq("app_id",e).single(),o=n;return i||o===null||!o.version||!o.version.checksum?null:o.version.checksum}async function vse(t,e,r){let{data:n,error:i}=await t.from("channels").select(`version (
|
|
249
249
|
native_packages
|
|
250
250
|
)`).eq("name",r).eq("app_id",e).single();i&&(m.error(`Error fetching native packages: ${i.message}`),k.error(""));let o;try{o=n.version.native_packages}catch{m.error("Error parsing native packages"),k.error("")}return o||(m.error("Error parsing native packages, perhaps the metadata does not exist?"),k.error("")),o.forEach(a=>{typeof a!="object"&&(m.error(`Invalid remote native package data: ${a}, expected object, got ${typeof a}`),k.error(""));let{name:u,version:c}=a;(!u||typeof u!="string")&&(m.error(`Invalid remote native package name: ${u}, expected string, got ${typeof u}`),k.error("")),(!c||typeof c!="string")&&(m.error(`Invalid remote native package version: ${c}, expected string, got ${typeof c}`),k.error(""))}),new Map(o.map(a=>[a.name,a]))}async function lj(t,e,r,n){let i=ve();i.start(`Checking bundle checksum compatibility with channel ${r}`);let o=await Dse(t,e,r);if(!o){i.stop(`No checksum found for channel ${r}, the bundle will be uploaded`);return}o&&o===n&&(m.error(`Cannot upload the same bundle content.
|
|
251
251
|
Current bundle checksum matches remote bundle for channel ${r}
|
|
252
252
|
Did you builded your app before uploading?
|
|
253
|
-
PS: You can ignore this check with "--ignore-checksum-check"`),k.error("")),i.stop(`Checksum compatible with ${r} channel`)}async function Rh(t,e,r,n){let i=await nb(n),o=await vse(t,e,r),s=i.filter(u=>!!u.native).map(u=>{let c=o.get(u.name);return c?{name:u.name,localVersion:u.version,remoteVersion:c.version}:{name:u.name,localVersion:u.version,remoteVersion:void 0}}),a=[...o].filter(([u])=>i.find(c=>c.name===u)===void 0).map(([u,c])=>({name:u,localVersion:void 0,remoteVersion:c.version}));return s.push(...a),{finalCompatibility:s,localDependencies:i}}async function fj(t,e){let{data:r}=await t.rpc("exist_app_v2",{appid:e}).single();return!!r}async function qe(t,e,r,n){let i=Nt(),o=await tj(t,e,r);if(!o.okay)switch(o.error){case"INVALID_APIKEY":{m.error("Invalid apikey, such apikey does not exists!"),k.error("");break}case"NO_APP":{m.error(`App ${r} does not exist, run first \`${i.runner} @capgo/cli app add ${r}\` to create it`),k.error("");break}case"NO_ORG":{m.error("Could not find organization, please contact support to resolve this!"),k.error("");break}}let s=o.data;return n>s&&(m.error(`Insuficcent permissions for app ${r}. Current permission: ${xt[o.data]}, required for this action: ${xt[n]}.`),k.error("")),o.data}var xr="assets/icon.png";var Ij=le($j(),1);function ab(t){let e=(0,Ij.default)("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`}var I8=le($8(),1),j8=le(Ov(),1),bb=class extends Error{constructor(e){super(`Package \`${e}\` could not be found`),this.name="PackageNotFoundError"}},wb=class extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`),this.name="VersionNotFoundError"}};async function _b(t,e={}){let{version:r="latest"}=e,{omitDeprecated:n=!0}=e,i=t.split("/")[0],o=e.registryUrl??ab(i),s=new URL(encodeURIComponent(t).replace(/^%40/,"@"),o),a=(0,I8.default)(o.toString(),{recursive:!0}),u={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete u.accept,a&&(u.authorization=`${a.type} ${a.token}`);let c;try{c=await Hr(s,{headers:u,keepalive:!0}).json()}catch(f){throw f?.response?.status===404?new bb(t):f}if(e.allVersions)return c;let l=new wb(t,r);if(c["dist-tags"][r]){let{time:f}=c;c=c.versions[c["dist-tags"][r]],c.time=f}else if(r){let f=!!c.versions[r];if(n&&!f)for(let[d,p]of Object.entries(c.versions))p.deprecated&&delete c.versions[d];if(!f){let d=Object.keys(c.versions);if(r=j8.default.maxSatisfying(d,r),!r)throw l}let{time:h}=c;if(c=c.versions[r],c.time=h,!c)throw l}return c}async function Nc(t,e){let{version:r}=await _b(t.toLowerCase(),e);return r}async function ge(){let t=await Nc("@capgo/cli"),e=t?.split(".")[0];t!==Ir.version&&m.warning(`\u{1F6A8} You are using @capgo/cli@${Ir.version} it's not the latest version.
|
|
253
|
+
PS: You can ignore this check with "--ignore-checksum-check"`),k.error("")),i.stop(`Checksum compatible with ${r} channel`)}async function Rh(t,e,r,n){let i=await nb(n),o=await vse(t,e,r),s=i.filter(u=>!!u.native).map(u=>{let c=o.get(u.name);return c?{name:u.name,localVersion:u.version,remoteVersion:c.version}:{name:u.name,localVersion:u.version,remoteVersion:void 0}}),a=[...o].filter(([u])=>i.find(c=>c.name===u)===void 0).map(([u,c])=>({name:u,localVersion:void 0,remoteVersion:c.version}));return s.push(...a),{finalCompatibility:s,localDependencies:i}}async function fj(t,e){let{data:r}=await t.rpc("exist_app_v2",{appid:e}).single();return!!r}async function qe(t,e,r,n){let i=Nt(),o=await tj(t,e,r);if(!o.okay)switch(o.error){case"INVALID_APIKEY":{m.error("Invalid apikey, such apikey does not exists!"),k.error("");break}case"NO_APP":{m.error(`App ${r} does not exist, run first \`${i.runner} @capgo/cli app add ${r}\` to create it`),k.error("");break}case"NO_ORG":{m.error("Could not find organization, please contact support to resolve this!"),k.error("");break}}let s=o.data;return n>s&&(m.error(`Insuficcent permissions for app ${r}. Current permission: ${xt[o.data]}, required for this action: ${xt[n]}.`),k.error("")),o.data}var xr="assets/icon.png";var Ij=le($j(),1);function ab(t){let e=(0,Ij.default)("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`}var I8=le($8(),1),j8=le(Ov(),1),bb=class extends Error{constructor(e){super(`Package \`${e}\` could not be found`),this.name="PackageNotFoundError"}},wb=class extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`),this.name="VersionNotFoundError"}};async function _b(t,e={}){let{version:r="latest"}=e,{omitDeprecated:n=!0}=e,i=t.split("/")[0],o=e.registryUrl??ab(i),s=new URL(encodeURIComponent(t).replace(/^%40/,"@"),o),a=(0,I8.default)(o.toString(),{recursive:!0}),u={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete u.accept,a&&(u.authorization=`${a.type} ${a.token}`);let c;try{c=await Hr(s,{headers:u,keepalive:!0}).json()}catch(f){throw f?.response?.status===404?new bb(t):f}if(e.allVersions)return c;let l=new wb(t,r);if(c["dist-tags"][r]){let{time:f}=c;c=c.versions[c["dist-tags"][r]],c.time=f}else if(r){let f=!!c.versions[r];if(n&&!f)for(let[d,p]of Object.entries(c.versions))p.deprecated&&delete c.versions[d];if(!f){let d=Object.keys(c.versions);if(r=j8.default.maxSatisfying(d,r),!r)throw l}let{time:h}=c;if(c=c.versions[r],c.time=h,!c)throw l}return c}async function Nc(t,e){let{version:r}=await _b(t.toLowerCase(),e);return r}async function ge(){let t=await Nc("@capgo/cli").catch(()=>""),e=t?.split(".")[0];t!==Ir.version&&m.warning(`\u{1F6A8} You are using @capgo/cli@${Ir.version} it's not the latest version.
|
|
254
254
|
Please use @capgo/cli@${t}" or @capgo/cli@${e} to keep up to date with the latest features and bug fixes.`)}async function Eae(t,e,r=!0){await Eb(t,e,void 0,r)}async function Eb(t,e,r,n=!0){n&&Y("Adding"),await ge(),e.apikey=e.apikey||he();let i=await ee();t=t||i?.config?.appId,e.apikey||(m.error("Missing API key, you need to provide a API key to upload your bundle"),k.error("")),t||(m.error("Missing argument, you need to provide a appId, or be in a capacitor project"),k.error("")),t.includes("--")&&(m.error('The app id includes illegal symbols. You cannot use "--" in the app id'),k.error(""));let o=await fe(e.apikey);await pe(o,e.apikey,["write","all"]),await fj(o,t)&&(m.error(`App ${t} already exist`),k.error("")),r||(r=await ha(o,["admin","super_admin"]));let a=r.gid;await fa(o,a,e.apikey,void 0,!1);let{name:u,icon:c}=e;u=u||i.config?.appName||"Unknown",c=c||"resources/icon.png",(!c||!u)&&(m.error("Missing argument, you need to provide a appId and a name, or be in a capacitor project"),k.error("")),n&&m.info(`Adding ${t} to Capgo`);let l=null,f=null;c&&(0,_a.existsSync)(c)?(l=(0,_a.readFileSync)(c),f=da(c)||"image/png",m.warn(`Found app icon ${c}`)):(0,_a.existsSync)(xr)?(l=(0,_a.readFileSync)(xr),f=da(xr)||"image/png",m.warn(`Found app icon ${xr}`)):m.warn(`Cannot find app icon in any of the following locations: ${c}, ${xr}`);let h="icon",d="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(l&&f){let{error:g}=await o.storage.from(`images/org/${a}/${t}`).upload(h,l,{contentType:f});g&&(console.error(g),m.error(`Could not add app ${Z(g)}`),k.error(""));let{data:w}=await o.storage.from(`images/org/${a}/${t}`).getPublicUrl(h);d=w?.publicUrl||d}let{error:p}=await o.from("apps").insert({icon_url:d,owner_org:a,name:u,app_id:t});p&&(m.error(`Could not add app ${Z(p)}`),k.error(""));let{error:b}=await o.from("app_versions").insert([{owner_org:a,deleted:!0,name:"unknown",app_id:t},{owner_org:a,deleted:!0,name:"builtin",app_id:t}]);return b&&(m.error(`Could not add app ${Z(b)}`),k.error("")),m.success(`App ${t} added to Capgo. ${n?"You can upload a bundle now":""}`),n&&(X("Done \u2705"),(0,N8.exit)()),!0}async function L8(t,e){Eae(t,e,!0)}var B8=require("node:process");async function q8(t,e){Y("Deleting"),e.apikey=e.apikey||he();let r=await ee();t=t||r?.config?.appId,e.apikey||(m.error("Missing API key, you need to provide a API key to upload your bundle"),k.error("")),t||(m.error("Missing argument, you need to provide a appId, or be in a capacitor project"),k.error(""));let n=await fe(e.apikey),i=await pe(n,e.apikey,["write","all"]);await qe(n,e.apikey,t,5);let{data:o,error:s}=await n.from("apps").select("owner_org ( created_by, id )").eq("app_id",t).single(),a=o;if(!s&&(a?.owner_org.created_by??"")!==i){m.warn("Deleting the app is not recomended for users that are not the organization owner"),m.warn("You are invited as a super_admin but your are not the owner"),m.warn("It's strongly recomended that you do not continue!");let h=await Bo({message:"Do you want to continue?",options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}]});(qt(h)||h==="no")&&(m.error("Canceled deleting the app, exiting"),k.error(""))}else s&&m.warn(`Cannot get the app owner ${Z(s)}`);let{error:u}=await n.storage.from("images").remove([`org/${a?.owner_org.id}/${t}/icon`]);u&&(console.error(u,`images/org/${a?.owner_org.id}/${t}`),m.error("Could not delete app logo"));let{error:c}=await n.storage.from(`apps/${t}/${i}`).remove(["versions"]);c&&m.error("Could not delete app version");let{error:l}=await n.from("apps").delete().eq("app_id",t);l&&(m.error("Could not delete app"),k.error(""));let f=await Sr(n,t);await xe(e.apikey,{channel:"app",event:"App Deleted",icon:"\u{1F5D1}\uFE0F",user_id:f,tags:{"app-id":t},notify:!1}).catch(),m.success("App deleted in Capgo"),X("Done \u2705"),(0,B8.exit)()}var Wh=require("node:os"),Ea=require("node:process");async function Cae(t){let e={},r=[];for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.push(Nc(n));return await Promise.all(r).then(n=>{let i=Object.keys(t);for(let o=0;o<n.length;o+=1){let s=n[o];s&&(e[i[o]]=s)}}),e}async function Sae(){let{dependencies:t}=await jt(),e={"@capgo/cli":Ir.version};for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith("@capgo/")&&r.startsWith("@capawesome/")&&r.startsWith("capacitor")){let n=t[r].replace("^","").replace("~","");e[r]=n}return e}async function M8(t){m.warn(" \u{1F48A} Capgo Doctor \u{1F48A}");let e=await ee(),r=await jt("",t.packageJson),n=e?.config?.plugins?.CapacitorUpdater?.version||r?.version,i=e?.config?.appName||"";m.info(` App Name: ${i}`);let o=e?.config?.appId||"";m.info(` App ID: ${o}`),m.info(` App Version: ${n}`);let s=e?.config?.webDir||"";m.info(` Web Dir: ${s}`),m.info(` OS: ${(0,Wh.platform)()} ${(0,Wh.version)()}`),m.info(` Node: ${Ea.version}`),m.info(" Installed Dependencies:");let a=await Sae();Object.keys(a).length===0&&(m.warning("\x1B[31m%s\x1B[0m \u{1F6A8} No dependencies found"),(0,Ea.exit)(1));for(let l in a)if(Object.prototype.hasOwnProperty.call(a,l)){let f=a[l];m.info(` ${l}: ${f}`)}let u=ve();u.start("Running: Loading latest dependencies");let c=await Cae(a);u.stop("Latest Dependencies:");for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let f=c[l];m.info(` ${l}: ${f}`)}JSON.stringify(a)!==JSON.stringify(c)&&(m.warn("\x1B[31m\u{1F6A8} Some dependencies are not up to date\x1B[0m"),(0,Ea.exit)(1)),m.success("\x1B[32m\u2705 All dependencies are up to date\x1B[0m"),(0,Ea.exit)()}var Cb=require("node:process");function U8(t,e){let n=["normal","bold","dim","italic","underline","strikethrough"].indexOf(t),i="\x1B[";return i+n+"m"+e+i+"0m"}var lr=class t{title=null;headers=[];rows=[];static narrowTheme={top:["\u2554","\u2550","\u2564","\u2557"],row:["\u2551"," ","\u2502","\u2551"],div:["\u255F","\u2500","\u253C","\u2562"],bot:["\u255A","\u2550","\u2567","\u255D"]};static wideTheme={top:["\u2554\u2550","\u2550","\u2550\u2564\u2550","\u2550\u2557"],row:["\u2551 "," "," \u2502 "," \u2551"],div:["\u255F\u2500","\u2500","\u2500\u253C\u2500","\u2500\u2562"],bot:["\u255A\u2550","\u2550","\u2550\u2567\u2550","\u2550\u255D"]};static roundTheme={top:["\u256D\u2500","\u2500","\u2500\u252C\u2500","\u2500\u256E"],row:["\u2502 "," "," \u2502 "," \u2502"],div:["\u251C\u2500","\u2500","\u2500\u253C\u2500","\u2500\u2524"],bot:["\u2570\u2500","\u2500","\u2500\u2534\u2500","\u2500\u256F"]};theme=t.wideTheme;columnWidth(){let e=[this.headers,...this.rows].filter(n=>n.length>0),r=e[0].map(n=>this.cast(n).length);for(let n of e.slice(1))for(let i=0;i<r.length;i++){let o=this.cast(n[i]).length;o>r[i]&&(r[i]=o)}return r}cast(e){return typeof e=="object"?"obj":e!==void 0&&typeof e.toString=="function"?e.toString():""}renderTitle(){return"[ "+this.title+" ]"}renderLine(e){let r=this.columnWidth();return e[0]+r.map(n=>e[1].repeat(n)).join(e[2])+e[3]}renderCell(e,r,n=!1){let i=this.cast(e),o=n?U8("bold",i):i,s=r-i.length,a=this.theme.row[1];switch(typeof e){case"number":return a.repeat(s)+o;case"string":return o+a.repeat(s);case"boolean":case"object":return a.repeat(Math.ceil(s/2))+U8("italic",i)+a.repeat(Math.floor(s/2));default:return a.repeat(s)}}renderRow(e,r=!1){let n=this.theme.row,i=this.columnWidth();return n[0]+e.map((o,s)=>this.renderCell(o,i[s],r)).join(n[2])+n[3]}toString(){let e=this.theme,r=this.headers.length>0,n=this.rows.length>0;return[this.title?this.renderTitle():"",r||n?this.renderLine(e.top):"",r?this.renderRow(this.headers,!0):"",r&&n?this.renderLine(e.div):"",...this.rows.map(i=>this.renderRow(i)),r||n?this.renderLine(e.bot):""].filter(i=>i.length>0).join(`
|
|
255
255
|
`)}};function xae(t){t.length||(m.error("No apps found"),(0,Cb.exit)(1));let e=new lr;e.headers=["Name","id","Created"],e.rows=[],t.reverse().forEach(r=>{e.rows.push([r.name??"",r.app_id,pa(r.created_at)])}),m.success("Apps"),m.success(e.toString())}async function Fae(t){let{data:e,error:r}=await t.from("apps").select().order("created_at",{ascending:!1});return r&&(m.error("Apps not found"),k.error("")),e}async function V8(t){Y("List apps in Capgo"),await ge(),t.apikey=t.apikey||he();let e=await fe(t.apikey);await pe(e,t.apikey,["write","all","read","upload"]),m.info("Getting active bundle in Capgo");let r=await Fae(e);m.info(`Active app in Capgo: ${r?.length}`),xae(r),X("Done \u2705"),(0,Cb.exit)()}var H8=require("node:crypto"),Ca=require("node:fs"),z8=require("node:process");async function G8(t,e){Y("Set app"),e.apikey=e.apikey||he();let r=await ee();t=t||r?.config?.appId,e.apikey||(m.error("Missing API key, you need to provide a API key to upload your bundle"),k.error("")),t||(m.error("Missing argument, you need to provide a appId, or be in a capacitor project"),k.error(""));let n=await fe(e.apikey),o=(await ha(n,["admin","super_admin"])).gid,s=await pe(n,e.apikey,["write","all"]);await qe(n,e.apikey,t,4);let{name:a,icon:u,retention:c}=e;c&&Number.isNaN(Number(c))?(m.error("retention value must be a number"),k.error("")):c&&c<0&&(m.error("retention value cannot be less than 0"),k.error(""));let l,f,h=`icon_${(0,H8.randomUUID)()}`,d="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(u&&(0,Ca.existsSync)(u)?(l=(0,Ca.readFileSync)(u),f=da(u)||"image/png",m.warn(`Found app icon ${u}`)):(0,Ca.existsSync)(xr)?(l=(0,Ca.readFileSync)(xr),f=da(xr)||"image/png",m.warn(`Found app icon ${xr}`)):m.warn(`Cannot find app icon in any of the following locations: ${u}, ${xr}`),l&&f){let{error:b}=await n.storage.from(`images/org/${o}/${t}`).upload(h,l,{contentType:f});b&&(m.error(`Could not set app ${Z(b)}`),k.error(""));let{data:g}=await n.storage.from(`images/org/${o}/${t}`).getPublicUrl(h);d=g?.publicUrl||d}let{error:p}=await n.from("apps").update({icon_url:d,name:a,retention:c?c*24*60*60:void 0}).eq("app_id",t).eq("user_id",s);p&&(m.error(`Could not set app ${Z(p)}`),k.error("")),X("Done \u2705"),(0,z8.exit)()}var Sa=require("node:process");async function W8(t,e){Y("Set a specific setting in capacitor config"),e.bool&&e.string&&(m.error("Bool and string CANNOT be set at the same time"),(0,Sa.exit)(1)),!e.bool&&!e.string&&(m.error("You MUST provide either bool or string as the value"),(0,Sa.exit)(1)),e.bool&&e.bool!=="true"&&e.bool!=="false"&&(m.error("Invalid bool"),(0,Sa.exit)(1));try{let r=await ee(),n=r.config,i=t.split(".");i.length===0&&(m.error("Invalid path"),(0,Sa.exit)(1));for(let s of i.slice(0,-1))Object.prototype.hasOwnProperty.call(n,s)||(n[s]={}),n=n[s];let o=e.bool?e.bool==="true":e.string;n[i.at(-1)]=o,await on(r,!0),m.success(`Set "${t}" to "${o}"`)}catch(r){m.error(`Cannot set config in capacitor settings ${Z(r)}`),(0,Sa.exit)(1)}X("Done \u2705")}var $b=require("node:process");function Kh(t,e){if(isNaN(t)||isNaN(e))throw new Error("Cannot compare against non-numbers");return t===e?0:t<e?-1:1}function J8(t=[],e=[]){return t.length&&!e.length?-1:!t.length&&e.length?1:0}function xb(t=[],e=[]){let r=Math.max(t.length,e.length);for(let n=0;n<r;n++){let i=t[n],o=e[n];if(i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(typeof i=="string"&&typeof o=="number")return 1;if(typeof i=="number"&&typeof o=="string"||i<o)return-1;if(i>o)return 1}return 0}var xa="0|[1-9]\\d*",Oae="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Aae=`(?<major>${xa})\\.(?<minor>${xa})\\.(?<patch>${xa})`,K8=`(?:${xa}|${Oae})`,X8=`(?:-(?<prerelease>${K8}(?:\\.${K8})*))`,Y8="[0-9A-Za-z-]+",Z8=`(?:\\+(?<buildmetadata>${Y8}(?:\\.${Y8})*))`,Q8=`v?${Aae}${X8}?${Z8}?`,eN=new RegExp(`^${Q8}$`),tN="(?:<|>)?=?",kae="x|X|\\*",Sb=`${xa}|${kae}`,rN=`[v=\\s]*(?<major>${Sb})(?:\\.(?<minor>${Sb})(?:\\.(?<patch>${Sb})${X8}?${Z8}?)?)?`,Tae=new RegExp(`^(?<operator>~>?|\\^|${tN})\\s*${rN}$`),Pae=new RegExp(`^(?<operator>${tN})\\s*(${Q8})$|^$`);function Fb(t){return typeof t=="number"&&!Number.isNaN(t)&&(!Number.isFinite(t)||0<=t&&t<=Number.MAX_SAFE_INTEGER)}var Ob=256;var Rae=new RegExp(`^${xa}$`);function Ab(t){return t.split(".").filter(Boolean).map(e=>{if(Rae.test(e)){let r=Number(e);if(Fb(r))return r}return e})}function Lc(t){return t.split(".").filter(Boolean)}function Bc(t,e){let r=Number(t);if(!Fb(r))throw new TypeError(e);return r}function Fr(t,e){return t===e?0:Kh(t.major,e.major)||Kh(t.minor,e.minor)||Kh(t.patch,e.patch)||J8(t.prerelease,e.prerelease)||xb(t.prerelease,e.prerelease)}function kb(t){return t.toFixed(0)}function Fa(t){let e=kb(t.major),r=kb(t.minor),n=kb(t.patch),i=t.prerelease?.join(".")??"",o=t.build?.join(".")??"";return[[`${e}.${r}.${n}`,i].filter(u=>u).join("-"),o].filter(u=>u).join("+")}function $ae(t=[]){let e=[...t],r=e.length;for(;r>=0;){let n=e[r];if(typeof n=="number"){e[r]=n+1;break}r-=1}return r===-1&&e.push(0),e}function qc(t=[],e){let r=$ae(t);return e&&(r[0]!==e||isNaN(r[1]))&&(r=[e,0]),r}function iN(t,e,r={}){let n=r.build!==void 0?Lc(r.build):t.build??[];switch(e){case"premajor":return{major:t.major+1,minor:0,patch:0,prerelease:qc(t.prerelease,r.prerelease),build:n};case"preminor":return{major:t.major,minor:t.minor+1,patch:0,prerelease:qc(t.prerelease,r.prerelease),build:n};case"prepatch":return{major:t.major,minor:t.minor,patch:t.patch+1,prerelease:qc(t.prerelease,r.prerelease),build:n};case"prerelease":{let o=(t.prerelease??[]).length===0?t.patch+1:t.patch;return{major:t.major,minor:t.minor,patch:o,prerelease:qc(t.prerelease,r.prerelease),build:n}}case"major":return{major:(t.prerelease??[]).length===0||t.minor!==0||t.patch!==0?t.major+1:t.major,minor:0,patch:0,prerelease:[],build:n};case"minor":{let o=(t.prerelease??[]).length===0||t.patch!==0?t.minor+1:t.minor;return{major:t.major,minor:o,patch:0,prerelease:[],build:n}}case"patch":{let o=(t.prerelease??[]).length===0?t.patch+1:t.patch;return{major:t.major,minor:t.minor,patch:o,prerelease:[],build:n}}case"pre":return{major:t.major,minor:t.minor,patch:t.patch,prerelease:qc(t.prerelease,r.prerelease),build:n};default:throw new TypeError(`Cannot increment version: invalid argument ${e}`)}}var Tb={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},oN={operator:void 0,...Tb};function Pb(t,e){return Fr(t,e)>0}function Oa(t,e){return Fr(t,e)<0}function Bn(t){if(typeof t!="string")throw new TypeError(`Cannot parse version as version must be a string: received ${typeof t}`);if(t.length>Ob)throw new TypeError(`Cannot parse version as version length is too long: length is ${t.length}, max length is ${Ob}`);t=t.trim();let e=t.match(eN)?.groups;if(!e)throw new TypeError(`Cannot parse version: ${t}`);let r=Bc(e.major,`Cannot parse version ${t}: invalid major version`),n=Bc(e.minor,`Cannot parse version ${t}: invalid minor version`),i=Bc(e.patch,`Cannot parse version ${t}: invalid patch version`),o=e.prerelease?Ab(e.prerelease):[],s=e.buildmetadata?Lc(e.buildmetadata):[];return{major:r,minor:n,patch:i,prerelease:o,build:s}}var mN=require("node:process");var aN=require("node:process");async function uN(t,e,r){let{data:n,error:i}=await t.from("channels").select().eq("app_id",e).eq("version",r.id);if(i&&(m.error(`Cannot check Version ${e}@${r.name}`),k.error("")),n&&n.length>0){if(Y(`\u274C Version ${e}@${r.name} is used in ${n.length} channel`),await Te({message:"unlink it?"}))for(let o of n){let s=ve();s.start(`Unlinking channel ${o.name}`);let{error:a}=await t.from("channels").update({version:(await Rb(t,e))?.id}).eq("id",o.id);a&&(s.stop(`Cannot update channel ${o.name} ${Z(a)}`),(0,aN.exit)(1)),s.stop(`\u2705 Channel ${o.name} unlinked`)}else m.error("Unlink it first"),k.error("");X(`Version unlinked from ${n.length} channel`)}}function Rb(t,e){return t.from("app_versions").select("id").eq("app_id",e).eq("name","unknown").throwOnError().single().then(({data:r,error:n})=>(n&&(m.error(`Cannot call findUnknownVersion as it returned an error.
|
|
256
256
|
${Z(n)}`),k.error("")),r))}function cN(t,e){return t.from("channels").insert(e).select().single()}function lN(t,e,r,n){return t.from("channels").delete().eq("name",e).eq("app_id",r).single()}function fN(t){let e=new lr;e.theme=lr.roundTheme,e.headers=["Name","Version","Public","iOS","Android","Auto Update","Native Auto Update","Device Self Set","Progressive Deploy","Secondary Version","Secondary Version Percentage","AB Testing","AB Testing Version","AB Testing Percentage","Emulator","Dev"],e.rows=[["a",0,!0],["bb",10,!1]],t.reverse().forEach(r=>{e.rows.push([r.name,r.version?.name,r.public?"\u2705":"\u274C",r.ios?"\u2705":"\u274C",r.android?"\u2705":"\u274C",r.disable_auto_update,r.disable_auto_update_under_native?"\u274C":"\u2705",r.allow_device_self_set?"\u2705":"\u274C",r.enable_progressive_deploy?"\u2705":"\u274C",r.enable_progressive_deploy&&r.second_version?r.second_version.name:void 0,r.enable_progressive_deploy&&r.second_version?r.secondary_version_percentage:void 0,r.enable_ab_testing?"\u2705":"\u274C",r.enable_ab_testing&&r.second_version?r.second_version.name:void 0,r.enable_ab_testing&&r.second_version?`${(1-r.secondary_version_percentage)*100}% / ${r.secondary_version_percentage*100}%`:void 0,r.allow_emulator?"\u2705":"\u274C",r.allow_dev?"\u2705":"\u274C"])}),m.success("Channels"),m.success(e.toString())}async function dN(t,e){let{data:r,error:n}=await t.from("channels").select(`
|
package/dist/package.json
CHANGED