Dot_Files/.config/raycast/extensions/6d35b3a5-ae12-48b1-b5de-616a22387eae/projects_list.js

24 lines
144 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Ns=Object.create;var yt=Object.defineProperty;var Ds=Object.getOwnPropertyDescriptor;var Ms=Object.getOwnPropertyNames;var Fs=Object.getPrototypeOf,js=Object.prototype.hasOwnProperty;var hn=e=>yt(e,"__esModule",{value:!0});var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bs=(e,t)=>{for(var r in t)yt(e,r,{get:t[r],enumerable:!0})},pn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ms(t))!js.call(e,i)&&(r||i!=="default")&&yt(e,i,{get:()=>t[i],enumerable:!(n=Ds(t,i))||n.enumerable});return e},mn=(e,t)=>pn(hn(yt(e!=null?Ns(Fs(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Us=(e=>(t,r)=>e&&e.get(t)||(r=pn(hn({}),t,1),e&&e.set(t,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var or=v((xl,ir)=>{var gn=[],Gs=gn.forEach,Ws=gn.slice;ir.exports.extend=function(e){return Gs.call(Ws.call(arguments,1),function(t){if(t)for(var r in t)e[r]=t[r]}),e};ir.exports.parseJSON=function(e){try{return JSON.parse(e)}catch{return null}}});var wn=v((bn,wt)=>{var Hs=require("https"),Vs=require("http"),sr=require("url"),vn=or(),Il=wt.exports.maxRedirects=5,yn={https:Hs,http:Vs};for(bt in yn)ie=function(){},ie.prototype=yn[bt],ie=new ie,ie.request=function(e){return function(t,r,n){n=n||{};var i=typeof t=="object"&&"maxRedirects"in t?t.maxRedirects:bn.maxRedirects,o=vn.extend({count:0,max:i,clientRequest:null,userCallback:r},n);if(o.count>o.max){var s=new Error("Max redirects exceeded. To allow more redirects, pass options.maxRedirects property.");return o.clientRequest.emit("error",s),o.clientRequest}o.count++;var a;typeof t=="string"?a=t:a=sr.format(vn.extend({protocol:bt},t));var u=Object.getPrototypeOf(e).request(t,c(a,o));o.clientRequest||(o.clientRequest=u);function c(f,l){return function(d){if(d.statusCode<300||d.statusCode>399||!("location"in d.headers))return l.userCallback(d);var h=sr.resolve(f,d.headers.location),w=sr.parse(h).protocol;return w=w.substr(0,w.length-1),wt.exports[w].get(h,c(f,l),l)}}return u}}(ie),ie.get=function(e){return function(t,r,n){var i=e.request(t,r,n);return i.end(),i}}(ie),wt.exports[bt]=ie;var ie,bt});var ar=v((Ll,Sn)=>{Sn.exports=require("stream")});var Tn=v((ql,En)=>{"use strict";function _n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_n(Object(r),!0).forEach(function(n){$s(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_n(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ks(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ys(e,t,r){return t&&Cn(e.prototype,t),r&&Cn(e,r),e}var Js=require("buffer"),St=Js.Buffer,Zs=require("util"),ur=Zs.inspect,Xs=ur&&ur.custom||"inspect";function Qs(e,t,r){St.prototype.copy.call(e,t,r)}En.exports=function(){function e(){Ks(this,e),this.head=null,this.tail=null,this.length=0}return Ys(e,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return St.alloc(0);for(var n=St.allocUnsafe(r>>>0),i=this.head,o=0;i;)Qs(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=St.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,a),r-=a,r===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:Xs,value:function(r,n){return ur(this,zs({},n,{depth:0,customInspect:!1}))}}]),e}()});var lr=v((Nl,Rn)=>{"use strict";function ea(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(fr,this,e)):process.nextTick(fr,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(_t,r):(r._writableState.errorEmitted=!0,process.nextTick(kn,r,o)):process.nextTick(kn,r,o):t?(process.nextTick(_t,r),t(o)):process.nextTick(_t,r)}),this)}function kn(e,t){fr(e,t),_t(e)}function _t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function ta(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function fr(e,t){e.emit("error",t)}function ra(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}Rn.exports={destroy:ea,undestroy:ta,errorOrDestroy:ra}});var le=v((Dl,An)=>{"use strict";var Pn={};function H(e,t,r){r||(r=Error);function n(o,s,a){return typeof t=="string"?t:t(o,s,a)}class i extends r{constructor(s,a,u){super(n(s,a,u))}}i.prototype.name=r.name,i.prototype.code=e,Pn[e]=i}function On(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(n=>String(n)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function na(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function ia(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function oa(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}H("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);H("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;typeof t=="string"&&na(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let i;if(ia(e," argument"))i=`The ${e} ${n} ${On(t,"type")}`;else{let o=oa(e,".")?"property":"argument";i=`The "${e}" ${o} ${n} ${On(t,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);H("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");H("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});H("ERR_STREAM_PREMATURE_CLOSE","Premature close");H("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});H("ERR_MULTIPLE_CALLBACK","Callback called multiple times");H("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");H("ERR_STREAM_WRITE_AFTER_END","write after end");H("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);H("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);H("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");An.exports.codes=Pn});var cr=v((Ml,xn)=>{"use strict";var sa=le().codes.ERR_INVALID_OPT_VALUE;function aa(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function ua(e,t,r,n){var i=aa(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new sa(o,i)}return Math.floor(i)}return e.objectMode?16:16*1024}xn.exports={getHighWaterMark:ua}});var In=v((Fl,dr)=>{typeof Object.create=="function"?dr.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:dr.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var ce=v((jl,pr)=>{try{if(hr=require("util"),typeof hr.inherits!="function")throw"";pr.exports=hr.inherits}catch{pr.exports=In()}var hr});var qn=v((Bl,Ln)=>{Ln.exports=require("util").deprecate});var vr=v((Ul,Bn)=>{"use strict";Bn.exports=A;function Nn(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Na(t,e)}}var Ae;A.WritableState=Ye;var fa={deprecate:qn()},Dn=ar(),Ct=require("buffer").Buffer,la=global.Uint8Array||function(){};function ca(e){return Ct.from(e)}function da(e){return Ct.isBuffer(e)||e instanceof la}var mr=lr(),ha=cr(),pa=ha.getHighWaterMark,de=le().codes,ma=de.ERR_INVALID_ARG_TYPE,ga=de.ERR_METHOD_NOT_IMPLEMENTED,va=de.ERR_MULTIPLE_CALLBACK,ya=de.ERR_STREAM_CANNOT_PIPE,ba=de.ERR_STREAM_DESTROYED,wa=de.ERR_STREAM_NULL_VALUES,Sa=de.ERR_STREAM_WRITE_AFTER_END,_a=de.ERR_UNKNOWN_ENCODING,xe=mr.errorOrDestroy;ce()(A,Dn);function Ca(){}function Ye(e,t,r){Ae=Ae||Se(),e=e||{},typeof r!="boolean"&&(r=t instanceof Ae),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=pa(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Aa(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Nn(this)}Ye.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ye.prototype,"buffer",{get:fa.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Et;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Et=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(t){return Et.call(this,t)?!0:this!==A?!1:t&&t._writableState instanceof Ye}})):Et=function(t){return t instanceof this};function A(e){Ae=Ae||Se();var t=this instanceof Ae;if(!t&&!Et.call(A,this))return new A(e);this._writableState=new Ye(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Dn.call(this)}A.prototype.pipe=function(){xe(this,new ya)};function Ea(e,t){var r=new Sa;xe(e,r),process.nextTick(t,r)}function Ta(e,t,r,n){var i;return r===null?i=new wa:typeof r!="string"&&!t.objectMode&&(i=new ma("chunk",["string","Buffer"],r)),i?(xe(e,i),process.nextTick(n,i),!1):!0}A.prototype.write=function(e,t,r){var n=this._writableState,i=!1,o=!n.objectMode&&da(e);return o&&!Ct.isBuffer(e)&&(e=ca(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=Ca),n.ending?Ea(this,r):(o||Ta(this,n,e,r))&&(n.pendingcb++,i=Ra(this,n,o,e,t,r)),i};A.prototype.cork=function(){this._writableState.corked++};A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Fn(this,e))};A.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _a(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ka(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Ct.from(t,r)),t}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ra(e,t,r,n,i,o){if(!r){var s=ka(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else gr(e,t,!1,a,n,i,o);return u}function gr(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new ba("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function Pa(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(Je,e,t),e._writableState.errorEmitted=!0,xe(e,n)):(i(n),e._writableState.errorEmitted=!0,xe(e,n),Je(e,t))}function Oa(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Aa(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new va;if(Oa(r),t)Pa(e,r,n,t,i);else{var o=jn(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Fn(e,r),n?process.nextTick(Mn,e,r,o,i):Mn(e,r,o,i)}}function Mn(e,t,r,n){r||xa(e,t),t.pendingcb--,n(),Je(e,t)}function xa(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Fn(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,gr(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Nn(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,f=r.callback,l=t.objectMode?1:u.length;if(gr(e,t,!1,l,u,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}A.prototype._write=function(e,t,r){r(new ga("_write()"))};A.prototype._writev=null;A.prototype.end=function(e,t,r){var n=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||qa(this,n,r),this};Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function jn(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Ia(e,t){e._final(function(r){t.pendingcb--,r&&xe(e,r),t.prefinished=!0,e.emit("prefinish"),Je(e,t)})}function La(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Ia,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Je(e,t){var r=jn(t);if(r&&(La(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function qa(e,t,r){t.ending=!0,Je(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function Na(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){!this._writableState||(this._writableState.destroyed=t)}});A.prototype.destroy=mr.destroy;A.prototype._undestroy=mr.undestroy;A.prototype._destroy=function(e,t){t(e)}});var Se=v((Gl,Gn)=>{"use strict";var Da=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Gn.exports=Q;var Un=wr(),yr=vr();ce()(Q,Un);for(br=Da(yr.prototype),Tt=0;Tt<br.length;Tt++)kt=br[Tt],Q.prototype[kt]||(Q.prototype[kt]=yr.prototype[kt]);var br,kt,Tt;function Q(e){if(!(this instanceof Q))return new Q(e);Un.call(this,e),yr.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Ma)))}Object.defineProperty(Q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ma(){this._writableState.ended||process.nextTick(Fa,this)}function Fa(e){e.end()}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var Vn=v((Sr,Hn)=>{var Rt=require("buffer"),ee=Rt.Buffer;function Wn(e,t){for(var r in e)t[r]=e[r]}ee.from&&ee.alloc&&ee.allocUnsafe&&ee.allocUnsafeSlow?Hn.exports=Rt:(Wn(Rt,Sr),Sr.Buffer=_e);function _e(e,t,r){return ee(e,t,r)}_e.prototype=Object.create(ee.prototype);Wn(ee,_e);_e.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ee(e,t,r)};_e.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=ee(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};_e.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ee(e)};_e.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Rt.SlowBuffer(e)}});var Er=v($n=>{"use strict";var _r=Vn().Buffer,zn=_r.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ja(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Ba(e){var t=ja(e);if(typeof t!="string"&&(_r.isEncoding===zn||!zn(e)))throw new Error("Unknown encoding: "+e);return t||e}$n.StringDecoder=Ze;function Ze(e){this.encoding=Ba(e);var t;switch(this.encoding){case"utf16le":this.text=za,this.end=$a,t=4;break;case"utf8":this.fillLast=Wa,t=4;break;case"base64":this.text=Ka,this.end=Ya,t=3;break;default:this.write=Ja,this.end=Za;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_r.allocUnsafe(t)}Ze.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Ze.prototype.end=Va;Ze.prototype.text=Ha;Ze.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Cr(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Ua(e,t,r){var n=t.length-1;if(n<r)return 0;var i=Cr(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=Cr(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=Cr(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function Ga(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Wa(e){var t=this.lastTotal-this.lastNeed,r=Ga(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Ha(e,t){var r=Ua(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function Va(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function za(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function $a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Ka(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Ya(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Ja(e){return e.toString(this.encoding)}function Za(e){return e&&e.length?this.write(e):""}});var Pt=v((Hl,Jn)=>{"use strict";var Kn=le().codes.ERR_STREAM_PREMATURE_CLOSE;function Xa(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function Qa(){}function eu(e){return e.setHeader&&typeof e.abort=="function"}function Yn(e,t,r){if(typeof t=="function")return Yn(e,null,t);t||(t={}),r=Xa(r||Qa);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||a()},s=e._writableState&&e._writableState.finished,a=function(){i=!1,s=!0,n||r.call(e)},u=e._readableState&&e._readableState.endEmitted,c=function(){n=!1,u=!0,i||r.call(e)},f=function(w){r.call(e,w)},l=function(){var w;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(w=new Kn),r.call(e,w);if(i&&!s)return(!e._writableState||!e._writableState.ended)&&(w=new Kn),r.call(e,w)},d=function(){e.req.on("finish",a)};return eu(e)?(e.on("complete",a),e.on("abort",l),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",c),e.on("finish",a),t.error!==!1&&e.on("error",f),e.on("close",l),function(){e.removeListener("complete",a),e.removeListener("abort",l),e.removeListener("request",d),e.req&&e.req.removeListener("finish",a),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",a),e.removeListener("end",c),e.removeListener("error",f),e.removeListener("close",l)}}Jn.exports=Yn});var Xn=v((Vl,Zn)=>{"use strict";var Ot;function he(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var tu=Pt(),pe=Symbol("lastResolve"),Ce=Symbol("lastReject"),Xe=Symbol("error"),At=Symbol("ended"),Ee=Symbol("lastPromise"),Tr=Symbol("handlePromise"),Te=Symbol("stream");function me(e,t){return{value:e,done:t}}function ru(e){var t=e[pe];if(t!==null){var r=e[Te].read();r!==null&&(e[Ee]=null,e[pe]=null,e[Ce]=null,t(me(r,!1)))}}function nu(e){process.nextTick(ru,e)}function iu(e,t){return function(r,n){e.then(function(){if(t[At]){r(me(void 0,!0));return}t[Tr](r,n)},n)}}var ou=Object.getPrototypeOf(function(){}),su=Object.setPrototypeOf((Ot={get stream(){return this[Te]},next:function(){var t=this,r=this[Xe];if(r!==null)return Promise.reject(r);if(this[At])return Promise.resolve(me(void 0,!0));if(this[Te].destroyed)return new Promise(function(s,a){process.nextTick(function(){t[Xe]?a(t[Xe]):s(me(void 0,!0))})});var n=this[Ee],i;if(n)i=new Promise(iu(n,this));else{var o=this[Te].read();if(o!==null)return Promise.resolve(me(o,!1));i=new Promise(this[Tr])}return this[Ee]=i,i}},he(Ot,Symbol.asyncIterator,function(){return this}),he(Ot,"return",function(){var t=this;return new Promise(function(r,n){t[Te].destroy(null,function(i){if(i){n(i);return}r(me(void 0,!0))})})}),Ot),ou),au=function(t){var r,n=Object.create(su,(r={},he(r,Te,{value:t,writable:!0}),he(r,pe,{value:null,writable:!0}),he(r,Ce,{value:null,writable:!0}),he(r,Xe,{value:null,writable:!0}),he(r,At,{value:t._readableState.endEmitted,writable:!0}),he(r,Tr,{value:function(o,s){var a=n[Te].read();a?(n[Ee]=null,n[pe]=null,n[Ce]=null,o(me(a,!1))):(n[pe]=o,n[Ce]=s)},writable:!0}),r));return n[Ee]=null,tu(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[Ce];o!==null&&(n[Ee]=null,n[pe]=null,n[Ce]=null,o(i)),n[Xe]=i;return}var s=n[pe];s!==null&&(n[Ee]=null,n[pe]=null,n[Ce]=null,s(me(void 0,!0))),n[At]=!0}),t.on("readable",nu.bind(null,n)),n};Zn.exports=au});var ri=v((zl,ti)=>{"use strict";function Qn(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(c){r(c);return}a.done?t(u):Promise.resolve(u).then(n,i)}function uu(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(u){Qn(o,n,i,s,a,"next",u)}function a(u){Qn(o,n,i,s,a,"throw",u)}s(void 0)})}}function ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ei(Object(r),!0).forEach(function(n){lu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cu=le().codes.ERR_INVALID_ARG_TYPE;function du(e,t,r){var n;if(t&&typeof t.next=="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new cu("iterable",["Iterable"],t);var i=new e(fu({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=uu(function*(){try{var u=yield n.next(),c=u.value,f=u.done;f?i.push(null):i.push(yield c)?s():o=!1}catch(l){i.destroy(l)}}),a.apply(this,arguments)}return i}ti.exports=du});var wr=v((Kl,di)=>{"use strict";di.exports=E;var Ie;E.ReadableState=ii;var $l=require("events").EventEmitter,ni=function(t,r){return t.listeners(r).length},Qe=ar(),xt=require("buffer").Buffer,hu=global.Uint8Array||function(){};function pu(e){return xt.from(e)}function mu(e){return xt.isBuffer(e)||e instanceof hu}var kr=require("util"),_;kr&&kr.debuglog?_=kr.debuglog("stream"):_=function(){};var gu=Tn(),Rr=lr(),vu=cr(),yu=vu.getHighWaterMark,It=le().codes,bu=It.ERR_INVALID_ARG_TYPE,wu=It.ERR_STREAM_PUSH_AFTER_EOF,Su=It.ERR_METHOD_NOT_IMPLEMENTED,_u=It.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Le,Pr,Or;ce()(E,Qe);var et=Rr.errorOrDestroy,Ar=["error","close","destroy","pause","resume"];function Cu(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function ii(e,t,r){Ie=Ie||Se(),e=e||{},typeof r!="boolean"&&(r=t instanceof Ie),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=yu(this,e,"readableHighWaterMark",r),this.buffer=new gu,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Le||(Le=Er().StringDecoder),this.decoder=new Le(e.encoding),this.encoding=e.encoding)}function E(e){if(Ie=Ie||Se(),!(this instanceof E))return new E(e);var t=this instanceof Ie;this._readableState=new ii(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Qe.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){!this._readableState||(this._readableState.destroyed=t)}});E.prototype.destroy=Rr.destroy;E.prototype._undestroy=Rr.undestroy;E.prototype._destroy=function(e,t){t(e)};E.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=xt.from(e,t),t=""),n=!0),oi(this,e,t,!1,n)};E.prototype.unshift=function(e){return oi(this,e,null,!0,!1)};function oi(e,t,r,n,i){_("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,ku(e,o);else{var s;if(i||(s=Eu(o,t)),s)et(e,s);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==xt.prototype&&(t=pu(t)),n)o.endEmitted?et(e,new _u):xr(e,o,t,!0);else if(o.ended)et(e,new wu);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?xr(e,o,t,!1):Ir(e,o)):xr(e,o,t,!1)}else n||(o.reading=!1,Ir(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function xr(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Lt(e)),Ir(e,t)}function Eu(e,t){var r;return!mu(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new bu("chunk",["string","Buffer","Uint8Array"],t)),r}E.prototype.isPaused=function(){return this._readableState.flowing===!1};E.prototype.setEncoding=function(e){Le||(Le=Er().StringDecoder);var t=new Le(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var si=1073741824;function Tu(e){return e>=si?e=si:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function ai(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Tu(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}E.prototype.read=function(e){_("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?qr(this):Lt(this),null;if(e=ai(e,t),e===0&&t.ended)return t.length===0&&qr(this),null;var n=t.needReadable;_("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,_("length less than watermark",n)),t.ended||t.reading?(n=!1,_("reading or ended",n)):n&&(_("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=ai(r,t)));var i;return e>0?i=li(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&qr(this)),i!==null&&this.emit("data",i),i};function ku(e,t){if(_("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Lt(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ui(e)))}}function Lt(e){var t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ui,e))}function ui(e){var t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Lr(e)}function Ir(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Ru,e,t))}function Ru(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(_("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}E.prototype._read=function(e){et(this,new Su("_read()"))};E.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,_("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=i?a:S;n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",s);function s(y,p){_("onunpipe"),y===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,f())}function a(){_("onend"),e.end()}var u=Pu(r);e.on("drain",u);var c=!1;function f(){_("cleanup"),e.removeListener("close",h),e.removeListener("finish",w),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",S),r.removeListener("data",l),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}r.on("data",l);function l(y){_("ondata");var p=e.write(y);_("dest.write",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&ci(n.pipes,e)!==-1)&&!c&&(_("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(y){_("onerror",y),S(),e.removeListener("error",d),ni(e,"error")===0&&et(e,y)}Cu(e,"error",d);function h(){e.removeListener("finish",w),S()}e.once("close",h);function w(){_("onfinish"),e.removeListener("close",h),S()}e.once("finish",w);function S(){_("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(_("pipe resume"),r.resume()),e};function Pu(e){return function(){var r=e._readableState;_("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&ni(e,"data")&&(r.flowing=!0,Lr(e))}}E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=ci(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};E.prototype.on=function(e,t){var r=Qe.prototype.on.call(this,e,t),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,_("on readable",n.length,n.reading),n.length?Lt(this):n.reading||process.nextTick(Ou,this)),r};E.prototype.addListener=E.prototype.on;E.prototype.removeListener=function(e,t){var r=Qe.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(fi,this),r};E.prototype.removeAllListeners=function(e){var t=Qe.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(fi,this),t};function fi(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Ou(e){_("readable nexttick read 0"),e.read(0)}E.prototype.resume=function(){var e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,Au(this,e)),e.paused=!1,this};function Au(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(xu,e,t))}function xu(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Lr(e),t.flowing&&!t.reading&&e.read(0)}E.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Lr(e){var t=e._readableState;for(_("flow",t.flowing);t.flowing&&e.read()!==null;);}E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(_("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(_("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=t.push(s);a||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(a){return function(){return e[a].apply(e,arguments)}}(i));for(var o=0;o<Ar.length;o++)e.on(Ar[o],this.emit.bind(this,Ar[o]));return this._read=function(s){_("wrapped _read",s),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(E.prototype[Symbol.asyncIterator]=function(){return Pr===void 0&&(Pr=Xn()),Pr(this)});Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});E._fromList=li;Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function li(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function qr(e){var t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(Iu,t,e))}function Iu(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(E.from=function(e,t){return Or===void 0&&(Or=ri()),Or(E,e,t)});function ci(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var Nr=v((Yl,pi)=>{"use strict";pi.exports=oe;var qt=le().codes,Lu=qt.ERR_METHOD_NOT_IMPLEMENTED,qu=qt.ERR_MULTIPLE_CALLBACK,Nu=qt.ERR_TRANSFORM_ALREADY_TRANSFORMING,Du=qt.ERR_TRANSFORM_WITH_LENGTH_0,Nt=Se();ce()(oe,Nt);function Mu(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new qu);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function oe(e){if(!(this instanceof oe))return new oe(e);Nt.call(this,e),this._transformState={afterTransform:Mu.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Fu)}function Fu(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){hi(e,t,r)}):hi(this,null,null)}oe.prototype.push=function(e,t){return this._transformState.needTransform=!1,Nt.prototype.push.call(this,e,t)};oe.prototype._transform=function(e,t,r){r(new Lu("_transform()"))};oe.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};oe.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};oe.prototype._destroy=function(e,t){Nt.prototype._destroy.call(this,e,function(r){t(r)})};function hi(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Du;if(e._transformState.transforming)throw new Nu;return e.push(null)}});var vi=v((Jl,gi)=>{"use strict";gi.exports=tt;var mi=Nr();ce()(tt,mi);function tt(e){if(!(this instanceof tt))return new tt(e);mi.call(this,e)}tt.prototype._transform=function(e,t,r){r(null,e)}});var _i=v((Zl,Si)=>{"use strict";var Dr;function ju(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var yi=le().codes,Bu=yi.ERR_MISSING_ARGS,Uu=yi.ERR_STREAM_DESTROYED;function bi(e){if(e)throw e}function Gu(e){return e.setHeader&&typeof e.abort=="function"}function Wu(e,t,r,n){n=ju(n);var i=!1;e.on("close",function(){i=!0}),Dr===void 0&&(Dr=Pt()),Dr(e,{readable:t,writable:r},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,Gu(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(s||new Uu("pipe"))}}}function wi(e){e()}function Hu(e,t){return e.pipe(t)}function Vu(e){return!e.length||typeof e[e.length-1]!="function"?bi:e.pop()}function zu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Vu(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Bu("streams");var i,o=t.map(function(s,a){var u=a<t.length-1,c=a>0;return Wu(s,u,c,function(f){i||(i=f),f&&o.forEach(wi),!u&&(o.forEach(wi),n(i))})});return t.reduce(Hu)}Si.exports=zu});var ke=v((V,nt)=>{var rt=require("stream");process.env.READABLE_STREAM==="disable"&&rt?(nt.exports=rt.Readable,Object.assign(nt.exports,rt),nt.exports.Stream=rt):(V=nt.exports=wr(),V.Stream=rt||V,V.Readable=V,V.Writable=vr(),V.Duplex=Se(),V.Transform=Nr(),V.PassThrough=vi(),V.finished=Pt(),V.pipeline=_i())});var Ti=v((Xl,Ei)=>{Ei.exports=se;var $u=require("util"),Ci=ke();$u.inherits(se,Ci.Duplex);function se(e,t,r){var n=this;if(!(n instanceof se))return new se(e,t,r);Ci.Duplex.call(n,r),n._output=null,n.connect(e,t)}se.prototype.connect=function(e,t){var r=this;r.req=e,r._output=t,r.emit("response",t),t.on("data",function(n){r.push(n)||r._output.pause()}),t.on("end",function(){r.push(null)})};se.prototype._read=function(e){this._output&&this._output.resume()};se.prototype._write=function(e,t,r){this.req.write(e,t),r()};se.prototype.end=function(e,t,r){return this._output.socket.destroy(),this.req.end(e,t,r)};se.prototype.destroy=function(){this.req.destroy(),this._output.socket.destroy()}});var Ri=v((Ql,ki)=>{var qe=1e3,Ne=qe*60,De=Ne*60,Re=De*24,Ku=Re*7,Yu=Re*365.25;ki.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Ju(e);if(r==="number"&&isFinite(e))return t.long?Xu(e):Zu(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Ju(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Yu;case"weeks":case"week":case"w":return r*Ku;case"days":case"day":case"d":return r*Re;case"hours":case"hour":case"hrs":case"hr":case"h":return r*De;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ne;case"seconds":case"second":case"secs":case"sec":case"s":return r*qe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Zu(e){var t=Math.abs(e);return t>=Re?Math.round(e/Re)+"d":t>=De?Math.round(e/De)+"h":t>=Ne?Math.round(e/Ne)+"m":t>=qe?Math.round(e/qe)+"s":e+"ms"}function Xu(e){var t=Math.abs(e);return t>=Re?Dt(e,t,Re,"day"):t>=De?Dt(e,t,De,"hour"):t>=Ne?Dt(e,t,Ne,"minute"):t>=qe?Dt(e,t,qe,"second"):e+" ms"}function Dt(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var Mr=v((ec,Pi)=>{function Qu(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=s,r.humanize=Ri(),r.destroy=c,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(f){let l=0;for(let d=0;d<f.length;d++)l=(l<<5)-l+f.charCodeAt(d),l|=0;return r.colors[Math.abs(l)%r.colors.length]}r.selectColor=t;function r(f){let l,d=null,h,w;function S(...y){if(!S.enabled)return;let p=S,b=Number(new Date),g=b-(l||b);p.diff=g,p.prev=l,p.curr=b,l=b,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let k=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(X,$e)=>{if(X==="%%")return"%";k++;let fe=r.formatters[$e];if(typeof fe=="function"){let Ke=y[k];X=fe.call(p,Ke),y.splice(k,1),k--}return X}),r.formatArgs.call(p,y),(p.log||r.log).apply(p,y)}return S.namespace=f,S.useColors=r.useColors(),S.color=r.selectColor(f),S.extend=n,S.destroy=r.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,w=r.enabled(f)),w),set:y=>{d=y}}),typeof r.init=="function"&&r.init(S),S}function n(f,l){let d=r(this.namespace+(typeof l=="undefined"?":":l)+f);return d.log=this.log,d}function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let l,d=(typeof f=="string"?f:"").split(/[\s,]+/),h=d.length;for(l=0;l<h;l++)!d[l]||(f=d[l].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.substr(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}function o(){let f=[...r.names.map(a),...r.skips.map(a).map(l=>"-"+l)].join(",");return r.enable(""),f}function s(f){if(f[f.length-1]==="*")return!0;let l,d;for(l=0,d=r.skips.length;l<d;l++)if(r.skips[l].test(f))return!1;for(l=0,d=r.names.length;l<d;l++)if(r.names[l].test(f))return!0;return!1}function a(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function u(f){return f instanceof Error?f.stack||f.message:f}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Pi.exports=Qu});var Oi=v((B,Mt)=>{B.formatArgs=tf;B.save=rf;B.load=nf;B.useColors=ef;B.storage=of();B.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();B.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ef(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function tf(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Mt.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}B.log=console.debug||console.log||(()=>{});function rf(e){try{e?B.storage.setItem("debug",e):B.storage.removeItem("debug")}catch{}}function nf(){let e;try{e=B.storage.getItem("debug")}catch{}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}function of(){try{return localStorage}catch{}}Mt.exports=Mr()(B);var{formatters:sf}=Mt.exports;sf.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var xi=v((tc,Ai)=>{"use strict";Ai.exports=(e,t)=>{t=t||process.argv;let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Li=v((rc,Ii)=>{"use strict";var af=require("os"),Y=xi(),L=process.env,Me;Y("no-color")||Y("no-colors")||Y("color=false")?Me=!1:(Y("color")||Y("colors")||Y("color=true")||Y("color=always"))&&(Me=!0);"FORCE_COLOR"in L&&(Me=L.FORCE_COLOR.length===0||parseInt(L.FORCE_COLOR,10)!==0);function uf(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ff(e){if(Me===!1)return 0;if(Y("color=16m")||Y("color=full")||Y("color=truecolor"))return 3;if(Y("color=256"))return 2;if(e&&!e.isTTY&&Me!==!0)return 0;let t=Me?1:0;if(process.platform==="win32"){let r=af.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in L)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in L)||L.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in L)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(L.TEAMCITY_VERSION)?1:0;if(L.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in L){let r=parseInt((L.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(L.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(L.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(L.TERM)||"COLORTERM"in L?1:(L.TERM==="dumb",t)}function Fr(e){let t=ff(e);return uf(t)}Ii.exports={supportsColor:Fr,stdout:Fr(process.stdout),stderr:Fr(process.stderr)}});var Ni=v((I,jt)=>{var lf=require("tty"),Ft=require("util");I.init=vf;I.log=pf;I.formatArgs=df;I.save=mf;I.load=gf;I.useColors=cf;I.destroy=Ft.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");I.colors=[6,2,3,4,5,1];try{let e=Li();e&&(e.stderr||e).level>=2&&(I.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}I.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function cf(){return"colors"in I.inspectOpts?Boolean(I.inspectOpts.colors):lf.isatty(process.stderr.fd)}function df(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} `;e[0]=o+e[0].split(`
`).join(`
`+o),e.push(i+"m+"+jt.exports.humanize(this.diff)+"")}else e[0]=hf()+t+" "+e[0]}function hf(){return I.inspectOpts.hideDate?"":new Date().toISOString()+" "}function pf(...e){return process.stderr.write(Ft.format(...e)+`
`)}function mf(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function gf(){return process.env.DEBUG}function vf(e){e.inspectOpts={};let t=Object.keys(I.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=I.inspectOpts[t[r]]}jt.exports=Mr()(I);var{formatters:qi}=jt.exports;qi.o=function(e){return this.inspectOpts.colors=this.useColors,Ft.inspect(e,this.inspectOpts).split(`
`).map(t=>t.trim()).join(" ")};qi.O=function(e){return this.inspectOpts.colors=this.useColors,Ft.inspect(e,this.inspectOpts)}});var Di=v((nc,jr)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?jr.exports=Oi():jr.exports=Ni()});var Fi=v((ic,Mi)=>{var yf=require("fs");Mi.exports=function(e,t,r){t=typeof t!="undefined"?t:`
`,r=typeof r!="undefined"?r:"utf8";var n=[],i=yf.readFileSync(e,r);if(i.indexOf("-END CERTIFICATE-")<0||i.indexOf("-BEGIN CERTIFICATE-")<0)throw Error("File does not contain 'BEGIN CERTIFICATE' or 'END CERTIFICATE'");i=i.split(t);var o=[],s,a;for(s=0,a=i.length;s<a;s++){var u=i[s];u.length!==0&&(o.push(u),u.match(/-END CERTIFICATE-/)&&(n.push(o.join(t)),o=[]))}return n}});var Ui=v((oc,Bi)=>{var bf=require("querystring"),wf=wn(),Br=require("fs"),Bt=require("path"),Fe=require("url"),Sf=Ti(),Ut=Di()("modem"),ji=or(),_f=require("util"),Fe=require("url"),Cf=Fi(),Ef=require("os").type()==="Windows_NT",Tf=function(){var e,t={};if(!process.env.DOCKER_HOST)t.socketPath=Ef?"//./pipe/docker_engine":"/var/run/docker.sock";else if(process.env.DOCKER_HOST.indexOf("unix://")===0)t.socketPath=process.env.DOCKER_HOST.substring(7)||"/var/run/docker.sock";else if(process.env.DOCKER_HOST.indexOf("npipe://")===0)t.socketPath=process.env.DOCKER_HOST.substring(8)||"//./pipe/docker_engine";else{var r=process.env.DOCKER_HOST;r.indexOf("//")<0&&(r="tcp://"+r);try{e=new Fe.URL(r)}catch{throw new Error("DOCKER_HOST env variable should be something like tcp://localhost:1234")}t.port=e.port,process.env.DOCKER_TLS_VERIFY==="1"||t.port==="2376"?t.protocol="https":t.protocol="http",t.host=e.hostname,process.env.DOCKER_CERT_PATH&&(t.ca=Cf(Bt.join(process.env.DOCKER_CERT_PATH,"ca.pem")),t.cert=Br.readFileSync(Bt.join(process.env.DOCKER_CERT_PATH,"cert.pem")),t.key=Br.readFileSync(Bt.join(process.env.DOCKER_CERT_PATH,"key.pem"))),process.env.DOCKER_CLIENT_TIMEOUT&&(t.timeout=parseInt(process.env.DOCKER_CLIENT_TIMEOUT,10))}return t},Pe=function(e){var t=Tf(),r=Object.assign({},t,e);this.host=r.host,this.host||(this.socketPath=r.socketPath),this.port=r.port,this.username=r.username,this.password=r.password,this.version=r.version,this.key=r.key,this.cert=r.cert,this.ca=r.ca,this.timeout=r.timeout,this.connectionTimeout=r.connectionTimeout,this.checkServerIdentity=r.checkServerIdentity,this.agent=r.agent,this.headers=r.headers||{},this.key&&this.cert&&this.ca&&(this.protocol="https"),this.protocol=r.protocol||this.protocol||"http"};Pe.prototype.dial=function(e,t){var r,n,i,o=this;if(e.options&&(r=e.options),r&&r.authconfig&&delete r.authconfig,r&&r.abortSignal&&delete r.abortSignal,this.version&&(e.path="/"+this.version+e.path),this.host){var s=Fe.parse(o.host);n=Fe.format({protocol:s.protocol||o.protocol,hostname:s.hostname||o.host,port:o.port}),n=Fe.resolve(n,e.path)}else n=e.path;e.path.indexOf("?")!==-1&&(r&&Object.keys(r).length>0?n+=this.buildQuerystring(r._query||r):n=n.substring(0,n.length-1));var a={path:n,method:e.method,headers:e.headers||Object.assign({},o.headers),key:o.key,cert:o.cert,ca:o.ca};if(this.checkServerIdentity&&(a.checkServerIdentity=this.checkServerIdentity),this.agent&&(a.agent=this.agent),e.authconfig&&(a.headers["X-Registry-Auth"]=e.authconfig.key||e.authconfig.base64||Buffer.from(JSON.stringify(e.authconfig)).toString("base64")),e.registryconfig&&(a.headers["X-Registry-Config"]=e.registryconfig.base64||Buffer.from(JSON.stringify(e.registryconfig)).toString("base64")),e.abortSignal&&(a.signal=e.abortSignal),e.file?(typeof e.file=="string"?i=Br.createReadStream(Bt.resolve(e.file)):i=e.file,a.headers["Content-Type"]="application/tar"):r&&e.method==="POST"&&(i=JSON.stringify(r._body||r),e.allowEmpty||i!=="{}"&&i!=='""'?a.headers["Content-Type"]="application/json":i=void 0),typeof i=="string"?a.headers["Content-Length"]=Buffer.byteLength(i):Buffer.isBuffer(i)===!0?a.headers["Content-Length"]=i.length:(a.method==="PUT"||e.hijack||e.openStdin)&&(a.headers["Transfer-Encoding"]="chunked"),e.hijack&&(a.headers.Connection="Upgrade",a.headers.Upgrade="tcp"),this.socketPath)a.socketPath=this.socketPath;else{var u=Fe.parse(n);a.hostname=u.hostname,a.port=u.port,a.path=u.path}this.buildRequest(a,e,i,t)};Pe.prototype.buildRequest=function(e,t,r,n){var i=this,o,s=wf[i.protocol].request(e,function(){});Ut("Sending: %s",_f.inspect(e,{showHidden:!0,depth:null})),i.connectionTimeout&&(o=setTimeout(function(){Ut("Connection Timeout of %s ms exceeded",i.connectionTimeout),s.abort()},i.connectionTimeout)),i.timeout&&s.on("socket",function(a){a.setTimeout(i.timeout),a.on("timeout",function(){Ut("Timeout of %s ms exceeded",i.timeout),s.abort()})}),t.hijack===!0&&(clearTimeout(o),s.on("upgrade",function(a,u,c){return n(null,u)})),s.on("connect",function(){clearTimeout(o)}),s.on("disconnect",function(){clearTimeout(o)}),s.on("response",function(a){if(clearTimeout(o),t.isStream===!0)i.buildPayload(null,t.isStream,t.statusCodes,t.openStdin,s,a,null,n);else{var u=[];a.on("data",function(c){u.push(c)}),a.on("end",function(){var c=Buffer.concat(u),f=c.toString();Ut("Received: %s",f);var l=ji.parseJSON(f)||c;i.buildPayload(null,t.isStream,t.statusCodes,!1,s,a,l,n)})}}),s.on("error",function(a){clearTimeout(o),i.buildPayload(a,t.isStream,t.statusCodes,!1,{},{},null,n)}),typeof r=="string"||Buffer.isBuffer(r)?s.write(r):r&&(r.on("error",function(a){s.destroy(a)}),r.pipe(s)),!t.hijack&&!t.openStdin&&(typeof r=="string"||r===void 0||Buffer.isBuffer(r))&&s.end()};Pe.prototype.buildPayload=function(e,t,r,n,i,o,s,a){if(e)return a(e,null);r[o.statusCode]!==!0?u(t,o,s,function(c,f){var l=new Error("(HTTP code "+o.statusCode+") "+(r[o.statusCode]||"unexpected")+" - "+(f.message||f)+" ");l.reason=r[o.statusCode],l.statusCode=o.statusCode,l.json=s,a(l,null)}):n?a(null,new Sf(i,o)):t?a(null,o):a(null,s);function u(c,f,l,d){var h="";c?(f.on("data",function(w){h+=w}),f.on("end",function(){d(null,ji.parseJSON(h)||h)})):d(null,l)}};Pe.prototype.demuxStream=function(e,t,r){var n=null,i=null,o=Buffer.from("");function s(u){if(u&&(o=Buffer.concat([o,u])),n){if(o.length>=i){var f=a(i);n===1?t.write(f):r.write(f),n=null,s()}}else if(o.length>=8){var c=a(8);n=c.readUInt8(0),i=c.readUInt32BE(4),s()}}function a(u){var c=o.slice(0,u);return o=Buffer.from(o.slice(u,o.length)),c}e.on("data",s)};Pe.prototype.followProgress=function(e,t,r){var n="",i=[],o=!1;e.on("data",s),e.on("error",a),e.on("end",u),e.on("close",u);function s(c){n+=c.toString(),f();function f(){for(var d;(d=n.indexOf(`
`))>=0;){if(d==0){n=n.slice(1);continue}l(n.slice(0,d)),n=n.slice(d+1)}}function l(d){if(d[d.length-1]=="\r"&&(d=d.substr(0,d.length-1)),d.length>0){var h=JSON.parse(d);i.push(h),r&&r(h)}}}function a(c){o=!0,e.removeListener("data",s),e.removeListener("error",a),e.removeListener("end",u),e.removeListener("close",u),t(c,i)}function u(){o||t(null,i),o=!0}};Pe.prototype.buildQuerystring=function(e){var t={};return Object.keys(e).map(function(r,n){e[r]&&typeof e[r]=="object"&&!Array.isArray(e[r])||r==="cachefrom"?t[r]=JSON.stringify(e[r]):t[r]=e[r]}),bf.stringify(t)};Bi.exports=Pe});var Ki=v((sc,$i)=>{"use strict";var z=require("fs"),Oe=require("path"),kf=z.lchown?"lchown":"chown",Rf=z.lchownSync?"lchownSync":"chownSync",Gi=z.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),Wi=(e,t,r)=>{try{return z[Rf](e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},Pf=(e,t,r)=>{try{return z.chownSync(e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},Of=Gi?(e,t,r,n)=>i=>{!i||i.code!=="EISDIR"?n(i):z.chown(e,t,r,n)}:(e,t,r,n)=>n,Ur=Gi?(e,t,r)=>{try{return Wi(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;Pf(e,t,r)}}:(e,t,r)=>Wi(e,t,r),Af=process.version,Hi=(e,t,r)=>z.readdir(e,t,r),xf=(e,t)=>z.readdirSync(e,t);/^v4\./.test(Af)&&(Hi=(e,t,r)=>z.readdir(e,r));var Gt=(e,t,r,n)=>{z[kf](e,t,r,Of(e,t,r,i=>{n(i&&i.code!=="ENOENT"?i:null)}))},Vi=(e,t,r,n,i)=>{if(typeof t=="string")return z.lstat(Oe.resolve(e,t),(o,s)=>{if(o)return i(o.code!=="ENOENT"?o:null);s.name=t,Vi(e,s,r,n,i)});if(t.isDirectory())Gr(Oe.resolve(e,t.name),r,n,o=>{if(o)return i(o);let s=Oe.resolve(e,t.name);Gt(s,r,n,i)});else{let o=Oe.resolve(e,t.name);Gt(o,r,n,i)}},Gr=(e,t,r,n)=>{Hi(e,{withFileTypes:!0},(i,o)=>{if(i){if(i.code==="ENOENT")return n();if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return n(i)}if(i||!o.length)return Gt(e,t,r,n);let s=o.length,a=null,u=c=>{if(!a){if(c)return n(a=c);if(--s===0)return Gt(e,t,r,n)}};o.forEach(c=>Vi(e,c,t,r,u))})},If=(e,t,r,n)=>{if(typeof t=="string")try{let i=z.lstatSync(Oe.resolve(e,t));i.name=t,t=i}catch(i){if(i.code==="ENOENT")return;throw i}t.isDirectory()&&zi(Oe.resolve(e,t.name),r,n),Ur(Oe.resolve(e,t.name),r,n)},zi=(e,t,r)=>{let n;try{n=xf(e,{withFileTypes:!0})}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR"||i.code==="ENOTSUP")return Ur(e,t,r);throw i}return n&&n.length&&n.forEach(i=>If(e,i,t,r)),Ur(e,t,r)};$i.exports=Gr;Gr.sync=zi});var Zi=v((ac,Ji)=>{"use strict";var{Buffer:J}=require("buffer"),Yi=Symbol.for("BufferList");function P(e){if(!(this instanceof P))return new P(e);P._init.call(this,e)}P._init=function(t){Object.defineProperty(this,Yi,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};P.prototype._new=function(t){return new P(t)};P.prototype._offset=function(t){if(t===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let i=r+this._bufs[n].length;if(t<i||n===this._bufs.length-1)return[n,t-r];r=i}};P.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let n=0;n<t;n++)r+=this._bufs[n].length;return r};P.prototype.get=function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]};P.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};P.prototype.copy=function(t,r,n,i){if((typeof n!="number"||n<0)&&(n=0),(typeof i!="number"||i>this.length)&&(i=this.length),n>=this.length||i<=0)return t||J.alloc(0);let o=!!t,s=this._offset(n),a=i-n,u=a,c=o&&r||0,f=s[1];if(n===0&&i===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:J.concat(this._bufs,this.length);for(let l=0;l<this._bufs.length;l++)this._bufs[l].copy(t,c),c+=this._bufs[l].length;return t}if(u<=this._bufs[s[0]].length-f)return o?this._bufs[s[0]].copy(t,r,f,f+u):this._bufs[s[0]].slice(f,f+u);o||(t=J.allocUnsafe(a));for(let l=s[0];l<this._bufs.length;l++){let d=this._bufs[l].length-f;if(u>d)this._bufs[l].copy(t,c,f),c+=d;else{this._bufs[l].copy(t,c,f,f+u),c+=d;break}u-=d,f&&(f=0)}return t.length>c?t.slice(0,c):t};P.prototype.shallowSlice=function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let n=this._offset(t),i=this._offset(r),o=this._bufs.slice(n[0],i[0]+1);return i[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,i[1]),n[1]!==0&&(o[0]=o[0].slice(n[1])),this._new(o)};P.prototype.toString=function(t,r,n){return this.slice(r,n).toString(t)};P.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};P.prototype.duplicate=function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t};P.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(J.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(J.from(t));return this};P.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};P.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=J.from([e]):typeof e=="string"?e=J.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=J.from(e.buffer,e.byteOffset,e.byteLength):J.isBuffer(e)||(e=J.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let n=this._offset(t),i=n[0],o=n[1];for(;i<this._bufs.length;i++){let s=this._bufs[i];for(;o<s.length;)if(s.length-o>=e.length){let u=s.indexOf(e,o);if(u!==-1)return this._reverseOffset([i,u]);o=s.length-e.length+1}else{let u=this._reverseOffset([i,o]);if(this._match(u,e))return u;o++}o=0}return-1};P.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?P.prototype[r]=function(n,i){return this.slice(n,n+i)[r](0,i)}:P.prototype[r]=function(n=0){return this.slice(n,n+e[r])[r](0)}})(t)})();P.prototype._isBufferList=function(t){return t instanceof P||P.isBufferList(t)};P.isBufferList=function(t){return t!=null&&t[Yi]};Ji.exports=P});var Xi=v((uc,Wt)=>{"use strict";var Wr=ke().Duplex,Lf=ce(),it=Zi();function q(e){if(!(this instanceof q))return new q(e);if(typeof e=="function"){this._callback=e;let t=function(n){this._callback&&(this._callback(n),this._callback=null)}.bind(this);this.on("pipe",function(n){n.on("error",t)}),this.on("unpipe",function(n){n.removeListener("error",t)}),e=null}it._init.call(this,e),Wr.call(this)}Lf(q,Wr);Object.assign(q.prototype,it.prototype);q.prototype._new=function(t){return new q(t)};q.prototype._write=function(t,r,n){this._appendBuffer(t),typeof n=="function"&&n()};q.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};q.prototype.end=function(t){Wr.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};q.prototype._destroy=function(t,r){this._bufs.length=0,this.length=0,r(t)};q.prototype._isBufferList=function(t){return t instanceof q||t instanceof it||q.isBufferList(t)};q.isBufferList=it.isBufferList;Wt.exports=q;Wt.exports.BufferListStream=q;Wt.exports.BufferList=it});var zr=v(Be=>{var qf=Buffer.alloc,Nf="0000000000000000000",Df="7777777777777777777",Qi="0".charCodeAt(0),eo=Buffer.from("ustar\0","binary"),Mf=Buffer.from("00","binary"),Ff=Buffer.from("ustar ","binary"),jf=Buffer.from(" \0","binary"),Bf=parseInt("7777",8),ot=257,Hr=263,Uf=function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},Gf=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},Wf=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},to=function(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n},ro=function(e){for(var t=8*32,r=0;r<148;r++)t+=e[r];for(var n=156;n<512;n++)t+=e[n];return t},ge=function(e,t){return e=e.toString(8),e.length>t?Df.slice(0,t)+" ":Nf.slice(0,t-e.length)+e+" "};function Hf(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],n=e.length-1;n>0;n--){var i=e[n];t?r.push(i):r.push(255-i)}var o=0,s=r.length;for(n=0;n<s;n++)o+=r[n]*Math.pow(256,n);return t?o:-1*o}var ve=function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return Hf(e);for(;t<e.length&&e[t]===32;)t++;for(var n=Uf(to(e,32,t,e.length),e.length,e.length);t<n&&e[t]===0;)t++;return n===t?0:parseInt(e.slice(t,n).toString(),8)},je=function(e,t,r,n){return e.slice(t,to(e,0,t,t+r)).toString(n)},Vr=function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e};Be.decodeLongPath=function(e,t){return je(e,0,e.length,t)};Be.encodePax=function(e){var t="";e.name&&(t+=Vr(" path="+e.name+`
`)),e.linkname&&(t+=Vr(" linkpath="+e.linkname+`
`));var r=e.pax;if(r)for(var n in r)t+=Vr(" "+n+"="+r[n]+`
`);return Buffer.from(t)};Be.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var n=parseInt(e.slice(0,r).toString(),10);if(!n)return t;var i=e.slice(r+1,n-1).toString(),o=i.indexOf("=");if(o===-1)return t;t[i.slice(0,o)]=i.slice(o+1),e=e.slice(n)}return t};Be.encode=function(e){var t=qf(512),r=e.name,n="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var i=r.indexOf("/");if(i===-1)return null;n+=n?"/"+r.slice(0,i):r.slice(0,i),r=r.slice(i+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(ge(e.mode&Bf,6),100),t.write(ge(e.uid,6),108),t.write(ge(e.gid,6),116),t.write(ge(e.size,11),124),t.write(ge(e.mtime.getTime()/1e3|0,11),136),t[156]=Qi+Wf(e.type),e.linkname&&t.write(e.linkname,157),eo.copy(t,ot),Mf.copy(t,Hr),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(ge(e.devmajor||0,6),329),t.write(ge(e.devminor||0,6),337),n&&t.write(n,345),t.write(ge(ro(t),6),148),t)};Be.decode=function(e,t,r){var n=e[156]===0?0:e[156]-Qi,i=je(e,0,100,t),o=ve(e,100,8),s=ve(e,108,8),a=ve(e,116,8),u=ve(e,124,12),c=ve(e,136,12),f=Gf(n),l=e[157]===0?null:je(e,157,100,t),d=je(e,265,32),h=je(e,297,32),w=ve(e,329,8),S=ve(e,337,8),y=ro(e);if(y===8*32)return null;if(y!==ve(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(eo.compare(e,ot,ot+6)===0)e[345]&&(i=je(e,345,155,t)+"/"+i);else if(!(Ff.compare(e,ot,ot+6)===0&&jf.compare(e,Hr,Hr+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return n===0&&i&&i[i.length-1]==="/"&&(n=5),{name:i,mode:o,uid:s,gid:a,size:u,mtime:new Date(1e3*c),type:f,linkname:l,uname:d,gname:h,devmajor:w,devminor:S}}});var fo=v((lc,uo)=>{var no=require("util"),Vf=Xi(),st=zr(),io=ke().Writable,oo=ke().PassThrough,so=function(){},ao=function(e){return e&=511,e&&512-e},zf=function(e,t){var r=new Ht(e,t);return r.end(),r},$f=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},Ht=function(e,t){this._parent=e,this.offset=t,oo.call(this,{autoDestroy:!1})};no.inherits(Ht,oo);Ht.prototype.destroy=function(e){this._parent.destroy(e)};var ae=function(e){if(!(this instanceof ae))return new ae(e);io.call(this,e),e=e||{},this._offset=0,this._buffer=Vf(),this._missing=0,this._partial=!1,this._onparse=so,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,n=function(){t._continue()},i=function(d){if(t._locked=!1,d)return t.destroy(d);t._stream||n()},o=function(){t._stream=null;var d=ao(t._header.size);d?t._parse(d,s):t._parse(512,l),t._locked||n()},s=function(){t._buffer.consume(ao(t._header.size)),t._parse(512,l),n()},a=function(){var d=t._header.size;t._paxGlobal=st.decodePax(r.slice(0,d)),r.consume(d),o()},u=function(){var d=t._header.size;t._pax=st.decodePax(r.slice(0,d)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(d),o()},c=function(){var d=t._header.size;this._gnuLongPath=st.decodeLongPath(r.slice(0,d),e.filenameEncoding),r.consume(d),o()},f=function(){var d=t._header.size;this._gnuLongLinkPath=st.decodeLongPath(r.slice(0,d),e.filenameEncoding),r.consume(d),o()},l=function(){var d=t._offset,h;try{h=t._header=st.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(w){t.emit("error",w)}if(r.consume(512),!h){t._parse(512,l),n();return}if(h.type==="gnu-long-path"){t._parse(h.size,c),n();return}if(h.type==="gnu-long-link-path"){t._parse(h.size,f),n();return}if(h.type==="pax-global-header"){t._parse(h.size,a),n();return}if(h.type==="pax-header"){t._parse(h.size,u),n();return}if(t._gnuLongPath&&(h.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(h.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=h=$f(h,t._pax),t._pax=null),t._locked=!0,!h.size||h.type==="directory"){t._parse(512,l),t.emit("entry",h,zf(t,d),i);return}t._stream=new Ht(t,d),t.emit("entry",h,t._stream,i),t._parse(h.size,o),n()};this._onheader=l,this._parse(512,l)};no.inherits(ae,io);ae.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};ae.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};ae.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=so,this._overflow?this._write(this._overflow,void 0,e):e()}};ae.prototype._write=function(e,t,r){if(!this._destroyed){var n=this._stream,i=this._buffer,o=this._missing;if(e.length&&(this._partial=!0),e.length<o)return this._missing-=e.length,this._overflow=null,n?n.write(e,r):(i.append(e),r());this._cb=r,this._missing=0;var s=null;e.length>o&&(s=e.slice(o),e=e.slice(0,o)),n?n.end(e):i.append(e),this._overflow=s,this._onparse()}};ae.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};uo.exports=ae});var co=v((cc,lo)=>{lo.exports=require("fs").constants||require("constants")});var mo=v((dc,po)=>{po.exports=ho;function ho(e,t){if(e&&t)return ho(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var o=e.apply(this,n),s=n[n.length-1];return typeof o=="function"&&o!==s&&Object.keys(s).forEach(function(a){o[a]=s[a]}),o}}});var Kr=v((hc,$r)=>{var go=mo();$r.exports=go(Vt);$r.exports.strict=go(vo);Vt.proto=Vt(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Vt(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return vo(this)},configurable:!0})});function Vt(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function vo(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var Yr=v((pc,bo)=>{var Kf=Kr(),Yf=function(){},Jf=function(e){return e.setHeader&&typeof e.abort=="function"},Zf=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},yo=function(e,t,r){if(typeof t=="function")return yo(e,null,t);t||(t={}),r=Kf(r||Yf);var n=e._writableState,i=e._readableState,o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,a=!1,u=function(){e.writable||c()},c=function(){s=!1,o||r.call(e)},f=function(){o=!1,s||r.call(e)},l=function(y){r.call(e,y?new Error("exited with error code: "+y):null)},d=function(y){r.call(e,y)},h=function(){process.nextTick(w)},w=function(){if(!a){if(o&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(s&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},S=function(){e.req.on("finish",c)};return Jf(e)?(e.on("complete",c),e.on("abort",h),e.req?S():e.on("request",S)):s&&!n&&(e.on("end",u),e.on("close",u)),Zf(e)&&e.on("exit",l),e.on("end",f),e.on("finish",c),t.error!==!1&&e.on("error",d),e.on("close",h),function(){a=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",S),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",h)}};bo.exports=yo});var Eo=v((mc,Co)=>{var Ue=co(),wo=Yr(),zt=ce(),Xf=Buffer.alloc,So=ke().Readable,Ge=ke().Writable,Qf=require("string_decoder").StringDecoder,$t=zr(),el=parseInt("755",8),tl=parseInt("644",8),_o=Xf(1024),Jr=function(){},Zr=function(e,t){t&=511,t&&e.push(_o.slice(0,512-t))};function rl(e){switch(e&Ue.S_IFMT){case Ue.S_IFBLK:return"block-device";case Ue.S_IFCHR:return"character-device";case Ue.S_IFDIR:return"directory";case Ue.S_IFIFO:return"fifo";case Ue.S_IFLNK:return"symlink"}return"file"}var Kt=function(e){Ge.call(this),this.written=0,this._to=e,this._destroyed=!1};zt(Kt,Ge);Kt.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};Kt.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Yt=function(){Ge.call(this),this.linkname="",this._decoder=new Qf("utf-8"),this._destroyed=!1};zt(Yt,Ge);Yt.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};Yt.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var at=function(){Ge.call(this),this._destroyed=!1};zt(at,Ge);at.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};at.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var te=function(e){if(!(this instanceof te))return new te(e);So.call(this,e),this._drain=Jr,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};zt(te,So);te.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=Jr);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=rl(e.mode)),e.mode||(e.mode=e.type==="directory"?el:tl),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)){e.size=t.length,this._encode(e);var i=this.push(t);return Zr(n,e.size),i?process.nextTick(r):this._drain=r,new at}if(e.type==="symlink"&&!e.linkname){var o=new Yt;return wo(o,function(a){if(a)return n.destroy(),r(a);e.linkname=o.linkname,n._encode(e),r()}),o}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new at;var s=new Kt(this);return this._stream=s,wo(s,function(a){if(n._stream=null,a)return n.destroy(),r(a);if(s.written!==e.size)return n.destroy(),r(new Error("size mismatch"));Zr(n,e.size),n._finalizing&&n.finalize(),r()}),s}};te.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(_o),this.push(null))};te.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};te.prototype._encode=function(e){if(!e.pax){var t=$t.encode(e);if(t){this.push(t);return}}this._encodePax(e)};te.prototype._encodePax=function(e){var t=$t.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push($t.encode(r)),this.push(t),Zr(this,t.length),r.size=e.size,r.type=e.type,this.push($t.encode(r))};te.prototype._read=function(e){var t=this._drain;this._drain=Jr,t()};Co.exports=te});var To=v(Xr=>{Xr.extract=fo();Xr.pack=Eo()});var Po=v((vc,Ro)=>{var nl=Kr(),il=Yr(),Qr=require("fs"),ut=function(){},ol=/^v?\.0/.test(process.version),Jt=function(e){return typeof e=="function"},sl=function(e){return!ol||!Qr?!1:(e instanceof(Qr.ReadStream||ut)||e instanceof(Qr.WriteStream||ut))&&Jt(e.close)},al=function(e){return e.setHeader&&Jt(e.abort)},ul=function(e,t,r,n){n=nl(n);var i=!1;e.on("close",function(){i=!0}),il(e,{readable:t,writable:r},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,sl(e))return e.close(ut);if(al(e))return e.abort();if(Jt(e.destroy))return e.destroy();n(s||new Error("stream was destroyed"))}}},ko=function(e){e()},fl=function(e,t){return e.pipe(t)},ll=function(){var e=Array.prototype.slice.call(arguments),t=Jt(e[e.length-1]||ut)&&e.pop()||ut;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,o){var s=o<e.length-1,a=o>0;return ul(i,s,a,function(u){r||(r=u),u&&n.forEach(ko),!s&&(n.forEach(ko),t(r))})});return e.reduce(fl)};Ro.exports=ll});var Io=v((yc,xo)=>{var Zt=require("path"),Oo=require("fs"),Ao=parseInt("0777",8);xo.exports=We.mkdirp=We.mkdirP=We;function We(e,t,r,n){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var i=t.mode,o=t.fs||Oo;i===void 0&&(i=Ao&~process.umask()),n||(n=null);var s=r||function(){};e=Zt.resolve(e),o.mkdir(e,i,function(a){if(!a)return n=n||e,s(null,n);switch(a.code){case"ENOENT":We(Zt.dirname(e),t,function(u,c){u?s(u,c):We(e,t,s,c)});break;default:o.stat(e,function(u,c){u||!c.isDirectory()?s(a,n):s(null,n)});break}})}We.sync=function e(t,r,n){(!r||typeof r!="object")&&(r={mode:r});var i=r.mode,o=r.fs||Oo;i===void 0&&(i=Ao&~process.umask()),n||(n=null),t=Zt.resolve(t);try{o.mkdirSync(t,i),n=n||t}catch(a){switch(a.code){case"ENOENT":n=e(Zt.dirname(t),r,n),e(t,r,n);break;default:var s;try{s=o.statSync(t)}catch{throw a}if(!s.isDirectory())throw a;break}}return n}});var Bo=v(rn=>{var cl=Ki(),Lo=To(),qo=Po(),dl=Io(),No=require("fs"),U=require("path"),hl=require("os"),ft=hl.platform()==="win32",lt=function(){},en=function(e){return e},tn=ft?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:en,pl=function(e,t,r,n,i,o){var s=i||["."];return function(u){if(!s.length)return u();var c=s.shift(),f=U.join(r,c);t(f,function(l,d){if(l)return u(l);if(!d.isDirectory())return u(null,c,d);e.readdir(f,function(h,w){if(h)return u(h);o&&w.sort();for(var S=0;S<w.length;S++)n(U.join(r,c,w[S]))||s.push(U.join(c,w[S]));u(null,c,d)})})}},Do=function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var n=r.linkname;return n&&(r.type==="link"||U.isAbsolute(n))&&(r.linkname=n.split("/").slice(t).join("/")),e(r)}};rn.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||No,n=t.ignore||t.filter||lt,i=t.map||lt,o=t.mapStream||en,s=pl(r,t.dereference?r.stat:r.lstat,e,n,t.entries,t.sort),a=t.strict!==!1,u=typeof t.umask=="number"?~t.umask:~Mo(),c=typeof t.dmode=="number"?t.dmode:0,f=typeof t.fmode=="number"?t.fmode:0,l=t.pack||Lo.pack(),d=t.finish||lt;t.strip&&(i=Do(i,t.strip)),t.readable&&(c|=parseInt(555,8),f|=parseInt(444,8)),t.writable&&(c|=parseInt(333,8),f|=parseInt(222,8));var h=function(y,p){r.readlink(U.join(e,y),function(b,g){if(b)return l.destroy(b);p.linkname=tn(g),l.entry(p,S)})},w=function(y,p,b){if(y)return l.destroy(y);if(!p)return t.finalize!==!1&&l.finalize(),d(l);if(b.isSocket())return S();var g={name:tn(p),mode:(b.mode|(b.isDirectory()?c:f))&u,mtime:b.mtime,size:b.size,type:"file",uid:b.uid,gid:b.gid};if(b.isDirectory())return g.size=0,g.type="directory",g=i(g)||g,l.entry(g,S);if(b.isSymbolicLink())return g.size=0,g.type="symlink",g=i(g)||g,h(p,g);if(g=i(g)||g,!b.isFile())return a?l.destroy(new Error("unsupported type for "+p)):S();var k=l.entry(g,S);if(!!k){var $=o(r.createReadStream(U.join(e,p)),g);$.on("error",function(X){k.destroy(X)}),qo($,k)}},S=function(y){if(y)return l.destroy(y);s(w)};return S(),l};var ml=function(e){return e.length?e[e.length-1]:null},gl=function(){return process.getuid?process.getuid():-1},Mo=function(){return process.umask?process.umask():0};rn.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||No,n=t.ignore||t.filter||lt,i=t.map||lt,o=t.mapStream||en,s=t.chown!==!1&&!ft&&gl()===0,a=t.extract||Lo.extract(),u=[],c=new Date,f=typeof t.umask=="number"?~t.umask:~Mo(),l=typeof t.dmode=="number"?t.dmode:0,d=typeof t.fmode=="number"?t.fmode:0,h=t.strict!==!1;t.strip&&(i=Do(i,t.strip)),t.readable&&(l|=parseInt(555,8),d|=parseInt(444,8)),t.writable&&(l|=parseInt(333,8),d|=parseInt(222,8));var w=function(p,b){for(var g;(g=ml(u))&&p.slice(0,g[0].length)!==g[0];)u.pop();if(!g)return b();r.utimes(g[0],c,g[1],b)},S=function(p,b,g){if(t.utimes===!1)return g();if(b.type==="directory")return r.utimes(p,c,b.mtime,g);if(b.type==="symlink")return w(p,g);r.utimes(p,c,b.mtime,function(k){if(k)return g(k);w(p,g)})},y=function(p,b,g){var k=b.type==="symlink",$=k?r.lchmod:r.chmod,X=k?r.lchown:r.chown;if(!$)return g();var $e=(b.mode|(b.type==="directory"?l:d))&f;$(p,$e,function(fe){if(fe)return g(fe);if(!s||!X)return g();X(p,b.uid,b.gid,g)})};return a.on("entry",function(p,b,g){p=i(p)||p,p.name=tn(p.name);var k=U.join(e,U.join("/",p.name));if(n(k,p))return b.resume(),g();var $=function(W){if(W)return g(W);S(k,p,function(K){if(K)return g(K);if(ft)return g();y(k,p,g)})},X=function(){if(ft)return g();r.unlink(k,function(){r.symlink(p.linkname,k,$)})},$e=function(){if(ft)return g();r.unlink(k,function(){var W=U.join(e,U.join("/",p.linkname));r.link(W,k,function(K){if(K&&K.code==="EPERM"&&t.hardlinkAsFilesFallback)return b=r.createReadStream(W),fe();$(K)})})},fe=function(){var W=r.createWriteStream(k),K=o(b,p);W.on("error",function(we){K.destroy(we)}),qo(K,W,function(we){if(we)return g(we);W.on("close",$)})};if(p.type==="directory")return u.push([k,p.mtime]),jo(k,{fs:r,own:s,uid:p.uid,gid:p.gid},$);var Ke=U.dirname(k);Fo(r,Ke,U.join(e,"."),function(W,K){if(W)return g(W);if(!K)return g(new Error(Ke+" is not a valid path"));jo(Ke,{fs:r,own:s,uid:p.uid,gid:p.gid},function(we){if(we)return g(we);switch(p.type){case"file":return fe();case"link":return $e();case"symlink":return X()}if(h)return g(new Error("unsupported type for "+k+" ("+p.type+")"));b.resume(),g()})})}),t.finish&&a.on("finish",t.finish),a};function Fo(e,t,r,n){if(t===r)return n(null,!0);e.lstat(t,function(i,o){if(i&&i.code!=="ENOENT")return n(i);if(i||o.isDirectory())return Fo(e,U.join(t,".."),r,n);n(null,!1)})}function jo(e,t,r){dl(e,{fs:t.fs},function(n,i){!n&&i&&t.own?cl(i,t.uid,t.gid,r):r(n)})}});var j=v((wc,ct)=>{var Uo=[],vl=Uo.forEach,yl=Uo.slice;ct.exports.extend=function(e){return vl.call(yl.call(arguments,1),function(t){if(t)for(var r in t)e[r]=t[r]}),e};ct.exports.processArgs=function(e,t,r){return!t&&typeof e=="function"&&(t=e,e=null),{callback:t,opts:ct.exports.extend({},r,e)}};ct.exports.parseRepositoryTag=function(e){var t,r=e.indexOf("@"),n=e.lastIndexOf(":");if(r>=0)t=r;else if(n>=0)t=n;else return{repository:e};var i=e.slice(t+1);return i.indexOf("/")===-1?{repository:e.slice(0,t),tag:i}:{repository:e}}});var on=v((Sc,Go)=>{var nn=j(),dt=function(e,t){this.modem=e,this.id=t};dt.prototype[require("util").inspect.custom]=function(){return this};dt.prototype.start=function(e,t){var r=this,n=nn.processArgs(e,t),i={path:"/exec/"+this.id+"/start",method:"POST",abortSignal:n.opts.abortSignal,isStream:!0,allowEmpty:!0,hijack:n.opts.hijack,openStdin:n.opts.stdin,statusCodes:{200:!0,204:!0,404:"no such exec",409:"container stopped/paused",500:"container not running"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){if(o)return n.callback(o,s);n.callback(o,s)})};dt.prototype.resize=function(e,t){var r=this,n=nn.processArgs(e,t),i={path:"/exec/"+this.id+"/resize?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such exec",500:"container not running"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){if(o)return n.callback(o,s);n.callback(o,s)})};dt.prototype.inspect=function(e,t){var r=this,n=nn.processArgs(e,t),i={path:"/exec/"+this.id+"/json",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such exec",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){if(o)return t(o,s);n.callback(o,s)})};Go.exports=dt});var Vo=v((Cc,Ho)=>{var _c=j().extend,Wo=on(),R=j(),T=function(e,t){this.modem=e,this.id=t,this.defaultOptions={top:{},start:{},commit:{},stop:{},pause:{},unpause:{},restart:{},resize:{},attach:{},remove:{},copy:{},kill:{},exec:{},rename:{},log:{},stats:{},getArchive:{},infoArchive:{},putArchive:{},update:{},wait:{}}};T.prototype[require("util").inspect.custom]=function(){return this};T.prototype.inspect=function(e,t){var r=this,n=R.processArgs(e,t),i={path:"/containers/"+this.id+"/json?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such container",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.rename=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.rename),i={path:"/containers/"+this.id+"/rename?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.update=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.update),i={path:"/containers/"+this.id+"/update",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,400:"bad parameter",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.top=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.top),i={path:"/containers/"+this.id+"/top?",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.changes=function(e,t){var r=this,n=R.processArgs(e,t),i={path:"/containers/"+this.id+"/changes",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such container",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.listCheckpoint=function(e,t){var r=this,n=R.processArgs(e,t),i={path:"/containers/"+this.id+"/checkpoints?",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.deleteCheckpoint=function(e,t,r){var n=this,i=R.processArgs(t,r),o={path:"/containers/"+this.id+"/checkpoints/"+e+"?",method:"DELETE",abortSignal:i.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"no such container",500:"server error"},options:i.opts};if(i.callback===void 0)return new this.modem.Promise(function(s,a){n.modem.dial(o,function(u,c){if(u)return a(u);s(c)})});this.modem.dial(o,function(s,a){i.callback(s,a)})};T.prototype.createCheckpoint=function(e,t){var r=this,n=R.processArgs(e,t),i={path:"/containers/"+this.id+"/checkpoints",method:"POST",abortSignal:n.opts.abortSignal,allowEmpty:!0,statusCodes:{200:!0,204:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.export=function(e,t){var r=this,n=R.processArgs(e,t),i={path:"/containers/"+this.id+"/export",method:"GET",abortSignal:n.opts.abortSignal,isStream:!0,statusCodes:{200:!0,404:"no such container",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.start=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.start),i={path:"/containers/"+this.id+"/start?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,304:"container already started",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.pause=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.pause),i={path:"/containers/"+this.id+"/pause",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.unpause=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.unpause),i={path:"/containers/"+this.id+"/unpause",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.exec=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.exec),i={path:"/containers/"+this.id+"/exec",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,201:!0,404:"no such container",409:"container stopped/paused",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(new Wo(r.modem,u.Id))})});this.modem.dial(i,function(o,s){if(o)return n.callback(o,s);n.callback(o,new Wo(r.modem,s.Id))})};T.prototype.commit=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.commit);n.opts.container=this.id;var i={path:"/commit?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,201:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.stop=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.stop),i={path:"/containers/"+this.id+"/stop?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,304:"container already stopped",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.restart=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.restart),i={path:"/containers/"+this.id+"/restart?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.kill=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.kill),i={path:"/containers/"+this.id+"/kill?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.resize=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.resize),i={path:"/containers/"+this.id+"/resize?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.attach=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.attach),i={path:"/containers/"+this.id+"/attach?",method:"POST",abortSignal:n.opts.abortSignal,isStream:!0,hijack:n.opts.hijack,openStdin:n.opts.stdin,statusCodes:{200:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.wait=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.wait),i={path:"/containers/"+this.id+"/wait?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.remove=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.remove),i={path:"/containers/"+this.id+"?",method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,400:"bad parameter",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.copy=function(e,t){var r=this;console.log("container.copy is deprecated since Docker v1.8.x");var n=R.processArgs(e,t,this.defaultOptions.copy),i={path:"/containers/"+this.id+"/copy",method:"POST",abortSignal:n.opts.abortSignal,isStream:!0,statusCodes:{200:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.getArchive=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.getArchive),i={path:"/containers/"+this.id+"/archive?",method:"GET",abortSignal:n.opts.abortSignal,isStream:!0,statusCodes:{200:!0,400:"client error, bad parameters",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.infoArchive=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.infoArchive),i={path:"/containers/"+this.id+"/archive?",method:"HEAD",abortSignal:n.opts.abortSignal,isStream:!0,statusCodes:{200:!0,400:"client error, bad parameters",404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.putArchive=function(e,t,r){var n=this,i=R.processArgs(t,r,this.defaultOptions.putArchive),o={path:"/containers/"+this.id+"/archive?",method:"PUT",file:e,abortSignal:i.opts.abortSignal,isStream:!0,statusCodes:{200:!0,400:"client error, bad parameters",403:"client error, permission denied",404:"no such container",500:"server error"},options:i.opts};if(i.callback===void 0)return new this.modem.Promise(function(s,a){n.modem.dial(o,function(u,c){if(u)return a(u);s(c)})});this.modem.dial(o,function(s,a){i.callback(s,a)})};T.prototype.logs=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.log),i={path:"/containers/"+this.id+"/logs?",method:"GET",abortSignal:n.opts.abortSignal,isStream:n.opts.follow||!1,statusCodes:{200:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};T.prototype.stats=function(e,t){var r=this,n=R.processArgs(e,t,this.defaultOptions.stats),i=!0;n.opts.stream===!1&&(i=!1);var o={path:"/containers/"+this.id+"/stats?",method:"GET",abortSignal:n.opts.abortSignal,isStream:i,statusCodes:{200:!0,404:"no such container",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(s,a){r.modem.dial(o,function(u,c){if(u)return a(u);s(c)})});this.modem.dial(o,function(s,a){n.callback(s,a)})};Ho.exports=T});var $o=v((Ec,zo)=>{var sn=j(),ue=function(e,t){this.modem=e,this.name=t};ue.prototype[require("util").inspect.custom]=function(){return this};ue.prototype.inspect=function(e){var t=this,r={path:"/images/"+this.name+"/json",method:"GET",statusCodes:{200:!0,404:"no such image",500:"server error"}};if(e===void 0)return new this.modem.Promise(function(n,i){t.modem.dial(r,function(o,s){if(o)return i(o);n(s)})});this.modem.dial(r,function(n,i){if(n)return e(n,i);e(n,i)})};ue.prototype.distribution=function(e,t){var r=sn.processArgs(e,t),n=this,i={path:"/distribution/"+this.name+"/json",method:"GET",statusCodes:{200:!0,401:"no such image",500:"server error"},authconfig:r.opts?r.opts.authconfig:void 0};if(r.callback===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){if(o)return r.callback(o,s);r.callback(o,s)})};ue.prototype.history=function(e){var t=this,r={path:"/images/"+this.name+"/history",method:"GET",statusCodes:{200:!0,404:"no such image",500:"server error"}};if(e===void 0)return new this.modem.Promise(function(n,i){t.modem.dial(r,function(o,s){if(o)return i(o);n(s)})});this.modem.dial(r,function(n,i){if(n)return e(n,i);e(n,i)})};ue.prototype.get=function(e){var t=this,r={path:"/images/"+this.name+"/get",method:"GET",isStream:!0,statusCodes:{200:!0,500:"server error"}};if(e===void 0)return new this.modem.Promise(function(n,i){t.modem.dial(r,function(o,s){if(o)return i(o);n(s)})});this.modem.dial(r,function(n,i){if(n)return e(n,i);e(n,i)})};ue.prototype.push=function(e,t,r){var n=this,i=sn.processArgs(e,t),o=!0;i.opts.stream===!1&&(o=!1);var s={path:"/images/"+this.name+"/push?",method:"POST",options:i.opts,authconfig:i.opts.authconfig||r,abortSignal:i.opts.abortSignal,isStream:o,statusCodes:{200:!0,404:"no such image",500:"server error"}};if(delete s.options.authconfig,t===void 0)return new this.modem.Promise(function(a,u){n.modem.dial(s,function(c,f){if(c)return u(c);a(f)})});this.modem.dial(s,function(a,u){t(a,u)})};ue.prototype.tag=function(e,t){var r=this,n={path:"/images/"+this.name+"/tag?",method:"POST",options:e,abortSignal:e&&e.abortSignal,statusCodes:{200:!0,201:!0,400:"bad parameter",404:"no such image",409:"conflict",500:"server error"}};if(t===void 0)return new this.modem.Promise(function(i,o){r.modem.dial(n,function(s,a){if(s)return o(s);i(a)})});this.modem.dial(n,function(i,o){t(i,o)})};ue.prototype.remove=function(e,t){var r=this,n=sn.processArgs(e,t),i={path:"/images/"+this.name+"?",method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such image",409:"conflict",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};zo.exports=ue});var Jo=v((Tc,Yo)=>{var Ko=j(),Xt=function(e,t){this.modem=e,this.name=t};Xt.prototype[require("util").inspect.custom]=function(){return this};Xt.prototype.inspect=function(e,t){var r=this,n=Ko.processArgs(e,t),i={path:"/volumes/"+this.name,method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such volume",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Xt.prototype.remove=function(e,t){var r=this,n=Ko.processArgs(e,t),i={path:"/volumes/"+this.name,method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{204:!0,404:"no such volume",409:"conflict",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Yo.exports=Xt});var Xo=v((kc,Zo)=>{var Qt=j(),He=function(e,t){this.modem=e,this.id=t};He.prototype[require("util").inspect.custom]=function(){return this};He.prototype.inspect=function(i,t){var r=this,n=Qt.processArgs(i,t),i={path:"/networks/"+this.id+"?",method:"GET",statusCodes:{200:!0,404:"no such network",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};He.prototype.remove=function(e,t){var r=this,n=Qt.processArgs(e,t),i={path:"/networks/"+this.id,method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"no such network",409:"conflict",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};He.prototype.connect=function(e,t){var r=this,n=Qt.processArgs(e,t),i={path:"/networks/"+this.id+"/connect",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,201:!0,404:"network or container is not found",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};He.prototype.disconnect=function(e,t){var r=this,n=Qt.processArgs(e,t),i={path:"/networks/"+this.id+"/disconnect",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,201:!0,404:"network or container is not found",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Zo.exports=He});var es=v((Rc,Qo)=>{var an=j(),Ve=function(e,t){this.modem=e,this.id=t};Ve.prototype[require("util").inspect.custom]=function(){return this};Ve.prototype.inspect=function(e,t){var r=this,n=an.processArgs(e,t),i={path:"/services/"+this.id,method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such service",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Ve.prototype.remove=function(e,t){var r=this,n=an.processArgs(e,t),i={path:"/services/"+this.id,method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"no such service",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Ve.prototype.update=function(e,t,r){var n=this;if(!r){var i=typeof t;i==="function"?(r=t,t=e,e=t.authconfig||void 0):i==="undefined"&&(t=e,e=t.authconfig||void 0)}var o={path:"/services/"+this.id+"/update?",method:"POST",abortSignal:t&&t.abortSignal,statusCodes:{200:!0,404:"no such service",500:"server error"},authconfig:e,options:t};if(r===void 0)return new this.modem.Promise(function(s,a){n.modem.dial(o,function(u,c){if(u)return a(u);s(c)})});this.modem.dial(o,function(s,a){r(s,a)})};Ve.prototype.logs=function(e,t){var r=this,n=an.processArgs(e,t,{}),i={path:"/services/"+this.id+"/logs?",method:"GET",abortSignal:n.opts.abortSignal,isStream:n.opts.follow||!1,statusCodes:{200:!0,404:"no such service",500:"server error",503:"node is not part of a swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Qo.exports=Ve});var rs=v((Pc,ts)=>{var ye=j(),Z=function(e,t,r){this.modem=e,this.name=t,this.remote=r||t};Z.prototype[require("util").inspect.custom]=function(){return this};Z.prototype.inspect=function(e,t){var r=this,n=ye.processArgs(e,t),i={path:"/plugins/"+this.name,method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"plugin is not installed",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Z.prototype.remove=function(e,t){var r=this,n=ye.processArgs(e,t),i={path:"/plugins/"+this.name+"?",method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"plugin is not installed",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){if(o)return n.callback(o,s);n.callback(o,s)})};Z.prototype.privileges=function(e,t){var r=this,n=ye.processArgs(e,t),i={path:"/plugins/privileges?",method:"GET",options:{remote:this.remote},abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Z.prototype.pull=function(e,t){var r=this,n=ye.processArgs(e,t);n.opts._query&&!n.opts._query.name&&(n.opts._query.name=this.name),n.opts._query&&!n.opts._query.remote&&(n.opts._query.remote=this.remote);var i={path:"/plugins/pull?",method:"POST",abortSignal:n.opts.abortSignal,isStream:!0,options:n.opts,statusCodes:{200:!0,204:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Z.prototype.enable=function(e,t){var r=this,n=ye.processArgs(e,t),i={path:"/plugins/"+this.name+"/enable?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Z.prototype.disable=function(e,t){var r=this,n=ye.processArgs(e,t),i={path:"/plugins/"+this.name+"/disable",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Z.prototype.push=function(e,t){var r=this,n=ye.processArgs(e,t),i={path:"/plugins/"+this.name+"/push",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"plugin not installed",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Z.prototype.configure=function(e,t){var r=this,n=ye.processArgs(e,t),i={path:"/plugins/"+this.name+"/set",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"plugin not installed",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};Z.prototype.upgrade=function(e,t,r){var n=this;!r&&typeof t=="function"&&(r=t,t=e,e=t.authconfig||void 0);var i={path:"/plugins/"+this.name+"/upgrade?",method:"POST",abortSignal:t&&t.abortSignal,statusCodes:{200:!0,204:!0,404:"plugin not installed",500:"server error"},authconfig:e,options:t};if(r===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){r(o,s)})};ts.exports=Z});var os=v((Oc,is)=>{var ns=j(),ht=function(e,t){this.modem=e,this.id=t};ht.prototype[require("util").inspect.custom]=function(){return this};ht.prototype.inspect=function(e,t){var r=this,n=ns.processArgs(e,t),i={path:"/secrets/"+this.id,method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"secret not found",406:"node is not part of a swarm",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};ht.prototype.update=function(e,t){var r=this;!t&&typeof e=="function"&&(t=e);var n={path:"/secrets/"+this.id+"/update?",method:"POST",abortSignal:e&&e.abortSignal,statusCodes:{200:!0,404:"secret not found",500:"server error"},options:e};if(t===void 0)return new this.modem.Promise(function(i,o){r.modem.dial(n,function(s,a){if(s)return o(s);i(a)})});this.modem.dial(n,function(i,o){t(i,o)})};ht.prototype.remove=function(e,t){var r=this,n=ns.processArgs(e,t),i={path:"/secrets/"+this.id,method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,404:"secret not found",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};is.exports=ht});var as=v((Ac,ss)=>{var un=j(),pt=function(e,t){this.modem=e,this.id=t};pt.prototype[require("util").inspect.custom]=function(){return this};pt.prototype.inspect=function(e,t){var r=this,n=un.processArgs(e,t),i={path:"/configs/"+this.id,method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"config not found",500:"server error",503:"node is not part of a swarm"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};pt.prototype.update=function(e,t){var r=this,n=un.processArgs(e,t),i={path:"/configs/"+this.id+"/update?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"config not found",500:"server error",503:"node is not part of a swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};pt.prototype.remove=function(e,t){var r=this,n=un.processArgs(e,t),i={path:"/configs/"+this.id,method:"DELETE",abortSignal:e.abortSignal,statusCodes:{200:!0,204:!0,404:"config not found",500:"server error",503:"node is not part of a swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};ss.exports=pt});var ls=v((xc,fs)=>{var us=j(),er=function(e,t){this.modem=e,this.id=t,this.defaultOptions={log:{}}};er.prototype[require("util").inspect.custom]=function(){return this};er.prototype.inspect=function(e,t){var r=this,n=us.processArgs(e,t),i={path:"/tasks/"+this.id,method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"unknown task",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};er.prototype.logs=function(e,t){var r=this,n=us.processArgs(e,t,this.defaultOptions.log),i={path:"/tasks/"+this.id+"/logs?",method:"GET",abortSignal:n.opts.abortSignal,isStream:n.opts.follow||!1,statusCodes:{101:!0,200:!0,404:"no such container",500:"server error",503:"node is not part of a swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};fs.exports=er});var hs=v((Ic,ds)=>{var cs=j(),mt=function(e,t){this.modem=e,this.id=t};mt.prototype[require("util").inspect.custom]=function(){return this};mt.prototype.inspect=function(e,t){var r=this,n=cs.processArgs(e,t),i={path:"/nodes/"+this.id,method:"GET",abortSignal:n.abortSignal,statusCodes:{200:!0,404:"no such node",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};mt.prototype.update=function(e,t){var r=this;!t&&typeof e=="function"&&(t=e);var n={path:"/nodes/"+this.id+"/update?",method:"POST",abortSignal:e&&e.abortSignal,statusCodes:{200:!0,404:"no such node",406:"node is not part of a swarm",500:"server error"},options:e};if(t===void 0)return new this.modem.Promise(function(i,o){r.modem.dial(n,function(s,a){if(s)return o(s);i(a)})});this.modem.dial(n,function(i,o){t(i,o)})};mt.prototype.remove=function(e,t){var r=this,n=cs.processArgs(e,t),i={path:"/nodes/"+this.id+"?",method:"DELETE",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,404:"no such node",500:"server error"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};ds.exports=mt});var fn=v((Lc,Ts)=>{var bl=require("events").EventEmitter,wl=Ui(),Sl=Bo(),_l=require("zlib"),ps=Vo(),ms=$o(),gs=Jo(),vs=Xo(),ys=es(),bs=rs(),ws=os(),Cl=as(),Ss=ls(),_s=hs(),Cs=on(),C=j(),Es=C.extend,m=function(e){if(!(this instanceof m))return new m(e);var t=global.Promise;e&&e.Promise&&(t=e.Promise,Object.keys(e).length===1&&(e=void 0)),this.modem=new wl(e),this.modem.Promise=t};m.prototype.createContainer=function(e,t){var r=this,n={path:"/containers/create?",method:"POST",options:e,authconfig:e.authconfig,abortSignal:e.abortSignal,statusCodes:{200:!0,201:!0,404:"no such container",406:"impossible to attach",500:"server error"}};if(delete e.authconfig,t===void 0)return new this.modem.Promise(function(i,o){r.modem.dial(n,function(s,a){if(s)return o(s);i(r.getContainer(a.Id))})});this.modem.dial(n,function(i,o){if(i)return t(i,o);t(i,r.getContainer(o.Id))})};m.prototype.createImage=function(e,t,r){var n=this;!r&&typeof t=="function"?(r=t,t=e,e=t.authconfig||void 0):!r&&!t&&(t=e,e=t.authconfig);var i={path:"/images/create?",method:"POST",options:t,authconfig:e,abortSignal:t.abortSignal,isStream:!0,statusCodes:{200:!0,500:"server error"}};if(r===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){r(o,s)})};m.prototype.loadImage=function(e,t,r){var n=this;!r&&typeof t=="function"&&(r=t,t=null);var i={path:"/images/load?",method:"POST",options:t,file:e,abortSignal:t&&t.abortSignal,isStream:!0,statusCodes:{200:!0,500:"server error"}};if(r===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){r(o,s)})};m.prototype.importImage=function(e,t,r){var n=this;!r&&typeof t=="function"&&(r=t,t=void 0),t||(t={}),t.fromSrc="-";var i={path:"/images/create?",method:"POST",options:t,file:e,abortSignal:t.abortSignal,isStream:!0,statusCodes:{200:!0,500:"server error"}};if(r===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){r(o,s)})};m.prototype.checkAuth=function(e,t){var r=this,n={path:"/auth",method:"POST",options:e,abortSignal:e.abortSignal,statusCodes:{200:!0,204:!0,500:"server error"}};if(t===void 0)return new this.modem.Promise(function(i,o){r.modem.dial(n,function(s,a){if(s)return o(s);i(a)})});this.modem.dial(n,function(i,o){t(i,o)})};m.prototype.buildImage=function(e,t,r){var n=this;!r&&typeof t=="function"&&(r=t,t=null);function i(s){var a={path:"/build?",method:"POST",file:s,options:t,abortSignal:t&&t.abortSignal,isStream:!0,statusCodes:{200:!0,500:"server error"}};if(t&&(t.registryconfig&&(a.registryconfig=a.options.registryconfig,delete a.options.registryconfig),t.authconfig&&(a.authconfig=a.options.authconfig,delete a.options.authconfig)),r===void 0)return new n.modem.Promise(function(u,c){n.modem.dial(a,function(f,l){if(f)return c(f);u(l)})});n.modem.dial(a,function(u,c){r(u,c)})}if(e&&e.context){var o=Sl.pack(e.context,{entries:e.src});return i(o.pipe(_l.createGzip()))}else return i(e)};m.prototype.getContainer=function(e){return new ps(this.modem,e)};m.prototype.getImage=function(e){return new ms(this.modem,e)};m.prototype.getVolume=function(e){return new gs(this.modem,e)};m.prototype.getPlugin=function(e,t){return new bs(this.modem,e,t)};m.prototype.getService=function(e){return new ys(this.modem,e)};m.prototype.getTask=function(e){return new Ss(this.modem,e)};m.prototype.getNode=function(e){return new _s(this.modem,e)};m.prototype.getNetwork=function(e){return new vs(this.modem,e)};m.prototype.getSecret=function(e){return new ws(this.modem,e)};m.prototype.getConfig=function(e){return new Cl(this.modem,e)};m.prototype.getExec=function(e){return new Cs(this.modem,e)};m.prototype.listContainers=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/containers/json?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.listImages=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/images/json?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.getImages=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/images/get?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,isStream:!0,statusCodes:{200:!0,400:"bad parameter",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.listServices=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/services?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.listNodes=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/nodes?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",404:"no such node",500:"server error",503:"node is not part of a swarm"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.listTasks=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/tasks?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.createSecret=function(e,t){var r=C.processArgs(e,t),n=this,i={path:"/secrets/create?",method:"POST",options:r.opts,abortSignal:r.opts.abortSignal,statusCodes:{200:!0,201:!0,406:"server error or node is not part of a swarm",409:"name conflicts with an existing object",500:"server error"}};if(r.callback===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(n.getSecret(u.ID))})});this.modem.dial(i,function(o,s){if(o)return r.callback(o,s);r.callback(o,n.getSecret(s.ID))})};m.prototype.createConfig=function(e,t){var r=C.processArgs(e,t),n=this,i={path:"/configs/create?",method:"POST",options:r.opts,abortSignal:r.opts.abortSignal,statusCodes:{200:!0,201:!0,406:"server error or node is not part of a swarm",409:"name conflicts with an existing object",500:"server error"}};if(r.callback===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(n.getConfig(u.ID))})});this.modem.dial(i,function(o,s){if(o)return r.callback(o,s);r.callback(o,n.getConfig(s.ID))})};m.prototype.listSecrets=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/secrets?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.listConfigs=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/configs?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.createPlugin=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/plugins/create?",method:"POST",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,204:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(r.getPlugin(n.opts.name))})});this.modem.dial(i,function(o,s){if(o)return n.callback(o,s);n.callback(o,r.getPlugin(n.opts.name))})};m.prototype.listPlugins=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/plugins?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.pruneImages=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/images/prune?",method:"POST",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.pruneBuilder=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/build/prune",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.pruneContainers=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/containers/prune?",method:"POST",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.pruneVolumes=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/volumes/prune?",method:"POST",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.pruneNetworks=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/networks/prune?",method:"POST",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.createVolume=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/volumes/create?",method:"POST",allowEmpty:!0,options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,201:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(r.getVolume(u.Name))})});this.modem.dial(i,function(o,s){if(o)return n.callback(o,s);n.callback(o,r.getVolume(s.Name))})};m.prototype.createService=function(e,t,r){!r&&typeof t=="function"?(r=t,t=e,e=t.authconfig||void 0):!t&&!r&&(t=e);var n=this,i={path:"/services/create",method:"POST",options:t,authconfig:e,abortSignal:t&&t.abortSignal,statusCodes:{200:!0,201:!0,500:"server error"}};if(r===void 0)return new this.modem.Promise(function(o,s){n.modem.dial(i,function(a,u){if(a)return s(a);o(n.getService(u.ID||u.Id))})});this.modem.dial(i,function(o,s){if(o)return r(o,s);r(o,n.getService(s.ID||s.Id))})};m.prototype.listVolumes=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/volumes?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.createNetwork=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/networks/create?",method:"POST",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,201:!0,404:"driver not found",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(r.getNetwork(u.Id))})});this.modem.dial(i,function(o,s){if(o)return n.callback(o,s);n.callback(o,r.getNetwork(s.Id))})};m.prototype.listNetworks=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/networks?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.searchImages=function(e,t){var r=this,n={path:"/images/search?",method:"GET",options:e,authconfig:e.authconfig,abortSignal:e.abortSignal,statusCodes:{200:!0,500:"server error"}};if(t===void 0)return new this.modem.Promise(function(i,o){r.modem.dial(n,function(s,a){if(s)return o(s);i(a)})});this.modem.dial(n,function(i,o){t(i,o)})};m.prototype.info=function(i,t){var r=this,n=C.processArgs(i,t),i={path:"/info",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.version=function(i,t){var r=this,n=C.processArgs(i,t),i={path:"/version",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.ping=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/_ping",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.df=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/system/df",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.getEvents=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/events?",method:"GET",options:n.opts,abortSignal:n.opts.abortSignal,isStream:!0,statusCodes:{200:!0,500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.pull=function(e,t,r,n){var i=C.processArgs(t,r),o=C.parseRepositoryTag(e);i.opts.fromImage=o.repository,i.opts.tag=o.tag||"latest";var s=[i.opts,i.callback];return n&&(s=[n,i.opts,i.callback]),this.createImage.apply(this,s)};m.prototype.run=function(e,t,r,n,i,o){return typeof arguments[arguments.length-1]=="function"?this.runCallback(e,t,r,n,i,o):this.runPromise(e,t,r,n,i)};m.prototype.runCallback=function(e,t,r,n,i,o){!o&&typeof n=="function"?(o=n,n={},i={}):!o&&typeof i=="function"&&(o=i,i={});var s=new bl;function a(c,f){if(c)return o(c,null,f);s.emit("container",f),f.attach({stream:!0,stdout:!0,stderr:!0},function(d,h){if(d)return o(d,null,f);s.emit("stream",h),r&&(r instanceof Array?(h.on("end",function(){try{r[0].end()}catch{}try{r[1].end()}catch{}}),f.modem.demuxStream(h,r[0],r[1])):(h.setEncoding("utf8"),h.pipe(r,{end:!0}))),f.start(i,function(w,S){if(w)return o(w,S,f);s.emit("start",f),f.wait(function(y,p){s.emit("data",p),o(y,p,f)})})})}var u={Hostname:"",User:"",AttachStdin:!1,AttachStdout:!0,AttachStderr:!0,Tty:!0,OpenStdin:!1,StdinOnce:!1,Env:null,Cmd:t,Image:e,Volumes:{},VolumesFrom:[]};return Es(u,n),this.createContainer(u,a),s};m.prototype.runPromise=function(e,t,r,n,i){var o=this;n=n||{},i=i||{};var s={Hostname:"",User:"",AttachStdin:!1,AttachStdout:!0,AttachStderr:!0,Tty:!0,OpenStdin:!1,StdinOnce:!1,Env:null,Cmd:t,Image:e,Volumes:{},VolumesFrom:[]};Es(s,n);var a;return new this.modem.Promise(function(u,c){o.createContainer(s).then(function(f){return a=f,f.attach({stream:!0,stdout:!0,stderr:!0})}).then(function(f){return r&&(r instanceof Array?(f.on("end",function(){try{r[0].end()}catch{}try{r[1].end()}catch{}}),a.modem.demuxStream(f,r[0],r[1])):(f.setEncoding("utf8"),f.pipe(r,{end:!0}))),a.start(i)}).then(function(f){return a.wait()}).then(function(f){u([f,a])}).catch(function(f){c(f)})})};m.prototype.swarmInit=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/swarm/init",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",406:"node is already part of a Swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.swarmJoin=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/swarm/join",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",406:"node is already part of a Swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.swarmLeave=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/swarm/leave?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,406:"node is not part of a Swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.swarmUpdate=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/swarm/update?",method:"POST",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,400:"bad parameter",406:"node is already part of a Swarm"},options:n.opts};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.prototype.swarmInspect=function(e,t){var r=this,n=C.processArgs(e,t),i={path:"/swarm",method:"GET",abortSignal:n.opts.abortSignal,statusCodes:{200:!0,406:"This node is not a swarm manager",500:"server error"}};if(n.callback===void 0)return new this.modem.Promise(function(o,s){r.modem.dial(i,function(a,u){if(a)return s(a);o(u)})});this.modem.dial(i,function(o,s){n.callback(o,s)})};m.Container=ps;m.Image=ms;m.Volume=gs;m.Network=vs;m.Service=ys;m.Plugin=bs;m.Secret=ws;m.Task=Ss;m.Node=_s;m.Exec=Cs;Ts.exports=m});var Ol={};Bs(Ol,{default:()=>qs});var Is=mn(fn()),F=require("@raycast/api"),Ls=require("react");var As=mn(fn()),x=require("@raycast/api"),xs=require("react");var M=require("@raycast/api");var ks=e=>e.map(([t,r])=>`**${t}:** ${r}`).join(`
`),Rs=e=>"```\n"+e+"\n```";var re=e=>e.State==="running",N=({Names:e,Name:t})=>e!==void 0?e.map(r=>r.replace(/^\//,"")).join(", "):t!==void 0?t.replace(/^\//,""):"-",Ps=e=>e!==void 0?`## ${N(e)}
`+ks([["Image",e.Config.Image],["Status",e.State.Status],["Command","`"+e.Config.Cmd?.join(" ")+"`"]])+Tl(e.Config.Env)+`
`:"",Tl=e=>e.length===0?"":[`
## Environment`,Rs(e.join(`
`))].join(`
`);var ln=e=>e.errno===-61&&e.code==="ECONNREFUSED",ne=(e,t)=>e.message.includes("container already stopped")?`Container ${N(t)} already stopped`:e.message.includes("container already started")?`Container ${N(t)} already started`:e.message.includes("cannot remove a running container")?["Cannot remove running container",`Please stop ${N(t)} first`]:e.message;var ze=require("@raycast/api"),G=({action:e,onSuccess:t,onFailure:r})=>async()=>{try{await e(),t!==void 0&&await(0,ze.showToast)(ze.ToastStyle.Success,...Os(t()))}catch(n){n instanceof Error&&r!==void 0&&await(0,ze.showToast)(ze.ToastStyle.Failure,...Os(r(n)))}},Os=e=>Array.isArray(e)?e:[e];function cn({docker:e,containerId:t}){let{isLoading:r,containerInfo:n,startContainer:i,restartContainer:o,stopContainer:s,removeContainer:a}=e.useContainerInfo(t),{pop:u}=(0,M.useNavigation)();return _jsx(M.Detail,{isLoading:r,markdown:Ps(n),actions:_jsx(M.ActionPanel,null,n?.State.Running===!0&&_jsx(M.ActionPanel.Item,{title:"Stop Container",shortcut:{modifiers:["cmd","shift"],key:"w"},onAction:G({action:()=>s(n),onSuccess:()=>`Container ${N(n)} stopped`,onFailure:c=>ne(c,n)})}),n?.State.Running===!0&&_jsx(M.ActionPanel.Item,{title:"Restart Container",icon:M.Icon.ArrowClockwise,shortcut:{modifiers:["opt"],key:"r"},onAction:G({action:()=>o(n),onSuccess:()=>`Container ${N(n)} restarted`,onFailure:c=>ne(c,n)})}),n?.State.Running===!1&&_jsx(M.ActionPanel.Item,{title:"Start Container",shortcut:{modifiers:["cmd","shift"],key:"r"},onAction:G({action:()=>i(n),onSuccess:()=>`Container ${N(n)} started`,onFailure:c=>ne(c,n)})}),n!==void 0&&_jsx(M.ActionPanel.Item,{title:"Remove Container",icon:{source:M.Icon.Trash,tintColor:M.Color.Red},shortcut:{modifiers:["cmd","shift"],key:"x"},onAction:G({action:async()=>{await a(n),u()},onSuccess:()=>`Container ${N(n)} removed`,onFailure:c=>ne(c,n)})}))})}var O=require("react");var tr=e=>e.reduce((t,r)=>{let n=r.Labels["com.docker.compose.project"],i=r.Labels["com.docker.compose.config_files"],o=r.Labels["com.docker.compose.working_dir"];if(n===void 0)return t;let s=t.find(({name:a})=>a===n);return s!==void 0?(s.containers=[...s.containers,r],t):[...t,{name:n,configFiles:i,workingDir:o,containers:[r]}]},[]);var gt=1e3,rr=e=>{let t=({Id:f})=>e.getContainer(f).stop(),r=({Id:f})=>e.getContainer(f).start(),n=({Id:f})=>e.getContainer(f).restart(),i=({Id:f})=>e.getContainer(f).remove();return{useImages:()=>{let[f,l]=(0,O.useState)(),[d,h]=(0,O.useState)(!1),[w,S]=(0,O.useState)(),y=(0,O.useRef)();return(0,O.useEffect)(()=>{async function p(){try{let b=await e.listImages();l(b)}catch(b){b instanceof Error&&S(b)}}return D(h,p)(),y.current=setInterval(p,gt),()=>y.current&&clearInterval(y.current)},[]),{images:f,error:w,isLoading:d,removeImage:D(h,({Id:p})=>e.getImage(p).remove())}},useImageInfo:({Id:f})=>{let[l,d]=(0,O.useState)(),[h,w]=(0,O.useState)(!1),S=(0,O.useRef)();return(0,O.useEffect)(()=>{async function y(){let p=await e.getImage(f).inspect();d(p)}return D(w,y)(),S.current=setInterval(y,gt),()=>S.current&&clearInterval(S.current)},[f]),{imageInfo:l,isLoading:h}},useContainers:()=>{let[f,l]=(0,O.useState)(),[d,h]=(0,O.useState)(!1),[w,S]=(0,O.useState)(),y=(0,O.useRef)();return(0,O.useEffect)(()=>{async function p(){try{let b=await e.listContainers({all:!0});l(b)}catch(b){b instanceof Error&&S(b)}}return D(h,p)(),y.current=setInterval(p,gt),()=>y.current&&clearInterval(y.current)},[]),{containers:f,isLoading:d,error:w,startContainer:D(h,r),stopContainer:D(h,t),restartContainer:D(h,n),removeContainer:D(h,i)}},useContainerInfo:f=>{let[l,d]=(0,O.useState)(),[h,w]=(0,O.useState)(!1),S=(0,O.useRef)();return(0,O.useEffect)(()=>{async function y(){let p=await e.getContainer(f).inspect();d(p)}return D(w,y)(),S.current=setInterval(y,gt),()=>S.current&&clearInterval(S.current)},[f]),{containerInfo:l,isLoading:h,startContainer:D(w,r),restartContainer:D(w,n),stopContainer:D(w,t),removeContainer:D(w,i)}},useProjects:()=>{let[f,l]=(0,O.useState)(),[d,h]=(0,O.useState)(!1),[w,S]=(0,O.useState)(),y=(0,O.useRef)();return(0,O.useEffect)(()=>{async function p(){try{let b=await e.listContainers({all:!0});l(tr(b))}catch(b){b instanceof Error&&S(b)}}return D(h,p)(),y.current=setInterval(p,gt),()=>y.current&&clearInterval(y.current)},[]),{projects:f,isLoading:d,error:w,startProject:D(h,async p=>{await Promise.all(p.containers.filter(g=>!re(g)).map(g=>e.getContainer(g.Id).start()));let b=await e.listContainers({all:!0});l(tr(b))}),stopProject:D(h,async p=>{await Promise.all(p.containers.filter(g=>re(g)).map(g=>e.getContainer(g.Id).stop()));let b=await e.listContainers({all:!0});l(tr(b))})}}}};function D(e,t){return async r=>{e(!0);try{let n=await t(r);return e(!1),n}finally{e(!1)}}}var be=require("@raycast/api"),nr=require("react");function vt({error:e}){let[t,r]=(0,nr.useState)([]);(0,nr.useEffect)(()=>{async function i(){let o=await(0,be.getApplications)();r(o)}i()},[]);let n=t.find(({bundleId:i})=>i==="com.docker.docker");return _jsx(be.Detail,{markdown:kl(e),actions:ln(e)&&n!==void 0?_jsx(be.ActionPanel,null,_jsx(be.OpenAction,{title:"Launch Docker",target:n.path})):null})}var kl=e=>{let t="Error message:\n\n```\n"+e.message+"\n```";return ln(e)?["## \u26A0\uFE0F Error connecting to Docker",t].join(`
`):`## An Error Occurred:
${t}`};function dn(e){let t=(0,xs.useMemo)(()=>new As.default,[]),r=rr(t),{useContainers:n}=r,{containers:i,isLoading:o,error:s,startContainer:a,restartContainer:u,stopContainer:c,removeContainer:f}=n();return s?_jsx(vt,{error:s}):_jsx(x.List,{isLoading:o},Rl(i,e.projectFilter)?.map(l=>_jsx(x.List.Item,{key:l.Id,title:N(l),subtitle:l.Image,accessoryTitle:l.State,icon:re(l)?{source:"icon-container-running.png",tintColor:x.Color.Green}:{source:"icon-container.png",tintColor:x.Color.SecondaryText},actions:_jsx(x.ActionPanel,null,re(l)&&_jsx(x.ActionPanel.Item,{title:"Stop Container",shortcut:{modifiers:["cmd","shift"],key:"w"},icon:{source:"icon-stop.png",tintColor:x.Color.PrimaryText},onAction:G({action:()=>c(l),onSuccess:()=>`Container ${N(l)} stopped`,onFailure:d=>ne(d,l)})}),re(l)&&_jsx(x.ActionPanel.Item,{title:"Restart Container",icon:x.Icon.ArrowClockwise,shortcut:{modifiers:["opt"],key:"r"},onAction:G({action:()=>u(l),onSuccess:()=>`Container ${N(l)} restarted`,onFailure:d=>ne(d,l)})}),!re(l)&&_jsx(x.ActionPanel.Item,{title:"Start Container",shortcut:{modifiers:["cmd","shift"],key:"r"},icon:{source:"icon-start.png",tintColor:x.Color.PrimaryText},onAction:G({action:()=>a(l),onSuccess:()=>`Container ${N(l)} started`,onFailure:d=>ne(d,l)})}),_jsx(x.PushAction,{title:"Inspect",icon:{source:x.Icon.Binoculars},shortcut:{modifiers:["cmd"],key:"i"},target:_jsx(cn,{docker:r,containerId:l.Id})}),_jsx(x.ActionPanel.Item,{title:"Remove Container",icon:{source:x.Icon.Trash,tintColor:x.Color.Red},shortcut:{modifiers:["cmd","shift"],key:"x"},onAction:G({action:()=>f(l),onSuccess:()=>`Container ${N(l)} removed`,onFailure:d=>ne(d,l)})}))})))}var Rl=(e,t)=>t===void 0||e===void 0?e:e.filter(r=>r.Labels["com.docker.compose.project"]===t);function qs(){let e=(0,Ls.useMemo)(()=>new Is.default,[]),{useProjects:t}=rr(e),{projects:r,isLoading:n,error:i,startProject:o,stopProject:s}=t();return i?_jsx(vt,{error:i}):_jsx(F.List,{isLoading:n},r?.map(a=>_jsx(F.List.Item,{key:a.name,icon:{source:"icon-compose.png",tintColor:F.Color.SecondaryText},title:a.name,subtitle:Pl(a),actions:_jsx(F.ActionPanel,null,_jsx(F.PushAction,{title:"Show Containers",icon:{source:F.Icon.Binoculars},target:_jsx(dn,{projectFilter:a.name})}),_jsx(F.ActionPanel.Item,{title:"Start All Containers",shortcut:{modifiers:["cmd","shift"],key:"r"},icon:{source:"icon-startall.png",tintColor:F.Color.PrimaryText},onAction:G({action:()=>o(a),onSuccess:()=>`Started ${a.name}`,onFailure:({message:u})=>u})}),_jsx(F.ActionPanel.Item,{title:"Stop All Containers",shortcut:{modifiers:["cmd","shift"],key:"w"},icon:{source:"icon-stopall.png",tintColor:F.Color.PrimaryText},onAction:G({action:()=>s(a),onSuccess:()=>`Stopped ${a.name}`,onFailure:({message:u})=>u})}))})))}var Pl=({containers:e})=>{let t=e.reduce((n,i)=>n+=re(i)?1:0,0),r=e.length-t;return`${t} Running, ${r} Stopped`};module.exports=Us(Ol);0&&(module.exports={});
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */